On Thu, Jun 21, 2007 at 11:33:01PM +0200, Simon Bertrang wrote:
> On Thu, Jun 21, 2007 at 12:39:00AM +0200, Simon Bertrang wrote:
> > Hi Porters,
> > following Marc Espie's recent addition of apache-module.port.mk i
> > converted all apache ports in the tree to use MODULES+=apache-module.
> > 
> > The diffs attached to this mail have noone respectively all recipients
> > of this mail as maintainer...  test, comments and oks are needed to get
> > this done.
> > 
> 
> After Antoine Jacoutot added SHARED_ONLY=Yes to apache-module.port.mk
> i've updated all diffs accordingly.  Besides this a few more ports have
> no maintainer anymore.  If you're using one or more of those ports and
> care to maintain them, please step up.
> 
> Three ports don't run (though build fine) but didn't before my diff
> either:  mod_auth_bsd, mod_auth_radius and mod_log_sql complain about
> unresolved symbols.  I had no time to check them yet;  patches welcome.
> 

They ran before;  these three diffs are wrong.

Some apache modules use mixed names (mod_foo_bar vs. bar_foo_module) and
force me to play boring variable games to get the `expected', working
results.

Updated diffs attached;  you need apache-module.port.mk r1.6 for these.

Regards,
Simon
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/mod_auth_bsd/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- Makefile    21 Feb 2007 20:26:33 -0000      1.5
+++ Makefile    21 Jun 2007 21:17:06 -0000
@@ -4,13 +4,15 @@ COMMENT=      "provides HTTP Basic authentica
 
 VERSION=       0.8.2
 DISTNAME=      bsdauth-${VERSION}
-PKGNAME=       mod_auth_bsd-${VERSION}
+PKGNAME=       mod_auth_bsd-${VERSION}p0
 EXTRACT_SUFX=  .tgz
 CATEGORIES=    www
 MASTER_SITES=  http://www.25thandclement.com/~william/projects/releases/
 
 HOMEPAGE=      http://www.25thandclement.com/~william/projects/bsdauth.html
 
+MODULES+=      apache-module
+
 # ISC-like
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
@@ -18,18 +20,17 @@ PERMIT_PACKAGE_CDROM=       Yes
 PERMIT_PACKAGE_FTP=    Yes
 WANTLIB=               event
 
+MODAPACHE_NAME=                auth_bsd
+
 NO_REGRESS=    Yes
 
 post-build:
-       @sed 's,_PREFIX_,${PREFIX},' \
-               < ${FILESDIR}/mod_auth_bsd-enable \
-               > ${WRKBUILD}/mod_auth_bsd-enable
+       @${MODAPACHE_CREATE_ENABLE_SCRIPT}
 
 do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mod_auth_bsd
        ${INSTALL_DATA} ${WRKSRC}/INSTALL \
                ${PREFIX}/share/doc/mod_auth_bsd/README
-       ${INSTALL_DATA} ${WRKBUILD}/mod_auth_bsd.so ${PREFIX}/lib
-       ${INSTALL_SCRIPT} ${WRKBUILD}/mod_auth_bsd-enable ${PREFIX}/sbin
+       ${MODAPACHE_INSTALL}
 
 .include <bsd.port.mk>
Index: files/mod_auth_bsd-enable
===================================================================
RCS file: /cvs/ports/www/mod_auth_bsd/files/mod_auth_bsd-enable,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 mod_auth_bsd-enable
--- files/mod_auth_bsd-enable   11 Jul 2004 06:54:50 -0000      1.1.1.1
+++ files/mod_auth_bsd-enable   21 Jun 2007 21:17:06 -0000
@@ -1,17 +0,0 @@
-#!/bin/sh
-#      $OpenBSD: mod_auth_bsd-enable,v 1.1.1.1 2004/07/11 06:54:50 jolan Exp $
-
-MODULE=_PREFIX_/lib/mod_auth_bsd.so
-
-if [ `id -u` -ne 0 ]; then
-    echo "You must be root to run this script."
-    exit
-fi
-
-if [ ! -f ${MODULE} ]; then
-    echo "Cannot find auth_bsd module (${MODULE})"
-    exit 1
-else
-    echo "Enabling BSD Authentication module..."
-    /usr/sbin/apxs -i -a -n bsd_auth ${MODULE}
-fi
Index: pkg/MESSAGE
===================================================================
RCS file: /cvs/ports/www/mod_auth_bsd/pkg/MESSAGE,v
retrieving revision 1.2
diff -u -p -r1.2 MESSAGE
--- pkg/MESSAGE 13 Oct 2004 18:59:33 -0000      1.2
+++ pkg/MESSAGE 21 Jun 2007 21:17:06 -0000
@@ -1,7 +1,7 @@
 To finish the install of mod_auth_bsd, you need
 to enable the module using the following command:
 
-# ${PREFIX}/sbin/mod_auth_bsd-enable
+# ${PREFIX}/sbin/${MODAPACHE_ENABLE}
 
 If you already have Apache running on your machine,
 you should not use "apachectl restart" - instead,
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/mod_auth_bsd/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST
--- pkg/PLIST   11 Jan 2006 08:20:26 -0000      1.4
+++ pkg/PLIST   21 Jun 2007 21:17:06 -0000
@@ -1,6 +1,7 @@
 @comment $OpenBSD: PLIST,v 1.4 2006/01/11 08:20:26 jolan Exp $
-lib/mod_auth_bsd.so
-sbin/mod_auth_bsd-enable
+lib/${MODAPACHE_MODULE}
[EMAIL PROTECTED] test -f ${MODAPACHE_FINAL} && cp -fp %D/%F ${MODAPACHE_FINAL}
+sbin/${MODAPACHE_ENABLE}
 share/doc/mod_auth_bsd/
 share/doc/mod_auth_bsd/README
[EMAIL PROTECTED] /usr/lib/apache/modules/mod_auth_bsd.so
[EMAIL PROTECTED] rm -f ${MODAPACHE_FINAL}
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/mod_auth_radius/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile    12 Nov 2006 23:28:42 -0000      1.14
+++ Makefile    21 Jun 2007 21:17:08 -0000
@@ -1,12 +1,9 @@
 # $OpenBSD: Makefile,v 1.14 2006/11/12 23:28:42 jcs Exp $
 
-# This port currently only works with archs supporting dynamic loading
-# and has Apache that supports DSO's.
-SHARED_ONLY=   Yes
-
 DISTNAME=      mod_auth_radius-1.5.7
-PKGNAME=       ${DISTNAME}p2
+PKGNAME=       ${DISTNAME}p3
 CATEGORIES=    www
+MODULES+=      apache-module
 
 # Apache
 PERMIT_PACKAGE_CDROM=  Yes
@@ -19,23 +16,22 @@ HOMEPAGE=   http://www.freeradius.org/mod_
 MASTER_SITES=  ftp://ftp.freeradius.org/pub/radius/
 EXTRACT_SUFX=  .tar
 
+MODAPACHE_NAME=        auth_radius
+
 NO_REGRESS=    Yes
 
 WRKDIST=       ${WRKDIR}/${DISTNAME}
 
 do-build:
        @cd ${WRKSRC}; /usr/sbin/apxs -c mod_auth_radius.c
-       @sed 's,!!PREFIX!!,${PREFIX},' \
-               < ${FILESDIR}/mod_auth_radius-enable \
-               > ${WRKBUILD}/mod_auth_radius-enable
+       @${MODAPACHE_CREATE_ENABLE_SCRIPT}
 
 do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mod_auth_radius
-       ${INSTALL_DATA} ${WRKSRC}/mod_auth_radius.so ${PREFIX}/lib
-       ${INSTALL_SCRIPT} ${WRKBUILD}/mod_auth_radius-enable ${PREFIX}/sbin
        ${INSTALL_DATA} ${WRKSRC}/httpd.conf \
                ${PREFIX}/share/examples/mod_auth_radius/httpd.conf-example
        ${INSTALL_DATA} ${WRKSRC}/htaccess \
                ${PREFIX}/share/examples/mod_auth_radius/htaccess-example
+       ${MODAPACHE_INSTALL}
 
 .include <bsd.port.mk>
Index: files/mod_auth_radius-enable
===================================================================
RCS file: /cvs/ports/www/mod_auth_radius/files/mod_auth_radius-enable,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 mod_auth_radius-enable
--- files/mod_auth_radius-enable        1 Sep 2001 15:26:13 -0000       1.1.1.1
+++ files/mod_auth_radius-enable        21 Jun 2007 21:17:08 -0000
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# $OpenBSD: mod_auth_radius-enable,v 1.1.1.1 2001/09/01 15:26:13 jcs Exp $
-
-MODULE=!!PREFIX!!/lib/mod_auth_radius.so
-
-if [ `id -u` -ne 0 ]; then
-    echo "You must be root to run this script."
-    exit
-fi
-
-if [ ! -f ${MODULE} ]; then
-    echo "Cannot find mod_auth_radius module (${MODULE})"
-    exit 1
-else
-    echo "Enabling RADIUS Authentication module..."
-    /usr/sbin/apxs -i -a -n radius_auth ${MODULE}
-fi
Index: pkg/MESSAGE
===================================================================
RCS file: /cvs/ports/www/mod_auth_radius/pkg/MESSAGE,v
retrieving revision 1.3
diff -u -p -r1.3 MESSAGE
--- pkg/MESSAGE 13 Oct 2004 18:59:33 -0000      1.3
+++ pkg/MESSAGE 21 Jun 2007 21:17:08 -0000
@@ -1,7 +1,7 @@
 To finish the install of mod_auth_radius, you need
 to enable the module using the following command
 
-  ${PREFIX}/sbin/mod_auth_radius-enable
+  ${PREFIX}/sbin/${MODAPACHE_ENABLE}
 
 Also, copy the following file into your Apache config:
 ${PREFIX}/share/examples/mod_auth_radius/httpd.conf-example
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/mod_auth_radius/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   7 Feb 2005 12:11:09 -0000       1.3
+++ pkg/PLIST   21 Jun 2007 21:17:08 -0000
@@ -1,7 +1,8 @@
 @comment $OpenBSD: PLIST,v 1.3 2005/02/07 12:11:09 alek Exp $
-lib/mod_auth_radius.so
-sbin/mod_auth_radius-enable
+lib/${MODAPACHE_MODULE}
[EMAIL PROTECTED] test -f ${MODAPACHE_FINAL} && cp -fp %D/%F ${MODAPACHE_FINAL}
+sbin/${MODAPACHE_ENABLE}
 share/examples/mod_auth_radius/
 share/examples/mod_auth_radius/htaccess-example
 share/examples/mod_auth_radius/httpd.conf-example
[EMAIL PROTECTED] rm -f /usr/lib/apache/modules/mod_auth_radius.so
[EMAIL PROTECTED] rm -f ${MODAPACHE_FINAL}
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/mod_log_sql/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile    4 Aug 2006 00:10:42 -0000       1.8
+++ Makefile    21 Jun 2007 21:17:11 -0000
@@ -2,16 +2,14 @@
 
 COMMENT=       "Apache module for logging to an SQL database"
 
-# This port currently only works with archs supporting dynamic loading
-# and has Apache that supports DSO's.
-SHARED_ONLY=   Yes
-
 DISTNAME=      mod_log_sql-1.18
-PKGNAME=       ${DISTNAME}p0
+PKGNAME=       ${DISTNAME}p1
 CATEGORIES=    www
 
 HOMEPAGE=      http://www.outoforder.cc/projects/apache/mod_log_sql/
 
+MODULES+=      apache-module
+
 # Artistic
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
@@ -19,6 +17,8 @@ PERMIT_DISTFILES_CDROM=       Yes
 PERMIT_DISTFILES_FTP=  Yes
 WANTLIB=               z
 
+MODAPACHE_NAME=        log_sql
+
 MASTER_SITES=  http://www.outoforder.cc/downloads/mod_log_sql/
 EXTRACT_SUFX=  .tar.bz2
 
@@ -36,13 +36,9 @@ FLAGS=               -I${LOCALBASE}/include/mysql -L$
 do-build:
        cd ${WRKBUILD} && \
                ${APXS} -c -o mod_log_sql.so ${FLAGS} mod_log_sql.c
-       @sed 's,!!PREFIX!!,${PREFIX},' \
-               < ${FILESDIR}/mod_log_sql-enable \
-               > ${WRKBUILD}/mod_log_sql-enable
+       @${MODAPACHE_CREATE_ENABLE_SCRIPT}
 
 do-install:
-       ${INSTALL_DATA} ${WRKBUILD}/mod_log_sql.so ${PREFIX}/lib
-       ${INSTALL_SCRIPT} ${WRKBUILD}/mod_log_sql-enable ${PREFIX}/sbin
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mod_log_sql
        for p in ${EXAMPLES}; do \
                ${INSTALL_DATA} ${WRKSRC}/$$p \
@@ -51,5 +47,6 @@ do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mod_log_sql
        ${INSTALL_DATA} ${WRKSRC}/Documentation/HTML/* \
                ${PREFIX}/share/doc/mod_log_sql
+       ${MODAPACHE_INSTALL}
 
 .include <bsd.port.mk>
Index: files/mod_log_sql-enable
===================================================================
RCS file: /cvs/ports/www/mod_log_sql/files/mod_log_sql-enable,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 mod_log_sql-enable
--- files/mod_log_sql-enable    26 May 2003 15:19:32 -0000      1.1.1.1
+++ files/mod_log_sql-enable    21 Jun 2007 21:17:11 -0000
@@ -1,18 +0,0 @@
-#!/bin/sh
-#
-# $OpenBSD: mod_log_sql-enable,v 1.1.1.1 2003/05/26 15:19:32 naddy Exp $
-
-MODULE=!!PREFIX!!/lib/mod_log_sql.so
-
-if [ `id -u` -ne 0 ]; then
-       echo "You must be root to run this script."
-       exit
-fi
-
-if [ ! -f ${MODULE} ]; then
-       echo "Cannot find mod_log_sql module (${MODULE})"
-       exit 1
-else
-       echo "Enabling Log SQL module..."
-       /usr/sbin/apxs -i -a -n sql_log ${MODULE}
-fi
Index: pkg/MESSAGE
===================================================================
RCS file: /cvs/ports/www/mod_log_sql/pkg/MESSAGE,v
retrieving revision 1.2
diff -u -p -r1.2 MESSAGE
--- pkg/MESSAGE 13 Oct 2004 18:59:33 -0000      1.2
+++ pkg/MESSAGE 21 Jun 2007 21:17:11 -0000
@@ -1,7 +1,7 @@
 To finish the install of mod_log_sql, you need
 to enable the module using the following command
 
-  ${PREFIX}/sbin/mod_log_sql-enable
+  ${PREFIX}/sbin/${MODAPACHE_ENABLE}
 
 If you already have Apache running on your machine,
 you should not use "apachectl restart" - instead,
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/mod_log_sql/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   5 Feb 2005 10:49:49 -0000       1.3
+++ pkg/PLIST   21 Jun 2007 21:17:11 -0000
@@ -1,6 +1,7 @@
 @comment $OpenBSD: PLIST,v 1.3 2005/02/05 10:49:49 alek Exp $
-lib/mod_log_sql.so
-sbin/mod_log_sql-enable
+lib/${MODAPACHE_MODULE}
[EMAIL PROTECTED] test -f ${MODAPACHE_FINAL} && cp -fp %D/%F ${MODAPACHE_FINAL}
+sbin/${MODAPACHE_ENABLE}
 share/doc/mod_log_sql/
 share/doc/mod_log_sql/contents.png
 share/doc/mod_log_sql/documentation.css
@@ -24,4 +25,4 @@ share/doc/mod_log_sql/up_g.png
 share/examples/mod_log_sql/
 share/examples/mod_log_sql/create_tables.sql
 share/examples/mod_log_sql/make_combined_log.pl
[EMAIL PROTECTED] rm -f /usr/lib/apache/modules/mod_log_sql.so
[EMAIL PROTECTED] rm -f ${MODAPACHE_FINAL}

Reply via email to