Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Sep 2014 17:10:36 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r368665 - in head/databases/py-bsddb3: . files
Message-ID:  <201409201710.s8KHAaog006090@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Sat Sep 20 17:10:36 2014
New Revision: 368665
URL: http://svnweb.freebsd.org/changeset/ports/368665
QAT: https://qat.redports.org/buildarchive/r368665/

Log:
  databases/py-bsddb3: Fix build with python 3.x
  
  PR:		189131
  Reported by:	arcade (b1t.name)
  Fixed by:	maintainer (Muhammad Rahman)

Modified:
  head/databases/py-bsddb3/Makefile
  head/databases/py-bsddb3/files/patch-setup3.py

Modified: head/databases/py-bsddb3/Makefile
==============================================================================
--- head/databases/py-bsddb3/Makefile	Sat Sep 20 17:06:46 2014	(r368664)
+++ head/databases/py-bsddb3/Makefile	Sat Sep 20 17:10:36 2014	(r368665)
@@ -3,6 +3,7 @@
 
 PORTNAME=	bsddb3
 PORTVERSION=	6.1.0
+PORTREVISION=	1
 CATEGORIES=	databases python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -26,7 +27,8 @@ DOCSDIR=	${PREFIX}/share/doc/py-${PORTNA
 post-patch:
 	${REINPLACE_CMD} 's,%%DBVERSION%%,${BDB_LIB_NAME},g' ${WRKSRC}/setup2.py ${WRKSRC}/setup3.py
 	${REINPLACE_CMD} 's,<db\.h>,<${BDB_INCLUDE_DIR}/db.h>,' ${WRKSRC}/Modules/bsddb.h
-	${REINPLACE_CMD} 's,%%BDB_INCLUDE_DIR%%,${BDB_INCLUDE_DIR},' ${WRKSRC}/setup2.py
+	${REINPLACE_CMD} 's,%%BDB_INCLUDE_DIR%%,${BDB_INCLUDE_DIR},' ${WRKSRC}/setup2.py ${WRKSRC}/setup3.py
+	${REINPLACE_CMD} 's,%%BDB_LIB_NAME%%,${BDB_LIB_NAME},' ${WRKSRC}/setup3.py
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}

Modified: head/databases/py-bsddb3/files/patch-setup3.py
==============================================================================
--- head/databases/py-bsddb3/files/patch-setup3.py	Sat Sep 20 17:06:46 2014	(r368664)
+++ head/databases/py-bsddb3/files/patch-setup3.py	Sat Sep 20 17:10:36 2014	(r368665)
@@ -1,6 +1,6 @@
---- setup3.py.orig	2011-03-15 16:10:41.000000000 +0800
-+++ setup3.py	2011-03-15 16:12:40.000000000 +0800
-@@ -53,10 +53,7 @@
+--- setup3.py.orig
++++ setup3.py
+@@ -86,10 +86,7 @@
              category=DeprecationWarning)
  
  
@@ -12,14 +12,23 @@
  
  from distutils.dep_util import newer
  import distutils.ccompiler
-@@ -247,8 +244,8 @@
+@@ -295,8 +292,8 @@
          incdir = os.path.join(BERKELEYDB_DIR, 'include')
      if not libdir:
          libdir = os.path.join(BERKELEYDB_DIR, 'lib')
 -    if not '-ldb' in LIBS:
 -        libname = [dblib]
-+    if not '-l%%DBVERSION%%' in LIBS:
-+        libname = ['%%DBVERSION%%']
++    if not '-l%%BDB_LIB_NAME%%' in LIBS:
++        libname = ['%%BDB_LIB_NAME%%']
      else:
          if debug: print("LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'")
          libname = []
+@@ -336,7 +333,7 @@
+     # read db.h to figure out what version of Berkeley DB this is
+     ver = None
+     # This should move to "with" when we drop support for Python 2.4 and 2.5
+-    f = open(os.path.join(incdir, 'db.h'), 'r')
++    f = open('%%BDB_INCLUDE_DIR%%/db.h', 'r')
+     db_h_lines = f.readlines()
+     f.close()
+     db_ver_re = re.compile(



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409201710.s8KHAaog006090>