Fri May 6 16:27:04 2011 UTC ()
Fix build on (at least RHEL 5.6). Tested (and no change) on NetBSD 5.99.51


(abs)
diff -r1.3 -r1.4 pkgsrc/lang/python27/distinfo
diff -r1.1.1.1 -r1.2 pkgsrc/lang/python27/patches/patch-am

cvs diff -r1.3 -r1.4 pkgsrc/lang/python27/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/python27/distinfo 2011/03/28 16:00:07 1.3
+++ pkgsrc/lang/python27/distinfo 2011/05/06 16:27:04 1.4
@@ -1,20 +1,20 @@ @@ -1,20 +1,20 @@
1$NetBSD: distinfo,v 1.3 2011/03/28 16:00:07 drochner Exp $ 1$NetBSD: distinfo,v 1.4 2011/05/06 16:27:04 abs Exp $
2 2
3SHA1 (Python-2.7.1.tar.bz2) = fbe1894322ff91b80726e269c97454f4129fc2a3 3SHA1 (Python-2.7.1.tar.bz2) = fbe1894322ff91b80726e269c97454f4129fc2a3
4RMD160 (Python-2.7.1.tar.bz2) = 3ce59305f6cd3fb320a53771d0ea01ec0687005f 4RMD160 (Python-2.7.1.tar.bz2) = 3ce59305f6cd3fb320a53771d0ea01ec0687005f
5Size (Python-2.7.1.tar.bz2) = 11722546 bytes 5Size (Python-2.7.1.tar.bz2) = 11722546 bytes
6SHA1 (patch-aa) = 990e4025bb6a37715e1f5df1831499f0ab08acfa 6SHA1 (patch-aa) = 990e4025bb6a37715e1f5df1831499f0ab08acfa
7SHA1 (patch-ab) = 8c44f60d9ed0babb107bc4643b0437e2dd55d03a 7SHA1 (patch-ab) = 8c44f60d9ed0babb107bc4643b0437e2dd55d03a
8SHA1 (patch-ad) = de730b9f5a5efb56afa8bed05824b5f6579242ec 8SHA1 (patch-ad) = de730b9f5a5efb56afa8bed05824b5f6579242ec
9SHA1 (patch-ae) = ff6d8c6164fe3c6dc4fb33d88eb8a49d5c5442f6 9SHA1 (patch-ae) = ff6d8c6164fe3c6dc4fb33d88eb8a49d5c5442f6
10SHA1 (patch-ah) = 8e9ee44c7a054f1387b6d8ef8dbe9c1b8dc8d891 10SHA1 (patch-ah) = 8e9ee44c7a054f1387b6d8ef8dbe9c1b8dc8d891
11SHA1 (patch-al) = 2c6a578b62dfba45b2ba01a6b004f1d8feee0fe2 11SHA1 (patch-al) = 2c6a578b62dfba45b2ba01a6b004f1d8feee0fe2
12SHA1 (patch-am) = c0a72af7c9827a9107fb7d1862febd487b9b5c83 12SHA1 (patch-am) = 760ed52308b31043bbf28528adf2a99f2420d85b
13SHA1 (patch-an) = 6098fbf0fc31422196cc40d3a227934523db11ca 13SHA1 (patch-an) = 6098fbf0fc31422196cc40d3a227934523db11ca
14SHA1 (patch-ao) = 2061473e5e672b4cc38d91c5d8f885cb361a35b3 14SHA1 (patch-ao) = 2061473e5e672b4cc38d91c5d8f885cb361a35b3
15SHA1 (patch-au) = 700dc128833af755f3ea08c4db79c127453b12e6 15SHA1 (patch-au) = 700dc128833af755f3ea08c4db79c127453b12e6
16SHA1 (patch-av) = a14eaf4d5db6fc3b79ed896fbfcc34ca98051af2 16SHA1 (patch-av) = a14eaf4d5db6fc3b79ed896fbfcc34ca98051af2
17SHA1 (patch-aw) = 15652e241f371a22c7300f46771825ea74514fa0 17SHA1 (patch-aw) = 15652e241f371a22c7300f46771825ea74514fa0
18SHA1 (patch-ax) = b3a69107d3abbc8476ce79fb05aa8c9f293896a2 18SHA1 (patch-ax) = b3a69107d3abbc8476ce79fb05aa8c9f293896a2
19SHA1 (patch-ca) = aa0ad5a9dff1cd7c1c456aa6371733727ac1425b 19SHA1 (patch-ca) = aa0ad5a9dff1cd7c1c456aa6371733727ac1425b
20SHA1 (patch-cb) = f8fa30bb9aae0ef02c187d1d6db176bac731381e 20SHA1 (patch-cb) = f8fa30bb9aae0ef02c187d1d6db176bac731381e

cvs diff -r1.1.1.1 -r1.2 pkgsrc/lang/python27/patches/Attic/patch-am (expand / switch to unified diff)

--- pkgsrc/lang/python27/patches/Attic/patch-am 2011/02/22 08:52:01 1.1.1.1
+++ pkgsrc/lang/python27/patches/Attic/patch-am 2011/05/06 16:27:04 1.2
@@ -1,35 +1,35 @@ @@ -1,35 +1,35 @@
1$NetBSD: patch-am,v 1.1.1.1 2011/02/22 08:52:01 obache Exp $ 1$NetBSD: patch-am,v 1.2 2011/05/06 16:27:04 abs Exp $
2 2
3Disabled modules for normal build: 3Disabled modules for normal build:
4bsddb 4bsddb
5curses 5curses
6curses_panel 6curses_panel
7elementtree 7elementtree
8sqlite3 8sqlite3
9tkinter 9tkinter
10gdbm 10gdbm
11pyexpat 11pyexpat
12readline 12readline
13{linux,oss,sun}audiodev 13{linux,oss,sun}audiodev
14spwd 14spwd
15Those have separate packages where needed. 15Those have separate packages where needed.
16 16
17Only check the BUILDLINK_DIR for libraries etc, do not pick up random 17Only check the BUILDLINK_DIR for libraries etc, do not pick up random
18headers and libraries from the system. 18headers and libraries from the system.
19 19
20Build the 1.85 compat module all the time against the BDB version of choice. 20Build the 1.85 compat module all the time against the BDB version of choice.
21 21
22--- setup.py.orig 2010-06-27 12:36:16.000000000 +0000 22--- setup.py.orig 2010-10-31 16:40:21.000000000 +0000
23+++ setup.py 23+++ setup.py
24@@ -21,7 +21,7 @@ from distutils.spawn import find_executa 24@@ -21,7 +21,7 @@ from distutils.spawn import find_executa
25 COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount') 25 COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
26  26
27 # This global variable is used to hold the list of modules to be disabled. 27 # This global variable is used to hold the list of modules to be disabled.
28-disabled_module_list = [] 28-disabled_module_list = []
29+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_elementtree", "_sqlite3", "_tkinter", "gdbm", "pyexpat", "readline", "linuxaudiodev", "ossaudiodev", "spwd", "sunaudiodev"] 29+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_elementtree", "_sqlite3", "_tkinter", "gdbm", "pyexpat", "readline", "linuxaudiodev", "ossaudiodev", "spwd", "sunaudiodev"]
30  30
31 def add_dir_to_list(dirlist, dir): 31 def add_dir_to_list(dirlist, dir):
32 """Add the directory 'dir' to the list 'dirlist' (at the front) if 32 """Add the directory 'dir' to the list 'dirlist' (at the front) if
33@@ -346,9 +346,15 @@ class PyBuildExt(build_ext): 33@@ -346,9 +346,15 @@ class PyBuildExt(build_ext):
34 return sys.platform 34 return sys.platform
35  35
@@ -39,38 +39,38 @@ Build the 1.85 compat module all the tim @@ -39,38 +39,38 @@ Build the 1.85 compat module all the tim
39- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') 39- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
40+ # Add the buildlink directories for pkgsrc 40+ # Add the buildlink directories for pkgsrc
41+ if os.environ.has_key('BUILDLINK_DIR'): 41+ if os.environ.has_key('BUILDLINK_DIR'):
42+ dir = os.environ['BUILDLINK_DIR'] 42+ dir = os.environ['BUILDLINK_DIR']
43+ libdir = dir + '/lib' 43+ libdir = dir + '/lib'
44+ incdir = dir + '/include' 44+ incdir = dir + '/include'
45+ if libdir not in self.compiler.library_dirs: 45+ if libdir not in self.compiler.library_dirs:
46+ self.compiler.library_dirs.insert(0, libdir) 46+ self.compiler.library_dirs.insert(0, libdir)
47+ if incdir not in self.compiler.include_dirs: 47+ if incdir not in self.compiler.include_dirs:
48+ self.compiler.include_dirs.insert(0, incdir) 48+ self.compiler.include_dirs.insert(0, incdir)
49  49
50 # Add paths specified in the environment variables LDFLAGS and 50 # Add paths specified in the environment variables LDFLAGS and
51 # CPPFLAGS for header and library files. 51 # CPPFLAGS for header and library files.
52@@ -681,9 +687,7 @@ class PyBuildExt(build_ext): 52@@ -692,9 +698,7 @@ class PyBuildExt(build_ext):
53 if krb5_h: 53 if krb5_h:
54 ssl_incs += krb5_h 54 ssl_incs += krb5_h
55 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, 55 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
56- ['/usr/local/ssl/lib', 56- ['/usr/local/ssl/lib',
57- '/usr/contrib/ssl/lib/' 57- '/usr/contrib/ssl/lib/'
58- ] ) 58- ] )
59+ [] ) 59+ [] )
60  60
61 if (ssl_incs is not None and 61 if (ssl_incs is not None and
62 ssl_libs is not None): 62 ssl_libs is not None):
63@@ -798,172 +802,6 @@ class PyBuildExt(build_ext): 63@@ -809,172 +813,6 @@ class PyBuildExt(build_ext):
64 else: 64 else:
65 raise ValueError("unknown major BerkeleyDB version", major) 65 raise ValueError("unknown major BerkeleyDB version", major)
66  66
67- # construct a list of paths to look for the header file in on 67- # construct a list of paths to look for the header file in on
68- # top of the normal inc_dirs. 68- # top of the normal inc_dirs.
69- db_inc_paths = [ 69- db_inc_paths = [
70- '/usr/include/db4', 70- '/usr/include/db4',
71- '/usr/local/include/db4', 71- '/usr/local/include/db4',
72- '/opt/sfw/include/db4', 72- '/opt/sfw/include/db4',
73- '/usr/include/db3', 73- '/usr/include/db3',
74- '/usr/local/include/db3', 74- '/usr/local/include/db3',
75- '/opt/sfw/include/db3', 75- '/opt/sfw/include/db3',
76- # Fink defaults (http://fink.sourceforge.net/) 76- # Fink defaults (http://fink.sourceforge.net/)
@@ -223,27 +223,27 @@ Build the 1.85 compat module all the tim @@ -223,27 +223,27 @@ Build the 1.85 compat module all the tim
223- runtime_library_dirs=dblib_dir, 223- runtime_library_dirs=dblib_dir,
224- include_dirs=db_incs, 224- include_dirs=db_incs,
225- libraries=dblibs)) 225- libraries=dblibs))
226- else: 226- else:
227- if db_setup_debug: print "db: no appropriate library found" 227- if db_setup_debug: print "db: no appropriate library found"
228- db_incs = None 228- db_incs = None
229- dblibs = [] 229- dblibs = []
230- dblib_dir = None 230- dblib_dir = None
231- missing.append('_bsddb') 231- missing.append('_bsddb')
232- 232-
233 # The sqlite interface 233 # The sqlite interface
234 sqlite_setup_debug = False # verbose debug prints from this script? 234 sqlite_setup_debug = False # verbose debug prints from this script?
235  235
236@@ -1079,31 +917,12 @@ class PyBuildExt(build_ext): 236@@ -1090,31 +928,12 @@ class PyBuildExt(build_ext):
237 # we do not build this one. Otherwise this build will pick up 237 # we do not build this one. Otherwise this build will pick up
238 # the more recent berkeleydb's db.h file first in the include path 238 # the more recent berkeleydb's db.h file first in the include path
239 # when attempting to compile and it will fail. 239 # when attempting to compile and it will fail.
240- f = "/usr/include/db.h" 240- f = "/usr/include/db.h"
241- 241-
242- if sys.platform == 'darwin': 242- if sys.platform == 'darwin':
243- if is_macosx_sdk_path(f): 243- if is_macosx_sdk_path(f):
244- sysroot = macosx_sdk_root() 244- sysroot = macosx_sdk_root()
245- f = os.path.join(sysroot, f[1:]) 245- f = os.path.join(sysroot, f[1:])
246- 246-
247- if os.path.exists(f) and not db_incs: 247- if os.path.exists(f) and not db_incs:
248- data = open(f).read() 248- data = open(f).read()
249- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) 249- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
@@ -260,42 +260,53 @@ Build the 1.85 compat module all the tim @@ -260,42 +260,53 @@ Build the 1.85 compat module all the tim
260- exts.append(Extension('bsddb185', ['bsddbmodule.c'])) 260- exts.append(Extension('bsddb185', ['bsddbmodule.c']))
261- else: 261- else:
262- missing.append('bsddb185') 262- missing.append('bsddb185')
263+ libraries = os.getenv("PY_BDB_TYPE", "") 263+ libraries = os.getenv("PY_BDB_TYPE", "")
264+ if libraries: 264+ if libraries:
265+ exts.append(Extension('bsddb185', ['bsddbmodule.c'], 265+ exts.append(Extension('bsddb185', ['bsddbmodule.c'],
266+ libraries=['db'])) 266+ libraries=['db']))
267 else: 267 else:
268- missing.append('bsddb185') 268- missing.append('bsddb185')
269+ exts.append(Extension('bsddb185', ['bsddbmodule.c'])) 269+ exts.append(Extension('bsddb185', ['bsddbmodule.c']))
270  270
271 dbm_order = ['gdbm'] 271 dbm_order = ['gdbm']
272 # The standard Unix dbm module: 272 # The standard Unix dbm module:
273@@ -1162,14 +981,11 @@ class PyBuildExt(build_ext): 273@@ -1170,18 +989,14 @@ class PyBuildExt(build_ext):
274 if db_incs is not None: 274 libraries = gdbm_libs)
275 print "building dbm using bdb" 275 break
276 dbmext = Extension('dbm', ['dbmmodule.c'], 276 elif cand == "bdb":
 277- if db_incs is not None:
 278- print "building dbm using bdb"
 279- dbmext = Extension('dbm', ['dbmmodule.c'],
277- library_dirs=dblib_dir, 280- library_dirs=dblib_dir,
278- runtime_library_dirs=dblib_dir, 281- runtime_library_dirs=dblib_dir,
279- include_dirs=db_incs, 282- include_dirs=db_incs,
280 define_macros=[ 283- define_macros=[
281 ('HAVE_BERKDB_H', None), 284- ('HAVE_BERKDB_H', None),
282 ('DB_DBM_HSEARCH', None), 285- ('DB_DBM_HSEARCH', None),
283 ], 286- ],
284- libraries=dblibs) 287- libraries=dblibs)
285+ libraries=["db"]) 288- break
286 break 289+ print "building dbm using bdb"
 290+ dbmext = Extension('dbm', ['dbmmodule.c'],
 291+ define_macros=[
 292+ ('HAVE_BERKDB_H', None),
 293+ ('DB_DBM_HSEARCH', None),
 294+ ],
 295+ libraries=["db"])
 296+ break
287 if dbmext is not None: 297 if dbmext is not None:
288 exts.append(dbmext) 298 exts.append(dbmext)
289@@ -2032,9 +1848,9 @@ def main(): 299 else:
 300@@ -2043,9 +1858,9 @@ def main():
290 ext_modules=[Extension('_struct', ['_struct.c'])], 301 ext_modules=[Extension('_struct', ['_struct.c'])],
291  302
292 # Scripts to install 303 # Scripts to install
293- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', 304- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
294- 'Tools/scripts/2to3', 305- 'Tools/scripts/2to3',
295- 'Lib/smtpd.py'] 306- 'Lib/smtpd.py']
296+ scripts = ['Tools/scripts/pydoc2.7', 307+ scripts = ['Tools/scripts/pydoc2.7',
297+ 'Tools/scripts/2to3-2.7', 308+ 'Tools/scripts/2to3-2.7',
298+ 'Lib/smtpd2.7.py'] 309+ 'Lib/smtpd2.7.py']
299 ) 310 )
300  311
301 # --install-platlib 312 # --install-platlib