summaryrefslogtreecommitdiff
path: root/databases/db
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-11-18 20:49:17 +0000
committerjlam <jlam@pkgsrc.org>2002-11-18 20:49:17 +0000
commit3672e2ec00dc87b3b282451fb35495ff1828ff5f (patch)
tree8dd78a95930e30686ac1b307d0c1a448f3a5b07a /databases/db
parentb2f6643a90cbc1961af2c49c1228e692683e2eaa (diff)
downloadpkgsrc-3672e2ec00dc87b3b282451fb35495ff1828ff5f.tar.gz
Allow this file to be used to mean "we want DB-1.85" if the inclusion of
this file is preceded by defining "USE_DB185". On NetBSD (and probably Linux), where we already have DB-1.85 in the base system, this defaults to using the system libraries and headers.
Diffstat (limited to 'databases/db')
-rw-r--r--databases/db/buildlink2.mk29
1 files changed, 22 insertions, 7 deletions
diff --git a/databases/db/buildlink2.mk b/databases/db/buildlink2.mk
index 3330aa6d24f..0575426dd00 100644
--- a/databases/db/buildlink2.mk
+++ b/databases/db/buildlink2.mk
@@ -1,18 +1,33 @@
-# $NetBSD: buildlink2.mk,v 1.3 2002/09/26 22:34:09 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.4 2002/11/18 20:49:17 jlam Exp $
.if !defined(DB_BUILDLINK2_MK)
DB_BUILDLINK2_MK= # defined
-BUILDLINK_PACKAGES+= db
BUILDLINK_DEPENDS.db?= db>=2.7.3
BUILDLINK_PKGSRCDIR.db?= ../../databases/db
-EVAL_PREFIX+= BUILDLINK_PREFIX.db=db
+.if defined(USE_DB185)
+. if exists(/usr/include/db.h) # NetBSD
+BUILDLINK_PREFIX.db= /usr
+BUILDLINK_FILES.db= include/db.h
+BUILDLINK_FILES.db+= include/mpool.h
+BUILDLINK_CPPFLAGS.db= # empty
+. elif exists(/usr/include/db1/db.h) # Linux
+BUILDLINK_PREFIX.db= /usr
+BUILDLINK_FILES.db= include/db1/*
+BUILDLINK_CPPFLAGS.db= -I${BUILDLINK_PREFIX.db}/include/db1
+BUILDLINK_TRANSFORM+= l:db:db1
+. else
+BUILDLINK_PACKAGES+= db
+EVAL_PREFIX+= BUILDLINK_PREFIX.db=db
BUILDLINK_PREFIX.db_DEFAULT= ${LOCALBASE}
-BUILDLINK_FILES.db= include/db2/*
-BUILDLINK_FILES.db+= lib/libdb2.*
-
-BUILDLINK_CPPFLAGS.db= -I${BUILDLINK_PREFIX.db}/include/db2
+BUILDLINK_FILES.db= include/db2/*
+BUILDLINK_FILES.db+= lib/libdb2.*
+BUILDLINK_CPPFLAGS.db= -I${BUILDLINK_PREFIX.db}/include/db2
+BUILDLINK_TRANSFORM+= l:db:db2
+. endif
+CPPFLAGS+= ${BUILDLINK_CPPFLAGS.db}
+.endif
BUILDLINK_TARGETS+= db-buildlink