summaryrefslogtreecommitdiff
path: root/databases/py-bsddb3/files/patch-setup3.py
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-09-20 17:10:36 +0000
committerJohn Marino <marino@FreeBSD.org>2014-09-20 17:10:36 +0000
commit566d086cd911f39560f3403d0409fd917f073915 (patch)
tree06c5c6da2a31322b1796b7d6a0ec55bf1fff7715 /databases/py-bsddb3/files/patch-setup3.py
parentReplace USE_GCC=4.8+ by the equivalent, but preferred USE_GCC=yes. (diff)
databases/py-bsddb3: Fix build with python 3.x
PR: 189131 Reported by: arcade (b1t.name) Fixed by: maintainer (Muhammad Rahman)
Diffstat (limited to 'databases/py-bsddb3/files/patch-setup3.py')
-rw-r--r--databases/py-bsddb3/files/patch-setup3.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/databases/py-bsddb3/files/patch-setup3.py b/databases/py-bsddb3/files/patch-setup3.py
index f93ce03ad7be..81ebb4ff6e4e 100644
--- a/databases/py-bsddb3/files/patch-setup3.py
+++ b/databases/py-bsddb3/files/patch-setup3.py
@@ -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(