[packages/php4] - rel 48; apache24 support

arekm arekm at pld-linux.org
Mon Oct 7 13:42:31 CEST 2013


commit 36240886e702d2087e360fbe3394b8efd325bd69
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Oct 7 13:41:40 2013 +0200

    - rel 48; apache24 support

 php4-apache24.patch | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 php4.spec           |  4 ++-
 2 files changed, 101 insertions(+), 1 deletion(-)
---
diff --git a/php4.spec b/php4.spec
index 720a629..e5ff4ad 100644
--- a/php4.spec
+++ b/php4.spec
@@ -73,7 +73,7 @@
 %undefine	with_msession
 %endif
 
-%define		rel 47
+%define		rel 48
 Summary:	PHP: Hypertext Preprocessor
 Summary(fr.UTF-8):	Le langage de script embarque-HTML PHP
 Summary(pl.UTF-8):	Język skryptowy PHP
@@ -152,6 +152,7 @@ Patch54:	%{name}-m4-divert.patch
 Patch55:	%{name}-libpng.patch
 Patch56:	%{name}-gmp.patch
 Patch57:	%{name}-pcre.patch
+Patch58:	%{name}-apache24.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}
@@ -1629,6 +1630,7 @@ cp php.ini-dist php.ini
 %patch55 -p1
 %patch56 -p1
 %patch57 -p1
+%patch58 -p1
 
 %if %{with hardening}
 zcat %{SOURCE8} | patch -p1
diff --git a/php4-apache24.patch b/php4-apache24.patch
new file mode 100644
index 0000000..773245e
--- /dev/null
+++ b/php4-apache24.patch
@@ -0,0 +1,98 @@
+diff -ur -x configure -x aclocal.m4 -x config.guess -x config.sub -x '*.orig' -x install-sh -x ltmain.sh -x php_config.h.in php-4.4.9.org/acinclude.m4 php-4.4.9.changed/acinclude.m4
+--- php-4.4.9.org/acinclude.m4	2013-10-07 13:35:57.560042156 +0200
++++ php-4.4.9.changed/acinclude.m4	2013-10-07 13:35:39.659624293 +0200
+@@ -2007,6 +2007,10 @@
+   ac_output=`$1 -v 2>&1`
+ fi
+ 
++  if test -n "$FORCE_APACHE_VERSION"; then
++    ac_output="Server version: Apache/${FORCE_APACHE_VERSION} (PLD/Linux)"
++  fi
++
+   ac_IFS=$IFS
+ IFS="- /.
+ "
+diff -ur -x configure -x aclocal.m4 -x config.guess -x config.sub -x '*.orig' -x install-sh -x ltmain.sh -x php_config.h.in php-4.4.9.org/configure.in php-4.4.9.changed/configure.in
+--- php-4.4.9.org/configure.in	2013-10-07 13:35:57.586709445 +0200
++++ php-4.4.9.changed/configure.in	2013-10-07 13:34:26.551250929 +0200
+@@ -1421,6 +1421,21 @@
+ X
+   fi
+ 
++  if test "$PHP_SAPI" = "apache2handler" || test "$PHP_SAPI" = "apache2filter"; then
++    if test "$APACHE_VERSION" -ge 2004001; then
++      if test -z "$APACHE_THREADED_MPM"; then
++cat <<X
+++--------------------------------------------------------------------+
++|                        *** WARNING ***                             |
++|                                                                    |
++| You have built PHP for Apache's current non-threaded MPM.          |
++| If you change Apache to use a threaded MPM you must reconfigure    |
++| PHP with --enable-maintainer-zts                                   |
++X
++      fi
++    fi
++  fi
++
+   # Warn about linking Apache with libpthread if oci8 extension is enabled on linux.
+   if test "$PHP_OCI8" != "no" -o "$PHP_ORACLE" != "no"; then
+     if test "$PHP_SAPI" = "apache"; then
+diff -ur -x configure -x aclocal.m4 -x config.guess -x config.sub -x '*.orig' -x install-sh -x ltmain.sh -x php_config.h.in php-4.4.9.org/sapi/apache2filter/config.m4 php-4.4.9.changed/sapi/apache2filter/config.m4
+--- php-4.4.9.org/sapi/apache2filter/config.m4	2004-12-17 00:14:28.000000000 +0100
++++ php-4.4.9.changed/sapi/apache2filter/config.m4	2013-10-07 13:34:26.551250929 +0200
+@@ -36,7 +36,6 @@
+   APXS_BINDIR=`$APXS -q BINDIR`
+   APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
+   APXS_CFLAGS=`$APXS -q CFLAGS`
+-  APXS_MPM=`$APXS -q MPM_NAME`
+   APU_BINDIR=`$APXS -q APU_BINDIR`
+   APR_BINDIR=`$APXS -q APR_BINDIR`
+ 
+@@ -115,8 +114,16 @@
+     ;;
+   esac
+ 
+-  if test "$APXS_MPM" != "prefork"; then
+-    PHP_BUILD_THREAD_SAFE
++  if test "$APACHE_VERSION" -lt 2004001; then
++    APXS_MPM=`$APXS -q MPM_NAME`
++    if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
++      PHP_BUILD_THREAD_SAFE
++    fi
++  else
++    APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
++    if test -n "$APACHE_THREADED_MPM"; then
++      PHP_BUILD_THREAD_SAFE
++    fi
+   fi
+   AC_MSG_RESULT(yes)
+ 
+diff -ur -x configure -x aclocal.m4 -x config.guess -x config.sub -x '*.orig' -x install-sh -x ltmain.sh -x php_config.h.in php-4.4.9.org/sapi/apache2handler/config.m4 php-4.4.9.changed/sapi/apache2handler/config.m4
+--- php-4.4.9.org/sapi/apache2handler/config.m4	2013-10-07 13:35:57.520041222 +0200
++++ php-4.4.9.changed/sapi/apache2handler/config.m4	2013-10-07 13:34:26.551250929 +0200
+@@ -35,7 +35,6 @@
+   APXS_BINDIR=`$APXS -q BINDIR`
+   APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
+   APXS_CFLAGS=`$APXS -q CFLAGS`
+-  APXS_MPM=`$APXS -q MPM_NAME`
+   APU_BINDIR=`$APXS -q APU_BINDIR`
+   APR_BINDIR=`$APXS -q APR_BINDIR`
+ 
+@@ -114,8 +113,16 @@
+     ;;
+   esac
+ 
+-  if test "$APXS_MPM" != "prefork"; then
+-    PHP_BUILD_THREAD_SAFE
++  if test "$APACHE_VERSION" -lt 2004001; then
++    APXS_MPM=`$APXS -q MPM_NAME`
++    if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then
++      PHP_BUILD_THREAD_SAFE
++    fi
++  else
++    APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
++    if test -n "$APACHE_THREADED_MPM"; then
++      PHP_BUILD_THREAD_SAFE
++    fi
+   fi
+   AC_MSG_RESULT(yes)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php4.git/commitdiff/36240886e702d2087e360fbe3394b8efd325bd69



More information about the pld-cvs-commit mailing list