summaryrefslogtreecommitdiff
path: root/lang/python26
diff options
context:
space:
mode:
authorsbd <sbd@pkgsrc.org>2011-10-31 06:50:53 +0000
committersbd <sbd@pkgsrc.org>2011-10-31 06:50:53 +0000
commit5c40bfdabd6d0209fd23d0022a4fbc2af1d1a63a (patch)
tree96fb10aeb62b081653b3936ffb63cca8a29acf7c /lang/python26
parentfb79eb46833f8ddb894b459541eb17030a6054e2 (diff)
downloadpkgsrc-5c40bfdabd6d0209fd23d0022a4fbc2af1d1a63a.tar.gz
Improve the gdbm_compat handling by searching any ndbm.h found for the
string 'This file is part of GDBM' and ignoring it if it dose. Thanks to obache@ for the idea.
Diffstat (limited to 'lang/python26')
-rw-r--r--lang/python26/distinfo4
-rw-r--r--lang/python26/patches/patch-am47
2 files changed, 37 insertions, 14 deletions
diff --git a/lang/python26/distinfo b/lang/python26/distinfo
index e03bfd60bcb..907711ecdee 100644
--- a/lang/python26/distinfo
+++ b/lang/python26/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.39 2011/10/18 21:59:18 sbd Exp $
+$NetBSD: distinfo,v 1.40 2011/10/31 06:50:54 sbd Exp $
SHA1 (Python-2.6.7.tar.bz2) = 5d35eb746e85fb3deaff8518448137c9b9fb6daa
RMD160 (Python-2.6.7.tar.bz2) = 513e84a7cb76ca876e3803bb03ed558bd0378063
@@ -14,7 +14,7 @@ SHA1 (patch-ad) = a997e39d16a8f0023125362b180d19ee97ab519b
SHA1 (patch-ae) = a6d578b5f12eb42fbbcc11791576d2686a4807d9
SHA1 (patch-ah) = 501d220b41e578402f3400fe88e582aa2408a147
SHA1 (patch-al) = e18800d53de022e4c24055f7d03b69af2837b089
-SHA1 (patch-am) = 740d3b3b0793d7ed152438b9dacbae457dc71076
+SHA1 (patch-am) = 154b1d4fd7b5f7767dc383867390aa55d476e824
SHA1 (patch-an) = 17b4e17b3b562c29a050e9bb20447084ce82b8ab
SHA1 (patch-ao) = 8c6a156b0f0c2a6d319658477fff348e6a0c3603
SHA1 (patch-ap) = d23a869a449ab9dc166cfa149913b20c9acad9cb
diff --git a/lang/python26/patches/patch-am b/lang/python26/patches/patch-am
index 05347373919..1327accae0a 100644
--- a/lang/python26/patches/patch-am
+++ b/lang/python26/patches/patch-am
@@ -1,4 +1,4 @@
-$NetBSD: patch-am,v 1.17 2011/10/18 21:59:18 sbd Exp $
+$NetBSD: patch-am,v 1.18 2011/10/31 06:50:54 sbd Exp $
Disabled modules for normal build:
bsddb
@@ -261,7 +261,7 @@ support building the "nis" and "crypt" modules.
# The sqlite interface
sqlite_setup_debug = False # verbose debug prints from this script?
-@@ -1094,31 +956,12 @@
+@@ -1094,35 +956,40 @@
# we do not build this one. Otherwise this build will pick up
# the more recent berkeleydb's db.h file first in the include path
# when attempting to compile and it will fail.
@@ -298,14 +298,37 @@ support building the "nis" and "crypt" modules.
# The standard Unix dbm module:
if platform not in ['cygwin']:
-@@ -1128,10 +971,12 @@
+- 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'],
-+ # Don't use gdbm_compat!
-+ if not self.compiler.find_library_file(lib_dirs, 'gdbm_compat'):
-+ exts.append( Extension('dbm', ['dbmmodule.c'],
+@@ -1131,7 +998,7 @@
+ exts.append( Extension('dbm', ['dbmmodule.c'],
define_macros=[('HAVE_NDBM_H',None)],
libraries = ndbm_libs ) )
- elif self.compiler.find_library_file(lib_dirs, 'gdbm'):
@@ -313,7 +336,7 @@ support building the "nis" and "crypt" modules.
gdbm_libs = ['gdbm']
if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'):
gdbm_libs.append('gdbm_compat')
-@@ -1147,14 +990,12 @@
+@@ -1147,14 +1014,12 @@
libraries = gdbm_libs ) )
else:
missing.append('dbm')
@@ -331,7 +354,7 @@ support building the "nis" and "crypt" modules.
else:
missing.append('dbm')
-@@ -1408,6 +1248,14 @@
+@@ -1408,6 +1273,14 @@
)
libraries = []
@@ -346,7 +369,7 @@ support building the "nis" and "crypt" modules.
else: # Linux and other unices
macros = dict(
HAVE_SEM_OPEN=1,
-@@ -2026,9 +1874,9 @@
+@@ -2026,9 +1899,9 @@
ext_modules=[Extension('_struct', ['_struct.c'])],
# Scripts to install