Bug 91212 - www/p5-CGI-SpeedyCGI: does not build apache module
Summary: www/p5-CGI-SpeedyCGI: does not build apache module
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Lars Thegler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-02 11:00 UTC by Rong-En Fan
Modified: 2006-05-02 09:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rong-En Fan 2006-01-02 11:00:24 UTC
I found that www/p5-CGI-SpeedyCGI does not build/install
mod_speedycgi.so even if I have www/apache13 installed.

The reason is that, this port use ${APXS} to check the
existence of apxs utility, and ${APXS} is defined only
after USE_APACHE is used.

Fix: 

I am not familar with Apache ports and thus have no ideas
how to fix this correctly. Putting APXS=/usr/local/sbin/apxs
in Makefile is an workaround.
How-To-Repeat: install apache first, then
cd /usr/ports/www/p5-CGI-SpeedyCGI
make install
pkg_info -L -x p5-CGI-SpeedyCGI | grep mod_speedycgi
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-01-02 11:02:04 UTC
Responsible Changed
From-To: freebsd-ports-bugs->lth

Over to maintainer
Comment 2 Rong-En Fan 2006-04-25 18:57:04 UTC
Finally, I have a fix and convert to use OPTIONS. Default is to
build apache module since you have to specify WITHOUT_APACHE
before to disable it. bsd.apache.mk is really easy to use.
But the Apache section in Porter's Handbook is out-of-date.
Hope someone will update that :-)

Tested with apache13 and apache20 installed.

===> Generating patch
===> Viewing diff with less
diff -ruN --exclude=CVS /usr/ports/www/p5-CGI-SpeedyCGI/Makefile /home/rafan/tmp/ports/p5-CGI-SpeedyCGI/Makefile
--- /usr/ports/www/p5-CGI-SpeedyCGI/Makefile	Thu Oct  6 22:09:56 2005
+++ /home/rafan/tmp/ports/p5-CGI-SpeedyCGI/Makefile	Wed Apr 26 01:51:44 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	CGI-SpeedyCGI
 PORTVERSION=	2.22
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	www perl5
 MASTER_SITES=	${MASTER_SITE_PERL_CPAN}
 MASTER_SITE_SUBDIR=	CGI
@@ -18,24 +18,16 @@
 
 PERL_CONFIGURE=	yes
 
-.include <bsd.port.pre.mk>
+OPTIONS=	APACHE "Enable mod_speedycgi" On
 
-# define WITHOUT_APACHE to prevent mod_speedycgi from being built even if Apache is installed
+.include <bsd.port.pre.mk>
 
-.if !exists(${APXS}) || defined(WITHOUT_APACHE)
-PLIST_SUB+=	APACHE="@comment "
-CONFIGURE_ENV+=	WITHOUT_APACHE=yes
-.else
+.if !defined(WITHOUT_APACHE)
+USE_APACHE=	1.3+
 PLIST_SUB+=	APACHE=""
-.if exists(${APXS})
-APXS_WORKS!=	${APXS} -q TARGET 2>/dev/null || ${ECHO} no
-.endif
-.if exists(${APXS}) && ${APXS_WORKS} != no
-AP_LIBEXEC!=	${APXS} -q LIBEXECDIR
 .else
-AP_LIBEXEC?=	${PREFIX}/libexec/apache
-.endif
-PLIST_SUB+=	AP_LIBEXEC=${AP_LIBEXEC:S/^${PREFIX}\///}
+PLIST_SUB+=	APACHE="@comment "
+CONFIGURE_ENV+=	WITHOUT_APACHE=yes
 .endif
 
 post-patch:
diff -ruN --exclude=CVS /usr/ports/www/p5-CGI-SpeedyCGI/pkg-plist /home/rafan/tmp/ports/p5-CGI-SpeedyCGI/pkg-plist
--- /usr/ports/www/p5-CGI-SpeedyCGI/pkg-plist	Mon Jan 23 03:22:42 2006
+++ /home/rafan/tmp/ports/p5-CGI-SpeedyCGI/pkg-plist	Wed Apr 26 00:26:06 2006
@@ -1,4 +1,4 @@
-%%APACHE%%%%AP_LIBEXEC%%/mod_speedycgi.so
+%%APACHE%%%%APACHEMODDIR%%/mod_speedycgi.so
 %%SITE_PERL%%/%%PERL_ARCH%%/auto/CGI/SpeedyCGI/.packlist
 %%SITE_PERL%%/CGI/SpeedyCGI.pm
 bin/speedy
===> Done
Comment 3 Lars Thegler freebsd_committer freebsd_triage 2006-05-02 09:53:58 UTC
State Changed
From-To: open->closed

Committed. Thanks!