From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Mar 2 20:30:06 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 874C016A420 for ; Thu, 2 Mar 2006 20:30:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1402B43D46 for ; Thu, 2 Mar 2006 20:30:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k22KU55e075109 for ; Thu, 2 Mar 2006 20:30:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k22KU5Wm075108; Thu, 2 Mar 2006 20:30:05 GMT (envelope-from gnats) Resent-Date: Thu, 2 Mar 2006 20:30:05 GMT Resent-Message-Id: <200603022030.k22KU5Wm075108@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Craig Boston Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC7EB16A420 for ; Thu, 2 Mar 2006 20:24:46 +0000 (GMT) (envelope-from craig@yekse.gank.org) Received: from ion.gank.org (ion.gank.org [64.81.113.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id E934543D48 for ; Thu, 2 Mar 2006 20:24:45 +0000 (GMT) (envelope-from craig@yekse.gank.org) Received: by ion.gank.org (mail, from userid 1001) id 864EDCDA; Thu, 2 Mar 2006 14:24:43 -0600 (CST) Message-Id: <20060302202443.864EDCDA@ion.gank.org> Date: Thu, 2 Mar 2006 14:24:43 -0600 (CST) From: Craig Boston To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/94034: www/suphp doesn't work with Apache 2.2 (patch) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Craig Boston List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2006 20:30:06 -0000 >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 -.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: