* Wed Apr 13 2005 Joe Orton <jorton@redhat.com> 5.0.4-7

- split out dba and bcmath extensions into subpackages
- BuildRequire gcc-c++ to avoid AC_PROG_CXX{,CPP} failure (#155221)
This commit is contained in:
jorton 2005-04-19 13:32:06 +00:00
parent 1005a1c62d
commit 25e1e3b342
3 changed files with 145 additions and 7 deletions

View File

@ -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 @@
<?php
$out = array();
$status = -1;
-exec($_ENV['TEST_PHP_EXECUTABLE'].' -r \'for($i=1;$i<=5000;$i++) print "$i\n";\' | tr \'\n\' \' \'', $out, $status);
+exec($_ENV['TEST_PHP_EXECUTABLE'].' -n -r \'for($i=1;$i<=5000;$i++) print "$i\n";\' | tr \'\n\' \' \'', $out, $status);
print_r($out);
?>
--EXPECT--
--- php-5.0.4/tests/lang/bug21800.phpt.tests
+++ php-5.0.4/tests/lang/bug21800.phpt
@@ -5,7 +5,7 @@
--FILE--
<?php
$exe = getenv('TEST_PHP_EXECUTABLE');
-$fh = popen("$exe -a", 'w');
+$fh = popen("$exe -a -n", 'w');
if ($fh !== false) {
fwrite($fh, "<?php echo ':test:'; ?>\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

View File

@ -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 @@
<dateTime>1980-06-12T04:32:12+00</dateTime>
</var>
<var name='aDateTime3'>
- <dateTime>2040-06-12T04:32:12</dateTime>
+ <dateTime>NotADateTime</dateTime>
</var>
<var name='aBoolean'>
<boolean value='true'/>

View File

@ -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 <<EOF
@ -592,6 +619,8 @@ rm files.*
%files ncurses -f files.ncurses
%files gd -f files.gd
%files soap -f files.soap
%files bcmath -f files.bcmath
%files dba -f files.dba
%if %{with_oci8}
%files oci8 -f files.oci8
@ -607,6 +636,10 @@ rm files.*
%endif
%changelog
* Wed Apr 13 2005 Joe Orton <jorton@redhat.com> 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 <jorton@redhat.com> 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)