diff options
author | jlam <jlam@pkgsrc.org> | 2004-11-15 17:54:49 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-11-15 17:54:49 +0000 |
commit | b67b0725c487d6867521ee52db866b955f29d0fd (patch) | |
tree | 5579b0ab6b1d842e66a7d3075d37a9f9564a124e | |
parent | 8f9890fc252ddfbc4e7f77aea28c933fe28c5a81 (diff) | |
download | pkgsrc-b67b0725c487d6867521ee52db866b955f29d0fd.tar.gz |
Rework the Berkeley DB detection in buildlink3:
* Add a db1.builtin.mk file that detects whether DB-1.85 functionality
exists in the base system, and remove the distinction between
"native" and the other Berkeley DB packages -- we now refer to
db[1234]. This paves the way for any future databases/db1 package.
* USE_DB185 shouldn't need to be set by any packages -- its correct
value is now automatically determined by bdb.buildlink3.mk depending
on whether we explicitly request db1 or not. By default, if you
include bdb.buildlink3.mk, you want DB-1.85 functionality and
USE_DB185 defaults to "yes", but if you explicitly remove db1 from
the list of acceptable DBs, then USE_DB185 defaults to "no".
* Set BDB_LIBS to the library options needed to link against the DB
library when bdb.buildlink3.mk is included.
* We only add the DB library to the linker command automatically if
we want DB-1.85 functionality; otherwise assume that the package
configure process can figure out how to probe for the correct
headers and libraries.
Edit package Makefiles to nuke redundant settings of USE_DB185.
-rw-r--r-- | databases/db/buildlink3.mk | 11 | ||||
-rw-r--r-- | databases/db3/buildlink3.mk | 12 | ||||
-rw-r--r-- | databases/db4/buildlink3.mk | 12 | ||||
-rw-r--r-- | databases/openldap/options.mk | 3 | ||||
-rw-r--r-- | databases/p5-BerkeleyDB/Makefile | 4 | ||||
-rw-r--r-- | lang/python20/Makefile | 4 | ||||
-rw-r--r-- | lang/python23/Makefile.common | 8 | ||||
-rw-r--r-- | mail/bogofilter/Makefile | 5 | ||||
-rw-r--r-- | mail/cucipop/Makefile | 4 | ||||
-rw-r--r-- | mail/cyrus-imapd21/Makefile | 3 | ||||
-rw-r--r-- | mail/cyrus-imapd22/Makefile | 3 | ||||
-rw-r--r-- | mail/exim3/Makefile | 18 | ||||
-rw-r--r-- | mail/maildrop/Makefile | 5 | ||||
-rw-r--r-- | misc/rpm/Makefile | 5 | ||||
-rw-r--r-- | mk/bdb.buildlink3.mk | 106 | ||||
-rw-r--r-- | mk/db1.builtin.mk | 72 | ||||
-rw-r--r-- | pkgtools/pkg_filecheck/Makefile | 3 | ||||
-rw-r--r-- | security/pam-dbm/Makefile | 7 | ||||
-rw-r--r-- | www/htdig/Makefile | 6 |
19 files changed, 161 insertions, 130 deletions
diff --git a/databases/db/buildlink3.mk b/databases/db/buildlink3.mk index e1e20ddf51d..49d0fc9b8dc 100644 --- a/databases/db/buildlink3.mk +++ b/databases/db/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.18 2004/10/03 00:13:18 tv Exp $ +# $NetBSD: buildlink3.mk,v 1.19 2004/11/15 17:54:49 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ DB_BUILDLINK3_MK:= ${DB_BUILDLINK3_MK}+ @@ -16,14 +16,13 @@ BUILDLINK_PACKAGES+= db2 BUILDLINK_DEPENDS.db2+= db>=2.7.3 BUILDLINK_RECOMMENDED.db2+= db>=2.7.7nb2 BUILDLINK_PKGSRCDIR.db2?= ../../databases/db -. if defined(USE_DB185) BUILDLINK_INCDIRS.db2?= include/db2 -BUILDLINK_LIBDIRS.db2?= lib +BUILDLINK_LDADD.db2= -ldb2 + +. if defined(USE_DB185) && !empty(USE_DB185:M[yY][eE][sS]) +BUILDLINK_LIBS.db2= ${BUILDLINK_LDADD.db2} BUILDLINK_TRANSFORM+= l:db:db2 -BUILDLINK_CPPFLAGS.db2= -I${BUILDLINK_PREFIX.db2}/${BUILDLINK_INCDIRS.db2} . endif -BUILDLINK_LDFLAGS.db2= -L${BUILDLINK_PREFIX.db2}/lib ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.db2}/lib -BUILDLINK_LIBS.db2= -ldb2 .endif # DB_BUILDLINK3_MK BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/databases/db3/buildlink3.mk b/databases/db3/buildlink3.mk index 3f1205e779d..c0b26fd7bdd 100644 --- a/databases/db3/buildlink3.mk +++ b/databases/db3/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.15 2004/10/03 00:13:18 tv Exp $ +# $NetBSD: buildlink3.mk,v 1.16 2004/11/15 17:54:49 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ DB3_BUILDLINK3_MK:= ${DB3_BUILDLINK3_MK}+ @@ -17,15 +17,13 @@ BUILDLINK_DEPENDS.db3+= db3>=2.9.2 BUILDLINK_RECOMMENDED.db3+= db3>=3.11.2nb3 BUILDLINK_PKGSRCDIR.db3?= ../../databases/db3 BUILDLINK_INCDIRS.db3?= include/db3 -BUILDLINK_LIBDIRS.db3?= lib +BUILDLINK_LDADD.db3= -ldb3 BUILDLINK_TRANSFORM+= l:db-3:db3 -USE_DB185?= yes -. if !empty(USE_DB185:M[yY][eE][sS]) + +. if defined(USE_DB185) && !empty(USE_DB185:M[yY][eE][sS]) +BUILDLINK_LIBS.db3= ${BUILDLINK_LDADD.db3} BUILDLINK_TRANSFORM+= l:db:db3 -BUILDLINK_CPPFLAGS.db3= -I${BUILDLINK_PREFIX.db3}/${BUILDLINK_INCDIRS.db3} . endif -BUILDLINK_LDFLAGS.db3= -L${BUILDLINK_PREFIX.db3}/lib ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.db3}/lib -BUILDLINK_LIBS.db3= -ldb3 .endif # DB3_BUILDLINK3_MK .include "../../mk/pthread.buildlink3.mk" diff --git a/databases/db4/buildlink3.mk b/databases/db4/buildlink3.mk index 507797a50ef..c0e36fb1ca4 100644 --- a/databases/db4/buildlink3.mk +++ b/databases/db4/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.20 2004/11/15 15:07:14 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.21 2004/11/15 17:54:49 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ DB4_BUILDLINK3_MK:= ${DB4_BUILDLINK3_MK}+ @@ -17,19 +17,17 @@ BUILDLINK_DEPENDS.db4+= db4>=4.2.52 BUILDLINK_RECOMMENDED.db4+= db4>=4.2.52nb6 BUILDLINK_PKGSRCDIR.db4?= ../../databases/db4 BUILDLINK_INCDIRS.db4?= include/db4 -BUILDLINK_LIBDIRS.db4?= lib +BUILDLINK_LDADD.db4= -ldb4 BUILDLINK_TRANSFORM+= l:db-4:db4 -USE_DB185?= yes -. if !empty(USE_DB185:M[yY][eE][sS]) + +. if defined(USE_DB185) && !empty(USE_DB185:M[yY][eE][sS]) # # Older db4 packages didn't enable the db-1.85 compatibility API. # BUILDLINK_DEPENDS.db4+= db4>=4.2.52nb1 +BUILDLINK_LIBS.db4= ${BUILDLINK_LDADD.db4} BUILDLINK_TRANSFORM+= l:db:db4 -BUILDLINK_CPPFLAGS.db4= -I${BUILDLINK_PREFIX.db4}/${BUILDLINK_INCDIRS.db4} . endif -BUILDLINK_LDFLAGS.db4= -L${BUILDLINK_PREFIX.db4}/lib ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.db4}/lib -BUILDLINK_LIBS.db4= -ldb4 .endif # DB4_BUILDLINK3_MK .include "../../mk/pthread.buildlink3.mk" diff --git a/databases/openldap/options.mk b/databases/openldap/options.mk index 95a1e40fa41..2c7c2bcb71e 100644 --- a/databases/openldap/options.mk +++ b/databases/openldap/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.6 2004/11/15 00:55:25 tv Exp $ +# $NetBSD: options.mk,v 1.7 2004/11/15 17:54:49 jlam Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.openldap PKG_SUPPORTED_OPTIONS= bdb dynamic kerberos sasl slp @@ -10,7 +10,6 @@ PKG_DEFAULT_OPTIONS+= bdb ### Whether to build with the Berkeley DB based slapd backends. ### .if !empty(PKG_OPTIONS:Mbdb) -USE_DB185= no BDB_ACCEPTED= db4 # db3? . include "../../mk/bdb.buildlink3.mk" CONFIGURE_ARGS+= --enable-bdb --enable-hdb diff --git a/databases/p5-BerkeleyDB/Makefile b/databases/p5-BerkeleyDB/Makefile index f224dbb5e96..7e5f313bfa0 100644 --- a/databases/p5-BerkeleyDB/Makefile +++ b/databases/p5-BerkeleyDB/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2004/08/04 05:45:49 jlam Exp $ +# $NetBSD: Makefile,v 1.7 2004/11/15 17:54:49 jlam Exp $ # DISTNAME= BerkeleyDB-0.25 @@ -20,7 +20,7 @@ PERL5_PACKLIST= ${PERL5_SITEARCH}/auto/BerkeleyDB/.packlist MAKE_ENV+= BERKELEYDB_INCLUDE="${BDBBASE}/include" MAKE_ENV+= BERKELEYDB_LIB="${BDBBASE}/lib" -MAKE_ENV+= BERKELEYDB_NAME="${BUILDLINK_LIBS.bdb}" +MAKE_ENV+= BERKELEYDB_NAME="${BDB_LIBS}" .include "../../mk/bdb.buildlink3.mk" .include "../../lang/perl5/module.mk" diff --git a/lang/python20/Makefile b/lang/python20/Makefile index e5d0e5a75f1..8a5a2524f2b 100644 --- a/lang/python20/Makefile +++ b/lang/python20/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2004/10/31 13:23:03 recht Exp $ +# $NetBSD: Makefile,v 1.23 2004/11/15 17:54:49 jlam Exp $ # DISTNAME= Python-2.0.1 @@ -24,8 +24,6 @@ USE_BUILDLINK3= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+= --without-threads INSTALL_TARGET= altinstall -# ensure that the bsddb185 module is built on all platforms -USE_DB185= yes # Make sure having environment variable OPT doesn't affect the # installed module-building Makefile diff --git a/lang/python23/Makefile.common b/lang/python23/Makefile.common index 32178a76d42..a42aff85ea9 100644 --- a/lang/python23/Makefile.common +++ b/lang/python23/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.18 2004/10/30 16:17:53 grant Exp $ +# $NetBSD: Makefile.common,v 1.19 2004/11/15 17:54:49 jlam Exp $ # DISTNAME= Python-2.3.4 @@ -71,16 +71,10 @@ INSTALL_UNSTRIPPED= yes .endif # ensure that the bsddb185 module is built on all platforms -USE_DB185= yes .include "../../mk/bdb.buildlink3.mk" MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE} - -.if ${BDB_TYPE} == "native" -MAKE_ENV+= PY_BDB_INCDIRS=/usr/${_BDB_INCDIRS} -.else MAKE_ENV+= PY_BDB_INCDIRS=${BDBBASE}/${BUILDLINK_INCDIRS.${BDB_TYPE}} MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib -.endif .if defined(BUILDLINK_TRANSFORM) MAKE_ENV+= PY_BDB_TRANSFORM="${BUILDLINK_TRANSFORM}" diff --git a/mail/bogofilter/Makefile b/mail/bogofilter/Makefile index 779f8f4d3b8..5091add303c 100644 --- a/mail/bogofilter/Makefile +++ b/mail/bogofilter/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2004/10/26 05:41:41 snj Exp $ +# $NetBSD: Makefile,v 1.23 2004/11/15 17:54:49 jlam Exp $ DISTNAME= bogofilter-0.92.8 CATEGORIES= mail @@ -23,6 +23,7 @@ CONF_FILES= ${EGDIR}/bogofilter.cf ${PKG_SYSCONFDIR}/bogofilter.cf REPLACE_PERL= src/bogoupgrade USE_DB185= YES +BDB_ACCEPTED= db4 -.include "../../databases/db4/buildlink3.mk" +.include "../../mk/bdb.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/mail/cucipop/Makefile b/mail/cucipop/Makefile index 0356f953e4b..b3cea336b39 100644 --- a/mail/cucipop/Makefile +++ b/mail/cucipop/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2004/11/15 15:34:16 jlam Exp $ +# $NetBSD: Makefile,v 1.18 2004/11/15 17:54:49 jlam Exp $ # DISTNAME= cucipop-1.31 @@ -35,7 +35,7 @@ PKG_SUPPORTED_OPTIONS= db .if !empty(PKG_OPTIONS:Mdb) BDB_ACCEPTED= db2 CFLAGS+= -DUSE_DB -MAKE_ENV+= LIBS=${BUILDLINK_LIBS.${BDB_TYPE}} +MAKE_ENV+= LIBS=${BDB_LIBS} . include "../../mk/bdb.buildlink3.mk" .endif diff --git a/mail/cyrus-imapd21/Makefile b/mail/cyrus-imapd21/Makefile index 0e6d7d016a8..73729a2c29b 100644 --- a/mail/cyrus-imapd21/Makefile +++ b/mail/cyrus-imapd21/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2004/10/03 00:12:52 tv Exp $ +# $NetBSD: Makefile,v 1.25 2004/11/15 17:54:49 jlam Exp $ DISTNAME= cyrus-imapd-2.1.15 PKGREVISION= 4 @@ -16,7 +16,6 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews USE_BUILDLINK3= yes GNU_CONFIGURE= yes PERL5_CONFIGURE= no -USE_DB185= no AUTOCONF_REQD= 2.13 USE_PKGINSTALL= yes diff --git a/mail/cyrus-imapd22/Makefile b/mail/cyrus-imapd22/Makefile index 11a826af526..76205795f33 100644 --- a/mail/cyrus-imapd22/Makefile +++ b/mail/cyrus-imapd22/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2004/10/17 22:07:32 recht Exp $ +# $NetBSD: Makefile,v 1.24 2004/11/15 17:54:49 jlam Exp $ DISTNAME= cyrus-imapd-2.2.8 PKGREVISION= 4 @@ -14,7 +14,6 @@ USE_BUILDLINK3= yes USE_PKGLOCALEDIR= yes GNU_CONFIGURE= yes PERL5_CONFIGURE= no -USE_DB185= no BDB_ACCEPTED= db4 db3 USE_PKGINSTALL= yes diff --git a/mail/exim3/Makefile b/mail/exim3/Makefile index 7a5615610e4..25fab10e86d 100644 --- a/mail/exim3/Makefile +++ b/mail/exim3/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2004/10/29 05:59:24 jdolecek Exp $ +# $NetBSD: Makefile,v 1.15 2004/11/15 17:54:49 jlam Exp $ DISTNAME= exim-3.36 PKGREVISION= 3 @@ -18,7 +18,7 @@ USE_PERL5= YES USE_PKGINSTALL= YES BUILD_DEFS+= EXIM_USER EXIM_GROUP -BUILD_DEFS+= EXIM_DB.db1 EXIM_DB.mysql EXIM_DB.pgsql +BUILD_DEFS+= EXIM_DB.mysql EXIM_DB.pgsql PKG_SYSCONFSUBDIR?= exim EGDIR= ${PREFIX}/share/examples/exim @@ -42,14 +42,6 @@ FILES_SUBST+= GZCAT="${GZCAT}" _LOOKUP_LIBS+= ${LDFLAGS} -# default to using db1 on platforms which have it. -EXIM_DB.db1?= YES -.if ${EXIM_DB.db1} == "YES" -USE_DB185= YES -.endif -# does not compile with db4 -BDB_ACCEPTED= native db3 db2 - .if defined(EXIM_DB.mysql) && ${EXIM_DB.mysql} == "YES" LOOKUP_INCLUDE+= -I${BUILDLINK_PREFIX.mysql-client}/include/mysql LOOKUP_LIBS+= -L${BUILDLINK_PREFIX.mysql-client}/lib/mysql @@ -66,11 +58,9 @@ MAKE_ENV+= LOOKUP_PGSQL=YES . include "../../mk/pgsql.buildlink3.mk" .endif -# buildlink3 decides which libdb to use on this platform. +BDB_ACCEPTED= db1 db3 db2 # does not compile with db4 .include "../../mk/bdb.buildlink3.mk" -DBMLIB+= ${BUILDLINK_CPPFLAGS.bdb} -DBMLIB+= ${BUILDLINK_LDFLAGS.bdb} -DBMLIB+= ${BUILDLINK_LIBS.bdb} +DBMLIB+= ${BDB_LIBS} MAKE_ENV+= DBMLIB=${DBMLIB:Q} MAKE_ENV+= LOOKUP_INCLUDE="${LOOKUP_INCLUDE}" diff --git a/mail/maildrop/Makefile b/mail/maildrop/Makefile index 25469a97780..cdf0db06ea0 100644 --- a/mail/maildrop/Makefile +++ b/mail/maildrop/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2004/10/03 00:12:53 tv Exp $ +# $NetBSD: Makefile,v 1.21 2004/11/15 17:54:49 jlam Exp $ DISTNAME= maildrop-1.3.9 PKGREVISION= 2 @@ -12,6 +12,7 @@ DEPENDS+= courier-maildir>=0.45.6:../../mail/courier-maildir USE_BUILDLINK3= yes USE_DB185= yes +BDB_ACCEPTED= db2 USE_LANGUAGES= c c++ .include "../../mail/courier-auth/Makefile.common" @@ -29,6 +30,6 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/README.postfix ${DOCDIR} ${INSTALL_DATA} ${WRKSRC}/maildroptips.txt ${DOCDIR} -.include "../../databases/db/buildlink3.mk" .include "../../lang/perl5/buildlink3.mk" +.include "../../mk/bdb.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/misc/rpm/Makefile b/misc/rpm/Makefile index 531c15bd612..9686bfd97a7 100644 --- a/misc/rpm/Makefile +++ b/misc/rpm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.49 2004/10/03 00:13:00 tv Exp $ +# $NetBSD: Makefile,v 1.50 2004/11/15 17:54:49 jlam Exp $ DISTNAME= rpm-2.5.4 PKGREVISION= 3 @@ -14,7 +14,6 @@ BUILD_USES_MSGFMT= yes CONFLICTS+= rpm2cpio<1.0nb1 USE_BUILDLINK3= yes -USE_DB185= yes USE_GNU_TOOLS+= make GNU_CONFIGURE= yes @@ -28,8 +27,6 @@ CONFIGURE_ARGS+= --datadir=${PREFIX}/${PKGLOCALEDIR} # The rpm databases are kept under ${RPM_DB_PREFIX}/lib/rpm. CONFIGURE_ENV+= varprefix="${RPM_DB_PREFIX}" -CFLAGS+= ${BUILDLINK_CPPFLAGS.db} - RPMDIR= ${RPM_DB_PREFIX}/lib/rpm FILES_SUBST+= RPMDIR=${RPMDIR} diff --git a/mk/bdb.buildlink3.mk b/mk/bdb.buildlink3.mk index b34eddc00f6..c85710d9330 100644 --- a/mk/bdb.buildlink3.mk +++ b/mk/bdb.buildlink3.mk @@ -1,9 +1,11 @@ -# $NetBSD: bdb.buildlink3.mk,v 1.11 2004/07/10 03:05:46 grant Exp $ +# $NetBSD: bdb.buildlink3.mk,v 1.12 2004/11/15 17:54:49 jlam Exp $ # # This Makefile fragment is meant to be included by packages that # require a Berkeley DB implementation. bdb.buildlink3.mk will: # # * set BDBBASE to the base directory of the Berkeley DB files; +# * set BDB_LIBS to the library option needed to link against +# the Berkeley DB library; # * set BDB_TYPE to the Berkeley DB implementation used. # # There are two variables that can be used to tweak the selection of @@ -20,13 +22,38 @@ BDB_BUILDLINK3_MK:= ${BDB_BUILDLINK3_MK}+ .include "../../mk/bsd.prefs.mk" .if !empty(BDB_BUILDLINK3_MK:M+) + +# If we've specified a list of acceptable Berkeley DB packages and it +# doesn't include db1, then don't set USE_DB185 to yes. The package's +# configure process should know how to probe for the libraries and +# headers on its own. +# +. if defined(BDB_ACCEPTED) && empty(BDB_ACCEPTED:Mdb1) +USE_DB185?= no +. else +USE_DB185?= yes +. endif + BDB_DEFAULT?= # empty BDB_ACCEPTED?= ${_BDB_PKGS} -# This is an exhaustive list of all of the Berkeley DB implementations -# that may be used with bdb.buildlink3.mk, in order of precedence. +# _BDB_PKGS is an exhaustive list of all of the Berkeley DB +# implementations that may be used with bdb.buildlink3.mk, in order +# of precedence. # -_BDB_PKGS?= native db4 db3 db2 +. if !empty(USE_DB185:M[yY][eE][sS]) +CHECK_BUILTIN.db1:= yes +. include "../../mk/db1.builtin.mk" +CHECK_BUILTIN.db1:= no +. if defined(IS_BUILTIN.db1) && !empty(IS_BUILTIN.db1:M[yY][eE][sS]) +# Prefer the builtin db1 support if we requested it +_BDB_PKGS?= db1 db4 db3 db2 +. else +_BDB_PKGS?= db4 db3 db2 db1 +. endif +. else +_BDB_PKGS?= db4 db3 db2 +. endif _BDB_PKGBASE.db2= db _BDB_PKGSRCDIR.db2= ../../databases/db @@ -41,7 +68,7 @@ _BDB_ACCEPTED= ${BDB_ACCEPTED} # Mark the acceptable Berkeley DB packages and check which, if any, are # already installed. # -. for _bdb_ in ${_BDB_ACCEPTED:Nnative} +. for _bdb_ in ${_BDB_ACCEPTED} _BDB_OK.${_bdb_}= yes . if !defined(_BDB_INSTALLED.${_bdb_}) _BDB_INSTALLED.${_bdb_}!= \ @@ -54,40 +81,12 @@ MAKEFLAGS+= _BDB_INSTALLED.${_bdb_}=${_BDB_INSTALLED.${_bdb_}} . endif . endfor -USE_DB185?= yes -_BDB_CPPFLAGS?= # empty -_BDB_LIBS?= # empty -_BDB_LDFLAGS?= # empty -_BDB_OK.native?= no -_BDB_INSTALLED.native?= no -. if exists(/usr/include/db.h) -_BDB_OK.native!= \ - if ${GREP} -q "^\#define.*HASHVERSION.*2$$" /usr/include/db.h; then \ - ${ECHO} "yes"; \ - else \ - ${ECHO} "no"; \ - fi -. if !empty(_BDB_OK.native:M[yY][eE][sS]) -_BDB_INSTALLED.native= yes -_BDB_INCDIRS= include -_BDB_TRANSFORM= # empty -_BDB_LIBS+= # empty -. endif -. endif -. if !empty(_BDB_OK.native:M[nN][oO]) && exists(/usr/include/db1/db.h) -_BDB_OK.native= yes -_BDB_INSTALLED.native= yes -_BDB_INCDIRS= include/db1 -_BDB_TRANSFORM= l:db:db1 -_BDB_LIBS+= -ldb1 -_BDB_CPPFLAGS+= -I/usr/${_BDB_INCDIRS} -. endif -. if !empty(USE_DB185:M[nN][oO]) -_BDB_OK.native= no -_BDB_INSTALLED.native= no -_BDB_INCDIRS= # empty -_BDB_TRANSFORM= # empty -_BDB_LIBS+= # empty +. if defined(USE_BUILTIN.db1) +_BDB_OK.db1= ${USE_BUILTIN.db1} +_BDB_INSTALLED.db1= ${USE_BUILTIN.db1} +. else +_BDB_OK.db1= no +_BDB_INSTALLED.db1= no . endif . if !defined(_BDB_TYPE) @@ -110,7 +109,7 @@ _BDB_TYPE?= ${_bdb_} # # ...otherwise, just use the first accepted Berkeley DB package. # -. for _bdb_ in ${_BDB_ACCEPTED:Nnative} +. for _bdb_ in ${_BDB_ACCEPTED} _BDB_TYPE?= ${_bdb_} . endfor _BDB_TYPE?= none @@ -121,27 +120,18 @@ BDB_TYPE= ${_BDB_TYPE} BUILD_DEFS+= BDB_TYPE BUILD_DEFS+= BDBBASE +# Define some public variables to refer to package-specific variables. +BDBBASE= ${BUILDLINK_PREFIX.${_BDB_PKGBASE.${BDB_TYPE}}} +BDB_LIBS= ${BUILDLINK_LDADD.${_BDB_PKGBASE.${BDB_TYPE}}} + .endif # BDB_BUILDLINK3_MK .if ${BDB_TYPE} == "none" PKG_FAIL_REASON= "No acceptable Berkeley DB implementation found." +.elif ${BDB_TYPE} == "db1" +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ndb1} +BUILDLINK_PACKAGES+= db1 +BUILDLINK_BUILTIN_MK.db1= ../../mk/db1.builtin.mk .else -. if ${BDB_TYPE} == "native" -IS_BUILTIN.db-native= yes -USE_BUILTIN.db-native= yes -BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ndb-native} -BUILDLINK_PACKAGES+= db-native -BUILDLINK_INCDIRS.db-native?= ${_BDB_INCDIRS} -BUILDLINK_TRANSFORM?= ${_BDB_TRANSFORM} -BDBBASE= ${BUILDLINK_PREFIX.db-native} -BUILDLINK_CPPFLAGS.bdb+= ${_BDB_CPPFLAGS} -BUILDLINK_LDFLAGS.bdb+= ${_BDB_LDFLAGS} -BUILDLINK_LIBS.bdb+= ${_BDB_LIBS} -. else -BDBBASE= ${BUILDLINK_PREFIX.${_BDB_PKGBASE.${BDB_TYPE}}} -. include "${_BDB_PKGSRCDIR.${BDB_TYPE}}/buildlink3.mk" -BUILDLINK_CPPFLAGS.bdb+= ${BUILDLINK_CPPFLAGS.${BDB_TYPE}} -BUILDLINK_LDFLAGS.bdb+= ${BUILDLINK_LDFLAGS.${BDB_TYPE}} -BUILDLINK_LIBS.bdb+= ${BUILDLINK_LIBS.${BDB_TYPE}} -. endif +. include "${_BDB_PKGSRCDIR.${BDB_TYPE}}/buildlink3.mk" .endif diff --git a/mk/db1.builtin.mk b/mk/db1.builtin.mk new file mode 100644 index 00000000000..dee2f8cf3cd --- /dev/null +++ b/mk/db1.builtin.mk @@ -0,0 +1,72 @@ +# $NetBSD: db1.builtin.mk,v 1.1 2004/11/15 17:54:49 jlam Exp $ + +.for _lib_ in db db1 +. if !defined(_BLNK_LIB_FOUND.${_lib_}) +_BLNK_LIB_FOUND.${_lib_}!= \ + if ${TEST} `${ECHO} /usr/lib/lib${_lib_}.*` = "/usr/lib/lib${_lib_}.*"; then \ + ${ECHO} "no"; \ + elif ${TEST} `${ECHO} /lib/lib${_lib_}.*` = "/lib/lib${_lib_}.*"; then \ + ${ECHO} "no"; \ + else \ + ${ECHO} "yes"; \ + fi +BUILDLINK_VARS+= _BLNK_LIB_FOUND.${_lib_} +. endif +.endfor +.undef _lib_ + +.if !defined(IS_BUILTIN.db1) +IS_BUILTIN.db1= no +# +# The builtin Berkeley database library must support hash version 2 or +# else it doesn't support db-1.85 databases. +# +_BLNK_NATIVE_DB1_OK= no +. for _inc_ in /usr/include/db.h /usr/include/db1/db.h +. if exists(${_inc_}) +_BLNK_NATIVE_DB1_OK.${_inc_}!= \ + if ${GREP} -q "^\#define.*HASHVERSION.*2$$" ${_inc_}; then \ + ${ECHO} "yes"; \ + else \ + ${ECHO} "no"; \ + fi +. endif +_BLNK_NATIVE_DB1_OK+= ${_BLNK_NATIVE_DB1_OK.${_inc_}} +. endfor +. undef _inc_ +. if !empty(_BLNK_NATIVE_DB1_OK:M[yY][eE][sS]) +IS_BUILTIN.db1= yes +. endif +BUILDLINK_VARS+= IS_BUILTIN.db1 +.endif # IS_BUILTIN.db1 + +.if !defined(USE_BUILTIN.db1) +USE_BUILTIN.db1?= ${IS_BUILTIN.db1} +_INCOMPAT_DB1?= # empty +. for _pattern_ in ${_INCOMPAT_DB1} ${INCOMPAT_DB1} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) +USE_BUILTIN.db1= no +. endif +. endfor +. undef _pattern_ +BUILDLINK_VARS+= USE_BUILTIN.db1 +.endif # USE_BUILTIN.db1 + +CHECK_BUILTIN.db1?= no +.if !empty(CHECK_BUILTIN.db1:M[nN][oO]) +. if !empty(USE_BUILTIN.db1:M[yY][eE][sS]) +BUILDLINK_PREFIX.db1= /usr +. if exists(/usr/include/db.h) +BUILDLINK_INCDIRS.db1= include +. elif exists(/usr/include/db1/db.h) +BUILDLINK_INCDIRS.db1= include/db1 +. endif +. if !empty(_BLNK_LIB_FOUND.db:M[yY][eE][sS]) +BUILDLINK_LIBS.db1= -ldb +. endif +. if !empty(_BLNK_LIB_FOUND.db1:M[yY][eE][sS]) +BUILDLINK_LIBS.db1= -ldb1 +BUILDLINK_TRANSFORM+= l:db:db1 +. endif +. endif # USE_BUILTIN.db1 == yes +.endif # CHECK_BUILTIN.db1 diff --git a/pkgtools/pkg_filecheck/Makefile b/pkgtools/pkg_filecheck/Makefile index fce4b45c532..bac77fc562f 100644 --- a/pkgtools/pkg_filecheck/Makefile +++ b/pkgtools/pkg_filecheck/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2004/07/06 22:13:14 wiz Exp $ +# $NetBSD: Makefile,v 1.12 2004/11/15 17:54:50 jlam Exp $ # DISTNAME= pkg_filecheck-0.1 @@ -13,7 +13,6 @@ COMMENT= Check for files not owned by any package WRKSRC= ${WRKDIR} USE_PERL5= run USE_PKGINSTALL= yes -USE_DB185= yes USE_BUILDLINK3= yes EXTRACT_ONLY= # empty diff --git a/security/pam-dbm/Makefile b/security/pam-dbm/Makefile index ce5f9dd3888..74882a1ef76 100644 --- a/security/pam-dbm/Makefile +++ b/security/pam-dbm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2004/09/05 10:22:12 grant Exp $ +# $NetBSD: Makefile,v 1.3 2004/11/15 17:54:50 jlam Exp $ # DISTNAME= pam_dbm-0.2 @@ -13,10 +13,7 @@ COMMENT= PAM module for DBM authentication USE_BUILDLINK3= yes USE_PKGLOCALEDIR= yes GNU_CONFIGURE= yes - -BDB_ACCEPTED= native - -LIBS+= ${BUILDLINK_LIBS.bdb} +BDB_ACCEPTED= db1 .include "../../security/PAM/buildlink3.mk" .include "../../mk/bdb.buildlink3.mk" diff --git a/www/htdig/Makefile b/www/htdig/Makefile index d545d896b8d..819d0994e22 100644 --- a/www/htdig/Makefile +++ b/www/htdig/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2004/05/26 20:40:50 wiz Exp $ +# $NetBSD: Makefile,v 1.20 2004/11/15 17:54:50 jlam Exp $ DISTNAME= htdig-3.1.6 CATEGORIES= www databases @@ -18,6 +18,7 @@ COMMENT= WWW indexing and searching system USE_BUILDLINK3= YES USE_LANGUAGES= c c++ USE_PKGINSTALL= YES +USE_DB185= yes BDB_ACCEPTED= db2 GNU_CONFIGURE= yes @@ -28,8 +29,7 @@ CONFIGURE_ARGS= --with-cgi-bin-dir=${PREFIX}/libexec/cgi-bin \ --with-image-dir=${PREFIX}/share/examples/htdig \ --with-search-dir=${PREFIX}/share/examples/htdig CXXFLAGS+= -Wno-deprecated -CPPFLAGS+= ${BUILDLINK_CPPFLAGS.db} ${CXXFLAGS} -LDFLAGS+= ${BUILDLINK_LDFLAGS.db} +CPPFLAGS+= ${CXXFLAGS} INSTALL_EXTRA_TMPL= ${PKGDIR}/INSTALL PKG_SYSCONFSUBDIR= htdig |