summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2002-12-15 01:48:45 +0000
committerseb <seb@pkgsrc.org>2002-12-15 01:48:45 +0000
commit5dcda1ae5bf5f07650749fa1c4a5f83e4ca15c40 (patch)
treefe46c5cb28ee956ba5af83adde73750918e8fdc7 /databases
parent6e1eb8c9780073284147925bebd6511a62c24227 (diff)
downloadpkgsrc-5dcda1ae5bf5f07650749fa1c4a5f83e4ca15c40.tar.gz
If USE_DB185 is _not_ defined we actually want db2: introduce _NEED_DB2
to help sort this out.
Diffstat (limited to 'databases')
-rw-r--r--databases/db/buildlink2.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/databases/db/buildlink2.mk b/databases/db/buildlink2.mk
index 0575426dd00..ff4195220d4 100644
--- a/databases/db/buildlink2.mk
+++ b/databases/db/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.4 2002/11/18 20:49:17 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.5 2002/12/15 01:48:45 seb Exp $
.if !defined(DB_BUILDLINK2_MK)
DB_BUILDLINK2_MK= # defined
@@ -6,18 +6,25 @@ DB_BUILDLINK2_MK= # defined
BUILDLINK_DEPENDS.db?= db>=2.7.3
BUILDLINK_PKGSRCDIR.db?= ../../databases/db
+_NEED_DB2= YES
+
.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
+_NEED_DB2= NO
. 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
+_NEED_DB2= NO
+. endif
+.endif
+
+.if ${_NEED_DB2} == "YES"
BUILDLINK_PACKAGES+= db
EVAL_PREFIX+= BUILDLINK_PREFIX.db=db
BUILDLINK_PREFIX.db_DEFAULT= ${LOCALBASE}
@@ -25,9 +32,8 @@ 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
+CPPFLAGS+= ${BUILDLINK_CPPFLAGS.db}
BUILDLINK_TARGETS+= db-buildlink