View | Details | Raw Unified | Return to bug 189131 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-1 / +2 lines)
Lines 26-32 Link Here
26
post-patch:
26
post-patch:
27
	${REINPLACE_CMD} 's,%%DBVERSION%%,${BDB_LIB_NAME},g' ${WRKSRC}/setup2.py ${WRKSRC}/setup3.py
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
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
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
30
31
31
post-install:
32
post-install:
32
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
33
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
(-)./files/patch-setup3.py (-6 / +15 lines)
Lines 1-6 Link Here
1
--- setup3.py.orig	2011-03-15 16:10:41.000000000 +0800
1
--- setup3.py.orig
2
+++ setup3.py	2011-03-15 16:12:40.000000000 +0800
2
+++ setup3.py
3
@@ -53,10 +53,7 @@
3
@@ -86,10 +86,7 @@
4
             category=DeprecationWarning)
4
             category=DeprecationWarning)
5
 
5
 
6
 
6
 
Lines 12-25 Link Here
12
 
12
 
13
 from distutils.dep_util import newer
13
 from distutils.dep_util import newer
14
 import distutils.ccompiler
14
 import distutils.ccompiler
15
@@ -247,8 +244,8 @@
15
@@ -295,8 +292,8 @@
16
         incdir = os.path.join(BERKELEYDB_DIR, 'include')
16
         incdir = os.path.join(BERKELEYDB_DIR, 'include')
17
     if not libdir:
17
     if not libdir:
18
         libdir = os.path.join(BERKELEYDB_DIR, 'lib')
18
         libdir = os.path.join(BERKELEYDB_DIR, 'lib')
19
-    if not '-ldb' in LIBS:
19
-    if not '-ldb' in LIBS:
20
-        libname = [dblib]
20
-        libname = [dblib]
21
+    if not '-l%%DBVERSION%%' in LIBS:
21
+    if not '-l%%BDB_LIB_NAME%%' in LIBS:
22
+        libname = ['%%DBVERSION%%']
22
+        libname = ['%%BDB_LIB_NAME%%']
23
     else:
23
     else:
24
         if debug: print("LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'")
24
         if debug: print("LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'")
25
         libname = []
25
         libname = []
26
@@ -336,7 +333,7 @@
27
     # read db.h to figure out what version of Berkeley DB this is
28
     ver = None
29
     # This should move to "with" when we drop support for Python 2.4 and 2.5
30
-    f = open(os.path.join(incdir, 'db.h'), 'r')
31
+    f = open('%%BDB_INCLUDE_DIR%%/db.h', 'r')
32
     db_h_lines = f.readlines()
33
     f.close()
34
     db_ver_re = re.compile(

Return to bug 189131