summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-11-15 17:54:49 +0000
committerjlam <jlam@pkgsrc.org>2004-11-15 17:54:49 +0000
commitb67b0725c487d6867521ee52db866b955f29d0fd (patch)
tree5579b0ab6b1d842e66a7d3075d37a9f9564a124e /databases
parent8f9890fc252ddfbc4e7f77aea28c933fe28c5a81 (diff)
downloadpkgsrc-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.
Diffstat (limited to 'databases')
-rw-r--r--databases/db/buildlink3.mk11
-rw-r--r--databases/db3/buildlink3.mk12
-rw-r--r--databases/db4/buildlink3.mk12
-rw-r--r--databases/openldap/options.mk3
-rw-r--r--databases/p5-BerkeleyDB/Makefile4
5 files changed, 18 insertions, 24 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"