Subject: Re: Proftpd + MYSQL support
To: Quentin Garnier <cube@cubidou.net>
From: Geert Hendrickx <ghen@telenet.be>
List: tech-pkg
Date: 11/23/2005 14:14:55
--MGYHOYXEY6WxJCY8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Wed, Nov 23, 2005 at 12:13:51PM +0100, Quentin Garnier wrote:
> > > the "ts" modifier cannot be used since it's not supported by the
> > > make(1) shipped with netbsd-1-6.
> >
> > Heh, then how should we fix this? The package currently uses
> > MODULES:=${MODULES}:foo but this way MODULES starts with a colon which
> > confuses the configure script...
>
> Pass ${MODULES:C/^://}.
Good idea. Here's the patch to implement it that way + OPTION'ize the
modules.
Geert
--MGYHOYXEY6WxJCY8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="proftpd.diff"
Index: options.mk
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/net/proftpd/options.mk,v
retrieving revision 1.1
diff -u -r1.1 options.mk
--- options.mk 22 Jun 2005 22:43:37 -0000 1.1
+++ options.mk 23 Nov 2005 13:11:20 -0000
@@ -1,8 +1,13 @@
# $NetBSD: options.mk,v 1.1 2005/06/22 22:43:37 salo Exp $
#
-PKG_OPTIONS_VAR = PKG_OPTIONS.proftpd
-PKG_SUPPORTED_OPTIONS = pam wrap quota
+PKG_OPTIONS_VAR= PKG_OPTIONS.proftpd
+PKG_SUPPORTED_OPTIONS= pam wrap quota ldap mysql pgsql readme
+
+PKG_OPTIONS_LEGACY_VARS+= PROFTPD_USE_LDAP:ldap
+PKG_OPTIONS_LEGACY_VARS+= PROFTPD_USE_MYSQL:mysql
+PKG_OPTIONS_LEGACY_VARS+= PROFTPD_USE_POSTGRES:pgsql
+PKG_OPTIONS_LEGACY_VARS+= PROFTPD_USE_README:readme
.include "../../mk/bsd.options.mk"
@@ -11,35 +16,35 @@
.include "../../mk/pam.buildlink3.mk"
.endif
-MODULES=#defined
+MODULES= # defined
.if !empty(PKG_OPTIONS:Mwrap)
-MODULES:=${MODULES}mod_wrap
+MODULES:= ${MODULES}:mod_wrap
.endif
.if !empty(PKG_OPTIONS:Mquota)
-MODULES:=${MODULES}mod_quota
+MODULES:= ${MODULES}:mod_quota
+.endif
+
+.if !empty(PKG_OPTIONS:Mldap)
+MODULES:= ${MODULES}:mod_ldap
+.include "../../databases/openldap/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mmysql)
+MODULES:= ${MODULES}:mod_sql:mod_sql_mysql
+.include "../../mk/mysql.buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpgsql)
+MODULES:= ${MODULES}:mod_sql:mod_sql_pgsql
+.include "../../mk/pgsql.buildlink3.mk"
.endif
-## .if defined(PROFTPD_USE_LDAP) && ${PROFTPD_USE_LDAP} == "YES"
-## MODULES:= ${MODULES}:mod_ldap
-## DEPENDS+= openldap-[0-9]*:../../databases/openldap
-## .endif
-##
-## .if defined(PROFTPD_USE_MYSQL) && ${PROFTPD_USE_MYSQL} == "YES"
-## MODULES:= ${MODULES}:mod_sql:mod_sql_mysql
-## DEPENDS+= mysql-client-[0-9]*:../../databases/mysql-client
-## .endif
-##
-## .if defined(PROFTPD_USE_POSTGRES) && ${PROFTPD_USE_POSTGRES} == "YES"
-## MODULES:= ${MODULES}:mod_sql:mod_sql_postgres
-## DEPENDS+= postgresql-client-[0-9]*:../../databases/postgresql-client
-## .endif
-##
-## .if defined(PROFTPD_USE_README) && ${PROFTPD_USE_README} == "YES"
-## MODULES:= ${MODULES}:mod_readme
-## .endif
+.if !empty(PKG_OPTIONS:Mreadme)
+MODULES:= ${MODULES}:mod_readme
+.endif
.if !empty(MODULES)
-CONFIGURE_ARGS+= --with-modules=${MODULES}
+CONFIGURE_ARGS+= --with-modules=${MODULES:C/^://}
.endif
--MGYHOYXEY6WxJCY8--