Tue Oct 18 21:59:19 2011 UTC ()
Deal with the fact that if /usr/include/ndbm.h exists on Linux it probably
belongs to gdbm_compat.  I.E. _don't_ use ndbm on Linux.


(sbd)
diff -r1.35 -r1.36 pkgsrc/lang/python24/distinfo
diff -r1.6 -r1.7 pkgsrc/lang/python24/patches/patch-am
diff -r1.17 -r1.18 pkgsrc/lang/python25/distinfo
diff -r1.7 -r1.8 pkgsrc/lang/python25/patches/patch-am
diff -r1.38 -r1.39 pkgsrc/lang/python26/distinfo
diff -r1.16 -r1.17 pkgsrc/lang/python26/patches/patch-am
diff -r1.9 -r1.10 pkgsrc/lang/python27/distinfo
diff -r1.3 -r1.4 pkgsrc/lang/python27/patches/patch-am
diff -r1.3 -r1.4 pkgsrc/lang/python31/distinfo
diff -r1.2 -r1.3 pkgsrc/lang/python31/patches/patch-am
diff -r1.57 -r1.58 pkgsrc/security/cyrus-sasl/Makefile

cvs diff -r1.35 -r1.36 pkgsrc/lang/python24/Attic/distinfo (switch to unified diff)

--- pkgsrc/lang/python24/Attic/distinfo 2011/09/14 17:00:20 1.35
+++ pkgsrc/lang/python24/Attic/distinfo 2011/10/18 21:59:17 1.36
@@ -1,24 +1,24 @@ @@ -1,24 +1,24 @@
1$NetBSD: distinfo,v 1.35 2011/09/14 17:00:20 hans Exp $ 1$NetBSD: distinfo,v 1.36 2011/10/18 21:59:17 sbd Exp $
2 2
3SHA1 (Python-2.4.6.tar.bz2) = cb1972a554a458f6a26d3e047b359251865d7c96 3SHA1 (Python-2.4.6.tar.bz2) = cb1972a554a458f6a26d3e047b359251865d7c96
4RMD160 (Python-2.4.6.tar.bz2) = 0687989193dec2ac108142759281be7ddcf7f31e 4RMD160 (Python-2.4.6.tar.bz2) = 0687989193dec2ac108142759281be7ddcf7f31e
5Size (Python-2.4.6.tar.bz2) = 8154677 bytes 5Size (Python-2.4.6.tar.bz2) = 8154677 bytes
6SHA1 (patch-aa) = 310309e6778fd809b7758efa8db7333ed498e5e5 6SHA1 (patch-aa) = 310309e6778fd809b7758efa8db7333ed498e5e5
7SHA1 (patch-ab) = 98b94620baf5d9d5e8681529297124c2d07a901b 7SHA1 (patch-ab) = 98b94620baf5d9d5e8681529297124c2d07a901b
8SHA1 (patch-ac) = 4a7a83c9a7bb26254d17907fe15f895276910364 8SHA1 (patch-ac) = 4a7a83c9a7bb26254d17907fe15f895276910364
9SHA1 (patch-ad) = 44a13d3f9814d471f266ab641024ad74be046ec1 9SHA1 (patch-ad) = 44a13d3f9814d471f266ab641024ad74be046ec1
10SHA1 (patch-ae) = 7e00d719044fa0f205692392d9ebe87146715206 10SHA1 (patch-ae) = 7e00d719044fa0f205692392d9ebe87146715206
11SHA1 (patch-af) = f468e8c172fc5aaae1bf843898a30c00ec753537 11SHA1 (patch-af) = f468e8c172fc5aaae1bf843898a30c00ec753537
12SHA1 (patch-ag) = 0cdc08af9d37ae7d00a06ab81c30efa021ef28ac 12SHA1 (patch-ag) = 0cdc08af9d37ae7d00a06ab81c30efa021ef28ac
13SHA1 (patch-ah) = 154b40eec926a6dcc968c635467807766d1cfaa3 13SHA1 (patch-ah) = 154b40eec926a6dcc968c635467807766d1cfaa3
14SHA1 (patch-ai) = 6435c5a7269c14d94eab6fb9777b9d059507e7b8 14SHA1 (patch-ai) = 6435c5a7269c14d94eab6fb9777b9d059507e7b8
15SHA1 (patch-aj) = e471737ade95423039661b475f2dd0fc27aa9dac 15SHA1 (patch-aj) = e471737ade95423039661b475f2dd0fc27aa9dac
16SHA1 (patch-ak) = 4c6708eb29757179e6855d8fbe78cab92c5a18d5 16SHA1 (patch-ak) = 4c6708eb29757179e6855d8fbe78cab92c5a18d5
17SHA1 (patch-al) = 3bcbdcacc451c8a354ea2d9e9887e61edaabfa41 17SHA1 (patch-al) = 3bcbdcacc451c8a354ea2d9e9887e61edaabfa41
18SHA1 (patch-am) = 31158eee32363963e2f6d0bd528f0b291453de74 18SHA1 (patch-am) = 3db16b0d139c9ae113378aeb94a4cdf9828148ce
19SHA1 (patch-an) = 0ae5b3d547c7dbe1366c5ae6c60c11516e4550b8 19SHA1 (patch-an) = 0ae5b3d547c7dbe1366c5ae6c60c11516e4550b8
20SHA1 (patch-ao) = 1ef48142acd8b591b11013b46048d9145f235843 20SHA1 (patch-ao) = 1ef48142acd8b591b11013b46048d9145f235843
21SHA1 (patch-ap) = 8fbfecdb80ee851db569b64201ccd94bd3552a81 21SHA1 (patch-ap) = 8fbfecdb80ee851db569b64201ccd94bd3552a81
22SHA1 (patch-aq) = 3d13cd79d50b70302d1b6ee598759a51f0b98532 22SHA1 (patch-aq) = 3d13cd79d50b70302d1b6ee598759a51f0b98532
23SHA1 (patch-ar) = f132998e3e81f3093f9bddf32fe6dcb40fcfa76f 23SHA1 (patch-ar) = f132998e3e81f3093f9bddf32fe6dcb40fcfa76f
24SHA1 (patch-at) = 9d66115cc561c99dcc3478678aa286c1c0c3df6b 24SHA1 (patch-at) = 9d66115cc561c99dcc3478678aa286c1c0c3df6b

cvs diff -r1.6 -r1.7 pkgsrc/lang/python24/patches/Attic/patch-am (switch to unified diff)

--- pkgsrc/lang/python24/patches/Attic/patch-am 2009/09/19 09:30:41 1.6
+++ pkgsrc/lang/python24/patches/Attic/patch-am 2011/10/18 21:59:17 1.7
@@ -1,292 +1,304 @@ @@ -1,292 +1,304 @@
1$NetBSD: patch-am,v 1.6 2009/09/19 09:30:41 obache Exp $ 1$NetBSD: patch-am,v 1.7 2011/10/18 21:59:17 sbd Exp $
2 2
3--- setup.py.orig 2006-10-08 17:41:25.000000000 +0000 3--- setup.py.orig 2006-10-08 17:41:25.000000000 +0000
4+++ setup.py 4+++ setup.py
5@@ -15,7 +15,7 @@ 5@@ -15,7 +15,7 @@
6 from distutils.command.install_lib import install_lib 6 from distutils.command.install_lib import install_lib
7  7
8 # This global variable is used to hold the list of modules to be disabled. 8 # This global variable is used to hold the list of modules to be disabled.
9-disabled_module_list = [] 9-disabled_module_list = []
10+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_tkinter", "gdbm", "pyexpat", "readline"] 10+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_tkinter", "gdbm", "pyexpat", "readline"]
11  11
12 def add_dir_to_list(dirlist, dir): 12 def add_dir_to_list(dirlist, dir):
13 """Add the directory 'dir' to the list 'dirlist' (at the front) if 13 """Add the directory 'dir' to the list 'dirlist' (at the front) if
14@@ -239,9 +239,15 @@ 14@@ -239,9 +239,15 @@
15 return sys.platform 15 return sys.platform
16  16
17 def detect_modules(self): 17 def detect_modules(self):
18- # Ensure that /usr/local is always used 18- # Ensure that /usr/local is always used
19- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') 19- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
20- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') 20- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
21+ # Add the buildlink directories for pkgsrc 21+ # Add the buildlink directories for pkgsrc
22+ if os.environ.has_key('BUILDLINK_DIR'): 22+ if os.environ.has_key('BUILDLINK_DIR'):
23+ dir = os.environ['BUILDLINK_DIR'] 23+ dir = os.environ['BUILDLINK_DIR']
24+ libdir = dir + '/lib' 24+ libdir = dir + '/lib'
25+ incdir = dir + '/include' 25+ incdir = dir + '/include'
26+ if libdir not in self.compiler.library_dirs: 26+ if libdir not in self.compiler.library_dirs:
27+ self.compiler.library_dirs.insert(0, libdir) 27+ self.compiler.library_dirs.insert(0, libdir)
28+ if incdir not in self.compiler.include_dirs: 28+ if incdir not in self.compiler.include_dirs:
29+ self.compiler.include_dirs.insert(0, incdir) 29+ self.compiler.include_dirs.insert(0, incdir)
30  30
31 # Add paths to popular package managers on OS X/darwin 31 # Add paths to popular package managers on OS X/darwin
32 if sys.platform == "darwin": 32 if sys.platform == "darwin":
33@@ -485,9 +491,7 @@ 33@@ -485,9 +491,7 @@
34 depends = ['socketmodule.h']) ) 34 depends = ['socketmodule.h']) )
35 # Detect SSL support for the socket module (via _ssl) 35 # Detect SSL support for the socket module (via _ssl)
36 ssl_incs = find_file('openssl/ssl.h', inc_dirs, 36 ssl_incs = find_file('openssl/ssl.h', inc_dirs,
37- ['/usr/local/ssl/include', 37- ['/usr/local/ssl/include',
38- '/usr/contrib/ssl/include/' 38- '/usr/contrib/ssl/include/'
39- ] 39- ]
40+ [] 40+ []
41 ) 41 )
42 if ssl_incs is not None: 42 if ssl_incs is not None:
43 krb5_h = find_file('krb5.h', inc_dirs, 43 krb5_h = find_file('krb5.h', inc_dirs,
44@@ -495,9 +499,7 @@ 44@@ -495,9 +499,7 @@
45 if krb5_h: 45 if krb5_h:
46 ssl_incs += krb5_h 46 ssl_incs += krb5_h
47 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, 47 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
48- ['/usr/local/ssl/lib', 48- ['/usr/local/ssl/lib',
49- '/usr/contrib/ssl/lib/' 49- '/usr/contrib/ssl/lib/'
50- ] ) 50- ] )
51+ [] ) 51+ [] )
52  52
53 if (ssl_incs is not None and 53 if (ssl_incs is not None and
54 ssl_libs is not None): 54 ssl_libs is not None):
55@@ -515,168 +517,51 @@ 55@@ -515,168 +517,51 @@
56 # similar functionality (but slower of course) implemented in Python. 56 # similar functionality (but slower of course) implemented in Python.
57  57
58 # Sleepycat Berkeley DB interface. http://www.sleepycat.com 58 # Sleepycat Berkeley DB interface. http://www.sleepycat.com
59- # 59- #
60- # This requires the Sleepycat DB code. The earliest supported version 60- # This requires the Sleepycat DB code. The earliest supported version
61- # of that library is 3.2, the latest supported version is 4.4. A list 61- # of that library is 3.2, the latest supported version is 4.4. A list
62- # of available releases can be found at 62- # of available releases can be found at
63- # 63- #
64- # http://www.sleepycat.com/update/index.html 64- # http://www.sleepycat.com/update/index.html
65- 65-
66- max_db_ver = (4, 4) 66- max_db_ver = (4, 4)
67- min_db_ver = (3, 2) 67- min_db_ver = (3, 2)
68- db_setup_debug = False # verbose debug prints from this script? 68- db_setup_debug = False # verbose debug prints from this script?
69- 69-
70- # construct a list of paths to look for the header file in on 70- # construct a list of paths to look for the header file in on
71- # top of the normal inc_dirs. 71- # top of the normal inc_dirs.
72- db_inc_paths = [ 72- db_inc_paths = [
73- '/usr/include/db4', 73- '/usr/include/db4',
74- '/usr/local/include/db4', 74- '/usr/local/include/db4',
75- '/opt/sfw/include/db4', 75- '/opt/sfw/include/db4',
76- '/sw/include/db4', 76- '/sw/include/db4',
77- '/usr/include/db3', 77- '/usr/include/db3',
78- '/usr/local/include/db3', 78- '/usr/local/include/db3',
79- '/opt/sfw/include/db3', 79- '/opt/sfw/include/db3',
80- '/sw/include/db3', 80- '/sw/include/db3',
81- ] 81- ]
82- # 4.x minor number specific paths 82- # 4.x minor number specific paths
83- for x in (0,1,2,3,4): 83- for x in (0,1,2,3,4):
84- db_inc_paths.append('/usr/include/db4%d' % x) 84- db_inc_paths.append('/usr/include/db4%d' % x)
85- db_inc_paths.append('/usr/include/db4.%d' % x) 85- db_inc_paths.append('/usr/include/db4.%d' % x)
86- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x) 86- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
87- db_inc_paths.append('/usr/local/include/db4%d' % x) 87- db_inc_paths.append('/usr/local/include/db4%d' % x)
88- db_inc_paths.append('/pkg/db-4.%d/include' % x) 88- db_inc_paths.append('/pkg/db-4.%d/include' % x)
89- db_inc_paths.append('/opt/db-4.%d/include' % x) 89- db_inc_paths.append('/opt/db-4.%d/include' % x)
90- # 3.x minor number specific paths 90- # 3.x minor number specific paths
91- for x in (2,3): 91- for x in (2,3):
92- db_inc_paths.append('/usr/include/db3%d' % x) 92- db_inc_paths.append('/usr/include/db3%d' % x)
93- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x) 93- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
94- db_inc_paths.append('/usr/local/include/db3%d' % x) 94- db_inc_paths.append('/usr/local/include/db3%d' % x)
95- db_inc_paths.append('/pkg/db-3.%d/include' % x) 95- db_inc_paths.append('/pkg/db-3.%d/include' % x)
96- db_inc_paths.append('/opt/db-3.%d/include' % x) 96- db_inc_paths.append('/opt/db-3.%d/include' % x)
97- 97-
98- # Add some common subdirectories for Sleepycat DB to the list, 98- # Add some common subdirectories for Sleepycat DB to the list,
99- # based on the standard include directories. This way DB3/4 gets 99- # based on the standard include directories. This way DB3/4 gets
100- # picked up when it is installed in a non-standard prefix and 100- # picked up when it is installed in a non-standard prefix and
101- # the user has added that prefix into inc_dirs. 101- # the user has added that prefix into inc_dirs.
102- std_variants = [] 102- std_variants = []
103- for dn in inc_dirs: 103- for dn in inc_dirs:
104- std_variants.append(os.path.join(dn, 'db3')) 104- std_variants.append(os.path.join(dn, 'db3'))
105- std_variants.append(os.path.join(dn, 'db4')) 105- std_variants.append(os.path.join(dn, 'db4'))
106- for x in (0,1,2,3,4): 106- for x in (0,1,2,3,4):
107- std_variants.append(os.path.join(dn, "db4%d"%x)) 107- std_variants.append(os.path.join(dn, "db4%d"%x))
108- std_variants.append(os.path.join(dn, "db4.%d"%x)) 108- std_variants.append(os.path.join(dn, "db4.%d"%x))
109- for x in (2,3): 109- for x in (2,3):
110- std_variants.append(os.path.join(dn, "db3%d"%x)) 110- std_variants.append(os.path.join(dn, "db3%d"%x))
111- std_variants.append(os.path.join(dn, "db3.%d"%x)) 111- std_variants.append(os.path.join(dn, "db3.%d"%x))
112- 112-
113- db_inc_paths = std_variants + db_inc_paths 113- db_inc_paths = std_variants + db_inc_paths
114- 114-
115- db_ver_inc_map = {} 115- db_ver_inc_map = {}
116- 116-
117- class db_found(Exception): pass 117- class db_found(Exception): pass
118+ class Notfound(Exception): pass 118+ class Notfound(Exception): pass
119 try: 119 try:
120 # See whether there is a Sleepycat header in the standard 120 # See whether there is a Sleepycat header in the standard
121 # search path. 121 # search path.
122- for d in inc_dirs + db_inc_paths: 122- for d in inc_dirs + db_inc_paths:
123- f = os.path.join(d, "db.h") 123- f = os.path.join(d, "db.h")
124- if db_setup_debug: print "db: looking for db.h in", f 124- if db_setup_debug: print "db: looking for db.h in", f
125- if os.path.exists(f): 125- if os.path.exists(f):
126- f = open(f).read() 126- f = open(f).read()
127- m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f) 127- m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f)
128- if m: 128- if m:
129- db_major = int(m.group(1)) 129- db_major = int(m.group(1))
130- m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f) 130- m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f)
131- db_minor = int(m.group(1)) 131- db_minor = int(m.group(1))
132- db_ver = (db_major, db_minor) 132- db_ver = (db_major, db_minor)
133- 133-
134- if ( (not db_ver_inc_map.has_key(db_ver)) and 134- if ( (not db_ver_inc_map.has_key(db_ver)) and
135- (db_ver <= max_db_ver and db_ver >= min_db_ver) ): 135- (db_ver <= max_db_ver and db_ver >= min_db_ver) ):
136- # save the include directory with the db.h version 136- # save the include directory with the db.h version
137- # (first occurrance only) 137- # (first occurrance only)
138- db_ver_inc_map[db_ver] = d 138- db_ver_inc_map[db_ver] = d
139- print "db.h: found", db_ver, "in", d 139- print "db.h: found", db_ver, "in", d
140- else: 140- else:
141- # we already found a header for this library version 141- # we already found a header for this library version
142- if db_setup_debug: print "db.h: ignoring", d 142- if db_setup_debug: print "db.h: ignoring", d
143- else: 143- else:
144- # ignore this header, it didn't contain a version number 144- # ignore this header, it didn't contain a version number
145- if db_setup_debug: print "db.h: unsupported version", db_ver, "in", d 145- if db_setup_debug: print "db.h: unsupported version", db_ver, "in", d
146- 146-
147- db_found_vers = db_ver_inc_map.keys() 147- db_found_vers = db_ver_inc_map.keys()
148- db_found_vers.sort() 148- db_found_vers.sort()
149- 149-
150- while db_found_vers: 150- while db_found_vers:
151- db_ver = db_found_vers.pop() 151- db_ver = db_found_vers.pop()
152- db_incdir = db_ver_inc_map[db_ver] 152- db_incdir = db_ver_inc_map[db_ver]
153- 153-
154- # check lib directories parallel to the location of the header 154- # check lib directories parallel to the location of the header
155- db_dirs_to_check = [ 155- db_dirs_to_check = [
156- os.path.join(db_incdir, '..', 'lib64'), 156- os.path.join(db_incdir, '..', 'lib64'),
157- os.path.join(db_incdir, '..', 'lib'), 157- os.path.join(db_incdir, '..', 'lib'),
158- os.path.join(db_incdir, '..', '..', 'lib64'), 158- os.path.join(db_incdir, '..', '..', 'lib64'),
159- os.path.join(db_incdir, '..', '..', 'lib'), 159- os.path.join(db_incdir, '..', '..', 'lib'),
160- ] 160- ]
161- db_dirs_to_check = filter(os.path.isdir, db_dirs_to_check) 161- db_dirs_to_check = filter(os.path.isdir, db_dirs_to_check)
162- 162-
163- # Look for a version specific db-X.Y before an ambiguoius dbX 163- # Look for a version specific db-X.Y before an ambiguoius dbX
164- # XXX should we -ever- look for a dbX name? Do any 164- # XXX should we -ever- look for a dbX name? Do any
165- # systems really not name their library by version and 165- # systems really not name their library by version and
166- # symlink to more general names? 166- # symlink to more general names?
167- for dblib in (('db-%d.%d' % db_ver), 167- for dblib in (('db-%d.%d' % db_ver),
168- ('db%d%d' % db_ver), 168- ('db%d%d' % db_ver),
169- ('db%d' % db_ver[0])): 169- ('db%d' % db_ver[0])):
170- dblib_file = self.compiler.find_library_file( 170- dblib_file = self.compiler.find_library_file(
171- db_dirs_to_check + lib_dirs, dblib ) 171- db_dirs_to_check + lib_dirs, dblib )
172- if dblib_file: 172- if dblib_file:
173- dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ] 173- dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ]
174- raise db_found 174- raise db_found
175- else: 175- else:
176- if db_setup_debug: print "db lib: ", dblib, "not found" 176- if db_setup_debug: print "db lib: ", dblib, "not found"
177- 177-
178- except db_found: 178- except db_found:
179- print "db lib: using", db_ver, dblib 179- print "db lib: using", db_ver, dblib
180- if db_setup_debug: print "db: lib dir", dblib_dir, "inc dir", db_incdir 180- if db_setup_debug: print "db: lib dir", dblib_dir, "inc dir", db_incdir
181- db_incs = [db_incdir] 181- db_incs = [db_incdir]
182- dblibs = [dblib] 182- dblibs = [dblib]
183- # We add the runtime_library_dirs argument because the 183- # We add the runtime_library_dirs argument because the
184- # BerkeleyDB lib we're linking against often isn't in the 184- # BerkeleyDB lib we're linking against often isn't in the
185- # system dynamic library search path. This is usually 185- # system dynamic library search path. This is usually
186- # correct and most trouble free, but may cause problems in 186- # correct and most trouble free, but may cause problems in
187- # some unusual system configurations (e.g. the directory 187- # some unusual system configurations (e.g. the directory
188- # is on an NFS server that goes away). 188- # is on an NFS server that goes away).
189- exts.append(Extension('_bsddb', ['_bsddb.c'], 189- exts.append(Extension('_bsddb', ['_bsddb.c'],
190- library_dirs=dblib_dir, 190- library_dirs=dblib_dir,
191- runtime_library_dirs=dblib_dir, 191- runtime_library_dirs=dblib_dir,
192- include_dirs=db_incs, 192- include_dirs=db_incs,
193- libraries=dblibs)) 193- libraries=dblibs))
194- else: 194- else:
195- if db_setup_debug: print "db: no appropriate library found" 195- if db_setup_debug: print "db: no appropriate library found"
196- db_incs = None 196- db_incs = None
197- dblibs = [] 197- dblibs = []
198+ bdb_type = os.environ['PY_BDB_TYPE'] 198+ bdb_type = os.environ['PY_BDB_TYPE']
199+ db_incs = [os.environ['PY_BDB_INCDIRS']] 199+ db_incs = [os.environ['PY_BDB_INCDIRS']]
200 dblib_dir = None 200 dblib_dir = None
201+ dblibs = None 201+ dblibs = None
202  202
203- 203-
204- # Look for Berkeley db 1.85. Note that it is built as a different 204- # Look for Berkeley db 1.85. Note that it is built as a different
205- # module name so it can be included even when later versions are 205- # module name so it can be included even when later versions are
206- # available. A very restrictive search is performed to avoid 206- # available. A very restrictive search is performed to avoid
207- # accidentally building this module with a later version of the 207- # accidentally building this module with a later version of the
208- # underlying db library. May BSD-ish Unixes incorporate db 1.85 208- # underlying db library. May BSD-ish Unixes incorporate db 1.85
209- # symbols into libc and place the include file in /usr/include. 209- # symbols into libc and place the include file in /usr/include.
210- f = "/usr/include/db.h" 210- f = "/usr/include/db.h"
211- if os.path.exists(f): 211- if os.path.exists(f):
212- data = open(f).read() 212- data = open(f).read()
213- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) 213- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
214- if m is not None: 214- if m is not None:
215- # bingo - old version used hash file format version 2 215- # bingo - old version used hash file format version 2
216- ### XXX this should be fixed to not be platform-dependent 216- ### XXX this should be fixed to not be platform-dependent
217- ### but I don't have direct access to an osf1 platform and 217- ### but I don't have direct access to an osf1 platform and
218- ### seemed to be muffing the search somehow 218- ### seemed to be muffing the search somehow
219- libraries = platform == "osf1" and ['db'] or None 219- libraries = platform == "osf1" and ['db'] or None
220- if libraries is not None: 220- if libraries is not None:
221- exts.append(Extension('bsddb185', ['bsddbmodule.c'], 221- exts.append(Extension('bsddb185', ['bsddbmodule.c'],
222- libraries=libraries)) 222- libraries=libraries))
223- else: 223- else:
224- exts.append(Extension('bsddb185', ['bsddbmodule.c'])) 224- exts.append(Extension('bsddb185', ['bsddbmodule.c']))
225+ # check if need to use the db_185.h compat header 225+ # check if need to use the db_185.h compat header
226+ bsddb185_define_macros=[] 226+ bsddb185_define_macros=[]
227+ if bdb_type == "db2" or bdb_type == "db3" or bdb_type == "db4": 227+ if bdb_type == "db2" or bdb_type == "db3" or bdb_type == "db4":
228+ bsddb185_define_macros=[('HAVE_DB_185_H',1)] 228+ bsddb185_define_macros=[('HAVE_DB_185_H',1)]
229+ dblib_dir = [os.environ['PY_BDB_LIBDIRS']] 229+ dblib_dir = [os.environ['PY_BDB_LIBDIRS']]
230+ else: 230+ else:
231+ # check if db_incs/db.h really is db 1.85 231+ # check if db_incs/db.h really is db 1.85
232+ f = "%s/db.h" % db_incs[0] 232+ f = "%s/db.h" % db_incs[0]
233+ if os.path.exists(f): 233+ if os.path.exists(f):
234+ data = open(f).read() 234+ data = open(f).read()
235+ m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) 235+ m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
236+ if m is None: 236+ if m is None:
237+ # check for 1.85 compat header 237+ # check for 1.85 compat header
238+ if os.path.exists("%s/db_185.h" % db_incs[0]): 238+ if os.path.exists("%s/db_185.h" % db_incs[0]):
239+ bsddb185_define_macros=[('HAVE_DB_185_H',1)] 239+ bsddb185_define_macros=[('HAVE_DB_185_H',1)]
240+ else: 240+ else:
241+ raise NotFound 241+ raise NotFound
242+ try: 242+ try:
243+ bltransform = os.environ['PY_BDB_TRANSFORM'] 243+ bltransform = os.environ['PY_BDB_TRANSFORM']
244+ m = re.search(r"l:db:(db.)\s*", bltransform) 244+ m = re.search(r"l:db:(db.)\s*", bltransform)
245+ if m is not None and m.group(1) is not None: 245+ if m is not None and m.group(1) is not None:
246+ dblibs = [m.group(1)] 246+ dblibs = [m.group(1)]
247+ except: 247+ except:
248+ pass 248+ pass
249+ 249+
250+ # build the bsddb185 extension module 250+ # build the bsddb185 extension module
251+ exts.append(Extension('bsddb185', ['bsddbmodule.c'], 251+ exts.append(Extension('bsddb185', ['bsddbmodule.c'],
252+ library_dirs=dblib_dir, 252+ library_dirs=dblib_dir,
253+ runtime_library_dirs=dblib_dir, 253+ runtime_library_dirs=dblib_dir,
254+ include_dirs=db_incs, 254+ include_dirs=db_incs,
255+ define_macros=bsddb185_define_macros, 255+ define_macros=bsddb185_define_macros,
256+ libraries=dblibs)) 256+ libraries=dblibs))
257+ except: 257+ except:
258+ db_incs = None 258+ db_incs = None
259+ dblibs = [] 259+ dblibs = []
260+ dblib_dir = None 260+ dblib_dir = None
261  261
262 # The standard Unix dbm module: 262 # The standard Unix dbm module:
263 if platform not in ['cygwin']: 263 if platform not in ['cygwin']:
264@@ -689,11 +574,13 @@ 264@@ -686,16 +571,21 @@
265 exts.append( Extension('dbm', ['dbmmodule.c'], 265 ndbm_libs = ['ndbm']
 266 else:
 267 ndbm_libs = []
 268- exts.append( Extension('dbm', ['dbmmodule.c'],
 269+ if not self.compiler.find_library_file(lib_dirs, 'gdbm_compat'):
 270+ exts.append( Extension('dbm', ['dbmmodule.c'],
266 define_macros=[('HAVE_NDBM_H',None)], 271 define_macros=[('HAVE_NDBM_H',None)],
267 libraries = ndbm_libs ) ) 272 libraries = ndbm_libs ) )
268- elif (self.compiler.find_library_file(lib_dirs, 'gdbm') 273- elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
269- and find_file("gdbm/ndbm.h", inc_dirs, []) is not None): 274- and find_file("gdbm/ndbm.h", inc_dirs, []) is not None):
270+ elif find_file("ndbm.h", db_incs, []) is not None: 275- exts.append( Extension('dbm', ['dbmmodule.c'],
271 exts.append( Extension('dbm', ['dbmmodule.c'], 
272- define_macros=[('HAVE_GDBM_NDBM_H',None)], 276- define_macros=[('HAVE_GDBM_NDBM_H',None)],
273- libraries = ['gdbm'] ) ) 277- libraries = ['gdbm'] ) )
 278- elif db_incs is not None:
 279- exts.append( Extension('dbm', ['dbmmodule.c'],
 280+
 281+ if not module_enabled(exts, 'dbm'):
 282+ if find_file("ndbm.h", db_incs, []) is not None:
 283+ exts.append( Extension('dbm', ['dbmmodule.c'],
274+ library_dirs=dblib_dir, 284+ library_dirs=dblib_dir,
275+ runtime_library_dirs=dblib_dir, 285+ runtime_library_dirs=dblib_dir,
276+ include_dirs=db_incs, 286+ include_dirs=db_incs,
277+ define_macros=[('HAVE_NDBM_H',None)], 287+ define_macros=[('HAVE_NDBM_H',None)],
278+ libraries=dblibs)) 288+ libraries=dblibs))
279 elif db_incs is not None: 289+ elif db_incs is not None:
280 exts.append( Extension('dbm', ['dbmmodule.c'], 290+ exts.append( Extension('dbm', ['dbmmodule.c'],
281 library_dirs=dblib_dir, 291 library_dirs=dblib_dir,
282@@ -1224,8 +1111,8 @@ 292 runtime_library_dirs=dblib_dir,
 293 include_dirs=db_incs,
 294@@ -1224,8 +1114,8 @@
283 ext_modules=[Extension('struct', ['structmodule.c'])], 295 ext_modules=[Extension('struct', ['structmodule.c'])],
284  296
285 # Scripts to install 297 # Scripts to install
286- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', 298- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
287- 'Lib/smtpd.py'] 299- 'Lib/smtpd.py']
288+ scripts = ['Tools/scripts/pydoc2.4', 300+ scripts = ['Tools/scripts/pydoc2.4',
289+ 'Lib/smtpd2.4.py'] 301+ 'Lib/smtpd2.4.py']
290 ) 302 )
291  303
292 # --install-platlib 304 # --install-platlib

cvs diff -r1.17 -r1.18 pkgsrc/lang/python25/Attic/distinfo (switch to unified diff)

--- pkgsrc/lang/python25/Attic/distinfo 2011/09/14 17:06:32 1.17
+++ pkgsrc/lang/python25/Attic/distinfo 2011/10/18 21:59:18 1.18
@@ -1,25 +1,25 @@ @@ -1,25 +1,25 @@
1$NetBSD: distinfo,v 1.17 2011/09/14 17:06:32 hans Exp $ 1$NetBSD: distinfo,v 1.18 2011/10/18 21:59:18 sbd Exp $
2 2
3SHA1 (Python-2.5.6.tar.bz2) = 29f6dd41bf09c5e04311b367cbb7604fa016e699 3SHA1 (Python-2.5.6.tar.bz2) = 29f6dd41bf09c5e04311b367cbb7604fa016e699
4RMD160 (Python-2.5.6.tar.bz2) = 92f0a955971f187a7d50c6422168202ec551bf22 4RMD160 (Python-2.5.6.tar.bz2) = 92f0a955971f187a7d50c6422168202ec551bf22
5Size (Python-2.5.6.tar.bz2) = 9821788 bytes 5Size (Python-2.5.6.tar.bz2) = 9821788 bytes
6SHA1 (patch-SA43463) = df776e171f1794bae52b6e98bc71ae63734b7693 6SHA1 (patch-SA43463) = df776e171f1794bae52b6e98bc71ae63734b7693
7SHA1 (patch-aa) = d44e67645dc86ff14f5daf5705de02c6f330cc48 7SHA1 (patch-aa) = d44e67645dc86ff14f5daf5705de02c6f330cc48
8SHA1 (patch-ab) = d35025df83e70d129f9fbcd277652b0eea83b026 8SHA1 (patch-ab) = d35025df83e70d129f9fbcd277652b0eea83b026
9SHA1 (patch-ac) = 4de5b8dc20b41dc3bb4acd38011ef59570318d3f 9SHA1 (patch-ac) = 4de5b8dc20b41dc3bb4acd38011ef59570318d3f
10SHA1 (patch-ad) = 9b401fc293ffb06ca1dd03526f6c38a8f28201ac 10SHA1 (patch-ad) = 9b401fc293ffb06ca1dd03526f6c38a8f28201ac
11SHA1 (patch-ae) = 5425515c6bf130eee204ca2749386f6447eaa35b 11SHA1 (patch-ae) = 5425515c6bf130eee204ca2749386f6447eaa35b
12SHA1 (patch-ag) = 95be54a4c8fe291cd7edd14a9180bbcb07bba2ce 12SHA1 (patch-ag) = 95be54a4c8fe291cd7edd14a9180bbcb07bba2ce
13SHA1 (patch-ah) = 98e9fa55c2af38d8032398cae693492c199dc5fa 13SHA1 (patch-ah) = 98e9fa55c2af38d8032398cae693492c199dc5fa
14SHA1 (patch-ai) = a89bee00860910f53a23b1c670d9c091846a03c1 14SHA1 (patch-ai) = a89bee00860910f53a23b1c670d9c091846a03c1
15SHA1 (patch-aj) = a75d680a6b8b1ad3c9222dcb841f4fb10db6d16d 15SHA1 (patch-aj) = a75d680a6b8b1ad3c9222dcb841f4fb10db6d16d
16SHA1 (patch-ak) = 948362c15ad59abeef46971f9b870b70655a62c7 16SHA1 (patch-ak) = 948362c15ad59abeef46971f9b870b70655a62c7
17SHA1 (patch-al) = a4e28f73d8da2f83fcfbb5daec8d7c2c5bb4ff7f 17SHA1 (patch-al) = a4e28f73d8da2f83fcfbb5daec8d7c2c5bb4ff7f
18SHA1 (patch-am) = d2e59cbc21542c436f1b1957e6089b4cda21ef8b 18SHA1 (patch-am) = ba4a651cc5ab930c9b2abd030d6376110b5d90fa
19SHA1 (patch-an) = 17b4e17b3b562c29a050e9bb20447084ce82b8ab 19SHA1 (patch-an) = 17b4e17b3b562c29a050e9bb20447084ce82b8ab
20SHA1 (patch-ao) = 9bbd5561c010e0a1ab8e0a70d27a5f77fd2089d2 20SHA1 (patch-ao) = 9bbd5561c010e0a1ab8e0a70d27a5f77fd2089d2
21SHA1 (patch-ap) = b864db92761c843a91374663bd2dbcfa57b317cf 21SHA1 (patch-ap) = b864db92761c843a91374663bd2dbcfa57b317cf
22SHA1 (patch-ar) = 2a0c3f9a798afdfda7af4823e67579b2e000c072 22SHA1 (patch-ar) = 2a0c3f9a798afdfda7af4823e67579b2e000c072
23SHA1 (patch-at) = 6fdd64ce70eb8c2de5336f3415f45bc467e46373 23SHA1 (patch-at) = 6fdd64ce70eb8c2de5336f3415f45bc467e46373
24SHA1 (patch-au) = c1a759765095d246151ba027ed06f423e05c9218 24SHA1 (patch-au) = c1a759765095d246151ba027ed06f423e05c9218
25SHA1 (patch-av) = a1d41cb3a93879d54f0964ff84a63a297c333156 25SHA1 (patch-av) = a1d41cb3a93879d54f0964ff84a63a297c333156

cvs diff -r1.7 -r1.8 pkgsrc/lang/python25/patches/Attic/patch-am (switch to unified diff)

--- pkgsrc/lang/python25/patches/Attic/patch-am 2011/06/04 05:08:20 1.7
+++ pkgsrc/lang/python25/patches/Attic/patch-am 2011/10/18 21:59:18 1.8
@@ -1,388 +1,397 @@ @@ -1,388 +1,397 @@
1$NetBSD: patch-am,v 1.7 2011/06/04 05:08:20 obache Exp $ 1$NetBSD: patch-am,v 1.8 2011/10/18 21:59:18 sbd Exp $
2 2
3--- setup.py.orig 2008-10-16 18:58:19.000000000 +0000 3--- setup.py.orig 2008-10-16 18:58:19.000000000 +0000
4+++ setup.py 4+++ setup.py
5@@ -15,7 +15,7 @@ from distutils.command.install import in 5@@ -15,7 +15,7 @@ from distutils.command.install import in
6 from distutils.command.install_lib import install_lib 6 from distutils.command.install_lib import install_lib
7  7
8 # This global variable is used to hold the list of modules to be disabled. 8 # This global variable is used to hold the list of modules to be disabled.
9-disabled_module_list = [] 9-disabled_module_list = []
10+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_elementtree", "_sqlite3", "_tkinter", "gdbm", "pyexpat", "readline"] 10+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_elementtree", "_sqlite3", "_tkinter", "gdbm", "pyexpat", "readline"]
11  11
12 def add_dir_to_list(dirlist, dir): 12 def add_dir_to_list(dirlist, dir):
13 """Add the directory 'dir' to the list 'dirlist' (at the front) if 13 """Add the directory 'dir' to the list 'dirlist' (at the front) if
14@@ -243,9 +243,15 @@ class PyBuildExt(build_ext): 14@@ -243,9 +243,15 @@ class PyBuildExt(build_ext):
15 return sys.platform 15 return sys.platform
16  16
17 def detect_modules(self): 17 def detect_modules(self):
18- # Ensure that /usr/local is always used 18- # Ensure that /usr/local is always used
19- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') 19- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
20- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') 20- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
21+ # Add the buildlink directories for pkgsrc 21+ # Add the buildlink directories for pkgsrc
22+ if os.environ.has_key('BUILDLINK_DIR'): 22+ if os.environ.has_key('BUILDLINK_DIR'):
23+ dir = os.environ['BUILDLINK_DIR'] 23+ dir = os.environ['BUILDLINK_DIR']
24+ libdir = dir + '/lib' 24+ libdir = dir + '/lib'
25+ incdir = dir + '/include' 25+ incdir = dir + '/include'
26+ if libdir not in self.compiler.library_dirs: 26+ if libdir not in self.compiler.library_dirs:
27+ self.compiler.library_dirs.insert(0, libdir) 27+ self.compiler.library_dirs.insert(0, libdir)
28+ if incdir not in self.compiler.include_dirs: 28+ if incdir not in self.compiler.include_dirs:
29+ self.compiler.include_dirs.insert(0, incdir) 29+ self.compiler.include_dirs.insert(0, incdir)
30  30
31 # Add paths specified in the environment variables LDFLAGS and 31 # Add paths specified in the environment variables LDFLAGS and
32 # CPPFLAGS for header and library files. 32 # CPPFLAGS for header and library files.
33@@ -534,9 +540,7 @@ class PyBuildExt(build_ext): 33@@ -534,9 +540,7 @@ class PyBuildExt(build_ext):
34 if krb5_h: 34 if krb5_h:
35 ssl_incs += krb5_h 35 ssl_incs += krb5_h
36 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, 36 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
37- ['/usr/local/ssl/lib', 37- ['/usr/local/ssl/lib',
38- '/usr/contrib/ssl/lib/' 38- '/usr/contrib/ssl/lib/'
39- ] ) 39- ] )
40+ [] ) 40+ [] )
41  41
42 if (ssl_incs is not None and 42 if (ssl_incs is not None and
43 ssl_libs is not None): 43 ssl_libs is not None):
44@@ -609,269 +613,51 @@ class PyBuildExt(build_ext): 44@@ -609,269 +613,51 @@ class PyBuildExt(build_ext):
45 # a release. Most open source OSes come with one or more 45 # a release. Most open source OSes come with one or more
46 # versions of BerkeleyDB already installed. 46 # versions of BerkeleyDB already installed.
47  47
48- max_db_ver = (4, 5) 48- max_db_ver = (4, 5)
49- # NOTE: while the _bsddb.c code links against BerkeleyDB 4.6.x 49- # NOTE: while the _bsddb.c code links against BerkeleyDB 4.6.x
50- # we leave that version disabled by default as it has proven to be 50- # we leave that version disabled by default as it has proven to be
51- # quite a buggy library release on many platforms. 51- # quite a buggy library release on many platforms.
52- min_db_ver = (3, 3) 52- min_db_ver = (3, 3)
53- db_setup_debug = False # verbose debug prints from this script? 53- db_setup_debug = False # verbose debug prints from this script?
54- 54-
55- # construct a list of paths to look for the header file in on 55- # construct a list of paths to look for the header file in on
56- # top of the normal inc_dirs. 56- # top of the normal inc_dirs.
57- db_inc_paths = [ 57- db_inc_paths = [
58- '/usr/include/db4', 58- '/usr/include/db4',
59- '/usr/local/include/db4', 59- '/usr/local/include/db4',
60- '/opt/sfw/include/db4', 60- '/opt/sfw/include/db4',
61- '/sw/include/db4', 61- '/sw/include/db4',
62- '/usr/include/db3', 62- '/usr/include/db3',
63- '/usr/local/include/db3', 63- '/usr/local/include/db3',
64- '/opt/sfw/include/db3', 64- '/opt/sfw/include/db3',
65- '/sw/include/db3', 65- '/sw/include/db3',
66- ] 66- ]
67- # 4.x minor number specific paths 67- # 4.x minor number specific paths
68- for x in range(max_db_ver[1]+1): 68- for x in range(max_db_ver[1]+1):
69- db_inc_paths.append('/usr/include/db4%d' % x) 69- db_inc_paths.append('/usr/include/db4%d' % x)
70- db_inc_paths.append('/usr/include/db4.%d' % x) 70- db_inc_paths.append('/usr/include/db4.%d' % x)
71- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x) 71- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
72- db_inc_paths.append('/usr/local/include/db4%d' % x) 72- db_inc_paths.append('/usr/local/include/db4%d' % x)
73- db_inc_paths.append('/pkg/db-4.%d/include' % x) 73- db_inc_paths.append('/pkg/db-4.%d/include' % x)
74- db_inc_paths.append('/opt/db-4.%d/include' % x) 74- db_inc_paths.append('/opt/db-4.%d/include' % x)
75- # 3.x minor number specific paths 75- # 3.x minor number specific paths
76- for x in (3,): 76- for x in (3,):
77- db_inc_paths.append('/usr/include/db3%d' % x) 77- db_inc_paths.append('/usr/include/db3%d' % x)
78- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x) 78- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
79- db_inc_paths.append('/usr/local/include/db3%d' % x) 79- db_inc_paths.append('/usr/local/include/db3%d' % x)
80- db_inc_paths.append('/pkg/db-3.%d/include' % x) 80- db_inc_paths.append('/pkg/db-3.%d/include' % x)
81- db_inc_paths.append('/opt/db-3.%d/include' % x) 81- db_inc_paths.append('/opt/db-3.%d/include' % x)
82- 82-
83- # Add some common subdirectories for Sleepycat DB to the list, 83- # Add some common subdirectories for Sleepycat DB to the list,
84- # based on the standard include directories. This way DB3/4 gets 84- # based on the standard include directories. This way DB3/4 gets
85- # picked up when it is installed in a non-standard prefix and 85- # picked up when it is installed in a non-standard prefix and
86- # the user has added that prefix into inc_dirs. 86- # the user has added that prefix into inc_dirs.
87- std_variants = [] 87- std_variants = []
88- for dn in inc_dirs: 88- for dn in inc_dirs:
89- std_variants.append(os.path.join(dn, 'db3')) 89- std_variants.append(os.path.join(dn, 'db3'))
90- std_variants.append(os.path.join(dn, 'db4')) 90- std_variants.append(os.path.join(dn, 'db4'))
91- for x in range(max_db_ver[1]+1): 91- for x in range(max_db_ver[1]+1):
92- std_variants.append(os.path.join(dn, "db4%d"%x)) 92- std_variants.append(os.path.join(dn, "db4%d"%x))
93- std_variants.append(os.path.join(dn, "db4.%d"%x)) 93- std_variants.append(os.path.join(dn, "db4.%d"%x))
94- for x in (2,3): 94- for x in (2,3):
95- std_variants.append(os.path.join(dn, "db3%d"%x)) 95- std_variants.append(os.path.join(dn, "db3%d"%x))
96- std_variants.append(os.path.join(dn, "db3.%d"%x)) 96- std_variants.append(os.path.join(dn, "db3.%d"%x))
97- 97-
98- db_inc_paths = std_variants + db_inc_paths 98- db_inc_paths = std_variants + db_inc_paths
99- 99-
100- 100-
101- db_ver_inc_map = {} 101- db_ver_inc_map = {}
102- 102-
103- class db_found(Exception): pass 103- class db_found(Exception): pass
104+ class Notfound(Exception): pass 104+ class Notfound(Exception): pass
105 try: 105 try:
106 # See whether there is a Sleepycat header in the standard 106 # See whether there is a Sleepycat header in the standard
107 # search path. 107 # search path.
108- for d in inc_dirs + db_inc_paths: 108- for d in inc_dirs + db_inc_paths:
109- f = os.path.join(d, "db.h") 109- f = os.path.join(d, "db.h")
110- if db_setup_debug: print "db: looking for db.h in", f 110- if db_setup_debug: print "db: looking for db.h in", f
111- if os.path.exists(f): 111- if os.path.exists(f):
112- f = open(f).read() 112- f = open(f).read()
113- m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f) 113- m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f)
114- if m: 114- if m:
115- db_major = int(m.group(1)) 115- db_major = int(m.group(1))
116- m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f) 116- m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f)
117- db_minor = int(m.group(1)) 117- db_minor = int(m.group(1))
118- db_ver = (db_major, db_minor) 118- db_ver = (db_major, db_minor)
119- 119-
120- # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug 120- # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug
121- if db_ver == (4, 6): 121- if db_ver == (4, 6):
122- m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)", f) 122- m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)", f)
123- db_patch = int(m.group(1)) 123- db_patch = int(m.group(1))
124- if db_patch < 21: 124- if db_patch < 21:
125- print "db.h:", db_ver, "patch", db_patch, 125- print "db.h:", db_ver, "patch", db_patch,
126- print "being ignored (4.6.x must be >= 4.6.21)" 126- print "being ignored (4.6.x must be >= 4.6.21)"
127- continue 127- continue
128- 128-
129- if ( (not db_ver_inc_map.has_key(db_ver)) and 129- if ( (not db_ver_inc_map.has_key(db_ver)) and
130- (db_ver <= max_db_ver and db_ver >= min_db_ver) ): 130- (db_ver <= max_db_ver and db_ver >= min_db_ver) ):
131- # save the include directory with the db.h version 131- # save the include directory with the db.h version
132- # (first occurrance only) 132- # (first occurrance only)
133- db_ver_inc_map[db_ver] = d 133- db_ver_inc_map[db_ver] = d
134- print "db.h: found", db_ver, "in", d 134- print "db.h: found", db_ver, "in", d
135- else: 135- else:
136- # we already found a header for this library version 136- # we already found a header for this library version
137- if db_setup_debug: print "db.h: ignoring", d 137- if db_setup_debug: print "db.h: ignoring", d
138- else: 138- else:
139- # ignore this header, it didn't contain a version number 139- # ignore this header, it didn't contain a version number
140- if db_setup_debug: print "db.h: unsupported version", db_ver, "in", d 140- if db_setup_debug: print "db.h: unsupported version", db_ver, "in", d
141- 141-
142- db_found_vers = db_ver_inc_map.keys() 142- db_found_vers = db_ver_inc_map.keys()
143- db_found_vers.sort() 143- db_found_vers.sort()
144- 144-
145- while db_found_vers: 145- while db_found_vers:
146- db_ver = db_found_vers.pop() 146- db_ver = db_found_vers.pop()
147- db_incdir = db_ver_inc_map[db_ver] 147- db_incdir = db_ver_inc_map[db_ver]
148- 148-
149- # check lib directories parallel to the location of the header 149- # check lib directories parallel to the location of the header
150- db_dirs_to_check = [ 150- db_dirs_to_check = [
151- os.path.join(db_incdir, '..', 'lib64'), 151- os.path.join(db_incdir, '..', 'lib64'),
152- os.path.join(db_incdir, '..', 'lib'), 152- os.path.join(db_incdir, '..', 'lib'),
153- os.path.join(db_incdir, '..', '..', 'lib64'), 153- os.path.join(db_incdir, '..', '..', 'lib64'),
154- os.path.join(db_incdir, '..', '..', 'lib'), 154- os.path.join(db_incdir, '..', '..', 'lib'),
155- ] 155- ]
156- db_dirs_to_check = filter(os.path.isdir, db_dirs_to_check) 156- db_dirs_to_check = filter(os.path.isdir, db_dirs_to_check)
157- 157-
158- # Look for a version specific db-X.Y before an ambiguoius dbX 158- # Look for a version specific db-X.Y before an ambiguoius dbX
159- # XXX should we -ever- look for a dbX name? Do any 159- # XXX should we -ever- look for a dbX name? Do any
160- # systems really not name their library by version and 160- # systems really not name their library by version and
161- # symlink to more general names? 161- # symlink to more general names?
162- for dblib in (('db-%d.%d' % db_ver), 162- for dblib in (('db-%d.%d' % db_ver),
163- ('db%d%d' % db_ver), 163- ('db%d%d' % db_ver),
164- ('db%d' % db_ver[0])): 164- ('db%d' % db_ver[0])):
165- dblib_file = self.compiler.find_library_file( 165- dblib_file = self.compiler.find_library_file(
166- db_dirs_to_check + lib_dirs, dblib ) 166- db_dirs_to_check + lib_dirs, dblib )
167- if dblib_file: 167- if dblib_file:
168- dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ] 168- dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ]
169- raise db_found 169- raise db_found
170- else: 170- else:
171- if db_setup_debug: print "db lib: ", dblib, "not found" 171- if db_setup_debug: print "db lib: ", dblib, "not found"
172- 172-
173- except db_found: 173- except db_found:
174- print "db lib: using", db_ver, dblib 174- print "db lib: using", db_ver, dblib
175- if db_setup_debug: print "db: lib dir", dblib_dir, "inc dir", db_incdir 175- if db_setup_debug: print "db: lib dir", dblib_dir, "inc dir", db_incdir
176- db_incs = [db_incdir] 176- db_incs = [db_incdir]
177- dblibs = [dblib] 177- dblibs = [dblib]
178- # We add the runtime_library_dirs argument because the 178- # We add the runtime_library_dirs argument because the
179- # BerkeleyDB lib we're linking against often isn't in the 179- # BerkeleyDB lib we're linking against often isn't in the
180- # system dynamic library search path. This is usually 180- # system dynamic library search path. This is usually
181- # correct and most trouble free, but may cause problems in 181- # correct and most trouble free, but may cause problems in
182- # some unusual system configurations (e.g. the directory 182- # some unusual system configurations (e.g. the directory
183- # is on an NFS server that goes away). 183- # is on an NFS server that goes away).
184- exts.append(Extension('_bsddb', ['_bsddb.c'], 184- exts.append(Extension('_bsddb', ['_bsddb.c'],
185- library_dirs=dblib_dir, 185- library_dirs=dblib_dir,
186- runtime_library_dirs=dblib_dir, 186- runtime_library_dirs=dblib_dir,
187- include_dirs=db_incs, 187- include_dirs=db_incs,
188- libraries=dblibs)) 188- libraries=dblibs))
189- else: 189- else:
190- if db_setup_debug: print "db: no appropriate library found" 190- if db_setup_debug: print "db: no appropriate library found"
191- db_incs = None 191- db_incs = None
192- dblibs = [] 192- dblibs = []
193+ bdb_type = os.environ['PY_BDB_TYPE'] 193+ bdb_type = os.environ['PY_BDB_TYPE']
194+ db_incs = [os.environ['PY_BDB_INCDIRS']] 194+ db_incs = [os.environ['PY_BDB_INCDIRS']]
195 dblib_dir = None 195 dblib_dir = None
196+ dblibs = None 196+ dblibs = None
197  197
198- # The sqlite interface 198- # The sqlite interface
199- sqlite_setup_debug = False # verbose debug prints from this script? 199- sqlite_setup_debug = False # verbose debug prints from this script?
200- 200-
201- # We hunt for #define SQLITE_VERSION "n.n.n" 201- # We hunt for #define SQLITE_VERSION "n.n.n"
202- # We need to find >= sqlite version 3.0.8 202- # We need to find >= sqlite version 3.0.8
203- sqlite_incdir = sqlite_libdir = None 203- sqlite_incdir = sqlite_libdir = None
204- sqlite_inc_paths = [ '/usr/include', 204- sqlite_inc_paths = [ '/usr/include',
205- '/usr/include/sqlite', 205- '/usr/include/sqlite',
206- '/usr/include/sqlite3', 206- '/usr/include/sqlite3',
207- '/usr/local/include', 207- '/usr/local/include',
208- '/usr/local/include/sqlite', 208- '/usr/local/include/sqlite',
209- '/usr/local/include/sqlite3', 209- '/usr/local/include/sqlite3',
210- ] 210- ]
211- MIN_SQLITE_VERSION_NUMBER = (3, 0, 8) 211- MIN_SQLITE_VERSION_NUMBER = (3, 0, 8)
212- MIN_SQLITE_VERSION = ".".join([str(x) 212- MIN_SQLITE_VERSION = ".".join([str(x)
213- for x in MIN_SQLITE_VERSION_NUMBER]) 213- for x in MIN_SQLITE_VERSION_NUMBER])
214- 214-
215- # Scan the default include directories before the SQLite specific 215- # Scan the default include directories before the SQLite specific
216- # ones. This allows one to override the copy of sqlite on OSX, 216- # ones. This allows one to override the copy of sqlite on OSX,
217- # where /usr/include contains an old version of sqlite. 217- # where /usr/include contains an old version of sqlite.
218- for d in inc_dirs + sqlite_inc_paths: 218- for d in inc_dirs + sqlite_inc_paths:
219- f = os.path.join(d, "sqlite3.h") 219- f = os.path.join(d, "sqlite3.h")
220- if os.path.exists(f): 220- if os.path.exists(f):
221- if sqlite_setup_debug: print "sqlite: found %s"%f 221- if sqlite_setup_debug: print "sqlite: found %s"%f
222- incf = open(f).read() 222- incf = open(f).read()
223- m = re.search( 223- m = re.search(
224- r'\s*.*#\s*.*define\s.*SQLITE_VERSION\W*"(.*)"', incf) 224- r'\s*.*#\s*.*define\s.*SQLITE_VERSION\W*"(.*)"', incf)
225- if m: 225- if m:
226- sqlite_version = m.group(1) 226- sqlite_version = m.group(1)
227- sqlite_version_tuple = tuple([int(x) 227- sqlite_version_tuple = tuple([int(x)
228- for x in sqlite_version.split(".")]) 228- for x in sqlite_version.split(".")])
229- if sqlite_version_tuple >= MIN_SQLITE_VERSION_NUMBER: 229- if sqlite_version_tuple >= MIN_SQLITE_VERSION_NUMBER:
230- # we win! 230- # we win!
231- print "%s/sqlite3.h: version %s"%(d, sqlite_version) 231- print "%s/sqlite3.h: version %s"%(d, sqlite_version)
232- sqlite_incdir = d 232- sqlite_incdir = d
233- break 233- break
234- else: 234- else:
235- if sqlite_setup_debug: 235- if sqlite_setup_debug:
236- print "%s: version %r is too old, need >= %r"%(d, 236- print "%s: version %r is too old, need >= %r"%(d,
237- sqlite_version, MIN_SQLITE_VERSION) 237- sqlite_version, MIN_SQLITE_VERSION)
238- elif sqlite_setup_debug: 238- elif sqlite_setup_debug:
239- print "sqlite: %s had no SQLITE_VERSION"%(f,) 239- print "sqlite: %s had no SQLITE_VERSION"%(f,)
240- 240-
241- if sqlite_incdir: 241- if sqlite_incdir:
242- sqlite_dirs_to_check = [ 242- sqlite_dirs_to_check = [
243- os.path.join(sqlite_incdir, '..', 'lib64'), 243- os.path.join(sqlite_incdir, '..', 'lib64'),
244- os.path.join(sqlite_incdir, '..', 'lib'), 244- os.path.join(sqlite_incdir, '..', 'lib'),
245- os.path.join(sqlite_incdir, '..', '..', 'lib64'), 245- os.path.join(sqlite_incdir, '..', '..', 'lib64'),
246- os.path.join(sqlite_incdir, '..', '..', 'lib'), 246- os.path.join(sqlite_incdir, '..', '..', 'lib'),
247- ] 247- ]
248- sqlite_libfile = self.compiler.find_library_file( 248- sqlite_libfile = self.compiler.find_library_file(
249- sqlite_dirs_to_check + lib_dirs, 'sqlite3') 249- sqlite_dirs_to_check + lib_dirs, 'sqlite3')
250- sqlite_libdir = [os.path.abspath(os.path.dirname(sqlite_libfile))] 250- sqlite_libdir = [os.path.abspath(os.path.dirname(sqlite_libfile))]
251- 251-
252- if sqlite_incdir and sqlite_libdir: 252- if sqlite_incdir and sqlite_libdir:
253- sqlite_srcs = ['_sqlite/cache.c', 253- sqlite_srcs = ['_sqlite/cache.c',
254- '_sqlite/connection.c', 254- '_sqlite/connection.c',
255- '_sqlite/cursor.c', 255- '_sqlite/cursor.c',
256- '_sqlite/microprotocols.c', 256- '_sqlite/microprotocols.c',
257- '_sqlite/module.c', 257- '_sqlite/module.c',
258- '_sqlite/prepare_protocol.c', 258- '_sqlite/prepare_protocol.c',
259- '_sqlite/row.c', 259- '_sqlite/row.c',
260- '_sqlite/statement.c', 260- '_sqlite/statement.c',
261- '_sqlite/util.c', ] 261- '_sqlite/util.c', ]
262- 262-
263- sqlite_defines = [] 263- sqlite_defines = []
264- if sys.platform != "win32": 264- if sys.platform != "win32":
265- sqlite_defines.append(('MODULE_NAME', '"sqlite3"')) 265- sqlite_defines.append(('MODULE_NAME', '"sqlite3"'))
266+ # check if need to use the db_185.h compat header 266+ # check if need to use the db_185.h compat header
267+ bsddb185_define_macros=[] 267+ bsddb185_define_macros=[]
268+ if bdb_type == "db2" or bdb_type == "db3" or bdb_type == "db4": 268+ if bdb_type == "db2" or bdb_type == "db3" or bdb_type == "db4":
269+ bsddb185_define_macros=[('HAVE_DB_185_H',1)] 269+ bsddb185_define_macros=[('HAVE_DB_185_H',1)]
270+ dblib_dir = [os.environ['PY_BDB_LIBDIRS']] 270+ dblib_dir = [os.environ['PY_BDB_LIBDIRS']]
271 else: 271 else:
272- sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"')) 272- sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"'))
273- 273-
274- 274-
275- if sys.platform == 'darwin': 275- if sys.platform == 'darwin':
276- # In every directory on the search path search for a dynamic 276- # In every directory on the search path search for a dynamic
277- # library and then a static library, instead of first looking 277- # library and then a static library, instead of first looking
278- # for dynamic libraries on the entiry path. 278- # for dynamic libraries on the entiry path.
279- # This way a staticly linked custom sqlite gets picked up 279- # This way a staticly linked custom sqlite gets picked up
280- # before the dynamic library in /usr/lib. 280- # before the dynamic library in /usr/lib.
281- sqlite_extra_link_args = ('-Wl,-search_paths_first',) 281- sqlite_extra_link_args = ('-Wl,-search_paths_first',)
282- else: 282- else:
283- sqlite_extra_link_args = () 283- sqlite_extra_link_args = ()
284- 284-
285- exts.append(Extension('_sqlite3', sqlite_srcs, 285- exts.append(Extension('_sqlite3', sqlite_srcs,
286- define_macros=sqlite_defines, 286- define_macros=sqlite_defines,
287- include_dirs=["Modules/_sqlite", 287- include_dirs=["Modules/_sqlite",
288- sqlite_incdir], 288- sqlite_incdir],
289- library_dirs=sqlite_libdir, 289- library_dirs=sqlite_libdir,
290- runtime_library_dirs=sqlite_libdir, 290- runtime_library_dirs=sqlite_libdir,
291- extra_link_args=sqlite_extra_link_args, 291- extra_link_args=sqlite_extra_link_args,
292- libraries=["sqlite3",])) 292- libraries=["sqlite3",]))
293- 293-
294- # Look for Berkeley db 1.85. Note that it is built as a different 294- # Look for Berkeley db 1.85. Note that it is built as a different
295- # module name so it can be included even when later versions are 295- # module name so it can be included even when later versions are
296- # available. A very restrictive search is performed to avoid 296- # available. A very restrictive search is performed to avoid
297- # accidentally building this module with a later version of the 297- # accidentally building this module with a later version of the
298- # underlying db library. May BSD-ish Unixes incorporate db 1.85 298- # underlying db library. May BSD-ish Unixes incorporate db 1.85
299- # symbols into libc and place the include file in /usr/include. 299- # symbols into libc and place the include file in /usr/include.
300- # 300- #
301- # If the better bsddb library can be built (db_incs is defined) 301- # If the better bsddb library can be built (db_incs is defined)
302- # we do not build this one. Otherwise this build will pick up 302- # we do not build this one. Otherwise this build will pick up
303- # the more recent berkeleydb's db.h file first in the include path 303- # the more recent berkeleydb's db.h file first in the include path
304- # when attempting to compile and it will fail. 304- # when attempting to compile and it will fail.
305- f = "/usr/include/db.h" 305- f = "/usr/include/db.h"
306- if os.path.exists(f) and not db_incs: 306- if os.path.exists(f) and not db_incs:
307- data = open(f).read() 307- data = open(f).read()
308- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) 308- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
309- if m is not None: 309- if m is not None:
310- # bingo - old version used hash file format version 2 310- # bingo - old version used hash file format version 2
311- ### XXX this should be fixed to not be platform-dependent 311- ### XXX this should be fixed to not be platform-dependent
312- ### but I don't have direct access to an osf1 platform and 312- ### but I don't have direct access to an osf1 platform and
313- ### seemed to be muffing the search somehow 313- ### seemed to be muffing the search somehow
314- libraries = platform == "osf1" and ['db'] or None 314- libraries = platform == "osf1" and ['db'] or None
315- if libraries is not None: 315- if libraries is not None:
316- exts.append(Extension('bsddb185', ['bsddbmodule.c'], 316- exts.append(Extension('bsddb185', ['bsddbmodule.c'],
317- libraries=libraries)) 317- libraries=libraries))
318- else: 318- else:
319- exts.append(Extension('bsddb185', ['bsddbmodule.c'])) 319- exts.append(Extension('bsddb185', ['bsddbmodule.c']))
320+ # check if db_incs/db.h really is db 1.85 320+ # check if db_incs/db.h really is db 1.85
321+ f = "%s/db.h" % db_incs[0] 321+ f = "%s/db.h" % db_incs[0]
322+ if os.path.exists(f): 322+ if os.path.exists(f):
323+ data = open(f).read() 323+ data = open(f).read()
324+ m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) 324+ m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
325+ if m is None: 325+ if m is None:
326+ # check for 1.85 compat header 326+ # check for 1.85 compat header
327+ if os.path.exists("%s/db_185.h" % db_incs[0]): 327+ if os.path.exists("%s/db_185.h" % db_incs[0]):
328+ bsddb185_define_macros=[('HAVE_DB_185_H',1)] 328+ bsddb185_define_macros=[('HAVE_DB_185_H',1)]
329+ else: 329+ else:
330+ raise NotFound 330+ raise NotFound
331+ try: 331+ try:
332+ bltransform = os.environ['PY_BDB_TRANSFORM'] 332+ bltransform = os.environ['PY_BDB_TRANSFORM']
333+ m = re.search(r"l:db:(db.)\s*", bltransform) 333+ m = re.search(r"l:db:(db.)\s*", bltransform)
334+ if m is not None and m.group(1) is not None: 334+ if m is not None and m.group(1) is not None:
335+ dblibs = [m.group(1)] 335+ dblibs = [m.group(1)]
336+ except: 336+ except:
337+ pass 337+ pass
338+ 338+
339+ # build the bsddb185 extension module 339+ # build the bsddb185 extension module
340+ exts.append(Extension('bsddb185', ['bsddbmodule.c'], 340+ exts.append(Extension('bsddb185', ['bsddbmodule.c'],
341+ library_dirs=dblib_dir, 341+ library_dirs=dblib_dir,
342+ runtime_library_dirs=dblib_dir, 342+ runtime_library_dirs=dblib_dir,
343+ include_dirs=db_incs, 343+ include_dirs=db_incs,
344+ define_macros=bsddb185_define_macros, 344+ define_macros=bsddb185_define_macros,
345+ libraries=dblibs)) 345+ libraries=dblibs))
346+ except: 346+ except:
347+ db_incs = None 347+ db_incs = None
348+ dblibs = [] 348+ dblibs = []
349+ dblib_dir = None 349+ dblib_dir = None
350  350
351 # The standard Unix dbm module: 351 # The standard Unix dbm module:
352 if platform not in ['cygwin']: 352 if platform not in ['cygwin']:
353@@ -884,11 +670,6 @@ class PyBuildExt(build_ext): 353@@ -881,15 +667,13 @@ class PyBuildExt(build_ext):
354 exts.append( Extension('dbm', ['dbmmodule.c'], 354 ndbm_libs = ['ndbm']
 355 else:
 356 ndbm_libs = []
 357- exts.append( Extension('dbm', ['dbmmodule.c'],
 358+
 359+ if not self.compiler.find_library_file(lib_dirs, 'gdbm_compat'):
 360+ exts.append( Extension('dbm', ['dbmmodule.c'],
355 define_macros=[('HAVE_NDBM_H',None)], 361 define_macros=[('HAVE_NDBM_H',None)],
356 libraries = ndbm_libs ) ) 362 libraries = ndbm_libs ) )
357- elif (self.compiler.find_library_file(lib_dirs, 'gdbm') 363- elif (self.compiler.find_library_file(lib_dirs, 'gdbm')
358- and find_file("gdbm/ndbm.h", inc_dirs, []) is not None): 364- and find_file("gdbm/ndbm.h", inc_dirs, []) is not None):
359- exts.append( Extension('dbm', ['dbmmodule.c'], 365- exts.append( Extension('dbm', ['dbmmodule.c'],
360- define_macros=[('HAVE_GDBM_NDBM_H',None)], 366- define_macros=[('HAVE_GDBM_NDBM_H',None)],
361- libraries = ['gdbm'] ) ) 367- libraries = ['gdbm'] ) )
362 elif db_incs is not None: 368- elif db_incs is not None:
 369+
 370+ if not module_enabled(exts, 'dbm'):
363 exts.append( Extension('dbm', ['dbmmodule.c'], 371 exts.append( Extension('dbm', ['dbmmodule.c'],
364 library_dirs=dblib_dir, 372 library_dirs=dblib_dir,
365@@ -899,9 +680,9 @@ class PyBuildExt(build_ext): 373 runtime_library_dirs=dblib_dir,
 374@@ -899,9 +683,9 @@ class PyBuildExt(build_ext):
366 libraries=dblibs)) 375 libraries=dblibs))
367  376
368 # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: 377 # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
369- if (self.compiler.find_library_file(lib_dirs, 'gdbm')): 378- if (self.compiler.find_library_file(lib_dirs, 'gdbm')):
370- exts.append( Extension('gdbm', ['gdbmmodule.c'], 379- exts.append( Extension('gdbm', ['gdbmmodule.c'],
371- libraries = ['gdbm'] ) ) 380- libraries = ['gdbm'] ) )
372+ #if (self.compiler.find_library_file(lib_dirs, 'gdbm')): 381+ #if (self.compiler.find_library_file(lib_dirs, 'gdbm')):
373+ # exts.append( Extension('gdbm', ['gdbmmodule.c'], 382+ # exts.append( Extension('gdbm', ['gdbmmodule.c'],
374+ # libraries = ['gdbm'] ) ) 383+ # libraries = ['gdbm'] ) )
375  384
376 # Unix-only modules 385 # Unix-only modules
377 if platform not in ['mac', 'win32']: 386 if platform not in ['mac', 'win32']:
378@@ -1536,8 +1317,8 @@ def main(): 387@@ -1536,8 +1320,8 @@ def main():
379 ext_modules=[Extension('_struct', ['_struct.c'])], 388 ext_modules=[Extension('_struct', ['_struct.c'])],
380  389
381 # Scripts to install 390 # Scripts to install
382- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', 391- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
383- 'Lib/smtpd.py'] 392- 'Lib/smtpd.py']
384+ scripts = ['Tools/scripts/pydoc2.5', 393+ scripts = ['Tools/scripts/pydoc2.5',
385+ 'Lib/smtpd2.5.py'] 394+ 'Lib/smtpd2.5.py']
386 ) 395 )
387  396
388 # --install-platlib 397 # --install-platlib

cvs diff -r1.38 -r1.39 pkgsrc/lang/python26/Attic/distinfo (switch to unified diff)

--- pkgsrc/lang/python26/Attic/distinfo 2011/10/01 03:11:15 1.38
+++ pkgsrc/lang/python26/Attic/distinfo 2011/10/18 21:59:18 1.39
@@ -1,26 +1,26 @@ @@ -1,26 +1,26 @@
1$NetBSD: distinfo,v 1.38 2011/10/01 03:11:15 dsainty Exp $ 1$NetBSD: distinfo,v 1.39 2011/10/18 21:59:18 sbd Exp $
2 2
3SHA1 (Python-2.6.7.tar.bz2) = 5d35eb746e85fb3deaff8518448137c9b9fb6daa 3SHA1 (Python-2.6.7.tar.bz2) = 5d35eb746e85fb3deaff8518448137c9b9fb6daa
4RMD160 (Python-2.6.7.tar.bz2) = 513e84a7cb76ca876e3803bb03ed558bd0378063 4RMD160 (Python-2.6.7.tar.bz2) = 513e84a7cb76ca876e3803bb03ed558bd0378063
5Size (Python-2.6.7.tar.bz2) = 11084667 bytes 5Size (Python-2.6.7.tar.bz2) = 11084667 bytes
6SHA1 (patch-Mac_Modules_fm___Fmmodule.c) = b9314bccb51b4fe672b81559068f7a79d2965f94 6SHA1 (patch-Mac_Modules_fm___Fmmodule.c) = b9314bccb51b4fe672b81559068f7a79d2965f94
7SHA1 (patch-Mac_Modules_qd___Qdmodule.c) = 45c748b15b9436d45ba137460389638aa7108c8d 7SHA1 (patch-Mac_Modules_qd___Qdmodule.c) = 45c748b15b9436d45ba137460389638aa7108c8d
8SHA1 (patch-Mac_Modules_qdoffs___Qdoffsmodule.c) = 9994f0c1a908f18f1f3df3f05b184f082c018365 8SHA1 (patch-Mac_Modules_qdoffs___Qdoffsmodule.c) = 9994f0c1a908f18f1f3df3f05b184f082c018365
9SHA1 (patch-SA43463) = a0285ce9eb1d994bb05cd54812f3fc9cb678fe7f 9SHA1 (patch-SA43463) = a0285ce9eb1d994bb05cd54812f3fc9cb678fe7f
10SHA1 (patch-aa) = 0528fc5da76d5f1d19586ea3dda1acd09a4b0113 10SHA1 (patch-aa) = 0528fc5da76d5f1d19586ea3dda1acd09a4b0113
11SHA1 (patch-ab) = b47aa9d18a7c1a99ac8cc8b29c64867443f303e5 11SHA1 (patch-ab) = b47aa9d18a7c1a99ac8cc8b29c64867443f303e5
12SHA1 (patch-ac) = 57c88d47f82630e67bcd27ab61bf4362035da2f2 12SHA1 (patch-ac) = 57c88d47f82630e67bcd27ab61bf4362035da2f2
13SHA1 (patch-ad) = a997e39d16a8f0023125362b180d19ee97ab519b 13SHA1 (patch-ad) = a997e39d16a8f0023125362b180d19ee97ab519b
14SHA1 (patch-ae) = a6d578b5f12eb42fbbcc11791576d2686a4807d9 14SHA1 (patch-ae) = a6d578b5f12eb42fbbcc11791576d2686a4807d9
15SHA1 (patch-ah) = 501d220b41e578402f3400fe88e582aa2408a147 15SHA1 (patch-ah) = 501d220b41e578402f3400fe88e582aa2408a147
16SHA1 (patch-al) = e18800d53de022e4c24055f7d03b69af2837b089 16SHA1 (patch-al) = e18800d53de022e4c24055f7d03b69af2837b089
17SHA1 (patch-am) = aebb81db4aa38c3c1ef57ed4e25422685c362db2 17SHA1 (patch-am) = 740d3b3b0793d7ed152438b9dacbae457dc71076
18SHA1 (patch-an) = 17b4e17b3b562c29a050e9bb20447084ce82b8ab 18SHA1 (patch-an) = 17b4e17b3b562c29a050e9bb20447084ce82b8ab
19SHA1 (patch-ao) = 8c6a156b0f0c2a6d319658477fff348e6a0c3603 19SHA1 (patch-ao) = 8c6a156b0f0c2a6d319658477fff348e6a0c3603
20SHA1 (patch-ap) = d23a869a449ab9dc166cfa149913b20c9acad9cb 20SHA1 (patch-ap) = d23a869a449ab9dc166cfa149913b20c9acad9cb
21SHA1 (patch-au) = 38030fc45afc2a8f53a41f26b649e731642b9148 21SHA1 (patch-au) = 38030fc45afc2a8f53a41f26b649e731642b9148
22SHA1 (patch-av) = d6bf0419015656a8d2f13d3132873e453c8a6b6e 22SHA1 (patch-av) = d6bf0419015656a8d2f13d3132873e453c8a6b6e
23SHA1 (patch-az) = 473419352f6e1ff3c6e6268e81457e6f8a1fccb8 23SHA1 (patch-az) = 473419352f6e1ff3c6e6268e81457e6f8a1fccb8
24SHA1 (patch-ba) = 97dcf72d7380a2d257220669845c52a698165fcf 24SHA1 (patch-ba) = 97dcf72d7380a2d257220669845c52a698165fcf
25SHA1 (patch-bb) = 6cdd94dd1e69630159194c7c153b6c4e46c81456 25SHA1 (patch-bb) = 6cdd94dd1e69630159194c7c153b6c4e46c81456
26SHA1 (patch-bc) = 09aaa254a54109026bb262a949b4006235df7858 26SHA1 (patch-bc) = 09aaa254a54109026bb262a949b4006235df7858

cvs diff -r1.16 -r1.17 pkgsrc/lang/python26/patches/Attic/patch-am (switch to unified diff)

--- pkgsrc/lang/python26/patches/Attic/patch-am 2011/10/01 03:11:15 1.16
+++ pkgsrc/lang/python26/patches/Attic/patch-am 2011/10/18 21:59:18 1.17
@@ -1,354 +1,361 @@ @@ -1,354 +1,361 @@
1$NetBSD: patch-am,v 1.16 2011/10/01 03:11:15 dsainty Exp $ 1$NetBSD: patch-am,v 1.17 2011/10/18 21:59:18 sbd 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
22Add in Debian multiarch support (retrofitted from Python 2.7.2) to 22Add in Debian multiarch support (retrofitted from Python 2.7.2) to
23support building the "nis" and "crypt" modules. 23support building the "nis" and "crypt" modules.
24 24
25--- setup.py 2010-07-18 00:31:09.000000000 +1200 25--- setup.py 2010-07-18 00:31:09.000000000 +1200
26+++ setup.py 2011-09-23 01:51:17.757519638 +1200 26+++ setup.py 2011-09-23 01:51:17.757519638 +1200
27@@ -18,7 +18,7 @@ 27@@ -18,7 +18,7 @@
28 from distutils.spawn import find_executable 28 from distutils.spawn import find_executable
29  29
30 # This global variable is used to hold the list of modules to be disabled. 30 # This global variable is used to hold the list of modules to be disabled.
31-disabled_module_list = [] 31-disabled_module_list = []
32+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_elementtree", "_sqlite3", "_tkinter", "gdbm", "pyexpat", "readline", "linuxaudiodev", "ossaudiodev", "spwd", "sunaudiodev"] 32+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_elementtree", "_sqlite3", "_tkinter", "gdbm", "pyexpat", "readline", "linuxaudiodev", "ossaudiodev", "spwd", "sunaudiodev"]
33  33
34 def add_dir_to_list(dirlist, dir): 34 def add_dir_to_list(dirlist, dir):
35 """Add the directory 'dir' to the list 'dirlist' (at the front) if 35 """Add the directory 'dir' to the list 'dirlist' (at the front) if
36@@ -354,10 +354,40 @@ 36@@ -354,10 +354,40 @@
37 return platform 37 return platform
38 return sys.platform 38 return sys.platform
39  39
40+ def add_multiarch_paths(self): 40+ def add_multiarch_paths(self):
41+ # Debian/Ubuntu multiarch support. 41+ # Debian/Ubuntu multiarch support.
42+ # https://wiki.ubuntu.com/MultiarchSpec 42+ # https://wiki.ubuntu.com/MultiarchSpec
43+ if not find_executable('dpkg-architecture'): 43+ if not find_executable('dpkg-architecture'):
44+ return 44+ return
45+ tmpfile = os.path.join(self.build_temp, 'multiarch') 45+ tmpfile = os.path.join(self.build_temp, 'multiarch')
46+ if not os.path.exists(self.build_temp): 46+ if not os.path.exists(self.build_temp):
47+ os.makedirs(self.build_temp) 47+ os.makedirs(self.build_temp)
48+ ret = os.system( 48+ ret = os.system(
49+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' % 49+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
50+ tmpfile) 50+ tmpfile)
51+ try: 51+ try:
52+ if ret >> 8 == 0: 52+ if ret >> 8 == 0:
53+ with open(tmpfile) as fp: 53+ with open(tmpfile) as fp:
54+ multiarch_path_component = fp.readline().strip() 54+ multiarch_path_component = fp.readline().strip()
55+ add_dir_to_list(self.compiler.library_dirs, 55+ add_dir_to_list(self.compiler.library_dirs,
56+ '/usr/lib/' + multiarch_path_component) 56+ '/usr/lib/' + multiarch_path_component)
57+ add_dir_to_list(self.compiler.include_dirs, 57+ add_dir_to_list(self.compiler.include_dirs,
58+ '/usr/include/' + multiarch_path_component) 58+ '/usr/include/' + multiarch_path_component)
59+ finally: 59+ finally:
60+ os.unlink(tmpfile) 60+ os.unlink(tmpfile)
61+ 61+
62 def detect_modules(self): 62 def detect_modules(self):
63- # Ensure that /usr/local is always used 63- # Ensure that /usr/local is always used
64- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') 64- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
65- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') 65- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
66+ # Add the buildlink directories for pkgsrc 66+ # Add the buildlink directories for pkgsrc
67+ if os.environ.has_key('BUILDLINK_DIR'): 67+ if os.environ.has_key('BUILDLINK_DIR'):
68+ dir = os.environ['BUILDLINK_DIR'] 68+ dir = os.environ['BUILDLINK_DIR']
69+ libdir = dir + '/lib' 69+ libdir = dir + '/lib'
70+ incdir = dir + '/include' 70+ incdir = dir + '/include'
71+ if libdir not in self.compiler.library_dirs: 71+ if libdir not in self.compiler.library_dirs:
72+ self.compiler.library_dirs.insert(0, libdir) 72+ self.compiler.library_dirs.insert(0, libdir)
73+ if incdir not in self.compiler.include_dirs: 73+ if incdir not in self.compiler.include_dirs:
74+ self.compiler.include_dirs.insert(0, incdir) 74+ self.compiler.include_dirs.insert(0, incdir)
75+ 75+
76+ self.add_multiarch_paths() 76+ self.add_multiarch_paths()
77  77
78 # Add paths specified in the environment variables LDFLAGS and 78 # Add paths specified in the environment variables LDFLAGS and
79 # CPPFLAGS for header and library files. 79 # CPPFLAGS for header and library files.
80@@ -703,9 +733,7 @@ 80@@ -703,9 +733,7 @@
81 if krb5_h: 81 if krb5_h:
82 ssl_incs += krb5_h 82 ssl_incs += krb5_h
83 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, 83 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
84- ['/usr/local/ssl/lib', 84- ['/usr/local/ssl/lib',
85- '/usr/contrib/ssl/lib/' 85- '/usr/contrib/ssl/lib/'
86- ] ) 86- ] )
87+ [] ) 87+ [] )
88  88
89 if (ssl_incs is not None and 89 if (ssl_incs is not None and
90 ssl_libs is not None): 90 ssl_libs is not None):
91@@ -815,172 +843,6 @@ 91@@ -815,172 +843,6 @@
92 else: 92 else:
93 raise ValueError("unknown major BerkeleyDB version", major) 93 raise ValueError("unknown major BerkeleyDB version", major)
94  94
95- # construct a list of paths to look for the header file in on 95- # construct a list of paths to look for the header file in on
96- # top of the normal inc_dirs. 96- # top of the normal inc_dirs.
97- db_inc_paths = [ 97- db_inc_paths = [
98- '/usr/include/db4', 98- '/usr/include/db4',
99- '/usr/local/include/db4', 99- '/usr/local/include/db4',
100- '/opt/sfw/include/db4', 100- '/opt/sfw/include/db4',
101- '/usr/include/db3', 101- '/usr/include/db3',
102- '/usr/local/include/db3', 102- '/usr/local/include/db3',
103- '/opt/sfw/include/db3', 103- '/opt/sfw/include/db3',
104- # Fink defaults (http://fink.sourceforge.net/) 104- # Fink defaults (http://fink.sourceforge.net/)
105- '/sw/include/db4', 105- '/sw/include/db4',
106- '/sw/include/db3', 106- '/sw/include/db3',
107- ] 107- ]
108- # 4.x minor number specific paths 108- # 4.x minor number specific paths
109- for x in gen_db_minor_ver_nums(4): 109- for x in gen_db_minor_ver_nums(4):
110- db_inc_paths.append('/usr/include/db4%d' % x) 110- db_inc_paths.append('/usr/include/db4%d' % x)
111- db_inc_paths.append('/usr/include/db4.%d' % x) 111- db_inc_paths.append('/usr/include/db4.%d' % x)
112- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x) 112- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
113- db_inc_paths.append('/usr/local/include/db4%d' % x) 113- db_inc_paths.append('/usr/local/include/db4%d' % x)
114- db_inc_paths.append('/pkg/db-4.%d/include' % x) 114- db_inc_paths.append('/pkg/db-4.%d/include' % x)
115- db_inc_paths.append('/opt/db-4.%d/include' % x) 115- db_inc_paths.append('/opt/db-4.%d/include' % x)
116- # MacPorts default (http://www.macports.org/) 116- # MacPorts default (http://www.macports.org/)
117- db_inc_paths.append('/opt/local/include/db4%d' % x) 117- db_inc_paths.append('/opt/local/include/db4%d' % x)
118- # 3.x minor number specific paths 118- # 3.x minor number specific paths
119- for x in gen_db_minor_ver_nums(3): 119- for x in gen_db_minor_ver_nums(3):
120- db_inc_paths.append('/usr/include/db3%d' % x) 120- db_inc_paths.append('/usr/include/db3%d' % x)
121- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x) 121- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
122- db_inc_paths.append('/usr/local/include/db3%d' % x) 122- db_inc_paths.append('/usr/local/include/db3%d' % x)
123- db_inc_paths.append('/pkg/db-3.%d/include' % x) 123- db_inc_paths.append('/pkg/db-3.%d/include' % x)
124- db_inc_paths.append('/opt/db-3.%d/include' % x) 124- db_inc_paths.append('/opt/db-3.%d/include' % x)
125- 125-
126- # Add some common subdirectories for Sleepycat DB to the list, 126- # Add some common subdirectories for Sleepycat DB to the list,
127- # based on the standard include directories. This way DB3/4 gets 127- # based on the standard include directories. This way DB3/4 gets
128- # picked up when it is installed in a non-standard prefix and 128- # picked up when it is installed in a non-standard prefix and
129- # the user has added that prefix into inc_dirs. 129- # the user has added that prefix into inc_dirs.
130- std_variants = [] 130- std_variants = []
131- for dn in inc_dirs: 131- for dn in inc_dirs:
132- std_variants.append(os.path.join(dn, 'db3')) 132- std_variants.append(os.path.join(dn, 'db3'))
133- std_variants.append(os.path.join(dn, 'db4')) 133- std_variants.append(os.path.join(dn, 'db4'))
134- for x in gen_db_minor_ver_nums(4): 134- for x in gen_db_minor_ver_nums(4):
135- std_variants.append(os.path.join(dn, "db4%d"%x)) 135- std_variants.append(os.path.join(dn, "db4%d"%x))
136- std_variants.append(os.path.join(dn, "db4.%d"%x)) 136- std_variants.append(os.path.join(dn, "db4.%d"%x))
137- for x in gen_db_minor_ver_nums(3): 137- for x in gen_db_minor_ver_nums(3):
138- std_variants.append(os.path.join(dn, "db3%d"%x)) 138- std_variants.append(os.path.join(dn, "db3%d"%x))
139- std_variants.append(os.path.join(dn, "db3.%d"%x)) 139- std_variants.append(os.path.join(dn, "db3.%d"%x))
140- 140-
141- db_inc_paths = std_variants + db_inc_paths 141- db_inc_paths = std_variants + db_inc_paths
142- db_inc_paths = [p for p in db_inc_paths if os.path.exists(p)] 142- db_inc_paths = [p for p in db_inc_paths if os.path.exists(p)]
143- 143-
144- db_ver_inc_map = {} 144- db_ver_inc_map = {}
145- 145-
146- if sys.platform == 'darwin': 146- if sys.platform == 'darwin':
147- sysroot = macosx_sdk_root() 147- sysroot = macosx_sdk_root()
148- 148-
149- class db_found(Exception): pass 149- class db_found(Exception): pass
150- try: 150- try:
151- # See whether there is a Sleepycat header in the standard 151- # See whether there is a Sleepycat header in the standard
152- # search path. 152- # search path.
153- for d in inc_dirs + db_inc_paths: 153- for d in inc_dirs + db_inc_paths:
154- f = os.path.join(d, "db.h") 154- f = os.path.join(d, "db.h")
155- 155-
156- if sys.platform == 'darwin' and is_macosx_sdk_path(d): 156- if sys.platform == 'darwin' and is_macosx_sdk_path(d):
157- f = os.path.join(sysroot, d[1:], "db.h") 157- f = os.path.join(sysroot, d[1:], "db.h")
158- 158-
159- if db_setup_debug: print "db: looking for db.h in", f 159- if db_setup_debug: print "db: looking for db.h in", f
160- if os.path.exists(f): 160- if os.path.exists(f):
161- f = open(f).read() 161- f = open(f).read()
162- m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f) 162- m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f)
163- if m: 163- if m:
164- db_major = int(m.group(1)) 164- db_major = int(m.group(1))
165- m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f) 165- m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f)
166- db_minor = int(m.group(1)) 166- db_minor = int(m.group(1))
167- db_ver = (db_major, db_minor) 167- db_ver = (db_major, db_minor)
168- 168-
169- # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug 169- # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug
170- if db_ver == (4, 6): 170- if db_ver == (4, 6):
171- m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)", f) 171- m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)", f)
172- db_patch = int(m.group(1)) 172- db_patch = int(m.group(1))
173- if db_patch < 21: 173- if db_patch < 21:
174- print "db.h:", db_ver, "patch", db_patch, 174- print "db.h:", db_ver, "patch", db_patch,
175- print "being ignored (4.6.x must be >= 4.6.21)" 175- print "being ignored (4.6.x must be >= 4.6.21)"
176- continue 176- continue
177- 177-
178- if ( (db_ver not in db_ver_inc_map) and 178- if ( (db_ver not in db_ver_inc_map) and
179- allow_db_ver(db_ver) ): 179- allow_db_ver(db_ver) ):
180- # save the include directory with the db.h version 180- # save the include directory with the db.h version
181- # (first occurrence only) 181- # (first occurrence only)
182- db_ver_inc_map[db_ver] = d 182- db_ver_inc_map[db_ver] = d
183- if db_setup_debug: 183- if db_setup_debug:
184- print "db.h: found", db_ver, "in", d 184- print "db.h: found", db_ver, "in", d
185- else: 185- else:
186- # we already found a header for this library version 186- # we already found a header for this library version
187- if db_setup_debug: print "db.h: ignoring", d 187- if db_setup_debug: print "db.h: ignoring", d
188- else: 188- else:
189- # ignore this header, it didn't contain a version number 189- # ignore this header, it didn't contain a version number
190- if db_setup_debug: 190- if db_setup_debug:
191- print "db.h: no version number version in", d 191- print "db.h: no version number version in", d
192- 192-
193- db_found_vers = db_ver_inc_map.keys() 193- db_found_vers = db_ver_inc_map.keys()
194- db_found_vers.sort() 194- db_found_vers.sort()
195- 195-
196- while db_found_vers: 196- while db_found_vers:
197- db_ver = db_found_vers.pop() 197- db_ver = db_found_vers.pop()
198- db_incdir = db_ver_inc_map[db_ver] 198- db_incdir = db_ver_inc_map[db_ver]
199- 199-
200- # check lib directories parallel to the location of the header 200- # check lib directories parallel to the location of the header
201- db_dirs_to_check = [ 201- db_dirs_to_check = [
202- db_incdir.replace("include", 'lib64'), 202- db_incdir.replace("include", 'lib64'),
203- db_incdir.replace("include", 'lib'), 203- db_incdir.replace("include", 'lib'),
204- ] 204- ]
205- 205-
206- if sys.platform != 'darwin': 206- if sys.platform != 'darwin':
207- db_dirs_to_check = filter(os.path.isdir, db_dirs_to_check) 207- db_dirs_to_check = filter(os.path.isdir, db_dirs_to_check)
208- 208-
209- else: 209- else:
210- # Same as other branch, but takes OSX SDK into account 210- # Same as other branch, but takes OSX SDK into account
211- tmp = [] 211- tmp = []
212- for dn in db_dirs_to_check: 212- for dn in db_dirs_to_check:
213- if is_macosx_sdk_path(dn): 213- if is_macosx_sdk_path(dn):
214- if os.path.isdir(os.path.join(sysroot, dn[1:])): 214- if os.path.isdir(os.path.join(sysroot, dn[1:])):
215- tmp.append(dn) 215- tmp.append(dn)
216- else: 216- else:
217- if os.path.isdir(dn): 217- if os.path.isdir(dn):
218- tmp.append(dn) 218- tmp.append(dn)
219- db_dirs_to_check = tmp 219- db_dirs_to_check = tmp
220- 220-
221- # Look for a version specific db-X.Y before an ambiguoius dbX 221- # Look for a version specific db-X.Y before an ambiguoius dbX
222- # XXX should we -ever- look for a dbX name? Do any 222- # XXX should we -ever- look for a dbX name? Do any
223- # systems really not name their library by version and 223- # systems really not name their library by version and
224- # symlink to more general names? 224- # symlink to more general names?
225- for dblib in (('db-%d.%d' % db_ver), 225- for dblib in (('db-%d.%d' % db_ver),
226- ('db%d%d' % db_ver), 226- ('db%d%d' % db_ver),
227- ('db%d' % db_ver[0])): 227- ('db%d' % db_ver[0])):
228- dblib_file = self.compiler.find_library_file( 228- dblib_file = self.compiler.find_library_file(
229- db_dirs_to_check + lib_dirs, dblib ) 229- db_dirs_to_check + lib_dirs, dblib )
230- if dblib_file: 230- if dblib_file:
231- dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ] 231- dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ]
232- raise db_found 232- raise db_found
233- else: 233- else:
234- if db_setup_debug: print "db lib: ", dblib, "not found" 234- if db_setup_debug: print "db lib: ", dblib, "not found"
235- 235-
236- except db_found: 236- except db_found:
237- if db_setup_debug: 237- if db_setup_debug:
238- print "bsddb using BerkeleyDB lib:", db_ver, dblib 238- print "bsddb using BerkeleyDB lib:", db_ver, dblib
239- print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir 239- print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir
240- db_incs = [db_incdir] 240- db_incs = [db_incdir]
241- dblibs = [dblib] 241- dblibs = [dblib]
242- # We add the runtime_library_dirs argument because the 242- # We add the runtime_library_dirs argument because the
243- # BerkeleyDB lib we're linking against often isn't in the 243- # BerkeleyDB lib we're linking against often isn't in the
244- # system dynamic library search path. This is usually 244- # system dynamic library search path. This is usually
245- # correct and most trouble free, but may cause problems in 245- # correct and most trouble free, but may cause problems in
246- # some unusual system configurations (e.g. the directory 246- # some unusual system configurations (e.g. the directory
247- # is on an NFS server that goes away). 247- # is on an NFS server that goes away).
248- exts.append(Extension('_bsddb', ['_bsddb.c'], 248- exts.append(Extension('_bsddb', ['_bsddb.c'],
249- depends = ['bsddb.h'], 249- depends = ['bsddb.h'],
250- library_dirs=dblib_dir, 250- library_dirs=dblib_dir,
251- runtime_library_dirs=dblib_dir, 251- runtime_library_dirs=dblib_dir,
252- include_dirs=db_incs, 252- include_dirs=db_incs,
253- libraries=dblibs)) 253- libraries=dblibs))
254- else: 254- else:
255- if db_setup_debug: print "db: no appropriate library found" 255- if db_setup_debug: print "db: no appropriate library found"
256- db_incs = None 256- db_incs = None
257- dblibs = [] 257- dblibs = []
258- dblib_dir = None 258- dblib_dir = None
259- missing.append('_bsddb') 259- missing.append('_bsddb')
260- 260-
261 # The sqlite interface 261 # The sqlite interface
262 sqlite_setup_debug = False # verbose debug prints from this script? 262 sqlite_setup_debug = False # verbose debug prints from this script?
263  263
264@@ -1094,31 +956,12 @@ 264@@ -1094,31 +956,12 @@
265 # we do not build this one. Otherwise this build will pick up 265 # we do not build this one. Otherwise this build will pick up
266 # the more recent berkeleydb's db.h file first in the include path 266 # the more recent berkeleydb's db.h file first in the include path
267 # when attempting to compile and it will fail. 267 # when attempting to compile and it will fail.
268- f = "/usr/include/db.h" 268- f = "/usr/include/db.h"
269- 269-
270- if sys.platform == 'darwin': 270- if sys.platform == 'darwin':
271- if is_macosx_sdk_path(f): 271- if is_macosx_sdk_path(f):
272- sysroot = macosx_sdk_root() 272- sysroot = macosx_sdk_root()
273- f = os.path.join(sysroot, f[1:]) 273- f = os.path.join(sysroot, f[1:])
274- 274-
275- if os.path.exists(f) and not db_incs: 275- if os.path.exists(f) and not db_incs:
276- data = open(f).read() 276- data = open(f).read()
277- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) 277- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
278- if m is not None: 278- if m is not None:
279- # bingo - old version used hash file format version 2 279- # bingo - old version used hash file format version 2
280- ### XXX this should be fixed to not be platform-dependent 280- ### XXX this should be fixed to not be platform-dependent
281- ### but I don't have direct access to an osf1 platform and 281- ### but I don't have direct access to an osf1 platform and
282- ### seemed to be muffing the search somehow 282- ### seemed to be muffing the search somehow
283- libraries = platform == "osf1" and ['db'] or None 283- libraries = platform == "osf1" and ['db'] or None
284- if libraries is not None: 284- if libraries is not None:
285- exts.append(Extension('bsddb185', ['bsddbmodule.c'], 285- exts.append(Extension('bsddb185', ['bsddbmodule.c'],
286- libraries=libraries)) 286- libraries=libraries))
287- else: 287- else:
288- exts.append(Extension('bsddb185', ['bsddbmodule.c'])) 288- exts.append(Extension('bsddb185', ['bsddbmodule.c']))
289- else: 289- else:
290- missing.append('bsddb185') 290- missing.append('bsddb185')
291+ libraries = os.getenv("PY_BDB_TYPE", "") 291+ libraries = os.getenv("PY_BDB_TYPE", "")
292+ if libraries: 292+ if libraries:
293+ exts.append(Extension('bsddb185', ['bsddbmodule.c'], 293+ exts.append(Extension('bsddb185', ['bsddbmodule.c'],
294+ libraries=["db"])) 294+ libraries=["db"]))
295 else: 295 else:
296- missing.append('bsddb185') 296- missing.append('bsddb185')
297+ exts.append(Extension('bsddb185', ['bsddbmodule.c'])) 297+ exts.append(Extension('bsddb185', ['bsddbmodule.c']))
298  298
299 # The standard Unix dbm module: 299 # The standard Unix dbm module:
300 if platform not in ['cygwin']: 300 if platform not in ['cygwin']:
301@@ -1131,7 +974,7 @@ 301@@ -1128,10 +971,12 @@
302 exts.append( Extension('dbm', ['dbmmodule.c'], 302 ndbm_libs = ['ndbm']
 303 else:
 304 ndbm_libs = []
 305- exts.append( Extension('dbm', ['dbmmodule.c'],
 306+ # Don't use gdbm_compat!
 307+ if not self.compiler.find_library_file(lib_dirs, 'gdbm_compat'):
 308+ exts.append( Extension('dbm', ['dbmmodule.c'],
303 define_macros=[('HAVE_NDBM_H',None)], 309 define_macros=[('HAVE_NDBM_H',None)],
304 libraries = ndbm_libs ) ) 310 libraries = ndbm_libs ) )
305- elif self.compiler.find_library_file(lib_dirs, 'gdbm'): 311- elif self.compiler.find_library_file(lib_dirs, 'gdbm'):
306+ elif 1==0 and self.compiler.find_library_file(lib_dirs, 'gdbm'): 312+ elif 1==0 and self.compiler.find_library_file(lib_dirs, 'gdbm'):
307 gdbm_libs = ['gdbm'] 313 gdbm_libs = ['gdbm']
308 if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'): 314 if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'):
309 gdbm_libs.append('gdbm_compat') 315 gdbm_libs.append('gdbm_compat')
310@@ -1147,14 +990,11 @@ 316@@ -1147,14 +990,12 @@
311 libraries = gdbm_libs ) ) 317 libraries = gdbm_libs ) )
312 else: 318 else:
313 missing.append('dbm') 319 missing.append('dbm')
314- elif db_incs is not None: 320- elif db_incs is not None:
315+ elif 1==1: 321+
 322+ if not module_enabled(exts, 'dbm'):
316 exts.append( Extension('dbm', ['dbmmodule.c'], 323 exts.append( Extension('dbm', ['dbmmodule.c'],
317- library_dirs=dblib_dir, 324- library_dirs=dblib_dir,
318- runtime_library_dirs=dblib_dir, 325- runtime_library_dirs=dblib_dir,
319- include_dirs=db_incs, 326- include_dirs=db_incs,
320 define_macros=[('HAVE_BERKDB_H',None), 327 define_macros=[('HAVE_BERKDB_H',None),
321 ('DB_DBM_HSEARCH',None)], 328 ('DB_DBM_HSEARCH',None)],
322- libraries=dblibs)) 329- libraries=dblibs))
323+ libraries=["db"])) 330+ libraries=["db"]))
324 else: 331 else:
325 missing.append('dbm') 332 missing.append('dbm')
326  333
327@@ -1408,6 +1248,14 @@ 334@@ -1408,6 +1248,14 @@
328 ) 335 )
329 libraries = [] 336 libraries = []
330  337
331+ elif platform.startswith('dragonfly'): 338+ elif platform.startswith('dragonfly'):
332+ macros = dict( 339+ macros = dict(
333+ HAVE_SEM_OPEN=0, 340+ HAVE_SEM_OPEN=0,
334+ HAVE_SEM_TIMEDWAIT=0, 341+ HAVE_SEM_TIMEDWAIT=0,
335+ HAVE_FD_TRANSFER=1, 342+ HAVE_FD_TRANSFER=1,
336+ ) 343+ )
337+ libraries = [] 344+ libraries = []
338+ 345+
339 else: # Linux and other unices 346 else: # Linux and other unices
340 macros = dict( 347 macros = dict(
341 HAVE_SEM_OPEN=1, 348 HAVE_SEM_OPEN=1,
342@@ -2026,9 +1874,9 @@ 349@@ -2026,9 +1874,9 @@
343 ext_modules=[Extension('_struct', ['_struct.c'])], 350 ext_modules=[Extension('_struct', ['_struct.c'])],
344  351
345 # Scripts to install 352 # Scripts to install
346- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', 353- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
347- 'Tools/scripts/2to3', 354- 'Tools/scripts/2to3',
348- 'Lib/smtpd.py'] 355- 'Lib/smtpd.py']
349+ scripts = ['Tools/scripts/pydoc2.6', 356+ scripts = ['Tools/scripts/pydoc2.6',
350+ 'Tools/scripts/2to3-2.6', 357+ 'Tools/scripts/2to3-2.6',
351+ 'Lib/smtpd2.6.py'] 358+ 'Lib/smtpd2.6.py']
352 ) 359 )
353  360
354 # --install-platlib 361 # --install-platlib

cvs diff -r1.9 -r1.10 pkgsrc/lang/python27/distinfo (switch to unified diff)

--- pkgsrc/lang/python27/distinfo 2011/09/30 08:37:24 1.9
+++ pkgsrc/lang/python27/distinfo 2011/10/18 21:59:18 1.10
@@ -1,22 +1,22 @@ @@ -1,22 +1,22 @@
1$NetBSD: distinfo,v 1.9 2011/09/30 08:37:24 yyamano Exp $ 1$NetBSD: distinfo,v 1.10 2011/10/18 21:59:18 sbd Exp $
2 2
3SHA1 (Python-2.7.2.tar.bz2) = 417bdeea77abfaf1b9257fc6b4a04aaa209f4547 3SHA1 (Python-2.7.2.tar.bz2) = 417bdeea77abfaf1b9257fc6b4a04aaa209f4547
4RMD160 (Python-2.7.2.tar.bz2) = c3bf4f09b7c429a4d9f4cc251c795304cd5232c5 4RMD160 (Python-2.7.2.tar.bz2) = c3bf4f09b7c429a4d9f4cc251c795304cd5232c5
5Size (Python-2.7.2.tar.bz2) = 11754834 bytes 5Size (Python-2.7.2.tar.bz2) = 11754834 bytes
6SHA1 (patch-Mac_Modules_fm___Fmmodule.c) = b9314bccb51b4fe672b81559068f7a79d2965f94 6SHA1 (patch-Mac_Modules_fm___Fmmodule.c) = b9314bccb51b4fe672b81559068f7a79d2965f94
7SHA1 (patch-Mac_Modules_qd___Qdmodule.c) = 45c748b15b9436d45ba137460389638aa7108c8d 7SHA1 (patch-Mac_Modules_qd___Qdmodule.c) = 45c748b15b9436d45ba137460389638aa7108c8d
8SHA1 (patch-Mac_Modules_qdoffs___Qdoffsmodule.c) = 9994f0c1a908f18f1f3df3f05b184f082c018365 8SHA1 (patch-Mac_Modules_qdoffs___Qdoffsmodule.c) = 9994f0c1a908f18f1f3df3f05b184f082c018365
9SHA1 (patch-aa) = 990e4025bb6a37715e1f5df1831499f0ab08acfa 9SHA1 (patch-aa) = 990e4025bb6a37715e1f5df1831499f0ab08acfa
10SHA1 (patch-ab) = 8c44f60d9ed0babb107bc4643b0437e2dd55d03a 10SHA1 (patch-ab) = 8c44f60d9ed0babb107bc4643b0437e2dd55d03a
11SHA1 (patch-ad) = de730b9f5a5efb56afa8bed05824b5f6579242ec 11SHA1 (patch-ad) = de730b9f5a5efb56afa8bed05824b5f6579242ec
12SHA1 (patch-ae) = ff6d8c6164fe3c6dc4fb33d88eb8a49d5c5442f6 12SHA1 (patch-ae) = ff6d8c6164fe3c6dc4fb33d88eb8a49d5c5442f6
13SHA1 (patch-ah) = 8e9ee44c7a054f1387b6d8ef8dbe9c1b8dc8d891 13SHA1 (patch-ah) = 8e9ee44c7a054f1387b6d8ef8dbe9c1b8dc8d891
14SHA1 (patch-al) = b97c2e73b9038e22f55ec226c2cbcc671466ad19 14SHA1 (patch-al) = b97c2e73b9038e22f55ec226c2cbcc671466ad19
15SHA1 (patch-am) = 8b546a0eb9b5e6d287b6fead2d0c20fd457b5b66 15SHA1 (patch-am) = 593f14d9f4ad9f46c57cc43a2a6402ffb9312437
16SHA1 (patch-an) = 6098fbf0fc31422196cc40d3a227934523db11ca 16SHA1 (patch-an) = 6098fbf0fc31422196cc40d3a227934523db11ca
17SHA1 (patch-ao) = 9996a444fc0034c9f01fd18f4ad7bf714a8c8d04 17SHA1 (patch-ao) = 9996a444fc0034c9f01fd18f4ad7bf714a8c8d04
18SHA1 (patch-au) = 18fce68df48e43c2927cc83e6b4b404b5e1103b7 18SHA1 (patch-au) = 18fce68df48e43c2927cc83e6b4b404b5e1103b7
19SHA1 (patch-av) = a14eaf4d5db6fc3b79ed896fbfcc34ca98051af2 19SHA1 (patch-av) = a14eaf4d5db6fc3b79ed896fbfcc34ca98051af2
20SHA1 (patch-aw) = 15652e241f371a22c7300f46771825ea74514fa0 20SHA1 (patch-aw) = 15652e241f371a22c7300f46771825ea74514fa0
21SHA1 (patch-ax) = bdb8e6555f36b1603c553e03a2d6d772e50c623b 21SHA1 (patch-ax) = bdb8e6555f36b1603c553e03a2d6d772e50c623b
22SHA1 (patch-az) = 473419352f6e1ff3c6e6268e81457e6f8a1fccb8 22SHA1 (patch-az) = 473419352f6e1ff3c6e6268e81457e6f8a1fccb8

cvs diff -r1.3 -r1.4 pkgsrc/lang/python27/patches/Attic/patch-am (switch to unified diff)

--- pkgsrc/lang/python27/patches/Attic/patch-am 2011/06/13 11:31:13 1.3
+++ pkgsrc/lang/python27/patches/Attic/patch-am 2011/10/18 21:59:18 1.4
@@ -1,312 +1,334 @@ @@ -1,312 +1,334 @@
1$NetBSD: patch-am,v 1.3 2011/06/13 11:31:13 obache Exp $ 1$NetBSD: patch-am,v 1.4 2011/10/18 21:59:18 sbd 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 2011-06-11 15:46:28.000000000 +0000 22--- setup.py.orig 2011-06-11 15:46:28.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@@ -368,9 +368,15 @@ class PyBuildExt(build_ext): 33@@ -368,9 +368,15 @@ class PyBuildExt(build_ext):
34 os.unlink(tmpfile) 34 os.unlink(tmpfile)
35  35
36 def detect_modules(self): 36 def detect_modules(self):
37- # Ensure that /usr/local is always used 37- # Ensure that /usr/local is always used
38- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') 38- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
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 self.add_multiarch_paths() 49 self.add_multiarch_paths()
50  50
51 # Add paths specified in the environment variables LDFLAGS and 51 # Add paths specified in the environment variables LDFLAGS and
52@@ -715,9 +721,7 @@ class PyBuildExt(build_ext): 52@@ -715,9 +721,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@@ -832,172 +836,6 @@ class PyBuildExt(build_ext): 63@@ -832,172 +836,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/)
77- '/sw/include/db4', 77- '/sw/include/db4',
78- '/sw/include/db3', 78- '/sw/include/db3',
79- ] 79- ]
80- # 4.x minor number specific paths 80- # 4.x minor number specific paths
81- for x in gen_db_minor_ver_nums(4): 81- for x in gen_db_minor_ver_nums(4):
82- db_inc_paths.append('/usr/include/db4%d' % x) 82- db_inc_paths.append('/usr/include/db4%d' % x)
83- db_inc_paths.append('/usr/include/db4.%d' % x) 83- db_inc_paths.append('/usr/include/db4.%d' % x)
84- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x) 84- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
85- db_inc_paths.append('/usr/local/include/db4%d' % x) 85- db_inc_paths.append('/usr/local/include/db4%d' % x)
86- db_inc_paths.append('/pkg/db-4.%d/include' % x) 86- db_inc_paths.append('/pkg/db-4.%d/include' % x)
87- db_inc_paths.append('/opt/db-4.%d/include' % x) 87- db_inc_paths.append('/opt/db-4.%d/include' % x)
88- # MacPorts default (http://www.macports.org/) 88- # MacPorts default (http://www.macports.org/)
89- db_inc_paths.append('/opt/local/include/db4%d' % x) 89- db_inc_paths.append('/opt/local/include/db4%d' % x)
90- # 3.x minor number specific paths 90- # 3.x minor number specific paths
91- for x in gen_db_minor_ver_nums(3): 91- for x in gen_db_minor_ver_nums(3):
92- db_inc_paths.append('/usr/include/db3%d' % x) 92- db_inc_paths.append('/usr/include/db3%d' % x)
93- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x) 93- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
94- db_inc_paths.append('/usr/local/include/db3%d' % x) 94- db_inc_paths.append('/usr/local/include/db3%d' % x)
95- db_inc_paths.append('/pkg/db-3.%d/include' % x) 95- db_inc_paths.append('/pkg/db-3.%d/include' % x)
96- db_inc_paths.append('/opt/db-3.%d/include' % x) 96- db_inc_paths.append('/opt/db-3.%d/include' % x)
97- 97-
98- # Add some common subdirectories for Sleepycat DB to the list, 98- # Add some common subdirectories for Sleepycat DB to the list,
99- # based on the standard include directories. This way DB3/4 gets 99- # based on the standard include directories. This way DB3/4 gets
100- # picked up when it is installed in a non-standard prefix and 100- # picked up when it is installed in a non-standard prefix and
101- # the user has added that prefix into inc_dirs. 101- # the user has added that prefix into inc_dirs.
102- std_variants = [] 102- std_variants = []
103- for dn in inc_dirs: 103- for dn in inc_dirs:
104- std_variants.append(os.path.join(dn, 'db3')) 104- std_variants.append(os.path.join(dn, 'db3'))
105- std_variants.append(os.path.join(dn, 'db4')) 105- std_variants.append(os.path.join(dn, 'db4'))
106- for x in gen_db_minor_ver_nums(4): 106- for x in gen_db_minor_ver_nums(4):
107- std_variants.append(os.path.join(dn, "db4%d"%x)) 107- std_variants.append(os.path.join(dn, "db4%d"%x))
108- std_variants.append(os.path.join(dn, "db4.%d"%x)) 108- std_variants.append(os.path.join(dn, "db4.%d"%x))
109- for x in gen_db_minor_ver_nums(3): 109- for x in gen_db_minor_ver_nums(3):
110- std_variants.append(os.path.join(dn, "db3%d"%x)) 110- std_variants.append(os.path.join(dn, "db3%d"%x))
111- std_variants.append(os.path.join(dn, "db3.%d"%x)) 111- std_variants.append(os.path.join(dn, "db3.%d"%x))
112- 112-
113- db_inc_paths = std_variants + db_inc_paths 113- db_inc_paths = std_variants + db_inc_paths
114- db_inc_paths = [p for p in db_inc_paths if os.path.exists(p)] 114- db_inc_paths = [p for p in db_inc_paths if os.path.exists(p)]
115- 115-
116- db_ver_inc_map = {} 116- db_ver_inc_map = {}
117- 117-
118- if sys.platform == 'darwin': 118- if sys.platform == 'darwin':
119- sysroot = macosx_sdk_root() 119- sysroot = macosx_sdk_root()
120- 120-
121- class db_found(Exception): pass 121- class db_found(Exception): pass
122- try: 122- try:
123- # See whether there is a Sleepycat header in the standard 123- # See whether there is a Sleepycat header in the standard
124- # search path. 124- # search path.
125- for d in inc_dirs + db_inc_paths: 125- for d in inc_dirs + db_inc_paths:
126- f = os.path.join(d, "db.h") 126- f = os.path.join(d, "db.h")
127- 127-
128- if sys.platform == 'darwin' and is_macosx_sdk_path(d): 128- if sys.platform == 'darwin' and is_macosx_sdk_path(d):
129- f = os.path.join(sysroot, d[1:], "db.h") 129- f = os.path.join(sysroot, d[1:], "db.h")
130- 130-
131- if db_setup_debug: print "db: looking for db.h in", f 131- if db_setup_debug: print "db: looking for db.h in", f
132- if os.path.exists(f): 132- if os.path.exists(f):
133- f = open(f).read() 133- f = open(f).read()
134- m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f) 134- m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f)
135- if m: 135- if m:
136- db_major = int(m.group(1)) 136- db_major = int(m.group(1))
137- m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f) 137- m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f)
138- db_minor = int(m.group(1)) 138- db_minor = int(m.group(1))
139- db_ver = (db_major, db_minor) 139- db_ver = (db_major, db_minor)
140- 140-
141- # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug 141- # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug
142- if db_ver == (4, 6): 142- if db_ver == (4, 6):
143- m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)", f) 143- m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)", f)
144- db_patch = int(m.group(1)) 144- db_patch = int(m.group(1))
145- if db_patch < 21: 145- if db_patch < 21:
146- print "db.h:", db_ver, "patch", db_patch, 146- print "db.h:", db_ver, "patch", db_patch,
147- print "being ignored (4.6.x must be >= 4.6.21)" 147- print "being ignored (4.6.x must be >= 4.6.21)"
148- continue 148- continue
149- 149-
150- if ( (db_ver not in db_ver_inc_map) and 150- if ( (db_ver not in db_ver_inc_map) and
151- allow_db_ver(db_ver) ): 151- allow_db_ver(db_ver) ):
152- # save the include directory with the db.h version 152- # save the include directory with the db.h version
153- # (first occurrence only) 153- # (first occurrence only)
154- db_ver_inc_map[db_ver] = d 154- db_ver_inc_map[db_ver] = d
155- if db_setup_debug: 155- if db_setup_debug:
156- print "db.h: found", db_ver, "in", d 156- print "db.h: found", db_ver, "in", d
157- else: 157- else:
158- # we already found a header for this library version 158- # we already found a header for this library version
159- if db_setup_debug: print "db.h: ignoring", d 159- if db_setup_debug: print "db.h: ignoring", d
160- else: 160- else:
161- # ignore this header, it didn't contain a version number 161- # ignore this header, it didn't contain a version number
162- if db_setup_debug: 162- if db_setup_debug:
163- print "db.h: no version number version in", d 163- print "db.h: no version number version in", d
164- 164-
165- db_found_vers = db_ver_inc_map.keys() 165- db_found_vers = db_ver_inc_map.keys()
166- db_found_vers.sort() 166- db_found_vers.sort()
167- 167-
168- while db_found_vers: 168- while db_found_vers:
169- db_ver = db_found_vers.pop() 169- db_ver = db_found_vers.pop()
170- db_incdir = db_ver_inc_map[db_ver] 170- db_incdir = db_ver_inc_map[db_ver]
171- 171-
172- # check lib directories parallel to the location of the header 172- # check lib directories parallel to the location of the header
173- db_dirs_to_check = [ 173- db_dirs_to_check = [
174- db_incdir.replace("include", 'lib64'), 174- db_incdir.replace("include", 'lib64'),
175- db_incdir.replace("include", 'lib'), 175- db_incdir.replace("include", 'lib'),
176- ] 176- ]
177- 177-
178- if sys.platform != 'darwin': 178- if sys.platform != 'darwin':
179- db_dirs_to_check = filter(os.path.isdir, db_dirs_to_check) 179- db_dirs_to_check = filter(os.path.isdir, db_dirs_to_check)
180- 180-
181- else: 181- else:
182- # Same as other branch, but takes OSX SDK into account 182- # Same as other branch, but takes OSX SDK into account
183- tmp = [] 183- tmp = []
184- for dn in db_dirs_to_check: 184- for dn in db_dirs_to_check:
185- if is_macosx_sdk_path(dn): 185- if is_macosx_sdk_path(dn):
186- if os.path.isdir(os.path.join(sysroot, dn[1:])): 186- if os.path.isdir(os.path.join(sysroot, dn[1:])):
187- tmp.append(dn) 187- tmp.append(dn)
188- else: 188- else:
189- if os.path.isdir(dn): 189- if os.path.isdir(dn):
190- tmp.append(dn) 190- tmp.append(dn)
191- db_dirs_to_check = tmp 191- db_dirs_to_check = tmp
192- 192-
193- # Look for a version specific db-X.Y before an ambiguous dbX 193- # Look for a version specific db-X.Y before an ambiguous dbX
194- # XXX should we -ever- look for a dbX name? Do any 194- # XXX should we -ever- look for a dbX name? Do any
195- # systems really not name their library by version and 195- # systems really not name their library by version and
196- # symlink to more general names? 196- # symlink to more general names?
197- for dblib in (('db-%d.%d' % db_ver), 197- for dblib in (('db-%d.%d' % db_ver),
198- ('db%d%d' % db_ver), 198- ('db%d%d' % db_ver),
199- ('db%d' % db_ver[0])): 199- ('db%d' % db_ver[0])):
200- dblib_file = self.compiler.find_library_file( 200- dblib_file = self.compiler.find_library_file(
201- db_dirs_to_check + lib_dirs, dblib ) 201- db_dirs_to_check + lib_dirs, dblib )
202- if dblib_file: 202- if dblib_file:
203- dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ] 203- dblib_dir = [ os.path.abspath(os.path.dirname(dblib_file)) ]
204- raise db_found 204- raise db_found
205- else: 205- else:
206- if db_setup_debug: print "db lib: ", dblib, "not found" 206- if db_setup_debug: print "db lib: ", dblib, "not found"
207- 207-
208- except db_found: 208- except db_found:
209- if db_setup_debug: 209- if db_setup_debug:
210- print "bsddb using BerkeleyDB lib:", db_ver, dblib 210- print "bsddb using BerkeleyDB lib:", db_ver, dblib
211- print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir 211- print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir
212- db_incs = [db_incdir] 212- db_incs = [db_incdir]
213- dblibs = [dblib] 213- dblibs = [dblib]
214- # We add the runtime_library_dirs argument because the 214- # We add the runtime_library_dirs argument because the
215- # BerkeleyDB lib we're linking against often isn't in the 215- # BerkeleyDB lib we're linking against often isn't in the
216- # system dynamic library search path. This is usually 216- # system dynamic library search path. This is usually
217- # correct and most trouble free, but may cause problems in 217- # correct and most trouble free, but may cause problems in
218- # some unusual system configurations (e.g. the directory 218- # some unusual system configurations (e.g. the directory
219- # is on an NFS server that goes away). 219- # is on an NFS server that goes away).
220- exts.append(Extension('_bsddb', ['_bsddb.c'], 220- exts.append(Extension('_bsddb', ['_bsddb.c'],
221- depends = ['bsddb.h'], 221- depends = ['bsddb.h'],
222- library_dirs=dblib_dir, 222- library_dirs=dblib_dir,
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@@ -1113,31 +951,12 @@ class PyBuildExt(build_ext): 236@@ -1113,31 +951,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)
250- if m is not None: 250- if m is not None:
251- # bingo - old version used hash file format version 2 251- # bingo - old version used hash file format version 2
252- ### XXX this should be fixed to not be platform-dependent 252- ### XXX this should be fixed to not be platform-dependent
253- ### but I don't have direct access to an osf1 platform and 253- ### but I don't have direct access to an osf1 platform and
254- ### seemed to be muffing the search somehow 254- ### seemed to be muffing the search somehow
255- libraries = platform == "osf1" and ['db'] or None 255- libraries = platform == "osf1" and ['db'] or None
256- if libraries is not None: 256- if libraries is not None:
257- exts.append(Extension('bsddb185', ['bsddbmodule.c'], 257- exts.append(Extension('bsddb185', ['bsddbmodule.c'],
258- libraries=libraries)) 258- libraries=libraries))
259- else: 259- else:
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@@ -1193,18 +1012,14 @@ class PyBuildExt(build_ext): 273@@ -1160,13 +979,15 @@ class PyBuildExt(build_ext):
 274 ndbm_libs = ['ndbm']
 275 else:
 276 ndbm_libs = []
 277- print "building dbm using ndbm"
 278- dbmext = Extension('dbm', ['dbmmodule.c'],
 279+ if not self.compiler.find_library_file(lib_dirs,
 280+ 'gdbm'):
 281+ print "building dbm using ndbm"
 282+ dbmext = Extension('dbm', ['dbmmodule.c'],
 283 define_macros=[
 284 ('HAVE_NDBM_H',None),
 285 ],
 286 libraries=ndbm_libs)
 287- break
 288+ break
 289
 290 elif cand == "gdbm":
 291 if self.compiler.find_library_file(lib_dirs, 'gdbm'):
 292@@ -1192,19 +1013,16 @@ class PyBuildExt(build_ext):
 293 ],
274 libraries = gdbm_libs) 294 libraries = gdbm_libs)
275 break 295 break
276 elif cand == "bdb": 296- elif cand == "bdb":
277- if db_incs is not None: 297- if db_incs is not None:
278- print "building dbm using bdb" 298- print "building dbm using bdb"
279- dbmext = Extension('dbm', ['dbmmodule.c'], 299- dbmext = Extension('dbm', ['dbmmodule.c'],
280- library_dirs=dblib_dir, 300- library_dirs=dblib_dir,
281- runtime_library_dirs=dblib_dir, 301- runtime_library_dirs=dblib_dir,
282- include_dirs=db_incs, 302- include_dirs=db_incs,
283- define_macros=[ 303- define_macros=[
284- ('HAVE_BERKDB_H', None), 304- ('HAVE_BERKDB_H', None),
285- ('DB_DBM_HSEARCH', None), 305- ('DB_DBM_HSEARCH', None),
286- ], 306- ],
287- libraries=dblibs) 307- libraries=dblibs)
288- break 308- break
 309+
 310+ if cand == "bdb" and dbmext is None:
289+ print "building dbm using bdb" 311+ print "building dbm using bdb"
290+ dbmext = Extension('dbm', ['dbmmodule.c'], 312+ dbmext = Extension('dbm', ['dbmmodule.c'],
291+ define_macros=[ 313+ define_macros=[
292+ ('HAVE_BERKDB_H', None), 314+ ('HAVE_BERKDB_H', None),
293+ ('DB_DBM_HSEARCH', None), 315+ ('DB_DBM_HSEARCH', None),
294+ ], 316+ ],
295+ libraries=["db"]) 317+ libraries=["db"])
296+ break 318+ break
297 if dbmext is not None: 319 if dbmext is not None:
298 exts.append(dbmext) 320 exts.append(dbmext)
299 else: 321 else:
300@@ -2066,9 +1881,9 @@ def main(): 322@@ -2066,9 +1884,9 @@ def main():
301 ext_modules=[Extension('_struct', ['_struct.c'])], 323 ext_modules=[Extension('_struct', ['_struct.c'])],
302  324
303 # Scripts to install 325 # Scripts to install
304- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', 326- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
305- 'Tools/scripts/2to3', 327- 'Tools/scripts/2to3',
306- 'Lib/smtpd.py'] 328- 'Lib/smtpd.py']
307+ scripts = ['Tools/scripts/pydoc2.7', 329+ scripts = ['Tools/scripts/pydoc2.7',
308+ 'Tools/scripts/2to3-2.7', 330+ 'Tools/scripts/2to3-2.7',
309+ 'Lib/smtpd2.7.py'] 331+ 'Lib/smtpd2.7.py']
310 ) 332 )
311  333
312 # --install-platlib 334 # --install-platlib

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

--- pkgsrc/lang/python31/Attic/distinfo 2011/09/10 11:23:12 1.3
+++ pkgsrc/lang/python31/Attic/distinfo 2011/10/18 21:59:18 1.4
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1$NetBSD: distinfo,v 1.3 2011/09/10 11:23:12 obache Exp $ 1$NetBSD: distinfo,v 1.4 2011/10/18 21:59:18 sbd Exp $
2 2
3SHA1 (Python-3.1.4.tar.bz2) = 043d0240247f289205deeb0e620d799005202b3c 3SHA1 (Python-3.1.4.tar.bz2) = 043d0240247f289205deeb0e620d799005202b3c
4RMD160 (Python-3.1.4.tar.bz2) = d537706808b00989a636418b6b6a06357b6bb94b 4RMD160 (Python-3.1.4.tar.bz2) = d537706808b00989a636418b6b6a06357b6bb94b
5Size (Python-3.1.4.tar.bz2) = 9887870 bytes 5Size (Python-3.1.4.tar.bz2) = 9887870 bytes
6SHA1 (patch-aa) = ae156c486007cfd14d378dd211108d3af4b841b1 6SHA1 (patch-aa) = ae156c486007cfd14d378dd211108d3af4b841b1
7SHA1 (patch-ab) = 7d4d6aa9239f53f1ce9ecd377890d71557c58ca4 7SHA1 (patch-ab) = 7d4d6aa9239f53f1ce9ecd377890d71557c58ca4
8SHA1 (patch-ah) = f93c0aab7b0d5e8e9f80433dda5ed5a22861f6b9 8SHA1 (patch-ah) = f93c0aab7b0d5e8e9f80433dda5ed5a22861f6b9
9SHA1 (patch-al) = 48e348c64cf54756cf5b10254661ac089bec3e0a 9SHA1 (patch-al) = 48e348c64cf54756cf5b10254661ac089bec3e0a
10SHA1 (patch-am) = 47d6b7993c1c8e3e203490eb14bf66888f3e39d6 10SHA1 (patch-am) = c7861e5c3bee63efa360218a2ff4685a23b45a3e
11SHA1 (patch-an) = 933acde107b735931d26ace4eef251000b9f07ba 11SHA1 (patch-an) = 933acde107b735931d26ace4eef251000b9f07ba
12SHA1 (patch-ao) = dca396744edc5c0f86c8912bf54347a630cd865b 12SHA1 (patch-ao) = dca396744edc5c0f86c8912bf54347a630cd865b
13SHA1 (patch-au) = a2cefb240d91121315d02104416324c971af6a20 13SHA1 (patch-au) = a2cefb240d91121315d02104416324c971af6a20
14SHA1 (patch-av) = dcbcd47a50b56d1fd8b5e5594b94a155c52d5e39 14SHA1 (patch-av) = dcbcd47a50b56d1fd8b5e5594b94a155c52d5e39
15SHA1 (patch-aw) = 598e4710c426110012048946786a6d72f050e0fc 15SHA1 (patch-aw) = 598e4710c426110012048946786a6d72f050e0fc

cvs diff -r1.2 -r1.3 pkgsrc/lang/python31/patches/Attic/patch-am (switch to unified diff)

--- pkgsrc/lang/python31/patches/Attic/patch-am 2011/09/10 11:23:12 1.2
+++ pkgsrc/lang/python31/patches/Attic/patch-am 2011/10/18 21:59:18 1.3
@@ -1,69 +1,98 @@ @@ -1,69 +1,98 @@
1$NetBSD: patch-am,v 1.2 2011/09/10 11:23:12 obache Exp $ 1$NetBSD: patch-am,v 1.3 2011/10/18 21:59:18 sbd Exp $
2 2
3--- setup.py.orig 2011-06-11 15:48:52.000000000 +0000 3--- setup.py.orig 2011-06-11 15:48:52.000000000 +0000
4+++ setup.py 4+++ setup.py
5@@ -17,7 +17,7 @@ from distutils.command.install_lib impor 5@@ -17,7 +17,7 @@ from distutils.command.install_lib impor
6 from distutils.spawn import find_executable 6 from distutils.spawn import find_executable
7  7
8 # This global variable is used to hold the list of modules to be disabled. 8 # This global variable is used to hold the list of modules to be disabled.
9-disabled_module_list = [] 9-disabled_module_list = []
10+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_elementtree", "_sqlite3", "_tkinter", "_gdbm", "pyexpat", "readline"] 10+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_elementtree", "_sqlite3", "_tkinter", "_gdbm", "pyexpat", "readline"]
11  11
12 def add_dir_to_list(dirlist, dir): 12 def add_dir_to_list(dirlist, dir):
13 """Add the directory 'dir' to the list 'dirlist' (at the front) if 13 """Add the directory 'dir' to the list 'dirlist' (at the front) if
14@@ -362,9 +362,15 @@ class PyBuildExt(build_ext): 14@@ -362,9 +362,15 @@ class PyBuildExt(build_ext):
15 os.unlink(tmpfile) 15 os.unlink(tmpfile)
16  16
17 def detect_modules(self): 17 def detect_modules(self):
18- # Ensure that /usr/local is always used 18- # Ensure that /usr/local is always used
19- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') 19- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
20- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') 20- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
21+ # Add the buildlink directories for pkgsrc 21+ # Add the buildlink directories for pkgsrc
22+ if os.environ.get('BUILDLINK_DIR'): 22+ if os.environ.get('BUILDLINK_DIR'):
23+ dir = os.environ['BUILDLINK_DIR'] 23+ dir = os.environ['BUILDLINK_DIR']
24+ libdir = dir + '/lib' 24+ libdir = dir + '/lib'
25+ incdir = dir + '/include' 25+ incdir = dir + '/include'
26+ if libdir not in self.compiler.library_dirs: 26+ if libdir not in self.compiler.library_dirs:
27+ self.compiler.library_dirs.insert(0, libdir) 27+ self.compiler.library_dirs.insert(0, libdir)
28+ if incdir not in self.compiler.include_dirs: 28+ if incdir not in self.compiler.include_dirs:
29+ self.compiler.include_dirs.insert(0, incdir) 29+ self.compiler.include_dirs.insert(0, incdir)
30 self.add_multiarch_paths() 30 self.add_multiarch_paths()
31  31
32 # Add paths specified in the environment variables LDFLAGS and 32 # Add paths specified in the environment variables LDFLAGS and
33@@ -674,9 +680,7 @@ class PyBuildExt(build_ext): 33@@ -674,9 +680,7 @@ class PyBuildExt(build_ext):
34 if krb5_h: 34 if krb5_h:
35 ssl_incs += krb5_h 35 ssl_incs += krb5_h
36 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, 36 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
37- ['/usr/local/ssl/lib', 37- ['/usr/local/ssl/lib',
38- '/usr/contrib/ssl/lib/' 38- '/usr/contrib/ssl/lib/'
39- ] ) 39- ] )
40+ [] ) 40+ [] )
41  41
42 if (ssl_incs is not None and 42 if (ssl_incs is not None and
43 ssl_libs is not None): 43 ssl_libs is not None):
44@@ -1315,6 +1319,14 @@ class PyBuildExt(build_ext): 44@@ -1054,13 +1058,15 @@ class PyBuildExt(build_ext):
 45 ndbm_libs = ['ndbm']
 46 else:
 47 ndbm_libs = []
 48- print("building dbm using ndbm")
 49- dbmext = Extension('_dbm', ['_dbmmodule.c'],
 50+ if not self.compiler.find_library_file(lib_dirs,
 51+ 'gdbm'):
 52+ print("building dbm using ndbm")
 53+ dbmext = Extension('_dbm', ['_dbmmodule.c'],
 54 define_macros=[
 55 ('HAVE_NDBM_H',None),
 56 ],
 57 libraries=ndbm_libs)
 58- break
 59+ break
 60
 61 elif cand == "gdbm":
 62 if self.compiler.find_library_file(lib_dirs, 'gdbm'):
 63@@ -1085,7 +1091,8 @@ class PyBuildExt(build_ext):
 64 ],
 65 libraries = gdbm_libs)
 66 break
 67- elif cand == "bdb":
 68+
 69+ if cand == "bdb" and dbmext is None:
 70 if db_incs is not None:
 71 print("building dbm using bdb")
 72 dbmext = Extension('_dbm', ['_dbmmodule.c'],
 73@@ -1315,6 +1322,14 @@ class PyBuildExt(build_ext):
45 macros = dict() 74 macros = dict()
46 libraries = [] 75 libraries = []
47  76
48+ elif platform.startswith('dragonfly'): 77+ elif platform.startswith('dragonfly'):
49+ macros = dict( 78+ macros = dict(
50+ HAVE_SEM_OPEN=0, 79+ HAVE_SEM_OPEN=0,
51+ HAVE_SEM_TIMEDWAIT=0, 80+ HAVE_SEM_TIMEDWAIT=0,
52+ HAVE_FD_TRANSFER=1, 81+ HAVE_FD_TRANSFER=1,
53+ ) 82+ )
54+ libraries = [] 83+ libraries = []
55+ 84+
56 else: # Linux and other unices 85 else: # Linux and other unices
57 macros = dict() 86 macros = dict()
58 libraries = ['rt'] 87 libraries = ['rt']
59@@ -1831,8 +1843,8 @@ def main(): 88@@ -1831,8 +1846,8 @@ def main():
60 # called unless there's at least one extension module defined. 89 # called unless there's at least one extension module defined.
61 ext_modules=[Extension('_struct', ['_struct.c'])], 90 ext_modules=[Extension('_struct', ['_struct.c'])],
62  91
63- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3", 92- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
64- "Tools/scripts/2to3"] 93- "Tools/scripts/2to3"]
65+ scripts = ["Tools/scripts/pydoc3.1", "Tools/scripts/idle3", 94+ scripts = ["Tools/scripts/pydoc3.1", "Tools/scripts/idle3",
66+ "Tools/scripts/2to3-3.1"] 95+ "Tools/scripts/2to3-3.1"]
67 ) 96 )
68  97
69 # --install-platlib 98 # --install-platlib

cvs diff -r1.57 -r1.58 pkgsrc/security/cyrus-sasl/Makefile (switch to unified diff)

--- pkgsrc/security/cyrus-sasl/Makefile 2011/09/17 11:32:02 1.57
+++ pkgsrc/security/cyrus-sasl/Makefile 2011/10/18 21:59:18 1.58
@@ -1,86 +1,86 @@ @@ -1,86 +1,86 @@
1# $NetBSD: Makefile,v 1.57 2011/09/17 11:32:02 obache Exp $ 1# $NetBSD: Makefile,v 1.58 2011/10/18 21:59:18 sbd Exp $
2 2
3SVR4_PKGNAME= csasl 3SVR4_PKGNAME= csasl
4COMMENT= Simple Authentication and Security Layer 4COMMENT= Simple Authentication and Security Layer
5 5
6PKG_DESTDIR_SUPPORT= user-destdir 6PKG_DESTDIR_SUPPORT= user-destdir
7 7
8.include "Makefile.common" 8.include "Makefile.common"
9 9
10.if exists(/usr/include/ndbm.h) 10.if exists(/usr/include/ndbm.h) && ${OPSYS} != "Linux"
11SASL_DBTYPE?= ndbm 11SASL_DBTYPE?= ndbm
12.else 12.else
13SASL_DBTYPE?= berkeley 13SASL_DBTYPE?= berkeley
14.endif 14.endif
15BUILD_DEFS+= SASL_DBTYPE 15BUILD_DEFS+= SASL_DBTYPE
16 16
17.if ${SASL_DBTYPE} == "berkeley" 17.if ${SASL_DBTYPE} == "berkeley"
18BDB_ACCEPTED= db3 db4 18BDB_ACCEPTED= db3 db4
19. include "../../mk/bdb.buildlink3.mk" 19. include "../../mk/bdb.buildlink3.mk"
20CONFIGURE_ENV+= with_bdb=${BDB_TYPE} 20CONFIGURE_ENV+= with_bdb=${BDB_TYPE}
21.endif 21.endif
22 22
23CONFIGURE_ARGS+= --with-dblib=${SASL_DBTYPE:Q} 23CONFIGURE_ARGS+= --with-dblib=${SASL_DBTYPE:Q}
24CONFIGURE_ARGS+= --with-dbpath=${PKG_SYSCONFDIR}/sasldb 24CONFIGURE_ARGS+= --with-dbpath=${PKG_SYSCONFDIR}/sasldb
25 25
26BUILD_DEFS+= VARBASE 26BUILD_DEFS+= VARBASE
27 27
28# Support using Cyrus saslauthd (security/cyrus-saslauthd) for plaintext 28# Support using Cyrus saslauthd (security/cyrus-saslauthd) for plaintext
29# password authentication. 29# password authentication.
30# 30#
31SASLSOCKETDIR?= ${VARBASE}/run/saslauthd 31SASLSOCKETDIR?= ${VARBASE}/run/saslauthd
32CONFIGURE_ARGS+= --with-saslauthd=${SASLSOCKETDIR:Q} 32CONFIGURE_ARGS+= --with-saslauthd=${SASLSOCKETDIR:Q}
33BUILD_DEFS+= SASLSOCKETDIR 33BUILD_DEFS+= SASLSOCKETDIR
34# let not to build & install saslauthd here. 34# let not to build & install saslauthd here.
35SUBST_CLASSES+= saslauthd 35SUBST_CLASSES+= saslauthd
36SUBST_STAGE.saslauthd= pre-configure 36SUBST_STAGE.saslauthd= pre-configure
37SUBST_FILES.saslauthd= Makefile.in 37SUBST_FILES.saslauthd= Makefile.in
38SUBST_SED.saslauthd= -e 's|@SASLAUTHD_TRUE@|\#|g' 38SUBST_SED.saslauthd= -e 's|@SASLAUTHD_TRUE@|\#|g'
39SUBST_SED.saslauthd+= -e 's|@SASLAUTHD_FALSE@||g' 39SUBST_SED.saslauthd+= -e 's|@SASLAUTHD_FALSE@||g'
40 40
41# Support using the Courier authdaemond (security/courier-authlib) for 41# Support using the Courier authdaemond (security/courier-authlib) for
42# plaintext password authentication. 42# plaintext password authentication.
43# 43#
44AUTHDAEMONVAR?= ${VARBASE}/authdaemon 44AUTHDAEMONVAR?= ${VARBASE}/authdaemon
45CONFIGURE_ARGS+= --with-authdaemond=${AUTHDAEMONVAR}/socket 45CONFIGURE_ARGS+= --with-authdaemond=${AUTHDAEMONVAR}/socket
46BUILD_DEFS+= AUTHDAEMONVAR 46BUILD_DEFS+= AUTHDAEMONVAR
47 47
48# Support using APOP against a POP server for plaintext password 48# Support using APOP against a POP server for plaintext password
49# authentication. 49# authentication.
50# 50#
51CONFIGURE_ARGS+= --enable-checkapop 51CONFIGURE_ARGS+= --enable-checkapop
52 52
53.if exists(/dev/urandom) 53.if exists(/dev/urandom)
54SASL_ENTROPY_SOURCE?= /dev/urandom 54SASL_ENTROPY_SOURCE?= /dev/urandom
55.endif 55.endif
56.if defined(SASL_ENTROPY_SOURCE) 56.if defined(SASL_ENTROPY_SOURCE)
57CONFIGURE_ARGS+= --with-devrandom=${SASL_ENTROPY_SOURCE:Q} 57CONFIGURE_ARGS+= --with-devrandom=${SASL_ENTROPY_SOURCE:Q}
58.endif 58.endif
59BUILD_DEFS+= SASL_ENTROPY_SOURCE 59BUILD_DEFS+= SASL_ENTROPY_SOURCE
60 60
61# Let not to build sample codes. 61# Let not to build sample codes.
62CONFIGURE_ARGS+= --disable-sample 62CONFIGURE_ARGS+= --disable-sample
63 63
64# CYRUS_USER username of the Cyrus administrator 64# CYRUS_USER username of the Cyrus administrator
65# CYRUS_GROUP group of the Cyrus administrator 65# CYRUS_GROUP group of the Cyrus administrator
66# 66#
67CYRUS_USER?= cyrus 67CYRUS_USER?= cyrus
68CYRUS_GROUP?= mail 68CYRUS_GROUP?= mail
69FILES_SUBST+= CYRUS_USER=${CYRUS_USER:Q} 69FILES_SUBST+= CYRUS_USER=${CYRUS_USER:Q}
70FILES_SUBST+= ROOT_USER=${ROOT_USER:Q} 70FILES_SUBST+= ROOT_USER=${ROOT_USER:Q}
71PKG_GROUPS_VARS+= CYRUS_GROUP 71PKG_GROUPS_VARS+= CYRUS_GROUP
72PKG_USERS_VARS+= CYRUS_USER 72PKG_USERS_VARS+= CYRUS_USER
73 73
74PKG_GROUPS= ${CYRUS_GROUP} 74PKG_GROUPS= ${CYRUS_GROUP}
75PKG_USERS= ${CYRUS_USER}:${CYRUS_GROUP} 75PKG_USERS= ${CYRUS_USER}:${CYRUS_GROUP}
76PKG_SHELL.${CYRUS_USER}=${SH} 76PKG_SHELL.${CYRUS_USER}=${SH}
77 77
78MESSAGE_SUBST+= PLUGINDIR=${PLUGINDIR:Q} 78MESSAGE_SUBST+= PLUGINDIR=${PLUGINDIR:Q}
79 79
80post-install: 80post-install:
81 ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR} 81 ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}
82 cd ${WRKSRC}/doc; for file in *.fig *.html *.txt; do \ 82 cd ${WRKSRC}/doc; for file in *.fig *.html *.txt; do \
83 ${INSTALL_DATA} $${file} ${DESTDIR}${DOCDIR}; \ 83 ${INSTALL_DATA} $${file} ${DESTDIR}${DOCDIR}; \
84 done 84 done
85 85
86.include "../../mk/bsd.pkg.mk" 86.include "../../mk/bsd.pkg.mk"