ports/118307: www/mod_perl2: [PATCH]: fix WITHOUT_APRUTIL_THREADS=yes, minor pkg-list fix, portlint fix

Philip M. Gollucci pgollucci at p6m7g8.com
Wed Nov 28 13:03:21 UTC 2007


>Number:         118307
>Category:       ports
>Synopsis:       www/mod_perl2: [PATCH]: fix WITHOUT_APRUTIL_THREADS=yes, minor pkg-list fix, portlint fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 28 13:00:02 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Philip M. Gollucci
>Release:        8.0-CURRENT
>Organization:
Riderway Inc.
>Environment:
FreeBSD philip.hq.rws 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Tue Nov  6 16:28:12 EST 2007     pgollucci at philip.hq.rws:/usr/obj/usr/src/sys/RIDERWAY  i386

>Description:
.if ${APACHE_VERSION} >= 21
PLIST_SUB+=    THREADMUTEX=""
.else
PLIST_SUB+=    THREADMUTEX="@comment "
.endif

is clearly wrong as the threadedness of apr-util/apr does not depend on apache version, but rather the:
  --disable-threads/--enable-threads parameter of ./configure.
In the APR port, you can set WITHOUT_APRUTIL_THREADS=yes to get the disable one.

If you do this, apr-nothr is installed.

Now go build www/mod_perl2 using www/apache22.

This breaks.

This fixes it.  I'm not sure this is the correct FreeBSD port way to get this information in the ports Makefile, but it does work at least for me.

I asked over on dev at apr.apache.org and was told not to use apxs/apr-1-config/apu-1-config by the VP since thats what first came to my mind.

Note, even though devel/apr is 1.2.x you can't discount apr 0.9x since 
www/apache20 bundles 0.9.12 and you can not use the devel/apr port with www/apache20 (thats correct btw).









>How-To-Repeat:

>Fix:
Apply patch

Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/www/mod_perl2/Makefile,v
retrieving revision 1.58
diff -u -r1.58 Makefile
--- Makefile	10 Sep 2007 00:45:02 -0000	1.58
+++ Makefile	28 Nov 2007 01:54:18 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	mod_perl
 PORTVERSION=	2.0.3
-PORTREVISION=	2
+PORTREVISION=	3
 PORTEPOCH=	3
 CATEGORIES=	www perl5
 MASTER_SITES=	http://perl.apache.org/dist/ \
@@ -34,7 +34,7 @@
 		APR::Date.3 APR::Error.3 APR::Finfo.3 APR::IpSubnet.3 \
 		APR::OS.3 APR::PerlIO.3 APR::Pool.3 APR::SockAddr.3 \
 		APR::Socket.3 APR::Status.3 APR::String.3 APR::Table.3 \
-		APR::ThreadMutex.3 APR::URI.3 APR::UUID.3 APR::Util.3 \
+		APR::URI.3 APR::UUID.3 APR::Util.3 \
 		Apache2::Access.3 Apache2::Build.3 Apache2::CmdParms.3 \
 		Apache2::Command.3 Apache2::Connection.3 Apache2::Const.3 \
 		Apache2::Directive.3 Apache2::Filter.3 Apache2::FilterRec.3 \
@@ -61,7 +61,16 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${APACHE_VERSION} >= 21
+.if exists(${PREFIX}/include/apr-1/apr.h)
+APR_H=	${PREFIX}/include/apr-1/apr.h
+.else
+APR_H=	${PREFIX}/include/apr/apr.h"
+.endif
+
+APR_HAS_THREADS!=	${ECHO_CMD} `${GREP} -c 'APR_HAS_THREADS *1' ${APR_H}`
+
+.if ${APR_HAS_THREADS} == 1
+MAN3+=	APR::ThreadMutex.3
 PLIST_SUB+=	THREADMUTEX=""
 .else
 PLIST_SUB+=	THREADMUTEX="@comment "
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/www/mod_perl2/pkg-plist,v
retrieving revision 1.32
diff -u -r1.32 pkg-plist
--- pkg-plist	2 Dec 2006 00:33:01 -0000	1.32
+++ pkg-plist	23 Nov 2007 09:44:38 -0000
@@ -337,7 +337,7 @@
 @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Apache2
 @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Apache
 @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/APR
- at dirrm %%SITE_PERL%%/%%PERL_ARCH%%
+ at dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%
 @dirrm %%APACHEINCLUDEDIR%%/modules/perl
 @dirrmtry %%APACHEINCLUDEDIR%%/modules
 @dirrmtry %%APACHEINCLUDEDIR%%


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list