Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2014 08:44:53 GMT
From:      Volodymyr Kostyrko <arcade@b1t.name>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/189131: databases/py-bsddb3 - fails to build with python3.x
Message-ID:  <201404300844.s3U8iraC064481@cgiserv.freebsd.org>
Resent-Message-ID: <201404300850.s3U8o0hJ004986@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         189131
>Category:       ports
>Synopsis:       databases/py-bsddb3 - fails to build with python3.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 30 08:50:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Volodymyr Kostyrko
>Release:        ^/stable/10
>Organization:
none
>Environment:
FreeBSD ar1l0u.maxima.local 10.0-STABLE FreeBSD 10.0-STABLE #12 r264752M: Tue Apr 22 11:08:50 EEST 2014     arcade@ar1l0u.maxima.local:/usr/obj/usr/src/sys/MINIMAL  amd64
>Description:
When building for python3.x the port can't correctly point to valid db.h header. Fix is copied from python2.x patch.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 352674)
+++ Makefile	(working copy)
@@ -28,6 +28,7 @@
 	${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}/setup3.py
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
Index: files/patch-setup3.py
===================================================================
--- files/patch-setup3.py	(revision 352674)
+++ files/patch-setup3.py	(working copy)
@@ -23,3 +23,12 @@
      else:
          if debug: print("LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'")
          libname = []
+@@ -332,7 +329,7 @@
+ 
+     # read db.h to figure out what version of Berkeley DB this is
+     ver = None
+-    db_h_lines = open(os.path.join(incdir, 'db.h'), 'r').readlines()
++    db_h_lines = open('%%BDB_INCLUDE_DIR%%/db.h', 'r').readlines()
+     db_ver_re = re.compile(
+         r'^#define\s+DB_VERSION_STRING\s.*Berkeley DB (\d+\.\d+).*')
+     db_ver2 = db_ver


>Release-Note:
>Audit-Trail:
>Unformatted:



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