Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 2004 16:11:37 -0600 (CST)
From:      "Scot W. Hetzel" <hetzelsw@westbend.net>
To:        FreeBSD-gnats-submit@FreeBSD.org, perky@FreeBSD.org
Subject:   ports/61650: Allow databases/py-bsddb to use any of the db4* ports
Message-ID:  <200401202211.i0KMBbJb042404@mail.westbend.net>
Resent-Message-ID: <200401202220.i0KMKDdt073162@freefall.freebsd.org>

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

>Number:         61650
>Category:       ports
>Synopsis:       Allow databases/py-bsddb to use any of the db4* ports
>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:   Tue Jan 20 14:20:12 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Scot W. Hetzel
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
West Bend Internet
>Environment:
System: FreeBSD database.westbend.net 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Fri Jan 9 09:41:22 CST 2004 root@default:/usr/obj/usr/src/C/sys/WB-SMP i386


>Description:
	Currently, the py-bsddb port will only builds with
	the db3, db4 or db41 ports.  It is missing support for
	building with the db42 port.

>How-To-Repeat:
	Install databases/db42 and databases/py-bsddbi (db41 installed by default).

>Fix:
	The following patch allows anyone to choose which version
	of the Berkley DB to use by defining WITH_DB3, WITH_DB4,
	or WITH_BDB_VER when building the port.

	NOTE: WITH_DB3 overrides WITH_BDB_VER, while WITH_DB4 does
	not override WITH_BDB_VER.

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/databases/py-bsddb/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	21 Nov 2003 05:17:53 -0000	1.5
+++ Makefile	20 Jan 2004 21:56:23 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	bsddb
 PORTVERSION=	${PYTHON_PORTVERSION}
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	databases python
 MASTER_SITES=	${PYTHON_MASTER_SITES}
 MASTER_SITE_SUBDIR=	${PYTHON_MASTER_SITE_SUBDIR}
@@ -18,15 +18,32 @@
 COMMENT=	Python bindings to the Berkeley DB library
 
 .if defined(WITH_DB3)
-LIB_DEPENDS=    db3.3:${PORTSDIR}/databases/db3
-DBVERSION=      db3
-PKGNAMESUFFIX=  -db3
+WITH_BDB_VER=	3
 .elif defined(WITH_DB4)
-LIB_DEPENDS=    db4.0:${PORTSDIR}/databases/db4
-DBVERSION=      db4
+WITH_BDB_VER?=	41
+.endif
+
+.if defined(WITH_BDB_VER) 
+.if ${WITH_BDB_VER} == 3
+LIB_DEPENDS=	db3.3:${PORTSDIR}/databases/db3
+DBVERSION=	db3
+DBHEADER=	db3
+PKGNAMESUFFIX=-db3
+.elif ${WITH_BDB_VER} == 4
+LIB_DEPENDS=	db4.0:${PORTSDIR}/databases/db4
+DBVERSION=	db4
+DBHEADER=	db4
+.elif ${WITH_BDB_VER} == 41
+LIB_DEPENDS=	db41.1:${PORTSDIR}/databases/db41
+DBVERSION=	db41
+DBHEADER=	db41
+.elif ${WITH_BDB_VER} == 42
+LIB_DEPENDS=	db-4.2.2:${PORTSDIR}/databases/db42
+DBVERSION=	db-4.2
+DBHEADER=	db42
 .else
-LIB_DEPENDS=    db41.1:${PORTSDIR}/databases/db41
-DBVERSION=      db41
+BROKEN=         "WITH_BDB_VER must be 3, 4, 41 or 42"
+.endif
 .endif
 
 DIST_SUBDIR=	python
@@ -42,7 +59,7 @@
 
 post-patch:
 	${REINPLACE_CMD} -e \
-		's,^\(#include.*\)\(db\.h.*\)$$,\1${DBVERSION}/\2,' \
+		's,^\(#include.*\)\(db\.h.*\)$$,\1${DBHEADER}/\2,' \
 		${WRKSRC}/_bsddb.c
 
 .include <bsd.port.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:



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