Date: Thu, 2 Mar 2006 14:24:43 -0600 (CST) From: Craig Boston <craig@yekse.gank.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/94034: www/suphp doesn't work with Apache 2.2 (patch) Message-ID: <20060302202443.864EDCDA@ion.gank.org> Resent-Message-ID: <200603022030.k22KU5Wm075108@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 94034 >Category: ports >Synopsis: www/suphp doesn't work with Apache 2.2 (patch) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Mar 02 20:30:05 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Craig Boston >Release: FreeBSD 6.0-STABLE i386 >Organization: >Environment: >Description: Attached patch enables suphp to compile against Apache 2.2. It also fixes the port not working when WRKDIRPREFIX is set. >How-To-Repeat: >Fix: --- suphp.patch begins here --- diff -ruN suphp.orig/Makefile suphp/Makefile --- suphp.orig/Makefile Thu Mar 2 13:23:34 2006 +++ suphp/Makefile Thu Mar 2 13:50:15 2006 @@ -16,7 +16,7 @@ GNU_CONFIGURE= yes USE_PHP= yes -USE_APACHE= yes +USE_APACHE= 1.3+ WANT_PHP_CGI= yes CONFLICTS= mod_php4-4* php-4.* mod_php5-5* php-5.* @@ -53,18 +53,11 @@ .include <bsd.port.pre.mk> -.if exists(${LOCALBASE}/include/apache2/apr.h) || defined(WITH_APACHE2) -APACHE_PORT= www/apache20 -PLIST_SUB+= MODULEDIR="libexec/apache2/" -.else -PLIST_SUB+= MODULEDIR="libexec/apache/" -.endif - show-options: @${SED} -ne 's/^##//p' ${.CURDIR}/Makefile -pre-everything:: - @${MAKE} show-options +pre-everything:: show-options + @${DO_NADA} post-install: .if !defined(NOPORTDOCS) diff -ruN suphp.orig/files/patch-configure suphp/files/patch-configure --- suphp.orig/files/patch-configure Wed Dec 31 18:00:00 1969 +++ suphp/files/patch-configure Thu Mar 2 13:41:57 2006 @@ -0,0 +1,11 @@ +--- configure.orig Thu Mar 2 13:38:36 2006 ++++ configure Thu Mar 2 13:39:23 2006 +@@ -2405,7 +2405,7 @@ + | cut -f2 -d"/" \ + | cut -f1 -d" "` + major_version=`echo $APACHE_VERSION|cut -f1,2 -d.` +- if test "$major_version" = "2.0"; then ++ if test "$major_version" = "2.0" -o "$major_version" = "2.2"; then + APACHE_VERSION_2=true + APACHE_VERSION_1_3=false + else diff -ruN suphp.orig/files/patch-src::apache2::mod_suphp.c suphp/files/patch-src::apache2::mod_suphp.c --- suphp.orig/files/patch-src::apache2::mod_suphp.c Thu Mar 2 13:23:34 2006 +++ suphp/files/patch-src::apache2::mod_suphp.c Thu Mar 2 13:47:56 2006 @@ -14,3 +14,36 @@ /* set resource limits */ +@@ -524,7 +530,9 @@ + return rv; + } + +- APR_BRIGADE_FOREACH(bucket, bb) ++ for (bucket = APR_BRIGADE_FIRST(bb); ++ bucket != APR_BRIGADE_SENTINEL(bb); ++ bucket = APR_BUCKET_NEXT(bucket)) + { + const char *data; + apr_size_t len; +@@ -595,7 +603,9 @@ + + const char *buf; + apr_size_t blen; +- APR_BRIGADE_FOREACH(b, bb) ++ for (b = APR_BRIGADE_FIRST(bb); ++ b != APR_BRIGADE_SENTINEL(bb); ++ b = APR_BUCKET_NEXT(b)) + { + if (APR_BUCKET_IS_EOS(b)) + break; +@@ -616,7 +626,9 @@ + /* empty brigade (script output) */ + const char *buf; + apr_size_t blen; +- APR_BRIGADE_FOREACH(b, bb) ++ for (b = APR_BRIGADE_FIRST(bb); ++ b != APR_BRIGADE_SENTINEL(bb); ++ b = APR_BUCKET_NEXT(b)) + { + if (APR_BUCKET_IS_EOS(b)) + break; diff -ruN suphp.orig/pkg-plist suphp/pkg-plist --- suphp.orig/pkg-plist Thu Mar 2 13:23:34 2006 +++ suphp/pkg-plist Thu Mar 2 13:26:50 2006 @@ -1,5 +1,5 @@ sbin/suphp -%%MODULEDIR%%/mod_suphp.so +%%APACHEMODDIR%%/mod_suphp.so @exec %D/sbin/apxs -e -a -n suphp %D/%f @unexec %D/sbin/apxs -e -A -n suphp %D/%f %%PORTDOCS%%%%DOCSDIR%%/en/INSTALL --- suphp.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060302202443.864EDCDA>