View | Details | Raw Unified | Return to bug 208285
Collapse All | Expand All

(-)databases/py-bsddb3/Makefile (-1 / +1 lines)
Lines 13-19 Link Here
13
LICENSE=	BSD3CLAUSE
13
LICENSE=	BSD3CLAUSE
14
14
15
USE_BDB=	yes
15
USE_BDB=	yes
16
USES=		python
16
USES?=		python
17
USE_PYTHON=	distutils autoplist
17
USE_PYTHON=	distutils autoplist
18
18
19
PYDISTUTILS_CONFIGUREARGS=--libs="-l${BDB_LIB_NAME}" --berkeley-db=${LOCALBASE}
19
PYDISTUTILS_CONFIGUREARGS=--libs="-l${BDB_LIB_NAME}" --berkeley-db=${LOCALBASE}
(-)databases/py3-bsddb3/Makefile (-32 / +3 lines)
Lines 1-37 Link Here
1
# Created by: Ben Woods <woodsb02@gmail.com>
1
# Created by: Ben Woods <woodsb02@gmail.com>
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	bsddb3
4
MASTERDIR=	${.CURDIR}/../py-bsddb3
5
PORTVERSION=	6.1.1
6
CATEGORIES=	databases python
7
MASTER_SITES=	CHEESESHOP
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
9
5
10
MAINTAINER=	woodsb02@gmail.com
6
USES=		python:3.2+
11
COMMENT=	Python extension module for BerkeleyDB 3 and 4
12
7
13
LICENSE=	BSD3CLAUSE
8
.include "${MASTERDIR}/Makefile"
14
15
USE_BDB=	yes
16
USES=		python:3
17
USE_PYTHON=	distutils autoplist
18
19
PYDISTUTILS_CONFIGUREARGS=--libs="-l${BDB_LIB_NAME}" --berkeley-db=${LOCALBASE}
20
PYDISTUTILS_BUILDARGS=	--libs="-l${BDB_LIB_NAME}" --berkeley-db=${LOCALBASE}
21
PYDISTUTILS_INSTALLARGS=-c -O1 --prefix=${PREFIX} --berkeley-db=${LOCALBASE}
22
23
PORTDOCS=	*
24
DOCSDIR=	${PREFIX}/share/doc/py-${PORTNAME}
25
26
post-patch:
27
	${REINPLACE_CMD} 's,%%DBVERSION%%,${BDB_LIB_NAME},g' ${WRKSRC}/setup2.py ${WRKSRC}/setup3.py
28
	${REINPLACE_CMD} 's,<db\.h>,<${BDB_INCLUDE_DIR}/db.h>,' ${WRKSRC}/Modules/bsddb.h
29
	${REINPLACE_CMD} 's,%%BDB_INCLUDE_DIR%%,${BDB_INCLUDE_DIR},' ${WRKSRC}/setup2.py ${WRKSRC}/setup3.py
30
	${REINPLACE_CMD} 's,%%BDB_LIB_NAME%%,${BDB_LIB_NAME},' ${WRKSRC}/setup3.py
31
32
post-install:
33
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
34
	(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR})
35
	${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/bsddb3/_pybsddb.so
36
37
.include <bsd.port.mk>
(-)databases/py3-bsddb3/distinfo (-2 lines)
Lines 1-2 Link Here
1
SHA256 (bsddb3-6.1.1.tar.gz) = 6f21b0252125c07798d784c164ef135ad153d226c01b290258ee1c5b9e7c4dd3
2
SIZE (bsddb3-6.1.1.tar.gz) = 450571
(-)databases/py3-bsddb3/files/patch-setup2.py (-35 lines)
Lines 1-35 Link Here
1
--- setup2.py.orig	2016-02-08 21:14:26 UTC
2
+++ setup2.py
3
@@ -81,11 +81,7 @@ if (sys.version_info[0] < 3) and (sys.ve
4
             category=DeprecationWarning)
5
 
6
 
7
-try :
8
-  from setuptools import setup, Extension
9
-except :
10
-  from distutils.core import setup, Extension
11
-
12
+from distutils.core import setup, Extension
13
 from distutils.dep_util import newer
14
 import distutils.ccompiler
15
 
16
@@ -288,8 +284,8 @@ if os.name == 'posix':
17
         incdir = os.path.join(BERKELEYDB_DIR, 'include')
18
     if not libdir:
19
         libdir = os.path.join(BERKELEYDB_DIR, 'lib')
20
-    if not '-ldb' in LIBS:
21
-        libname = [dblib]
22
+    if not '-l%%DBVERSION%%' in LIBS:
23
+        libname = ['%%DBVERSION%%']
24
     else:
25
         if debug: print "LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'"
26
         libname = []
27
@@ -328,7 +324,7 @@ if os.name == 'posix':
28
 
29
     # read db.h to figure out what version of Berkeley DB this is
30
     ver = None
31
-    with open(os.path.join(incdir, 'db.h'), 'r') as f :
32
+    with open('%%BDB_INCLUDE_DIR%%/db.h', 'r') as f :
33
         db_h_lines = f.readlines()
34
     db_ver_re = re.compile(
35
         r'^#define\s+DB_VERSION_STRING\s.*Berkeley DB (\d+\.\d+).*')
(-)databases/py3-bsddb3/files/patch-setup3.py (-35 lines)
Lines 1-35 Link Here
1
--- setup3.py.orig	2016-02-08 21:18:47 UTC
2
+++ setup3.py
3
@@ -81,11 +81,7 @@ if (sys.version_info[0] < 3) and (sys.ve
4
             category=DeprecationWarning)
5
 
6
 
7
-try :
8
-  from setuptools import setup, Extension
9
-except :
10
-  from distutils.core import setup, Extension
11
-
12
+from distutils.core import setup, Extension
13
 from distutils.dep_util import newer
14
 import distutils.ccompiler
15
 
16
@@ -288,8 +284,8 @@ if os.name == 'posix':
17
         incdir = os.path.join(BERKELEYDB_DIR, 'include')
18
     if not libdir:
19
         libdir = os.path.join(BERKELEYDB_DIR, 'lib')
20
-    if not '-ldb' in LIBS:
21
-        libname = [dblib]
22
+    if not '-l%%BDB_LIB_NAME%%' in LIBS:
23
+        libname = ['%%BDB_LIB_NAME%%']
24
     else:
25
         if debug: print("LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'")
26
         libname = []
27
@@ -328,7 +324,7 @@ if os.name == 'posix':
28
 
29
     # read db.h to figure out what version of Berkeley DB this is
30
     ver = None
31
-    with open(os.path.join(incdir, 'db.h'), 'r') as f :
32
+    with open('%%BDB_INCLUDE_DIR%%/db.h', 'r') as f :
33
         db_h_lines = f.readlines()
34
     db_ver_re = re.compile(
35
         r'^#define\s+DB_VERSION_STRING\s.*Berkeley DB (\d+\.\d+).*')
(-)databases/py3-bsddb3/pkg-descr (-10 lines)
Lines 1-10 Link Here
1
This module provides a nearly complete wrapping of the Sleepycat C API
2
for the Database Environment, Database, Cursor, and Transaction
3
objects, and each of these is exposed as a Python Type in the
4
bsddb3.db module.  The database objects can use different access
5
methods, btree, hash, recno, and queue.  For the first time all of
6
these are fully supported in the Python wrappers.  Please see the
7
document in developers' web site for more details on the types and
8
methods provided.
9
10
WWW: http://www.jcea.es/programacion/pybsddb.htm

Return to bug 208285