pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/apr Convert to use bsd.options.mk and use subst....
details: https://anonhg.NetBSD.org/pkgsrc/rev/bf0dd700d455
branches: trunk
changeset: 483706:bf0dd700d455
user: xtraeme <xtraeme%pkgsrc.org@localhost>
date: Wed Nov 17 19:30:12 2004 +0000
description:
Convert to use bsd.options.mk and use subst.mk instead of using
sed(1)/mv(1).
# XXX Support for the following variables will be removed after the
# XXX pkgsrc-2004Q3 branch is released:
# XXX
# XXX APR_USE_DB4
# XXX APR_USE_OPENLDAP
diffstat:
devel/apr/Makefile | 37 ++++++++-----------------------------
devel/apr/buildlink3.mk | 7 ++++---
devel/apr/options.mk | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+), 32 deletions(-)
diffs (126 lines):
diff -r beb42d9e5c77 -r bf0dd700d455 devel/apr/Makefile
--- a/devel/apr/Makefile Wed Nov 17 18:47:19 2004 +0000
+++ b/devel/apr/Makefile Wed Nov 17 19:30:12 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2004/11/10 18:09:07 epg Exp $
+# $NetBSD: Makefile,v 1.28 2004/11/17 19:30:12 xtraeme Exp $
PKGNAME= apr-${APR_VERSION}.${APACHE_VERSION}
PKGREVISION= 1
@@ -23,13 +23,6 @@
LDFLAGS.SunOS+= -lnsl
-pre-configure:
-.for f in apr/config.layout apr-util/config.layout
- ${SED} -e 's|@PREFIX@|${PREFIX}|g' < ${WRKSRC}/$f > ${WRKSRC}/$f.new
- ${MV} ${WRKSRC}/$f.new ${WRKSRC}/$f
-.endfor
-.undef f
-
APR_CONFIGURE_ARGS= \
--prefix=${PREFIX} \
--with-devrandom=/dev/urandom \
@@ -42,15 +35,7 @@
--without-gdbm
.include "../../mk/bsd.prefs.mk"
-
-BUILD_DEFS+= APR_USE_OPENLDAP APR_USE_DB4
-
-.if !empty(APR_USE_DB4:M[Yy][Ee][Ss])
-APU_CONFIGURE_ARGS+=\
- --with-berkeley-db=${BUILDLINK_PREFIX.db4}/include:${LOCALBASE}
-.else
-APU_CONFIGURE_ARGS+= --with-dbm=sdbm
-.endif
+.include "options.mk"
do-configure:
@cd ${WRKSRC}/apr && ${SETENV} ${CONFIGURE_ENV} ./configure \
@@ -65,18 +50,12 @@
@${CHMOD} ${PKGDIRMODE} ${PREFIX}/include/apr-0
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/include/apr-0/
-.include "../../www/apache2/Makefile.common"
-
-.if !empty(APR_USE_DB4:M[Yy][Ee][Ss])
-.include "../../databases/db4/buildlink3.mk"
-.endif
+SUBST_CLASSES+= conf
+SUBST_STAGE.conf= pre-configure
+SUBST_FILES.conf= apr/config.layout apr-util/config.layout
+SUBST_SED.conf= -e "s,@PREFIX@,${PREFIX},g"
+SUBST_MESSAGE.conf= "Fixing harcoded paths."
-# Enable OpenLDAP support
-.if !empty(APR_USE_OPENLDAP:M[Yy][Ee][Ss])
-APU_CONFIGURE_ARGS+= --with-ldap
-APR_CONFIGURE_ARGS+= --with-ldap
-.include "../../databases/openldap/buildlink3.mk"
-.endif
-
+.include "../../www/apache2/Makefile.common"
.include "../../textproc/expat/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r beb42d9e5c77 -r bf0dd700d455 devel/apr/buildlink3.mk
--- a/devel/apr/buildlink3.mk Wed Nov 17 18:47:19 2004 +0000
+++ b/devel/apr/buildlink3.mk Wed Nov 17 19:30:12 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.8 2004/10/26 04:57:12 xtraeme Exp $
+# $NetBSD: buildlink3.mk,v 1.9 2004/11/17 19:30:12 xtraeme Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
APR_BUILDLINK3_MK:= ${APR_BUILDLINK3_MK}+
@@ -22,10 +22,11 @@
BUILDLINK_FILES.apr+= lib/*.exp
.endif # APR_BUILDLINK3_MK
-.if !empty(APR_USE_DB4:M[yY][eE][sS])
+.if !empty(PKG_OPTIONS.apr:Mdb4)
. include "../../databases/db4/buildlink3.mk"
.endif
-.if !empty(APR_USE_OPENLDAP:M[Yy][Ee][Ss])
+
+.if !empty(PKG_OPTIONS.apr:Mopenldap)
. include "../../databases/openldap/buildlink3.mk"
.endif
diff -r beb42d9e5c77 -r bf0dd700d455 devel/apr/options.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/apr/options.mk Wed Nov 17 19:30:12 2004 +0000
@@ -0,0 +1,34 @@
+# $NetBSD: options.mk,v 1.1 2004/11/17 19:30:12 xtraeme Exp $
+#
+# XXX Support for the following variables will be removed after the
+# XXX pkgsrc-2004Q3 branch is released:
+# XXX
+# XXX APR_USE_DB4
+# XXX APR_USE_OPENLDAP
+
+.if defined(APR_USE_DB4) && !empty(APR_USE_DB4:M[Yy][Ee][Ss])
+PKG_DEFAULT_OPTIONS+= db4
+.endif
+
+.if defined(APR_USE_OPENLDAP) && !empty(APR_USE_OPENLDAP:M[Yy][Ee][Ss])
+PKG_DEFAULT_OPTIONS+= openldap
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.apr
+PKG_SUPPORTED_OPTIONS= db4 openldap
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdb4)
+APU_CONFIGURE_ARGS+= \
+ --with-berkeley-db=${BUILDLINK_PREFIX.db4}/include:${LOCALBASE}
+. include "../../databases/db4/buildlink3.mk"
+.else
+APU_CONFIGURE_ARGS+= --with-dbm=sdbm
+.endif
+
+.if !empty(PKG_OPTIONS:Mopenldap)
+APU_CONFIGURE_ARGS+= --with-ldap
+APR_CONFIGURE_ARGS+= --with-ldap
+. include "../../databases/openldap/buildlink3.mk"
+.endif
Home |
Main Index |
Thread Index |
Old Index