summaryrefslogtreecommitdiff
path: root/lang/python24/patches/patch-am
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python24/patches/patch-am')
-rw-r--r--lang/python24/patches/patch-am42
1 files changed, 33 insertions, 9 deletions
diff --git a/lang/python24/patches/patch-am b/lang/python24/patches/patch-am
index e2e4671bea4..44d081f29b3 100644
--- a/lang/python24/patches/patch-am
+++ b/lang/python24/patches/patch-am
@@ -1,4 +1,4 @@
-$NetBSD: patch-am,v 1.7 2011/10/18 21:59:17 sbd Exp $
+$NetBSD: patch-am,v 1.8 2011/10/31 06:50:53 sbd Exp $
--- setup.py.orig 2006-10-08 17:41:25.000000000 +0000
+++ setup.py
@@ -52,7 +52,7 @@ $NetBSD: patch-am,v 1.7 2011/10/18 21:59:17 sbd Exp $
if (ssl_incs is not None and
ssl_libs is not None):
-@@ -515,168 +517,51 @@
+@@ -515,172 +517,79 @@
# similar functionality (but slower of course) implemented in Python.
# Sleepycat Berkeley DB interface. http://www.sleepycat.com
@@ -261,13 +261,37 @@ $NetBSD: patch-am,v 1.7 2011/10/18 21:59:17 sbd Exp $
# The standard Unix dbm module:
if platform not in ['cygwin']:
-@@ -686,16 +571,21 @@
+- if find_file("ndbm.h", inc_dirs, []) is not None:
++
++ ## Top half based on find_file
++ def find_ndbm_h(dirs):
++ ret = None
++ if sys.platform == 'darwin':
++ sysroot = macosx_sdk_root()
++ for dir in dirs:
++ f = os.path.join(dir, 'ndbm.h')
++ if sys.platform == 'darwin' and is_macosx_sdk_path(dir):
++ f = os.path.join(sysroot, dir[1:], filename)
++ if not os.path.exists(f): continue
++
++ ret = 'True'
++ input = text_file.TextFile(f)
++ while 1:
++ line = input.readline()
++ if not line: break
++ if re.search('This file is part of GDBM', line):
++ ret = None
++ break
++ input.close()
++ break
++ return ret
++
++ if find_ndbm_h(inc_dirs) is not None:
+ # Some systems have -lndbm, others don't
+ if self.compiler.find_library_file(lib_dirs, 'ndbm'):
ndbm_libs = ['ndbm']
- else:
- ndbm_libs = []
-- exts.append( Extension('dbm', ['dbmmodule.c'],
-+ if not self.compiler.find_library_file(lib_dirs, 'gdbm_compat'):
-+ exts.append( Extension('dbm', ['dbmmodule.c'],
+@@ -689,13 +598,17 @@
+ exts.append( Extension('dbm', ['dbmmodule.c'],
define_macros=[('HAVE_NDBM_H',None)],
libraries = ndbm_libs ) )
- elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
@@ -291,7 +315,7 @@ $NetBSD: patch-am,v 1.7 2011/10/18 21:59:17 sbd Exp $
library_dirs=dblib_dir,
runtime_library_dirs=dblib_dir,
include_dirs=db_incs,
-@@ -1224,8 +1114,8 @@
+@@ -1224,8 +1137,8 @@
ext_modules=[Extension('struct', ['structmodule.c'])],
# Scripts to install