pkgsrc/databases/db/buildlink3.mk
jlam b67b0725c4 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.
2004-11-15 17:54:49 +00:00

28 lines
753 B
Makefile

# $NetBSD: buildlink3.mk,v 1.19 2004/11/15 17:54:49 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
DB_BUILDLINK3_MK:= ${DB_BUILDLINK3_MK}+
.include "../../mk/bsd.prefs.mk"
.if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+= db2
.endif
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ndb2}
BUILDLINK_PACKAGES+= db2
.if !empty(DB_BUILDLINK3_MK:M+)
BUILDLINK_DEPENDS.db2+= db>=2.7.3
BUILDLINK_RECOMMENDED.db2+= db>=2.7.7nb2
BUILDLINK_PKGSRCDIR.db2?= ../../databases/db
BUILDLINK_INCDIRS.db2?= include/db2
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
. endif
.endif # DB_BUILDLINK3_MK
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}