blob: 24413cc4667edbf68e9d33b9af1afaa7ae6041ab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
PORTNAME= berkeleydb
DISTVERSION= 18.1.9
CATEGORIES= databases python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= bofh@FreeBSD.org
COMMENT= Python bindings for Oracle Berkeley DB
WWW= https://www.jcea.es/programacion/pybsddb.htm
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
USES= bdb python
USE_PYTHON= distutils autoplist
PYDISTUTILS_CONFIGUREARGS=--libs="-l${BDB_LIB_NAME}" --berkeley-db=${LOCALBASE}
PYDISTUTILS_BUILDARGS= --libs="-l${BDB_LIB_NAME}" --berkeley-db=${LOCALBASE}
PYDISTUTILS_INSTALLARGS=-c -O1 --prefix=${PREFIX} --berkeley-db=${LOCALBASE}
PORTDOCS= *
DOCSDIR= ${PREFIX}/share/doc/${PYTHON_PKGNAMEPREFIX}${PORTNAME}
OPTIONS_DEFINE= DOCS
.include <bsd.port.pre.mk>
.if ${BDB_VER} > 5
MAKE_ENV= YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION=yes
.endif
post-patch:
@${REINPLACE_CMD} 's|%%DBVERSION%%|${BDB_LIB_NAME}| ; \
s|%%BDB_INCLUDE_DIR%%|${BDB_INCLUDE_DIR}| ; \
s|%%BDB_LIB_NAME%%|${BDB_LIB_NAME}|' \
${WRKSRC}/setup3.py
@${REINPLACE_CMD} 's|<db\.h>|<${BDB_INCLUDE_DIR}/db.h>|' ${WRKSRC}/src/Module/berkeleydb.h
post-install:
@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}/_${PORTNAME}*.so
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR})
do-test:
@(cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} ./test.py
.include <bsd.port.post.mk>
|