ports/130410: [PATCH] databases/py-bsddb - Fix build with python2.6

David Naylor naylor.b.david at gmail.com
Mon Jan 12 10:50:02 UTC 2009

>Number:         130410
>Category:       ports
>Synopsis:       [PATCH] databases/py-bsddb - Fix build with python2.6
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 12 10:50:02 UTC 2009
>Originator:     David Naylor
>Release:        FreeBSD 8.0-CURRENT
FreeBSD dragon.dg 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Fri Jan  9 16:05:40 SAST 2009     root at dragon.dg:/tmp/usr/src/sys/GENERIC  i386
With PYTHON_DEFAULT_VERSION=python2.6 set in make.conf py-bsddb fails to build due to a change in the bsddb module in python2.6.  The problem is the patched #include directive was moved from Modules/_bsddb.c to Modules/bsddb.h.
cd /usr/ports/databases/py-bsddb && make PYTHON_DEFAULT_VERSION=python2.6
[Preferable without python2.5 not being installed already, as I have not tested it in this case]
Apply to given patch.  The patch is also backward compatible and thus just fixes the case with PYTHON_DEFAULT_VERSION=python2.6.

NOTE: The patch has not been tested with python3.0 however I suspect it would work with it.

Patch attached with submission follows:

--- py-bsddb/Makefile	2007-08-01 17:38:48.000000000 +0200
+++ py-bsddb/Makefile	2009-01-12 10:46:52.000000000 +0200
@@ -28,12 +28,20 @@
+.include <bsd.port.pre.mk>
 	@${CP} ${FILESDIR}/setup.py ${WRKSRC}
+.if ${PYTHON_REL} < 260
 		's,^\(#include.*\)\(db\.h.*\)$$,\1${BDB_INCLUDE_DIR}/\2,' \
-		${WRKSRC}/_bsddb.c
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>


More information about the freebsd-ports-bugs mailing list