From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jan 1 22:40:24 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 A4F7116A41F for ; Sun, 1 Jan 2006 22:40:24 +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 289B243D5E for ; Sun, 1 Jan 2006 22:40:07 +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 k01Me3Cp096797 for ; Sun, 1 Jan 2006 22:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k01Me3H7096796; Sun, 1 Jan 2006 22:40:03 GMT (envelope-from gnats) Resent-Date: Sun, 1 Jan 2006 22:40:03 GMT Resent-Message-Id: <200601012240.k01Me3H7096796@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, Dominic Mitchell Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF0A816A41F for ; Sun, 1 Jan 2006 22:30:37 +0000 (GMT) (envelope-from dom@happygiraffe.net) Received: from happygiraffe.net (happygiraffe.net [81.6.215.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1869143D49 for ; Sun, 1 Jan 2006 22:30:37 +0000 (GMT) (envelope-from dom@happygiraffe.net) Received: from localhost (localhost.happygiraffe.net [127.0.0.1]) by happygiraffe.net (Postfix) with ESMTP id B3685B89C; Sun, 1 Jan 2006 22:30:35 +0000 (GMT) Received: from happygiraffe.net ([127.0.0.1]) by localhost (ppe.happygiraffe.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02707-02; Sun, 1 Jan 2006 22:30:35 +0000 (GMT) Received: by happygiraffe.net (Postfix, from userid 1001) id 1BA5BB851; Sun, 1 Jan 2006 22:30:35 +0000 (GMT) Message-Id: <20060101223035.1BA5BB851@happygiraffe.net> Date: Sun, 1 Jan 2006 22:30:35 +0000 (GMT) From: Dominic Mitchell To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: hollywar@holywar.net Subject: ports/91190: Update www/mod_fastcgi to work with Apache 2.2 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dominic Mitchell List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2006 22:40:24 -0000 >Number: 91190 >Category: ports >Synopsis: Update www/mod_fastcgi to work with Apache 2.2 >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: Sun Jan 01 22:40:03 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Dominic Mitchell >Release: FreeBSD 6.0-STABLE i386 >Organization: >Environment: System: FreeBSD ppe.happygiraffe.net 6.0-STABLE FreeBSD 6.0-STABLE #9: Sun Dec 25 17:51:37 GMT 2005 root@ppe.happygiraffe.net:/usr/obj/usr/src/sys/PPE i386 Apache 2.2 >Description: Presently, mod_fastcgi doesn't compile with Apache 2.2. I've tracked down a patch which makes it work correctly, and inserted it into this port. http://fastcgi.com/archives/fastcgi-developers/2005-December/004060.html In the process, I have converted the port to use the new USE_APACHE knob, simplifying the Makefile enormously. >How-To-Repeat: n/a >Fix: Here's the patch. I've added one new file, files/patch-apache22 and I've removed pkg-plist (it's no longer required). diff -burN /usr/ports/www/mod_fastcgi/Makefile mod_fastcgi/Makefile --- /usr/ports/www/mod_fastcgi/Makefile Sun Oct 2 09:07:32 2005 +++ mod_fastcgi/Makefile Sun Jan 1 22:29:54 2006 @@ -14,63 +14,19 @@ MAINTAINER= hollywar@mail.holywar.net COMMENT= A fast-cgi module for Apache -BUILD_DEPENDS= ${APXS}:${PORTSDIR}/${APACHE_PORT} - CONFLICTS= apache-contrib-1.* -APACHE_COMPAT= YES - -.include - -.if defined(WITH_APACHE2) || exists(${LOCALBASE}/include/apache2/apr.h) -WITH_APACHE2= YES -MAKEFILE= Makefile.AP2 -USE_REINPLACE= YES -MAKE_ARGS= INCLUDES=-I${PREFIX}/include/apache2 -INSTALL_TARGET= install-modules -PLIST_SUB= APACHE=2 -.else -PLIST_SUB= APACHE= -.endif - -.if defined(WITHOUT_APACHE_SUEXEC) -APXSOPTS+= -DNO_SUEXEC_FOR_AP_USER_N_GROUP -.endif - -do-patch: -.if defined(WITH_APACHE2) - @${REINPLACE_CMD} -e "s|/usr/local/apache2|${PREFIX}/share/apache2|g" ${WRKSRC}/${MAKEFILE} -.else - cd ${WRKSRC} ; ${MV} Makefile.tmpl Makefile ; - -do-build: - cd ${WRKSRC} ; ${LOCALBASE}/sbin/apxs -o mod_fastcgi.so -c ${APXSOPT} *.c - -do-install: - cd ${WRKSRC} ; ${LOCALBASE}/sbin/apxs -i -a -n fastcgi mod_fastcgi.so -.endif +USE_APACHE= 1.3+ +AP_FAST_BUILD= yes +AP_GENPLIST= yes +SRC_FILE= *.c +PORTDOCS= LICENSE.TERMS mod_fastcgi.html post-install: .if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} -.for file in LICENSE.TERMS mod_fastcgi.html - ${INSTALL_DATA} ${WRKSRC}/docs/${file} ${DOCSDIR} + ${MKDIR} ${DOCSDIR} +.for f in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/docs/${f} ${DOCSDIR} .endfor .endif - @${ECHO_MSG} "************************************************************" -.if !defined(WITH_APACHE2) - @${ECHO_MSG} "* Fast-cgi modules was included with your apache *" - @${ECHO_MSG} "* configuration file *" - @${ECHO_MSG} "* *" -.endif - @${ECHO_MSG} "* You need to add following lines to your apache *" - @${ECHO_MSG} "* configuration file. and restart it ! *" - @${ECHO_MSG} "* *" -.if defined(WITH_APACHE2) - @${ECHO_MSG} "* LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so *" -.endif - @${ECHO_MSG} "* AddHandler fastcgi-script fcgi fcgi fpl *" - @${ECHO_MSG} "* *" - @${ECHO_MSG} "************************************************************" - -.include +.include diff -burN /usr/ports/www/mod_fastcgi/files/patch-apache22 mod_fastcgi/files/patch-apache22 --- /usr/ports/www/mod_fastcgi/files/patch-apache22 Thu Jan 1 01:00:00 1970 +++ mod_fastcgi/files/patch-apache22 Sun Jan 1 22:22:35 2006 @@ -0,0 +1,43 @@ +Originally from +http://fastcgi.com/archives/fastcgi-developers/2005-December/004060.html + +diff -ruN mod_fastcgi-2.4.2/fcgi.h mod_fastcgi-2.4.2-ap22/fcgi.h +--- fcgi.h 2003-02-04 00:07:37.000000000 +0100 ++++ fcgi.h 2005-12-07 21:05:55.000000000 +0100 +@@ -73,6 +73,36 @@ + #define ap_reset_timeout(a) + #define ap_unblock_alarms() + ++/* starting with apache 2.2 the backward-compatibility defines for ++ * 1.3 APIs are not available anymore. Define them ourselves here. ++ */ ++#ifndef ap_copy_table ++ ++#define ap_copy_table apr_table_copy ++#define ap_cpystrn apr_cpystrn ++#define ap_destroy_pool apr_pool_destroy ++#define ap_isspace apr_isspace ++#define ap_make_array apr_array_make ++#define ap_make_table apr_table_make ++#define ap_null_cleanup apr_pool_cleanup_null ++#define ap_palloc apr_palloc ++#define ap_pcalloc apr_pcalloc ++#define ap_psprintf apr_psprintf ++#define ap_pstrcat apr_pstrcat ++#define ap_pstrdup apr_pstrdup ++#define ap_pstrndup apr_pstrndup ++#define ap_push_array apr_array_push ++#define ap_register_cleanup apr_pool_cleanup_register ++#define ap_snprintf apr_snprintf ++#define ap_table_add apr_table_add ++#define ap_table_do apr_table_do ++#define ap_table_get apr_table_get ++#define ap_table_set apr_table_set ++#define ap_table_setn apr_table_setn ++#define ap_table_unset apr_table_unset ++ ++#endif /* defined(ap_copy_table) */ ++ + #if (defined(HAVE_WRITEV) && !HAVE_WRITEV && !defined(NO_WRITEV)) || defined WIN32 + #define NO_WRITEV + #endif diff -burN /usr/ports/www/mod_fastcgi/pkg-plist mod_fastcgi/pkg-plist --- /usr/ports/www/mod_fastcgi/pkg-plist Thu Jun 19 16:41:36 2003 +++ mod_fastcgi/pkg-plist Thu Jan 1 01:00:00 1970 @@ -1,4 +0,0 @@ -libexec/apache%%APACHE%%/mod_fastcgi.so -%%PORTDOCS%%%%DOCSDIR%%/LICENSE.TERMS -%%PORTDOCS%%%%DOCSDIR%%/mod_fastcgi.html -%%PORTDOCS%%@dirrm %%DOCSDIR%% >Release-Note: >Audit-Trail: >Unformatted: