From 7692c52970d624fb95cc0ad4fd5080f3d267c136 Mon Sep 17 00:00:00 2001 From: tmclaugh Date: Mon, 6 Apr 2009 05:12:40 +0000 Subject: Fix build with Python 2.6 - chase moved db.h include location PR: 130410 Submitted by: David Naylor Approved by: maintainer timeout --- databases/py-bsddb/Makefile | 12 ++++++++++-- databases/py25-bsddb/Makefile | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'databases') diff --git a/databases/py-bsddb/Makefile b/databases/py-bsddb/Makefile index 048d14d08530..d70bb1cf02c9 100644 --- a/databases/py-bsddb/Makefile +++ b/databases/py-bsddb/Makefile @@ -28,12 +28,20 @@ MD5_FILE= ${PORTSDIR}/lang/python/distinfo MAKE_ENV= BSDDB_VERSION=${BDB_LIB_NAME} PLIST_FILES= %%PYTHON_SITELIBDIR%%/_bsddb.so +.include + 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 +.include diff --git a/databases/py25-bsddb/Makefile b/databases/py25-bsddb/Makefile index 048d14d08530..d70bb1cf02c9 100644 --- a/databases/py25-bsddb/Makefile +++ b/databases/py25-bsddb/Makefile @@ -28,12 +28,20 @@ MD5_FILE= ${PORTSDIR}/lang/python/distinfo MAKE_ENV= BSDDB_VERSION=${BDB_LIB_NAME} PLIST_FILES= %%PYTHON_SITELIBDIR%%/_bsddb.so +.include + 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 +.include -- cgit