aboutsummaryrefslogtreecommitdiffstats
path: root/databases/py-bsddb/Makefile
blob: d70bb1cf02c9447a556de80a06363db8942c19fa (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
# New ports collection makefile for:    py-bsddb
# Date created:         31 July 2003
# Whom:                 Hye-Shik Chang <perky@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   bsddb
PORTVERSION=    ${PYTHON_PORTVERSION}
PORTREVISION=   2
CATEGORIES= databases python
MASTER_SITES=   ${PYTHON_MASTER_SITES}
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTFILES=  ${PYTHON_DISTFILE}

MAINTAINER= perky@FreeBSD.org
COMMENT=    Python bindings to the Berkeley DB library

USE_BDB=    yes
USE_PYTHON= 2.3+
USE_PYDISTUTILS=yes
PYDISTUTILS_PKGNAME=    _bsddb
PYDISTUTILS_PKGVERSION= 0.0.0
DIST_SUBDIR=    python
WRKSRC=     ${PYTHON_WRKSRC}/Modules
MD5_FILE=   ${PORTSDIR}/lang/python/distinfo
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_PATCH}

.include <bsd.port.post.mk>