From 25e1e3b342a3cceaa60d3ec7a9ae32b2b6893a54 Mon Sep 17 00:00:00 2001 From: jorton Date: Tue, 19 Apr 2005 13:32:06 +0000 Subject: [PATCH] * Wed Apr 13 2005 Joe Orton 5.0.4-7 - split out dba and bcmath extensions into subpackages - BuildRequire gcc-c++ to avoid AC_PROG_CXX{,CPP} failure (#155221) --- php-5.0.4-tests-dashn.patch | 79 +++++++++++++++++++++++++++++++++++++ php-5.0.4-tests-wddx.patch | 26 ++++++++++++ php.spec | 47 ++++++++++++++++++---- 3 files changed, 145 insertions(+), 7 deletions(-) create mode 100644 php-5.0.4-tests-dashn.patch create mode 100644 php-5.0.4-tests-wddx.patch diff --git a/php-5.0.4-tests-dashn.patch b/php-5.0.4-tests-dashn.patch new file mode 100644 index 0000000..9440622 --- /dev/null +++ b/php-5.0.4-tests-dashn.patch @@ -0,0 +1,79 @@ + +Pass -n to php when running tests, to ensure that the system inidir +and hence the installed (old) shared extensions are not loaded. + +- when running run-tests.php itself +- passed to run-tests.php to ensure it's passed when running each test case +- in cases where the PHP executable is run by a test case + +--- php-5.0.4/ext/xml/tests/bug32001.phpt.tests ++++ php-5.0.4/ext/xml/tests/bug32001.phpt +@@ -151,7 +151,7 @@ + new testcase("GB2312", 1), + ); + +-preg_match("/^libxml2 Version.*\$/im", `$_ENV[TEST_PHP_EXECUTABLE] -i`, $match); ++preg_match("/^libxml2 Version.*\$/im", `$_ENV[TEST_PHP_EXECUTABLE] -i -n`, $match); + + echo $match[0], "\n"; + +--- php-5.0.4/ext/standard/tests/file/proc_open01.phpt.tests ++++ php-5.0.4/ext/standard/tests/file/proc_open01.phpt +@@ -9,7 +9,7 @@ + die("no php executable defined"); + } + $proc = proc_open( +- $php, ++ $php . " -n", + array(0 => array('pipe', 'r'), 1 => array('pipe', 'w')), + $pipes + ); +--- php-5.0.4/ext/standard/tests/file/bug26938.phpt.tests ++++ php-5.0.4/ext/standard/tests/file/bug26938.phpt +@@ -5,7 +5,7 @@ + $out = array(); + $status = -1; + $php = getenv('TEST_PHP_EXECUTABLE'); +-exec($php . ' -r \'' ++exec($php . ' -n -r \'' + . '$lengths = array(10,20000,10000,5,10000,3);' + . 'foreach($lengths as $length) {' + . ' for($i=0;$i<$length;$i++) print chr(65+$i % 27);' +--- php-5.0.4/ext/standard/tests/file/bug26615.phpt.tests ++++ php-5.0.4/ext/standard/tests/file/bug26615.phpt +@@ -4,7 +4,7 @@ + + --EXPECT-- +--- php-5.0.4/tests/lang/bug21800.phpt.tests ++++ php-5.0.4/tests/lang/bug21800.phpt +@@ -5,7 +5,7 @@ + --FILE-- + \n\n"); + fclose($fh); +--- php-5.0.4/Makefile.global.tests ++++ php-5.0.4/Makefile.global +@@ -51,11 +51,11 @@ + install-su: install-pear install-tester + + test: +- -@if test -x $(SAPI_CLI_PATH) && test ! -z $(SAPI_CLI_PATH); then \ ++ @if test -x $(SAPI_CLI_PATH) && test ! -z $(SAPI_CLI_PATH); then \ + TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ + TEST_PHP_SRCDIR=$(top_srcdir) \ + CC="$(CC)" \ +- $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' $(top_srcdir)/run-tests.php $(TESTS); \ ++ $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -n -d 'output_buffering=0' $(top_srcdir)/run-tests.php -n $(TESTS); \ + else \ + echo "ERROR: Cannot run tests without CLI sapi."; \ + fi diff --git a/php-5.0.4-tests-wddx.patch b/php-5.0.4-tests-wddx.patch new file mode 100644 index 0000000..842345d --- /dev/null +++ b/php-5.0.4-tests-wddx.patch @@ -0,0 +1,26 @@ + +The wddx tests presume that "2040-06-12T04:32:12" cannot be parsed; +that's only true on platforms with a 32-bit time_t. + +--- php-5.0.4/ext/wddx/tests/001.phpt.wddxtests ++++ php-5.0.4/ext/wddx/tests/001.phpt +@@ -18,7 +18,7 @@ + ["aDateTime2"]=> + int(329632332) + ["aDateTime3"]=> +- string(22) "2040-06-12T04:32:12+00" ++ string(12) "NotADateTime" + ["aBoolean"]=> + bool(true) + ["anArray"]=> +--- php-5.0.4/ext/wddx/tests/wddx.xml.wddxtests ++++ php-5.0.4/ext/wddx/tests/wddx.xml +@@ -20,7 +20,7 @@ + 1980-06-12T04:32:12+00 + + +- 2040-06-12T04:32:12 ++ NotADateTime + + + diff --git a/php.spec b/php.spec index 49d0314..e7d6558 100644 --- a/php.spec +++ b/php.spec @@ -7,7 +7,7 @@ Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor) Name: php Version: 5.0.4 -Release: 6 +Release: 7 License: The PHP License Group: Development/Languages URL: http://www.php.net/ @@ -26,7 +26,6 @@ Patch2: php-5.0.1-config.patch Patch3: php-5.0.4-lib64.patch Patch4: php-4.2.2-cxx.patch Patch5: php-4.3.3-install.patch -Patch6: php-4.3.1-tests.patch Patch7: php-4.3.2-libtool15.patch Patch9: php-4.3.6-umask.patch Patch10: php-5.0.2-gdnspace.patch @@ -45,6 +44,11 @@ Patch23: php-5.0.4-bug32282.patch Patch30: php-5.0.4-dlopen.patch Patch31: php-5.0.0-easter.patch +# Fixes for tests +Patch50: php-5.0.4-tests-dashn.patch +Patch51: php-5.0.4-tests-wddx.patch +Patch52: php-5.0.4-tests-sunfunc.patch + BuildRoot: %{_tmppath}/%{name}-root BuildRequires: bzip2-devel, curl-devel >= 7.9, db4-devel, expat-devel @@ -52,7 +56,7 @@ BuildRequires: gmp-devel, aspell-devel >= 0.50.0 BuildRequires: httpd-devel >= 2.0.46-1, libjpeg-devel, libpng-devel, pam-devel BuildRequires: libstdc++-devel, openssl-devel BuildRequires: zlib-devel, pcre-devel >= 4.5, smtpdaemon -BuildRequires: bzip2, fileutils, file >= 4.0, perl, libtool >= 1.4.3 +BuildRequires: bzip2, fileutils, file >= 4.0, perl, libtool >= 1.4.3, gcc-c++ Obsoletes: php-dbg, mod_php, php3, phpfi, stronghold-php, php-openssl # Enforce Apache module ABI compatibility Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel) @@ -299,13 +303,30 @@ BuildRequires: gd-devel, freetype-devel The php-gd package contains a dynamic shared object that will add support for using the gd graphics library to PHP. +%package bcmath +Summary: A module for PHP applications for using the bcmath library +Group: Development/Languages +Requires: php = %{version}-%{release} + +%description bcmath +The php-bcmath package contains a dynamic shared object that will add +support for using the bcmath library to PHP. + +%package dba +Summary: A database abstraction layer module for PHP applications +Group: Development/Languages +Requires: php = %{version}-%{release} + +%description dba +The php-dba package contains a dynamic shared object that will add +support for using the DBA database abstraction layer to PHP. + %prep %setup -q %patch2 -p1 -b .config %patch3 -p1 -b .lib64 %patch4 -p1 -b .cxx %patch5 -p1 -b .install -%patch6 -p1 -b .tests %patch7 -p1 -b .libtool15 %patch9 -p1 -b .umask %patch10 -p1 -b .gdnspace @@ -321,6 +342,10 @@ support for using the gd graphics library to PHP. %patch30 -p1 -b .dlopen %patch31 -p1 -b .easter +%patch50 -p1 -b .tests-dashn +%patch51 -p1 -b .tests-wddx +%patch52 -p1 -b .tests-sunfunc + # Prevent %%doc confusion over LICENSE files cp Zend/LICENSE Zend/ZEND_LICENSE cp TSRM/LICENSE TSRM_LICENSE @@ -398,7 +423,6 @@ ln -sf ../configure --with-pcre-regex=%{_prefix} \ --with-zlib \ --with-layout=GNU \ - --enable-bcmath \ --enable-exif \ --enable-ftp \ --enable-magic-quotes \ @@ -441,6 +465,8 @@ build --enable-force-cgi-redirect \ --enable-mbregex \ --with-ncurses=shared \ --with-gd=shared \ + --enable-bcmath=shared \ + --enable-dba=shared \ --with-xmlrpc=shared \ --with-ldap=shared \ --with-mysql=shared,%{_prefix} \ @@ -461,7 +487,8 @@ popd pushd build-apache build --with-apxs2=%{_sbindir}/apxs \ --without-mysql --without-gd \ - --without-odbc --disable-dom + --without-odbc --disable-dom \ + --disable-dba popd %check @@ -516,7 +543,7 @@ install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/session # Generate files lists and stub .ini files for each subpackage for mod in pgsql mysql mysqli odbc ldap snmp xmlrpc imap \ - mbstring ncurses gd dom xsl soap \ + mbstring ncurses gd dom xsl soap bcmath dba \ %{?_with_oci8:oci8} %{?_with_mssql:mssql} %{?_with_mhash:mhash} \ %{?_with_ibase:interbase}; do cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${mod}.ini < 5.0.4-7 +- split out dba and bcmath extensions into subpackages +- BuildRequire gcc-c++ to avoid AC_PROG_CXX{,CPP} failure (#155221) + * Wed Apr 13 2005 Joe Orton 5.0.4-6 - build /usr/bin/php with the CLI SAPI, and add /usr/bin/php-cgi, built with the CGI SAPI (thanks to Edward Rudd, #137704)