]> git.pld-linux.org Git - packages/php.git/blobdiff - php.spec
- attempt to implement graceful shutdown with SIGINT signal
[packages/php.git] / php.spec
index 971fcb8f9f01b0f261a8d979aed7989b3d12ae19..9984831179ce2967f961517a293b54a4ccb24ea8 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -46,6 +46,7 @@
 %bcond_without apache2         # disable building apache 2.x module
 %bcond_without fcgi            # disable building FCGI SAPI
 %bcond_without zts             # disable experimental-zts
+%bcond_with    tests           # default off; test process very often hangs on buildersl; perform "make test"
 %bcond_with    versioning      # build with experimental versioning (to load php4/php5 into same apache)
 
 %define apxs1          /usr/sbin/apxs1
@@ -70,7 +71,8 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
 %undefine      with_filter
 %endif
 
-%define        _rel 0.1
+%define                _rel 0.4
+%define                _rc RC1
 Summary:       PHP: Hypertext Preprocessor
 Summary(fr.UTF-8):     Le langage de script embarque-HTML PHP
 Summary(pl.UTF-8):     Język skryptowy PHP
@@ -78,13 +80,14 @@ 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:          php
-Version:       5.2.2
-Release:       %{_rel}%{?with_hardening:hardened}
+Version:       5.2.5
+Release:       %{_rel}%{?_rc:.%{_rc}}%{?with_hardening:hardened}
 Epoch:         4
 License:       PHP
 Group:         Libraries
-Source0:       http://www.php.net/distributions/%{name}-%{version}.tar.bz2
-# Source0-md5: d084337867d70b50a10322577be0e44e
+#Source0:      http://www.php.net/distributions/%{name}-%{version}.tar.bz2
+Source0:       http://downloads.php.net/ilia/%{name}-%{version}%{_rc}.tar.bz2
+# Source0-md5: 2f0c9ecbd50213958e9b69ec69f715ec
 Source2:       zend.gif
 Source3:       %{name}-mod_%{name}.conf
 Source4:       %{name}-cgi-fcgi.ini
@@ -126,10 +129,7 @@ Patch26:   %{name}-versioning.patch
 Patch27:       %{name}-linkflags-clean.patch
 Patch28:       %{name}-pear.patch
 Patch29:       %{name}-config-dir.patch
-#Patch30:      %{name}-5.1.6-CVE-2007-0455.patch
-#Patch31:      %{name}-5.1.6-CVE-2007-1001.patch
-#Patch32:      %{name}-5.1.6-CVE-2007-1583.patch
-#Patch33:      %{name}-5.1.6-CVE-2007-1718.patch
+Patch30:       %{name}-bug-42952.patch
 URL:           http://www.php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:       Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:  aspell-devel >= 2:0.50.0}
@@ -171,7 +171,7 @@ BuildRequires:      libxslt-devel >= 1.1.0
 BuildRequires: mysql-devel >= 4.0.0
 %{?with_mysqli:BuildRequires:  mysql-devel >= 4.1.0}
 BuildRequires: ncurses-ext-devel
-%{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
+%{?with_ldap:BuildRequires:    openldap-devel >= 2.4.6}
 %if %{with openssl} || %{with ldap}
 BuildRequires: openssl-devel >= 0.9.7d
 %endif
@@ -380,6 +380,7 @@ Provides:   php(spl)
 Provides:      php(standard)
 Provides:      php(zend_extension_api) = %{zend_extension_api}
 Provides:      php(zend_module_api) = %{zend_module_api}
+%{?with_pcre:Provides: php-pcre}
 Provides:      php5(debug) = %{php_debug}
 Provides:      php5(thread-safety) = %{zend_zts}
 Obsoletes:     php-pcre < 4:5.2.0
@@ -413,6 +414,7 @@ Requires:   %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      autoconf
 Requires:      automake
 Requires:      libtool
+%{?with_pcre:Requires: pcre-devel >= 6.6}
 Requires:      shtool
 Obsoletes:     php-pear-devel
 Obsoletes:     php4-devel
@@ -839,6 +841,7 @@ Summary:    ming extension module for PHP
 Summary(pl.UTF-8):     Moduł ming dla PHP
 Group:         Libraries
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+Requires:      ming >= 0.3
 Provides:      php(ming)
 
 %description ming
@@ -1508,6 +1511,7 @@ Summary:  xsl extension module for PHP
 Summary(pl.UTF-8):     Moduł xsl dla PHP
 Group:         Libraries
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
+Requires:      %{name}-dom = %{epoch}:%{version}-%{release}
 Requires:      libxslt >= 1.0.18
 # actually not true, functionality is similar, but API differs
 Provides:      php(xsl)
@@ -1550,7 +1554,7 @@ compression support to PHP.
 Moduł PHP umożliwiający używanie kompresji zlib.
 
 %prep
-%setup -q
+%setup -q -n %{name}-%{version}%{_rc}
 %patch27 -p1
 %patch0 -p1
 %patch1 -p1
@@ -1568,7 +1572,7 @@ cp php.ini-dist php.ini
 # for ac2.53b/am1.6b - AC_LANG_CXX has AM_CONDITIONAL, so cannot be invoked
 # conditionally...
 %patch11 -p1
-#%patch12 -p1 # breaks with ac cache vars, but later -lpthread is missing ...
+%patch12 -p1
 %patch13 -p1
 %patch14 -p1
 %patch15 -p1
@@ -1591,10 +1595,7 @@ patch -p1 < %{PATCH22} || exit 1
 
 %patch28 -p1
 %patch29 -p1
-#%patch30 -p1 collisions
-#%patch31 -p1 collisions
-#%patch32 -p1 reversed patch
-#%patch33 -p1 reversed patch 
+%patch30 -p1
 
 # conflict seems to be resolved by recode patches
 rm -f ext/recode/config9.m4
@@ -1653,30 +1654,32 @@ apxs2
 %endif
 "
 for sapi in $sapis; do
+       : SAPI $sapi
        [ -f Makefile.$sapi ] && continue # skip if already configured (for faster debugging purposes)
 
-       %configure \
-       `
+       sapi_args=''
        case $sapi in
        cgi)
-               echo --enable-discard-path --enable-force-cgi-redirect
-       ;;
+               sapi_args='--enable-discard-path --enable-force-cgi-redirect'
+               ;;
        cli)
-               echo --disable-cgi
-       ;;
+               sapi_args='--disable-cgi'
+               ;;
        fcgi)
-               echo --enable-fastcgi --with-fastcgi=/usr --enable-force-cgi-redirect
-       ;;
+               sapi_args='--enable-fastcgi --with-fastcgi=/usr --enable-force-cgi-redirect'
+               ;;
        apxs1)
-               ver=%(rpm -q --qf '%%{version}' apache1-apxs)
-               echo --with-apxs=%{apxs1} --with-apache-version=$ver
-       ;;
+               ver=$(rpm -q --qf '%{V}' apache1-devel)
+               sapi_args="--with-apxs=%{apxs1} --with-apache-version=$ver"
+               ;;
        apxs2)
-               ver=%(rpm -q --qf '%%{version}' apache-apxs)
-               echo --with-apxs2=%{apxs2} --with-apache-version=$ver
-       ;;
+               ver=$(rpm -q --qf '%{V}' apache-devel)
+               sapi_args="--with-apxs2=%{apxs2} --with-apache-version=$ver"
+               ;;
        esac
-       ` \
+
+       %configure \
+       $sapi_args \
 %if "%{!?configure_cache:0}%{?configure_cache}" == "0"
        --cache-file=config.cache \
 %endif
@@ -1814,18 +1817,30 @@ done
 # FCGI
 %if %{with fcgi}
 cp -af php_config.h.fcgi main/php_config.h
-%{__make} sapi/cgi/php -f Makefile.fcgi LDFLAGS=-lpthread
-cp -r sapi/cgi sapi/fcgi
 rm -rf sapi/cgi/.libs sapi/cgi/*.lo
+%{__make} sapi/cgi/php-cgi -f Makefile.fcgi
+cp -r sapi/cgi sapi/fcgi
+[ "$(echo '<?=php_sapi_name();' | ./sapi/fcgi/php-cgi -q)" = cgi-fcgi ] || exit 1
 %endif
 
 # CGI
 cp -af php_config.h.cgi main/php_config.h
-%{__make} sapi/cgi/php -f Makefile.cgi LDFLAGS=-lpthread
+rm -rf sapi/cgi/.libs sapi/cgi/*.lo
+%{__make} sapi/cgi/php-cgi -f Makefile.cgi
+[ "$(echo '<?=php_sapi_name();' | ./sapi/cgi/php-cgi -q)" = cgi ] || exit 1
 
 # CLI
 cp -af php_config.h.cli main/php_config.h
-%{__make} sapi/cli/php -f Makefile.cli LDFLAGS=-lpthread
+%{__make} sapi/cli/php -f Makefile.cli
+[ "$(echo '<?=php_sapi_name();' | ./sapi/cli/php -q)" = cli ] || exit 1
+
+%if %{with tests}
+# Run tests, using the CLI SAPI
+export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
+unset TZ LANG LC_ALL || :
+%{__make} test
+unset NO_INTERACTION REPORT_EXIT_STATUS MALLOC_CHECK_
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -1856,11 +1871,11 @@ sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_c
 sed -i -e 's|libphp_common.la|$(libdir)/libphp_common.la|' $RPM_BUILD_ROOT%{_libdir}/php/build/acinclude.m4
 
 # install CGI
-libtool --silent --mode=install install sapi/cgi/php $RPM_BUILD_ROOT%{_bindir}/php.cgi
+libtool --silent --mode=install install sapi/cgi/php-cgi $RPM_BUILD_ROOT%{_bindir}/php.cgi
 
 # install FCGI
 %if %{with fcgi}
-libtool --silent --mode=install install sapi/fcgi/php $RPM_BUILD_ROOT%{_bindir}/php.fcgi
+libtool --silent --mode=install install sapi/fcgi/php-cgi $RPM_BUILD_ROOT%{_bindir}/php.fcgi
 %endif
 
 # install CLI
This page took 0.03792 seconds and 4 git commands to generate.