Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jun 2004 11:50:35 +0200 (CEST)
From:      Joerg Pulz <Joerg.Pulz@frm2.tum.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/67562: patch for bsd.port.mk - USE_BDB, WANT_BDB_VER, WANT_BDB_NOCRYPTO
Message-ID:  <200406040950.i549oZH1052060@hades.admin.frm2>
Resent-Message-ID: <200406041000.i54A0k6P033292@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         67562
>Category:       ports
>Synopsis:       patch for bsd.port.mk - USE_BDB, WANT_BDB_VER, WANT_BDB_NOCRYPTO
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 04 03:00:46 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Joerg Pulz
>Release:        FreeBSD 5.2.1-RELEASE-p5 i386
>Organization:
TU-Munich / ZWE FRM-II
>Environment:
System: FreeBSD hades.admin.frm2 5.2.1-RELEASE-p5 FreeBSD 5.2.1-RELEASE-p5 #2: Wed May 5 17:52:38 CEST 2004 root@hades.admin.frm2:/usr/obj/usr/src/sys/HADES i386


	
>Description:
	Introduce USE_BDB knob, to tell the system that this port uses and depends
	on the BerkeleyDB libraries. (similar to the USE_OPENLDAP knob)
	The depending version can be specified with WANT_BDB_VER. (also very similar to WANT_OPENLDAP_VER)
	One can sepcify WANT_BDB_NOCRYPTO if WANT_BDB_VER=41 or WANT_BDB_VER=42 to tell the system
	to depend on the "-nocrypto" version of the libraries. (liken WANT_OPENLDAP_SASL)

	Using these knobs makes the maintaining of e.g. OpenLDAP, Cyrus-SASL or Cyrus-IMAPD ports
	and building of new ports easier.

	I've tested the whole scenario with an modified version of the current cyrus-imapd22 port.
>How-To-Repeat:
	
>Fix:

	

--- bsd.port.mk.diff begins here ---
--- bsd.port.mk.org	Fri Jun  4 10:32:50 2004
+++ bsd.port.mk	Fri Jun  4 10:57:24 2004
@@ -281,6 +281,15 @@
 #						  with SASL support.
 #
 ##
+#
+# USE_BDB			- Says that the port uses the BerkeleyDB libraries
+#						  Implies: WANT_BDB_VER?=42
+# WANT_BDB_VER			- Legal values are: 3, 4, 41, 42
+#						  If set to an unkown value, the port is marked BROKEN.
+# WANT_BDB_NOCRYPTO		- Says that the system should use BerkeleyDB libraries
+#						  without AES encryption support.
+#
+##
 # USE_AUTOTOOLS	-	Says that the port uses various GNU autotools
 #					(libtool, autoconf, autoheader, automake et al.)
 #					See bsd.autotools.mk for more details.
@@ -1177,6 +1186,8 @@
 
 WANT_OPENLDAP_VER?=	21
 
+WANT_BDB_VER?=	42
+
 # Owner and group of the WWW user
 WWWOWN?=	www
 WWWGRP?=	www
@@ -1342,6 +1353,25 @@
 LIB_DEPENDS+=		ldap.2:${PORTSDIR}/net/openldap21${_OPENLDAP_FLAVOUR}-client
 .else
 BROKEN=				"unknown OpenLDAP version: ${WANT_OPENLDAP_VER}"
+.endif
+.endif
+
+.if defined(USE_BDB)
+.if defined(WANT_BDB_NOCRYPTO)
+_BDB_FLAVOUR=	-nocrypto
+.else
+_BDB_FLAVOUR=
+.endif
+.if ${WANT_BDB_VER} == 42
+LIB_DEPENDS+=		db-4.2.2:${PORTSDIR}/databases/db42${_BDB_FLAVOUR}
+.elif ${WANT_BDB_VER} == 41
+LIB_DEPENDS+=		db41.1:${PORTSDIR}/databases/db41${_BDB_FLAVOUR}
+.elif ${WANT_BDB_VER} == 4
+LIB_DEPENDS+=		db4.0:${PORTSDIR}/databases/db4
+.elif ${WANT_BDB_VER} == 3
+LIB_DEPENDS+=		db3.3:${PORTSDIR}/databases/db3
+.else
+BROKEN=				"unknown BerkeleyDB version: ${WANT_BDB_VER}"
 .endif
 .endif
 
--- bsd.port.mk.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406040950.i549oZH1052060>