[PATCH] www/mod_perl: cleanups
ports at c0decafe.net
ports at c0decafe.net
Thu Dec 9 15:50:05 PST 2004
>Submitter-Id: current-users
>Originator: ports at c0decafe.net
>Organization:
>Confidential: no
>Synopsis: [PATCH] www/mod_perl: cleanups
>Severity: non-critical
>Priority: low
>Category: ports
>Class: change-request
>Release: FreeBSD 5.3-STABLE i386
>Environment:
System: FreeBSD atlantis.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Tue Dec 7 20:25:50 EET
>Description:
- USE_APACHE
- www/p5-libwww is actually only needed for tests which we do not perform
- pkg-(de)install scripts are not really needed
Removed file(s):
- files/patch-Makefile.PL
- pkg-deinstall
- pkg-install
Port maintainer (apache at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:
--- mod_perl-1.29_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/www/mod_perl.orig/Makefile /usr/ports/www/mod_perl/Makefile
--- /usr/ports/www/mod_perl.orig/Makefile Thu Sep 2 12:58:25 2004
+++ /usr/ports/www/mod_perl/Makefile Fri Dec 10 00:56:52 2004
@@ -15,15 +15,9 @@
MAINTAINER= apache at FreeBSD.org
COMMENT= Embeds a Perl interpreter in the Apache server
-BUILD_DEPENDS= ${APXS}:${PORTSDIR}/${APACHE_PORT} \
- ${SITE_PERL}/LWP.pm:${PORTSDIR}/www/p5-libwww
-RUN_DEPENDS= ${BUILD_DEPENDS}
-
+USE_APACHE= yes
PERL_CONFIGURE= yes
-CONFIGURE_ARGS+= USE_APXS=1 EVERYTHING=1 INSTALLSITELIB=${SITE_PERL} \
- INSTALLSITEARCH=${SITE_PERL}/${PERL_ARCH} \
- WITH_APXS=${APXS} \
- PERL_EXTRA_CFLAGS='-DDEFAULT_PATH=\"/bin:/usr/bin:/usr/local/bin\"'
+CONFIGURE_ARGS+=USE_APXS=1 EVERYTHING=1 WITH_APXS=${APXS}
MAN3= Apache.3 Apache::Constants.3 Apache::ExtUtils.3 \
Apache::FakeRequest.3 Apache::File.3 Apache::Leak.3 \
@@ -52,13 +46,8 @@
.endif
post-install:
- ${MKDIR} ${PREFIX}/include/apache/modules/perl
+ @${MKDIR} ${PREFIX}/include/apache/modules/perl
${INSTALL_DATA} ${WRKSRC}/src/modules/perl/*.h \
${PREFIX}/include/apache/modules/perl
- ${INSTALL_PROGRAM} ${WRKSRC}/apaci/libperl.so ${PREFIX}/libexec/apache
- @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-
-post-deinstall:
- @PKG_PREFIX=${PREFIX} ${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL
.include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/www/mod_perl.orig/files/patch-Makefile.PL /usr/ports/www/mod_perl/files/patch-Makefile.PL
--- /usr/ports/www/mod_perl.orig/files/patch-Makefile.PL Wed Aug 18 22:11:12 2004
+++ /usr/ports/www/mod_perl/files/patch-Makefile.PL Thu Jan 1 02:00:00 1970
@@ -1,15 +0,0 @@
---- Makefile.PL.orig Thu Feb 15 12:39:35 2001
-+++ Makefile.PL Thu Feb 15 12:41:28 2001
-@@ -1300,7 +1300,11 @@
- my $string = $self->MM::install;
- my $add = "";
- if($USE_APXS) {
-- $add = "apxs_install";
-+# XXX The FreeBSD port for mod_perl takes care of installing libperl.so
-+# itself via the pkg-install script.
-+#
-+# $add = "apxs_install";
-+ print "Disabling apxs_install target; deferred to pkg-install\n";
- }
- elsif ($win32_auto and $win32_args{INSTALL_DLL}) {
- $add = 'amp_install';
diff -ruN --exclude=CVS /usr/ports/www/mod_perl.orig/pkg-deinstall /usr/ports/www/mod_perl/pkg-deinstall
--- /usr/ports/www/mod_perl.orig/pkg-deinstall Mon May 28 23:52:46 2001
+++ /usr/ports/www/mod_perl/pkg-deinstall Thu Jan 1 02:00:00 1970
@@ -1,57 +0,0 @@
-#!/bin/sh
-#
-# Try to de-activate mod_perl in the installed httpd.conf and warn
-# if this fails.
-#
-# $FreeBSD: ports/www/mod_perl/pkg-deinstall,v 1.1 2001/05/28 20:52:46 sheldonh Exp $
-#
-
-if [ "$2" != "POST-DEINSTALL" ]; then
- exit 0
-fi
-
-TMPDIR=${TMPDIR:=/tmp}
-PKG_TMPDIR=${PKG_TMPDIR:=${TMPDIR}}
-
-apxscmd=${PKG_PREFIX}/sbin/apxs
-tmpdir=${PKG_TMPDIR}/deinstmod_perl.$$
-
-if [ ! -x ${apxscmd} ]; then
- echo Can\'t find the apxs program: ${apxscmd}.
- exit 1
-fi
-
-confdir=`${apxscmd} -q SYSCONFDIR`
-
-if [ ! -d ${confdir} ]; then
- echo Can\'t find Apache conf dir: ${confdir}
- exit 1
-fi
-
-if [ -f ${confdir}/httpd.conf ]; then
- conffile=httpd.conf
-fi
-if [ -f ${confdir}/httpd.conf.default ]; then
- conffile="${conffile} httpd.conf.default"
-fi
-if [ -z "${conffile}" ]; then
- echo Can\'t find either of ${confdir}/httpd.conf or
- echo ${confdir}/httpd.conf.default.
- exit 1
-fi
-
-if ! mkdir ${tmpdir}; then
- echo Can\'t create temporary directory: ${tmpdir}
- exit 1
-fi
-
-for i in ${conffile}; do
- awk '{if (!/^LoadModule perl_module/ && !/^AddModule mod_perl.c/) \
- print $0}' < ${confdir}/$i > ${tmpdir}/$i
- echo Updating $i in config dir: ${confdir}
- cat ${tmpdir}/$i > ${confdir}/$i
-done
-
-rm -rf ${tmpdir}
-
-exit 0
diff -ruN --exclude=CVS /usr/ports/www/mod_perl.orig/pkg-install /usr/ports/www/mod_perl/pkg-install
--- /usr/ports/www/mod_perl.orig/pkg-install Fri Nov 5 16:50:26 1999
+++ /usr/ports/www/mod_perl/pkg-install Thu Jan 1 02:00:00 1970
@@ -1,65 +0,0 @@
-#!/bin/sh
-#
-# Try to activate mod_perl in the installed httpd.conf and warn
-# if this fails. This script could be replaced with a simple @exec
-# line in the PLIST if the apache13 package installed an httpd.conf.
-#
-# $FreeBSD: ports/www/mod_perl/pkg-install,v 1.1.1.1 1999/11/05 14:50:26 sheldonh Exp $
-#
-
-if [ "$2" != "POST-INSTALL" ]; then
- exit 0
-fi
-
-TMPDIR=${TMPDIR:=/tmp}
-PKG_TMPDIR=${PKG_TMPDIR:=${TMPDIR}}
-
-apxscmd=${PKG_PREFIX}/sbin/apxs
-perlmod=${PKG_PREFIX}/libexec/apache/libperl.so
-tmpdir=${PKG_TMPDIR}/instmod_perl.$$
-
-if [ ! -x ${apxscmd} ]; then
- echo Can\'t find the apxs program: ${apxscmd}.
- exit 1
-fi
-
-confdir=`${apxscmd} -q SYSCONFDIR`
-
-if [ ! -d ${confdir} ]; then
- echo Can\'t find Apache conf dir: ${confdir}
- exit 1
-fi
-
-if [ ! -f ${confdir}/httpd.conf ]; then
- if [ ! -f ${confdir}/httpd.conf.default ]; then
- echo Can\'t find either of ${confdir}/httpd.conf nor
- echo ${confdir}/httpd.conf.default.
- exit 1
- fi
-
- if ! mkdir ${tmpdir}; then
- echo Can\'t create temporary directory: ${tmpdir}
- exit 1
- fi
-
- cp ${confdir}/httpd.conf.default ${tmpdir}/httpd.conf
- if ${apxscmd} -e -S SYSCONFDIR=${tmpdir} -a -n perl ${perlmod}; then
- echo Updating httpd.conf.default in config dir: ${confdir}
- cat ${tmpdir}/httpd.conf > ${confdir}/httpd.conf.default
- rm -rf ${tmpdir}
- exit 0
- else
- rm -rf ${tmpdir}
- echo The apxs command failed to activate mod_perl in the config
- echo file: ${tmpdir}/httpd.conf.
- exit 1
- fi
-elif ${apxscmd} -e -a -n perl ${perlmod}; then
- exit 0
-else
- echo The apxs command failed to activate mod_perl in the config
- echo file: ${confdir}/httpd.conf
- exit 1
-fi
-
-exit 0
diff -ruN --exclude=CVS /usr/ports/www/mod_perl.orig/pkg-plist /usr/ports/www/mod_perl/pkg-plist
--- /usr/ports/www/mod_perl.orig/pkg-plist Sun Mar 28 19:58:28 2004
+++ /usr/ports/www/mod_perl/pkg-plist Fri Dec 10 00:30:07 2004
@@ -64,6 +64,8 @@
%%SITE_PERL%%/%%PERL_ARCH%%/mod_perl_traps.pod
%%SITE_PERL%%/%%PERL_ARCH%%/mod_perl_tuning.pod
libexec/apache/libperl.so
+ at exec %D/sbin/apxs -e -a -n perl %D/%f
+ at unexec %D/sbin/apxs -e -A -n perl %D/%f
@dirrm include/apache/modules/perl
@dirrm include/apache/modules
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Apache/include/modules/perl
--- mod_perl-1.29_1.patch ends here ---
More information about the freebsd-apache
mailing list