]> git.pld-linux.org Git - packages/php.git/blobdiff - php.spec
Merge branch 'PHP_5_5' into PHP_5_6
[packages/php.git] / php.spec
index 73d2fb85d8c3b3112359a24e5b6aafa732c3c195..cebc18be1e43ca6101083007574c98aeae828296 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -1,4 +1,5 @@
-# TODO 5.5:
+# TODO 5.6:
+# - phpdbg: link with libphp_common
 # - enable --with-fpm-systemd, but ensure it checks for sd_booted()
 # - build with system libgd 2.1, see 73c5128
 # TODO 5.4:
@@ -38,6 +39,7 @@
 #+ereg
 # libxml
 # Reflection
+# standard
 #
 # Conditional build:
 %bcond_with    interbase_inst  # use InterBase install., not Firebird  (BR: proprietary libs)
@@ -84,7 +86,9 @@
 %bcond_without cgi             # disable CGI/FCGI SAPI
 %bcond_without fpm             # disable FPM
 %bcond_without embed           # disable Embedded API
-%bcond_without suhosin         # with suhosin patch
+%bcond_without phpdbg          # disable phpdbg SAPI
+%bcond_with    milter          # disable Milter SAPI
+%bcond_with    suhosin         # with suhosin patch, has little point in PHP>=5.3, see https://github.com/stefanesser/suhosin/issues/42#issuecomment-41728178
 %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
 %undefine      with_mm
 %endif
 
+# milter requires ZTS
+%if %{with milter} && %{without zts}
+%undefine      with_milter
+%endif
+
 %ifnarch %{ix86} %{x8664} sparc sparcv9 alpha
 # ppc disabled (broken on th-ppc)
 %undefine      with_interbase
@@ -126,9 +135,9 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
 %undefine      with_filter
 %endif
 
-%define                rel     1
+%define                rel     0.8
 %define                orgname php
-%define                ver_suffix 55
+%define                ver_suffix 56
 %define                php_suffix %{!?with_default_php:%{ver_suffix}}
 Summary:       PHP: Hypertext Preprocessor
 Summary(fr.UTF-8):     Le langage de script embarque-HTML PHP
@@ -137,13 +146,13 @@ Summary(pt_BR.UTF-8):     A linguagem de script PHP
 Summary(ru.UTF-8):     PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере
 Summary(uk.UTF-8):     PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері
 Name:          %{orgname}%{php_suffix}
-Version:       5.5.16
+Version:       5.6.0
 Release:       %{rel}%{?with_type_hints:.th}
 Epoch:         4
 License:       PHP
 Group:         Libraries
 Source0:       http://www.php.net/distributions/%{orgname}-%{version}.tar.xz
-# Source0-md5: 243f641c58b7d58b94b5431e0b730a5e
+# Source0-md5: 642825d75ce2634d9513d5b21dbee521
 Source2:       %{orgname}-mod_%{orgname}.conf
 Source3:       %{orgname}-cgi-fcgi.ini
 Source4:       %{orgname}-apache.ini
@@ -163,7 +172,8 @@ Patch4:             %{orgname}-libpq_fs_h_path.patch
 Patch5:                %{orgname}-filter-shared.patch
 Patch6:                %{orgname}-build_modules.patch
 Patch7:                %{orgname}-sapi-ini-file.patch
-
+Patch8:                milter.patch
+Patch9:                libtool-tag.patch
 Patch10:       %{orgname}-ini.patch
 Patch11:       embed.patch
 %if %{with type_hints}
@@ -207,7 +217,6 @@ Patch63:    %{orgname}-mysql-nowarning.patch
 Patch65:       system-libzip.patch
 Patch66:       php-db.patch
 Patch67:       mysql-lib-ver-mismatch.patch
-
 Patch69:       fpm-conf-split.patch
 URL:           http://www.php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:       Firebird-devel >= 1.0.2.908-2}}
@@ -294,9 +303,9 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %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         20121113
-%define                zend_module_api         20121212
-%define                zend_extension_api      220121212
+%define                php_api_version         20131106
+%define                zend_module_api         20131226
+%define                zend_extension_api      220131226
 %define                php_pdo_api_version     20080721
 
 # Extension versions
@@ -309,7 +318,8 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                opcachever      7.0.4-dev
 %define                pharver         2.0.2
 %define                sqlite3ver      0.7-dev
-%define                zipver          1.11.0
+%define                zipver          1.12.4
+%define                phpdbgver       0.4.0
 
 %define                _zend_zts               %{!?with_zts:0}%{?with_zts:1}
 %define                php_debug               %{!?debug:0}%{?debug:1}
@@ -511,6 +521,22 @@ PHP FastCGI Process Manager.
 %description fpm -l pl.UTF-8
 PHP FastCGI Process Manager - zarządca procesów FastCGI.
 
+%package phpdbg
+Summary:       The debugging platform for PHP 5.4+
+Group:         Development/Languages/PHP
+Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+Provides:      php(phpdbg) = %{phpdbgver}
+
+%description phpdbg
+phpdbg - The interactive PHP debugger.
+
+Implemented as a SAPI module, phpdbg can excert complete control over
+the environment without impacting the functionality or performance of
+your code.
+
+phpdbg aims to be a lightweight, powerful, easy to use debugging
+platform for PHP 5.4+
+
 %package common
 Summary:       Common files needed by both Apache modules and CGI/CLI SAPIs
 Summary(pl.UTF-8):     Wspólne pliki dla modułu Apache'a i programu CGI
@@ -1968,7 +1994,8 @@ compression support to PHP.
 Moduł PHP umożliwiający używanie kompresji zlib.
 
 %prep
-%setup -q -n %{orgname}-%{version}
+%setup -q -n %{orgname}-%{version}%{?subver}
+cp -p php.ini-production php.ini
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -1977,8 +2004,8 @@ Moduł PHP umożliwiający używanie kompresji zlib.
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
-
-cp -p php.ini-production php.ini
+%patch8 -p1
+%patch9 -p1
 %patch10 -p1
 %if %{with type_hints}
 %patch12 -p0
@@ -2028,7 +2055,6 @@ cp -p php.ini-production php.ini
 %{?with_system_libzip:%patch65 -p1}
 %patch66 -p1
 %patch67 -p1
-
 %patch69 -p1
 
 sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
@@ -2152,7 +2178,7 @@ if test "$ver" != "%{sqlite3ver}"; then
        : Update the sqlite3ver macro and rebuild.
        exit 1
 fi
-ver=$(sed -n '/#define PHP_ZIP_VERSION_STRING /{s/.* "//;s/".*$//;p}' ext/zip/php_zip.h)
+ver=$(sed -n '/#define PHP_ZIP_VERSION /{s/.* "//;s/".*$//;p}' ext/zip/php_zip.h)
 if test "$ver" != "%{zipver}"; then
        : Error: Upstream ZIP version is now ${ver}, expecting %{zipver}.
        : Update the zipver macro and rebuild.
@@ -2170,6 +2196,12 @@ if test "$ver" != "%{opcachever}"; then
        : Update the opcachever macro and rebuild.
        exit 1
 fi
+ver=$(sed -n '/#define PHPDBG_VERSION /{s/.* "//;s/".*$//;p}' sapi/phpdbg/phpdbg.h)
+if test "$ver" != "%{phpdbgver}"; then
+       : Error: Upstream phpdbg version is now ${ver}, expecting %{phpdbgver}.
+       : Update the phpdbgver macro and rebuild.
+       exit 1
+fi
 ver=$(sed -rne 's,.*<version>(.+)</version>,\1,p' ext/bz2/package.xml)
 if test "$ver" != "%{bz2ver}"; then
        : Error: Upstream BZIP2 version is now ${ver}, expecting %{bz2ver}.
@@ -2199,7 +2231,7 @@ export EXTENSION_DIR="%{php_extensiondir}"
 # configure once (for faster debugging purposes)
 if [ ! -f _built-conf ]; then
        # now remove Makefile copies
-       rm -f Makefile.{cgi-fcgi,fpm,cli,apxs1,apxs2,litespeed}
+       rm -f Makefile.{cgi-fcgi,fpm,cli,apxs1,apxs2,litespeed,phpdbg,milter}
        %{__libtoolize}
        %{__aclocal}
        cp -f /usr/share/automake/config.* .
@@ -2230,6 +2262,12 @@ apxs1
 %if %{with apache2}
 apxs2
 %endif
+%if %{with phpdbg}
+phpdbg
+%endif
+%if %{with milter}
+milter
+%endif
 "
 for sapi in $sapis; do
        : SAPI $sapi
@@ -2259,7 +2297,13 @@ for sapi in $sapis; do
                sapi_args="--disable-cli --disable-cgi --with-apxs2=%{apxs2} --with-apache-version=$ver"
        ;;
        litespeed)
-               sapi_args='--disable-cli --disable-cgi --with-litespeed '
+               sapi_args='--disable-cli --disable-cgi --with-litespeed'
+       ;;
+       phpdbg)
+               sapi_args='--disable-cli --disable-cgi --enable-phpdbg %{?debug:--enable-phpdbg-debug}'
+       ;;
+       milter)
+               sapi_args='--disable-cli --disable-cgi --with-milter'
        ;;
        esac
 
@@ -2407,6 +2451,16 @@ cp -af Makefile.cli Makefile
 %{__make} -f Makefile.embed libphp5.la
 %endif
 
+%if %{with phpdbg}
+# PHP_READLINE_LIBS is empty, so force readline here
+%{__make} -f Makefile.phpdbg phpdbg \
+       PHPDBG_EXTRA_LIBS=-lreadline
+%endif
+
+%if %{with milter}
+%{__make} -f Makefile.milter milter
+%endif
+
 # CGI/FCGI
 %if %{with cgi}
 cp -pf php_config.h.cgi-fcgi main/php_config.h
@@ -2490,7 +2544,8 @@ chmod +x run-tests.sh
 cp -pf php_config.h.cli main/php_config.h
 cp -pf Makefile.cli Makefile
 
-./run-tests.sh -w failed.log -s tests.log
+./run-tests.sh -w failed.log -s tests.log || {
+rc=$?
 
 # collect failed tests into cleanup script used in prep.
 sed -ne '/^FAILED TEST SUMMARY/,/^===/p' tests.log | sed -e '1,/^---/d;/^===/,$d' > tests-failed.log
@@ -2501,6 +2556,8 @@ sed -ne '/^via/d;/\[.*\]/{s/\t*\(.*\) \[\(.*\)\]\(.*\)/# \1\3\nmv \2{,.skip}/p}'
 tty -q || cat tests.log
 
 test ! -s failed.log
+exit $rc
+}
 %endif
 
 %install
@@ -2541,6 +2598,16 @@ ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.so
 libtool --mode=install install -p sapi/litespeed/php $RPM_BUILD_ROOT%{_sbindir}/%{name}.litespeed
 %endif
 
+%if %{with phpdbg}
+%{__make} -f Makefile.phpdbg install-phpdbg \
+       INSTALL_ROOT=$RPM_BUILD_ROOT
+%endif
+
+%if %{with milter}
+%{__make} -f Makefile.milter install-milter \
+       INSTALL_ROOT=$RPM_BUILD_ROOT
+%endif
+
 libtool --mode=install install -p libphp_common.la $RPM_BUILD_ROOT%{_libdir}
 
 # install CGI/FCGI
@@ -2889,9 +2956,21 @@ fi
 %attr(754,root,root) /etc/rc.d/init.d/%{name}-fpm
 %endif
 
+%if %{with phpdbg}
+%files phpdbg
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/phpdbg
+%endif
+
+%if %{with milter}
+%files milter
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/php-milter
+%endif
+
 %files common
 %defattr(644,root,root,755)
-%doc CREDITS EXTENSIONS LICENSE NEWS README.{PHP4-TO-PHP5-THIN-CHANGES,namespaces} UPGRADING* Zend/{LICENSE.Zend,ZEND_CHANGES} php.ini-*
+%doc CREDITS EXTENSIONS LICENSE NEWS README.namespaces UPGRADING* Zend/{LICENSE.Zend,ZEND_CHANGES} php.ini-*
 %dir %{_sysconfdir}
 %dir %{_sysconfdir}/conf.d
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini
@@ -2903,7 +2982,7 @@ fi
 
 %files devel
 %defattr(644,root,root,755)
-%doc CODING_STANDARDS README.{EXTENSIONS,EXT_SKEL,PARAMETER_PARSING_API,SELF-CONTAINED-EXTENSIONS,STREAMS,SUBMITTING_PATCH,TESTING,TESTING2,UNIX-BUILD-SYSTEM,input_filter}
+%doc CODING_STANDARDS README.{EXT_SKEL,PARAMETER_PARSING_API,SELF-CONTAINED-EXTENSIONS,STREAMS,SUBMITTING_PATCH,TESTING,TESTING2,UNIX-BUILD-SYSTEM,input_filter}
 %attr(755,root,root) %{_bindir}/phpize
 %attr(755,root,root) %{_bindir}/php-config
 %attr(755,root,root) %{_libdir}/libphp_common.so
@@ -2953,6 +3032,7 @@ fi
 %files dom
 %defattr(644,root,root,755)
 %doc ext/dom/{CREDITS,TODO}
+%doc ext/dom/examples
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/dom.ini
 %attr(755,root,root) %{php_extensiondir}/dom.so
 
@@ -3270,6 +3350,7 @@ fi
 %files simplexml
 %defattr(644,root,root,755)
 %doc ext/simplexml/{CREDITS,README}
+%doc ext/simplexml/examples
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/simplexml.ini
 %attr(755,root,root) %{php_extensiondir}/simplexml.so
 
@@ -3295,7 +3376,8 @@ fi
 
 %files spl
 %defattr(644,root,root,755)
-%doc ext/spl/{CREDITS,README,TODO,examples}
+%doc ext/spl/{CREDITS,README,TODO}
+%doc ext/spl/examples
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/SPL.ini
 %attr(755,root,root) %{php_extensiondir}/spl.so
 
@@ -3352,6 +3434,7 @@ fi
 %files tidy
 %defattr(644,root,root,755)
 %doc ext/tidy/{CREDITS,README}
+%doc ext/tidy/examples
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/tidy.ini
 %attr(755,root,root) %{php_extensiondir}/tidy.so
 %endif
@@ -3378,7 +3461,8 @@ fi
 
 %files xmlreader
 %defattr(644,root,root,755)
-%doc ext/xmlreader/{CREDITS,README,TODO,examples}
+%doc ext/xmlreader/{CREDITS,README,TODO}
+%doc ext/xmlreader/examples
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/xmlreader.ini
 %attr(755,root,root) %{php_extensiondir}/xmlreader.so
 
@@ -3393,6 +3477,7 @@ fi
 %files xmlwriter
 %defattr(644,root,root,755)
 %doc ext/xmlwriter/{CREDITS,TODO}
+%doc ext/xmlwriter/examples
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/xmlwriter.ini
 %attr(755,root,root) %{php_extensiondir}/xmlwriter.so
 
@@ -3405,6 +3490,7 @@ fi
 %files zip
 %defattr(644,root,root,755)
 %doc ext/zip/{CREDITS,TODO}
+%doc ext/zip/examples
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/zip.ini
 %attr(755,root,root) %{php_extensiondir}/zip.so
 
This page took 0.064685 seconds and 4 git commands to generate.