# TODO 5.4:
# - do not remove PatchX: definitions until merged to HEAD, needed for tracking their state
# - check php-sapi-ini-file.patch for safe mode removal
-# - enable suhoshin patch (needs api porting)
# - enable litespeed (needs api porting)
# - update imap annotations patch (needs api porting)
# - update imap myrights patch (needs api porting)
# --with-libmbfl=DIR MBSTRING: Use external libmbfl. DIR is the libmbfl base install directory BUNDLED
# --with-onig=DIR MBSTRING: Use external oniguruma. DIR is the oniguruma install prefix.
# - uses libvpx for webp support, should use libwebp-devel instead?
-# - fpm -qn check fails, as it still loads /etc/php/php.ini
-# - co-install with php 5.3:
-# file /etc/rc.d/init.d/php-fpm from install of php54-fpm-5.4.5-0.2.i686 conflicts with file from package php-fpm-5.3.14-1.i686
-# file /usr/sbin/php-fpm from install of php54-fpm-5.4.5-0.2.i686 conflicts with file from package php-fpm-5.3.14-1.i686
-# file /usr/share/man/man8/php-fpm.8.gz from install of php54-fpm-5.4.5-0.2.i686 conflicts with file from package php-fpm-5.3.14-1.i686
-# file /usr/bin/php.cli from install of php54-cli-5.4.5-0.2.i686 conflicts with file from package php-cli-5.3.14-1.i686
-# file /usr/share/man/man1/php.1.gz from install of php54-cli-5.4.5-0.2.i686 conflicts with file from package php-cli-5.3.14-1.i686
# NOTE: mysqlnd does not support ssl or compression (see FAQ at http://dev.mysql.com/downloads/connector/php-mysqlnd/)
# UNPACKAGED EXTENSION NOTES:
# - com_dotnet is Win32-only
%bcond_with system_gd # with system gd (we prefer internal since it enables few more features)
%bcond_with system_libzip # with system libzip (reported broken currently)
%bcond_without curl # without CURL extension module
-%bcond_without filter # without filter extension module
%bcond_without enchant # without Enchant extension module
+%bcond_without filter # without filter extension module
%bcond_without imap # without IMAP extension module
%bcond_without interbase # without InterBase extension module
+%bcond_without intl # without Intl extension module
%bcond_without kerberos5 # without Kerberos5 support
%bcond_with litespeed # build litespeed module
%bcond_without ldap # without LDAP extension module
%bcond_without sqlite3 # without SQLite3 extension module
%bcond_without sybase_ct # without Sybase-CT extension module
%bcond_without tidy # without Tidy extension module
+%bcond_without webp # Without WebP support in GD extension (imagecreatefromwebp)
%bcond_without wddx # without WDDX extension module
%bcond_without xmlrpc # without XML-RPC extension module
%bcond_without apache1 # disable building Apache 1.3.x SAPI
%bcond_without cgi # disable CGI/FCGI SAPI
%bcond_without fpm # disable FPM
%bcond_with embed # disable Embedded API
-%bcond_with suhosin # with suhosin patch
+%bcond_without suhosin # with suhosin patch
%bcond_with tests # default off; test process very often hangs on builders, approx run time 45m; perform "make test"
%bcond_with gcov # Enable Code coverage reporting
%bcond_with type_hints # experimental support for strict typing/casting
%define orgname php
%define php_suffix 54
-%define rel 0.15
+%define rel 0.17
Summary: PHP: Hypertext Preprocessor
Summary(fr.UTF-8): Le langage de script embarque-HTML PHP
Summary(pl.UTF-8): Język skryptowy PHP
Patch62: mcrypt-libs.patch
Patch63: %{orgname}-mysql-nowarning.patch
#Patch64: %{orgname}-m4.patch # not needed on 5.4 branch
-# http://spot.fedorapeople.org/php-5.3.6-libzip.patch
Patch65: system-libzip.patch
URL: http://www.php.net/
%{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}}
#BuildRequires: fcgi-devel
#BuildRequires: flex
%{?with_kerberos5:BuildRequires: heimdal-devel}
-%{?with_system_libzip:BuildRequires: libzip-devel >= 0.10-3}
+%{?with_system_libzip:BuildRequires: libzip-devel >= 0.10.1-2}
%{!?with_mysqlnd:BuildRequires: mysql-devel}
BuildRequires: pkgconfig
BuildRequires: sed >= 4.0
BuildRequires: gdbm-devel
BuildRequires: gmp-devel
%{?with_imap:BuildRequires: imap-devel >= 1:2007e-2}
-BuildRequires: libicu-devel
+%{?with_intl:BuildRequires: libicu-devel}
BuildRequires: libjpeg-devel
BuildRequires: libltdl-devel >= 1.4
BuildRequires: libmcrypt-devel >= 2.4.4
BuildRequires: libpng-devel >= 1.0.8
#BuildRequires: libtiff-devel
-BuildRequires: libvpx-devel
+%{?with_webp:BuildRequires: libvpx-devel}
BuildRequires: tokyocabinet-devel
%if "%{pld_release}" != "ac"
BuildRequires: libtool >= 2:2.2
%endif
%if %{with fpm}
#BuildRequires: judy-devel
-BuildRequires: libevent-devel >= 1.4.7-3
%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Requires(pre): /bin/id
Requires(pre): /usr/sbin/useradd
Requires: %{name}-common = %{epoch}:%{version}-%{release}
-Requires: libevent >= 1.4.7-3
Requires: rc-scripts
Provides: user(http)
Provides: webserver(php) = %{version}
Provides: %{name}(thread-safety) = %{zend_zts}
Provides: %{name}(zend_extension_api) = %{zend_extension_api}
Provides: %{name}(zend_module_api) = %{zend_module_api}
+Provides: %{name}-core
Provides: %{name}-date
Provides: %{name}-ereg
Provides: %{name}-reflection
Provides: %{name}-standard
+Provides: php(core) = %{version}
Provides: php(date)
Provides: php(ereg)
Provides: php(hash)
Group: Libraries
URL: http://www.php.net/manual/en/book.zip.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
-%{?with_system_libzip:Requires: libzip >= 0.10-3}
+%{?with_system_libzip:Requires: libzip >= 0.10.1-2}
Provides: php(zip) = %{zipver}
Obsoletes: php-pecl-zip < %{zipver}
%prep
%setup -q -n %{orgname}-%{version}
-# prep for suhosin patch
-%undos Zend/Zend.dsp Zend/ZendTS.dsp
%patch0 -p1
%patch1 -p1
%patch2 -p1
# says just "Terminated" twice and fails
mv sapi/cli/tests/022.phpt{,.broken}
+# really dumb test, executable binary name is .libs/ something when building
+# https://bugs.php.net/bug.php?id=54514
+mv tests/basic/bug54514.phpt{,.disable}
+
+# breaks whole testsuite unexpectedly:
+# Fatal error: Call to undefined function gzencode() in run-tests.php on line 1714
+# probably broken as zlib is built as shared
+mv ext/soap/tests/server019.phpt{,disable}
+# Fatal error: Call to undefined function gzcompress() in run-tests.php on line 1728
+mv ext/soap/tests/server020.phpt{,disable}
+
+# runs out of memory and kills carme vserver
+# PASS Bug #39438 (Fatal error: Out of memory) [Zend/tests/bug39438.phpt]
+mv Zend/tests/bug39438.phpt{,.disable}
+
# php-5.3.3/ext/standard/tests/file/statpage.phpt
%{__rm} ext/standard/tests/file/statpage.phpt
--enable-fileinfo=shared \
--enable-ftp=shared \
--enable-gd-native-ttf \
- --enable-intl=shared \
+ %{?with_intl:--enable-intl=shared} \
--enable-libxml \
--enable-mbstring=shared,all \
--enable-mbregex \
%{?with_odbc:--with-pdo-odbc=shared,unixODBC,/usr} \
%{?with_pgsql:--with-pdo-pgsql=shared} \
%{?with_pdo_sqlite:--with-pdo-sqlite=shared,/usr} \
- --with-vpx-dir=/usr \
+ %{?with_webp:--with-vpx-dir=/usr} \
--without-libexpat-dir \
--enable-posix=shared \
--enable-shared \
exit 1
%endif
-%if %{with tests}
-# Run tests, using the CLI SAPI
-cp -pf php_config.h.cli main/php_config.h
-cp -pf Makefile.cli Makefile
-
cat <<'EOF' > run-tests.sh
#!/bin/sh
export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
RUN_TESTS_SETTINGS="-q $*"
EOF
chmod +x run-tests.sh
+
+%if %{with tests}
+# Run tests, using the CLI SAPI
+cp -pf php_config.h.cli main/php_config.h
+cp -pf Makefile.cli Makefile
+
./run-tests.sh -w failed.log -s test.log
# collect failed tests into cleanup script used in prep.
%endif
# ensure that paths are correct for current php version and arch
-grep -El '/etc/php/|/usr/lib/php/' %{_sysconfdir}/*.ini | xargs -r \
+grep -El '/etc/php/|/usr/lib/php/' $RPM_BUILD_ROOT%{_sysconfdir}/*.ini | xargs -r \
%{__sed} -i -e '
s#/usr/lib/php#%{php_extensiondir}#
s#/etc/php#%{_sysconfdir}#
%attr(755,root,root) %{php_extensiondir}/interbase.so
%endif
+%if %{with intl}
%files intl
%defattr(644,root,root,755)
%doc ext/intl/{CREDITS,TODO}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/intl.ini
%attr(755,root,root) %{php_extensiondir}/intl.so
+%endif
%files json
%defattr(644,root,root,755)