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
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 12 10:50:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     David Naylor
>Release:        FreeBSD 8.0-CURRENT
>Organization:
Private
>Environment:
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
>Description:
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.
>How-To-Repeat:
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]
>Fix:
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 @@
 MAKE_ENV=	BSDDB_VERSION=${BDB_LIB_NAME}
 PLIST_FILES=	%%PYTHON_SITELIBDIR%%/_bsddb.so
 
+.include <bsd.port.pre.mk>
+
 post-extract:
 	@${CP} ${FILESDIR}/setup.py ${WRKSRC}
 
+.if ${PYTHON_REL} < 260
+BSDDB_PATCH=_bsddb.c
+.else
+BSDDB_PATCH=bsddb.h
+.endif
+
 post-patch:
 	${REINPLACE_CMD} -e \
 		's,^\(#include.*\)\(db\.h.*\)$$,\1${BDB_INCLUDE_DIR}/\2,' \
-		${WRKSRC}/_bsddb.c
+		${WRKSRC}/${BSDDB_PATCH}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>


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



More information about the freebsd-ports-bugs mailing list