+++ /dev/null
---- exif.c 2006/10/10 22:22:43 1.173.2.5.2.4
-+++ exif.c 2007/01/09 17:55:29 1.173.2.5.2.10
-@@ -2,7 +2,7 @@
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
-- | Copyright (c) 1997-2006 The PHP Group |
-+ | Copyright (c) 1997-2007 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
-@@ -17,7 +17,7 @@
- +----------------------------------------------------------------------+
- */
-
--/* $Id$ */
-+/* $Id$ */
-
- /* ToDos
- *
-@@ -139,7 +139,7 @@
- };
- /* }}} */
-
--#define EXIF_VERSION "1.4 $Id$"
-+#define EXIF_VERSION "1.4 $Id$"
-
- /* {{{ PHP_MINFO_FUNCTION
- */
-@@ -1150,6 +1150,80 @@
- }
- /* }}} */
-
-+#ifdef EXIF_DEBUG
-+char * exif_dump_data(int *dump_free, int format, int components, int length, int motorola_intel, char *value_ptr TSRMLS_DC) /* {{{ */
-+{
-+ char *dump;
-+ int len;
-+
-+ *dump_free = 0;
-+ if (format == TAG_FMT_STRING) {
-+ return value_ptr ? value_ptr : "<no data>";
-+ }
-+ if (format == TAG_FMT_UNDEFINED) {
-+ return "<undefined>\n";
-+ }
-+ if (format == TAG_FMT_IFD) {
-+ return "";
-+ }
-+ if (format == TAG_FMT_SINGLE || format == TAG_FMT_DOUBLE) {
-+ return "<not implemented>";
-+ }
-+ *dump_free = 1;
-+ if (components > 1) {
-+ len = spprintf(&dump, 0, "(%d,%d) {", components, length);
-+ } else {
-+ len = spprintf(&dump, 0, "{");
-+ }
-+ while(components > 0) {
-+ switch(format) {
-+ case TAG_FMT_BYTE:
-+ case TAG_FMT_UNDEFINED:
-+ case TAG_FMT_STRING:
-+ case TAG_FMT_SBYTE:
-+ dump = erealloc(dump, len + 4);
-+ sprintf(dump + len, "0x%02X", *value_ptr);
-+ len += 4;
-+ value_ptr++;
-+ break;
-+ case TAG_FMT_USHORT:
-+ case TAG_FMT_SSHORT:
-+ dump = erealloc(dump, len + 6);
-+ sprintf(dump + len, "0x%04X", php_ifd_get16s(value_ptr, motorola_intel));
-+ len += 6;
-+ value_ptr += 2;
-+ break;
-+ case TAG_FMT_ULONG:
-+ case TAG_FMT_SLONG:
-+ dump = erealloc(dump, len + 6);
-+ sprintf(dump + len, "0x%04X", php_ifd_get32s(value_ptr, motorola_intel));
-+ len += 6;
-+ value_ptr += 4;
-+ break;
-+ case TAG_FMT_URATIONAL:
-+ case TAG_FMT_SRATIONAL:
-+ dump = erealloc(dump, len + 13);
-+ sprintf(dump + len, "0x%04X/0x%04X", php_ifd_get32s(value_ptr, motorola_intel), php_ifd_get32s(value_ptr+4, motorola_intel));
-+ len += 13;
-+ value_ptr += 8;
-+ break;
-+ }
-+ if (components > 0) {
-+ dump = erealloc(dump, len + 2);
-+ sprintf(dump + len, ", ");
-+ len += 2;
-+ components--;
-+ } else{
-+ break;
-+ }
-+ }
-+ dump = erealloc(dump, len + 2);
-+ sprintf(dump + len, "}");
-+ return dump;
-+}
-+/* }}} */
-+#endif
-+
- /* {{{ exif_convert_any_format
- * Evaluate number, be it int, rational, or float from directory. */
- static double exif_convert_any_format(void *value, int format, int motorola_intel TSRMLS_DC)
-@@ -1599,6 +1673,7 @@
- image_info->info_list[section_index].list = list;
-
- info_data = &image_info->info_list[section_index].list[image_info->info_list[section_index].count];
-+ memset(info_data, 0, sizeof(image_info_data));
- info_data->tag = tag;
- info_data->format = format;
- info_data->length = length;
-@@ -2746,10 +2821,14 @@
- char *value_ptr, tagname[64], cbuf[32], *outside=NULL;
- size_t byte_count, offset_val, fpos, fgot;
- xp_field_type *tmp_xp;
-+#ifdef EXIF_DEBUG
-+ char *dump_data;
-+ int dump_free;
-+#endif /* EXIF_DEBUG */
-
- /* Protect against corrupt headers */
- if (ImageInfo->ifd_nesting_level > MAX_IFD_NESTING_LEVEL) {
-- exif_error_docref("exif_read_data#error_ifd" TSRMLS_CC, ImageInfo, E_WARNING, "corrupt EXIF header: maximum directory nesting level reached");
-+ exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "corrupt EXIF header: maximum directory nesting level reached");
- return FALSE;
- }
- ImageInfo->ifd_nesting_level++;
-@@ -2834,7 +2913,11 @@
-
- ImageInfo->sections_found |= FOUND_ANY_TAG;
- #ifdef EXIF_DEBUG
-- exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Process tag(x%04X=%s,@x%04X + x%04X(=%d)): %s%s", tag, exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), offset_val+displacement, byte_count, byte_count, (components>1)&&format!=TAG_FMT_UNDEFINED&&format!=TAG_FMT_STRING?"ARRAY OF ":"", format==TAG_FMT_STRING?(value_ptr?value_ptr:"<no data>"):exif_get_tagformat(format));
-+ dump_data = exif_dump_data(&dump_free, format, components, length, ImageInfo->motorola_intel, value_ptr TSRMLS_CC);
-+ exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Process tag(x%04X=%s,@x%04X + x%04X(=%d)): %s%s %s", tag, exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), offset_val+displacement, byte_count, byte_count, (components>1)&&format!=TAG_FMT_UNDEFINED&&format!=TAG_FMT_STRING?"ARRAY OF ":"", exif_get_tagformat(format), dump_data);
-+ if (dump_free) {
-+ efree(dump_data);
-+ }
- #endif
- if (section_index==SECTION_THUMBNAIL) {
- if (!ImageInfo->Thumbnail.data) {
-@@ -3023,7 +3106,9 @@
- exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD Pointer");
- return FALSE;
- }
-- exif_process_IFD_in_JPEG(ImageInfo, Subdir_start, offset_base, IFDlength, displacement, sub_section_index TSRMLS_CC);
-+ if (!exif_process_IFD_in_JPEG(ImageInfo, Subdir_start, offset_base, IFDlength, displacement, sub_section_index TSRMLS_CC)) {
-+ return FALSE;
-+ }
- #ifdef EXIF_DEBUG
- exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Subsection %s done", exif_get_sectionname(sub_section_index));
- #endif
-@@ -3590,7 +3675,7 @@
- exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "%s THUMBNAIL @0x%04X + 0x%04X", ImageInfo->Thumbnail.data ? "Ignore" : "Read", ImageInfo->Thumbnail.offset, ImageInfo->Thumbnail.size);
- #endif
- if (!ImageInfo->Thumbnail.data) {
-- ImageInfo->Thumbnail.data = emalloc(ImageInfo->Thumbnail.size);
-+ ImageInfo->Thumbnail.data = safe_emalloc(ImageInfo->Thumbnail.size, 1, 0);
- php_stream_seek(ImageInfo->infile, ImageInfo->Thumbnail.offset, SEEK_SET);
- fgot = php_stream_read(ImageInfo->infile, ImageInfo->Thumbnail.data, ImageInfo->Thumbnail.size);
- if (fgot < ImageInfo->Thumbnail.size) {
-@@ -3623,7 +3708,7 @@
- exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "%s THUMBNAIL @0x%04X + 0x%04X", ImageInfo->Thumbnail.data ? "Ignore" : "Read", ImageInfo->Thumbnail.offset, ImageInfo->Thumbnail.size);
- #endif
- if (!ImageInfo->Thumbnail.data && ImageInfo->Thumbnail.offset && ImageInfo->Thumbnail.size && ImageInfo->read_thumbnail) {
-- ImageInfo->Thumbnail.data = emalloc(ImageInfo->Thumbnail.size);
-+ ImageInfo->Thumbnail.data = safe_emalloc(ImageInfo->Thumbnail.size, 1, 0);
- php_stream_seek(ImageInfo->infile, ImageInfo->Thumbnail.offset, SEEK_SET);
- fgot = php_stream_read(ImageInfo->infile, ImageInfo->Thumbnail.data, ImageInfo->Thumbnail.size);
- if (fgot < ImageInfo->Thumbnail.size) {
-@@ -3914,7 +3999,7 @@
- exif_iif_add_int(&ImageInfo, SECTION_COMPUTED, "ByteOrderMotorola", ImageInfo.motorola_intel TSRMLS_CC);
- }
- if (ImageInfo.FocalLength) {
-- exif_iif_add_fmt(&ImageInfo, SECTION_COMPUTED, "FocalLength" TSRMLS_CC, "%4.1fmm", ImageInfo.FocalLength);
-+ exif_iif_add_fmt(&ImageInfo, SECTION_COMPUTED, "FocalLength" TSRMLS_CC, "%4.1Fmm", ImageInfo.FocalLength);
- if(ImageInfo.CCDWidth) {
- exif_iif_add_fmt(&ImageInfo, SECTION_COMPUTED, "35mmFocalLength" TSRMLS_CC, "%dmm", (int)(ImageInfo.FocalLength/ImageInfo.CCDWidth*35+0.5));
- }
-@@ -3924,19 +4009,19 @@
- }
- if(ImageInfo.ExposureTime>0) {
- if(ImageInfo.ExposureTime <= 0.5) {
-- exif_iif_add_fmt(&ImageInfo, SECTION_COMPUTED, "ExposureTime" TSRMLS_CC, "%0.3f s (1/%d)", ImageInfo.ExposureTime, (int)(0.5 + 1/ImageInfo.ExposureTime));
-+ exif_iif_add_fmt(&ImageInfo, SECTION_COMPUTED, "ExposureTime" TSRMLS_CC, "%0.3F s (1/%d)", ImageInfo.ExposureTime, (int)(0.5 + 1/ImageInfo.ExposureTime));
- } else {
-- exif_iif_add_fmt(&ImageInfo, SECTION_COMPUTED, "ExposureTime" TSRMLS_CC, "%0.3f s", ImageInfo.ExposureTime);
-+ exif_iif_add_fmt(&ImageInfo, SECTION_COMPUTED, "ExposureTime" TSRMLS_CC, "%0.3F s", ImageInfo.ExposureTime);
- }
- }
- if(ImageInfo.ApertureFNumber) {
-- exif_iif_add_fmt(&ImageInfo, SECTION_COMPUTED, "ApertureFNumber" TSRMLS_CC, "f/%.1f", ImageInfo.ApertureFNumber);
-+ exif_iif_add_fmt(&ImageInfo, SECTION_COMPUTED, "ApertureFNumber" TSRMLS_CC, "f/%.1F", ImageInfo.ApertureFNumber);
- }
- if(ImageInfo.Distance) {
- if(ImageInfo.Distance<0) {
- exif_iif_add_str(&ImageInfo, SECTION_COMPUTED, "FocusDistance", "Infinite" TSRMLS_CC);
- } else {
-- exif_iif_add_fmt(&ImageInfo, SECTION_COMPUTED, "FocusDistance" TSRMLS_CC, "%0.2fm", ImageInfo.Distance);
-+ exif_iif_add_fmt(&ImageInfo, SECTION_COMPUTED, "FocusDistance" TSRMLS_CC, "%0.2Fm", ImageInfo.Distance);
- }
- }
- if (ImageInfo.UserComment) {
-@@ -4005,7 +4090,7 @@
- Reads the embedded thumbnail */
- PHP_FUNCTION(exif_thumbnail)
- {
-- zval *p_width, *p_height, *p_imagetype;
-+ zval *p_width = 0, *p_height = 0, *p_imagetype = 0;
- char *p_name;
- int p_name_len, ret, arg_c = ZEND_NUM_ARGS();
- image_info_type ImageInfo;
-# TODO:
+# TODO
+# - fix -threads-acfix.patch
# - deal with modules removed from php and not moved to PECL, still not obsoleted anywhere
# - removed from php 5.0 (currently in php4):
# db, hyperwave, java, mcal, overload, qtdom
%undefine with_mm
%endif
-%ifnarch %{ix86} %{x8664} sparc sparcv9 alpha
-# ppc disabled (broken on th-ppc)
+%ifnarch %{ix86} %{x8664} sparc sparcv9 alpha ppc
%undefine with_interbase
%endif
-%if !%{with apache1} && !%{with apache2}
+%if %{without apache1} && %{without apache2}
ERROR: You need to select at least one Apache SAPI to build shared modules.
%endif
%undefine with_filter
%endif
-%define _rel 11
+%define _rel 6
Summary: PHP: Hypertext Preprocessor
Summary(fr): Le langage de script embarque-HTML PHP
Summary(pl): Jêzyk skryptowy PHP
Summary(ru): PHP ÷ÅÒÓÉÉ 5 - ÑÚÙË ÐÒÅÐÒÏÃÅÓÓÉÒÏ×ÁÎÉÑ HTML-ÆÁÊÌÏ×, ×ÙÐÏÌÎÑÅÍÙÊ ÎÁ ÓÅÒ×ÅÒÅ
Summary(uk): PHP ÷ÅÒÓ¦§ 5 - ÍÏ×Á ÐÒÅÐÒÏÃÅÓÕ×ÁÎÎÑ HTML-ÆÁÊ̦×, ×ÉËÏÎÕ×ÁÎÁ ÎÁ ÓÅÒ×ÅÒ¦
Name: php
-Version: 5.2.0
+Version: 5.2.1
Release: %{_rel}%{?with_hardening:hardened}
Epoch: 4
License: PHP
Group: Libraries
Source0: http://www.php.net/distributions/%{name}-%{version}.tar.bz2
-# Source0-md5: e6029fafcee029edcfa2ceed7a005333
+# Source0-md5: 261218e3569a777dbd87c16a15f05c8d
Source2: zend.gif
Source3: %{name}-mod_%{name}.conf
Source4: %{name}-cgi-fcgi.ini
Patch9: %{name}-sh.patch
Patch10: %{name}-ini.patch
Patch11: %{name}-acam.patch
-Patch12: %{name}-curl.patch
-Patch13: %{name}-bug-40073.patch
-Patch15: %{name}-threads-acfix.patch
+#Patch15: %{name}-threads-acfix.patch
Patch16: %{name}-tsrmlsfetchgcc2.patch
Patch17: %{name}-no_pear_install.patch
Patch18: %{name}-zlib.patch
Patch33: %{name}-zlib-for-getimagesize.patch
Patch35: %{name}-versioning.patch
Patch36: %{name}-linkflags-clean.patch
-Patch38: %{name}-memory-limit.patch
+
Patch39: %{name}-pear.patch
-Patch40: %{name}-db4.5.patch
Patch41: %{name}-config-dir.patch
URL: http://www.php.net/
%{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}}
BuildRequires: libxml2-devel >= 2.5.10
BuildRequires: libxslt-devel >= 1.1.0
%{?with_mhash:BuildRequires: mhash-devel}
-%{?with_ming:BuildRequires: ming-devel >= 0.2a-11}
+%{?with_ming:BuildRequires: ming-devel >= 0.3}
%{?with_mm:BuildRequires: mm-devel >= 1.3.0}
BuildRequires: mysql-devel >= 4.0.0
%{?with_mysqli:BuildRequires: mysql-devel >= 4.1.0}
%define php_sysconfdir /etc/php
%define php_extensiondir %{_libdir}/php
+%define _sysconfdir %{php_sysconfdir}
# must be in sync with source. extra check ensuring that it is so is done in %%build
%define php_api_version 20041225
Group: Libraries
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(pgsql)
+Provides: php-pecl-PDO_PGSQL
+Obsoletes: php-pecl-PDO_PGSQL
%description pgsql
This is a dynamic shared object (DSO) for PHP that will add PostgreSQL
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(sybase)
Obsoletes: php-sybase-ct
+Conflicts: php-sybase-ct
%description sybase
This is a dynamic shared object (DSO) for PHP that will add Sybase and
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(sybase-ct)
Obsoletes: php-sybase
+Conflicts: php-sybase
%description sybase-ct
This is a dynamic shared object (DSO) for PHP that will add Sybase and
# for ac2.53b/am1.6b - AC_LANG_CXX has AM_CONDITIONAL, so cannot be invoked
# conditionally...
%patch11 -p1
-%patch12 -p1
-cd ext/exif
-%patch13 -p0
-cd ../../
-%patch15 -p1
+#%patch15 -p1 # breaks with ac cache vars, but later -lpthread is missing ...
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
+
%{?with_versioning:%patch35 -p1}
-%ifarch %{x8664} alpha
-%patch38 -p1
-%endif
+
%patch39 -p1
-%patch40 -p1
%patch41 -p1
# conflict seems to be resolved by recode patches
%{__make} build-modules
%if %{with apache1}
-%{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache/libphp5.la -f Makefile.apxs1
+%{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache/libphp5.la -f Makefile.apxs1 LDFLAGS=-lpthread
%endif
%if %{with apache2}
# FCGI
%if %{with fcgi}
cp -af php_config.h.fcgi main/php_config.h
-%{__make} sapi/cgi/php -f Makefile.fcgi
+%{__make} sapi/cgi/php -f Makefile.fcgi LDFLAGS=-lpthread
cp -r sapi/cgi sapi/fcgi
rm -rf sapi/cgi/.libs sapi/cgi/*.lo
%endif
# CGI
cp -af php_config.h.cgi main/php_config.h
-%{__make} sapi/cgi/php -f Makefile.cgi
+%{__make} sapi/cgi/php -f Makefile.cgi LDFLAGS=-lpthread
# CLI
cp -af php_config.h.cli main/php_config.h
-%{__make} sapi/cli/php -f Makefile.cli
+%{__make} sapi/cli/php -f Makefile.cli LDFLAGS=-lpthread
%install
rm -rf $RPM_BUILD_ROOT