aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--databases/py-bsddb/Makefile36
-rw-r--r--databases/py-bsddb3/Makefile25
-rw-r--r--databases/py25-bsddb/Makefile36
3 files changed, 77 insertions, 20 deletions
diff --git a/databases/py-bsddb/Makefile b/databases/py-bsddb/Makefile
index 49d1edb146e7..16d2e0410b43 100644
--- a/databases/py-bsddb/Makefile
+++ b/databases/py-bsddb/Makefile
@@ -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,33 @@ MAINTAINER= perky@FreeBSD.org
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?= 4
.else
-LIB_DEPENDS= db41.1:${PORTSDIR}/databases/db41
-DBVERSION= db41
+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
+.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
+BROKEN= "WITH_BDB_VER must be 3, 4, 41 or 42"
+.endif
.endif
DIST_SUBDIR= python
@@ -42,7 +60,7 @@ post-extract:
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>
diff --git a/databases/py-bsddb3/Makefile b/databases/py-bsddb3/Makefile
index f79cd32c0c77..f45967d4d003 100644
--- a/databases/py-bsddb3/Makefile
+++ b/databases/py-bsddb3/Makefile
@@ -16,12 +16,33 @@ MAINTAINER= perky@FreeBSD.org
COMMENT= Python extension module for BerkeleyDB 3 and 4
.if defined(WITH_DB3)
+WITH_BDB_VER?= 3
+.elif defined(WITH_DB4)
+WITH_BDB_VER?= 4
+.else
+WITH_BDB_VER?= 41
+.endif
+
+.if defined(WITH_BDB_VER)
+.if ${WITH_BDB_VER} == 3
LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3
DBVERSION= db3
-PKGNAMESUFFIX= -db3
-.else
+DBHEADER= 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
+BROKEN= "WITH_BDB_VER must be 3, 4, 41 or 42"
+.endif
.endif
USE_PYTHON= yes
diff --git a/databases/py25-bsddb/Makefile b/databases/py25-bsddb/Makefile
index 49d1edb146e7..16d2e0410b43 100644
--- a/databases/py25-bsddb/Makefile
+++ b/databases/py25-bsddb/Makefile
@@ -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,33 @@ MAINTAINER= perky@FreeBSD.org
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?= 4
.else
-LIB_DEPENDS= db41.1:${PORTSDIR}/databases/db41
-DBVERSION= db41
+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
+.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
+BROKEN= "WITH_BDB_VER must be 3, 4, 41 or 42"
+.endif
.endif
DIST_SUBDIR= python
@@ -42,7 +60,7 @@ post-extract:
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>