Date: Mon, 12 Jan 2009 10:39:56 GMT From: David Naylor <naylor.b.david@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/130410: [PATCH] databases/py-bsddb - Fix build with python2.6 Message-ID: <200901121039.n0CAduej038676@www.freebsd.org> Resent-Message-ID: <200901121050.n0CAo20v073364@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901121039.n0CAduej038676>