mirror of
https://git.freebsd.org/ports.git
synced 2025-07-10 22:09:22 -04:00
34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
--- setup3.py.orig
|
|
+++ setup3.py
|
|
@@ -86,10 +86,7 @@
|
|
category=DeprecationWarning)
|
|
|
|
|
|
-try :
|
|
- from setuptools import setup, Extension
|
|
-except :
|
|
- from distutils.core import setup, Extension
|
|
+from distutils.core import setup, Extension
|
|
|
|
from distutils.dep_util import newer
|
|
import distutils.ccompiler
|
|
@@ -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%%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(
|