www/apache13-modperl does not work with external expat

Martin Nilsson martin at gneto.com
Thu Aug 11 13:58:26 GMT 2005


I'm unable to make this port work with external expat.

I have the following in make.conf
# Apache 1.3 + mod_perl
WITHOUT_APACHE_EXPAT=no
WITH_APACHE_INTERNAL_EXPAT=no

This is what I want:

www# ldd /usr/local/sbin/httpd-1.3.33+mod_perl-1.29
/usr/local/sbin/httpd-1.3.33+mod_perl-1.29:
         libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x280bf000)
         libperl.so => /usr/local/lib/perl5/5.8.7/mach/CORE/libperl.so 
(0x280d8000)
         libm.so.2 => /usr/lib/libm.so.2 (0x281d1000)
         libutil.so.3 => /usr/lib/libutil.so.3 (0x281ed000)
         libexpat.so.5 => /usr/local/lib/libexpat.so.5 (0x281f6000)
         libc_r.so.4 => /usr/lib/libc_r.so.4 (0x28214000)


Without the attached patch I get this:

www# ldd /usr/local/sbin/httpd
/usr/local/sbin/httpd:
         libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x280d2000)
         libperl.so => /usr/local/lib/perl5/5.8.7/mach/CORE/libperl.so 
(0x280eb000)
         libm.so.2 => /usr/lib/libm.so.2 (0x281e4000)
         libutil.so.3 => /usr/lib/libutil.so.3 (0x28200000)
         libc_r.so.4 => /usr/lib/libc_r.so.4 (0x28209000)


This breaks SOAP::Lite which includes the sytem expat.

The attached patch makes this port work the same way as www/apache13

Thanks in advance for fixing this!

/Martin
-------------- next part --------------
--- Makefile.orig	Tue May 17 17:22:12 2005
+++ Makefile	Tue May 17 17:22:24 2005
@@ -48,10 +48,12 @@
 WRKSRC_MODPERL=	${WRKDIR}/mod_perl-${VERSION_MODPERL}
 
 .if defined(WITHOUT_APACHE_EXPAT) && ${WITHOUT_APACHE_EXPAT} == yes
-EXPAT_CONF+=	--disable-rule=EXPAT
+EXPAT_CONF+=    --disable-rule=EXPAT
 .else
-LIB_DEPENDS+=	expat.5:${PORTSDIR}/textproc/expat2
-EXPAT_CONF+=	--enable-rule=EXPAT
+.if !defined(WITH_APACHE_INTERNAL_EXPAT) || ${WITH_APACHE_INTERNAL_EXPAT} != yes
+LIB_DEPENDS+=   expat.5:${PORTSDIR}/textproc/expat2
+.endif
+EXPAT_CONF+=    --enable-rule=EXPAT
 .endif
 
 .if defined(WITH_APACHE_SUEXEC) && ${WITH_APACHE_SUEXEC} == yes
@@ -124,11 +126,14 @@
 OPTIM+=		-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 .endif
 
-# For expat.
-CFLAGS+=	-I${LOCALBASE}/include
-LIBS+=		-L${LOCALBASE}/libs
-
 CONFIGURE_ENV=	OPTIM='${OPTIM}' LIBS='${LIBS}'
+
+.if (!defined(WITHOUT_APACHE_EXPAT) || ${WITHOUT_APACHE_EXPAT} != yes) && \
+    (!defined(WITH_APACHE_INTERNAL_EXPAT) || ${WITH_APACHE_INTERNAL_EXPAT} != yes)
+CONFIGURE_ENV+= \
+                INCLUDES=-I${LOCALBASE}/include \
+                LDFLAGS=-L${LOCALBASE}/lib
+.endif
 
 MAN1=	dbmmanage.1 htdigest.1 htpasswd.1
 


More information about the freebsd-apache mailing list