summaryrefslogtreecommitdiff
path: root/lang/python26/patches/patch-am
blob: 345da215129f46eabead8d475447981d9e36393d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
$NetBSD: patch-am,v 1.5 2009/07/18 10:41:33 wiz Exp $

--- setup.py.orig	2009-03-31 18:20:48.000000000 +0000
+++ setup.py
@@ -17,7 +17,7 @@ from distutils.command.install import in
 from distutils.command.install_lib import install_lib
 
 # This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
+disabled_module_list = ["_bsddb", "_curses", "_curses_panel", "_elementtree", "_sqlite", "_tkinter", "bsddb", "cjkcodecs" "gdbm", "mpz", "expat", "readline"]
 
 def add_dir_to_list(dirlist, dir):
     """Add the directory 'dir' to the list 'dirlist' (at the front) if
@@ -309,9 +309,15 @@ class PyBuildExt(build_ext):
         return sys.platform
 
     def detect_modules(self):
-        # Ensure that /usr/local is always used
-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+        # Add the buildlink directories for pkgsrc
+        if os.environ.has_key('BUILDLINK_DIR'):
+            dir = os.environ['BUILDLINK_DIR']
+            libdir = dir + '/lib'
+            incdir = dir + '/include'
+            if libdir not in self.compiler.library_dirs:
+                self.compiler.library_dirs.insert(0, libdir)
+            if incdir not in self.compiler.include_dirs:
+                self.compiler.include_dirs.insert(0, incdir)
 
         # Add paths specified in the environment variables LDFLAGS and
         # CPPFLAGS for header and library files.
@@ -626,9 +632,7 @@ class PyBuildExt(build_ext):
             if krb5_h:
                 ssl_incs += krb5_h
         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
-                                     ['/usr/local/ssl/lib',
-                                      '/usr/contrib/ssl/lib/'
-                                     ] )
+                                     [] )
 
         if (ssl_incs is not None and
             ssl_libs is not None):
@@ -1300,6 +1304,14 @@ class PyBuildExt(build_ext):
                 )
             libraries = []
 
+	elif platform.startswith('dragonfly'):
+	    macros = dict(
+		HAVE_SEM_OPEN=0,
+		HAVE_SEM_TIMEDWAIT=0,
+		HAVE_FD_TRANSFER=1,
+		)
+	    libraries = []
+
         else:                                   # Linux and other unices
             macros = dict(
                 HAVE_SEM_OPEN=1,
@@ -1891,9 +1903,9 @@ def main():
           ext_modules=[Extension('_struct', ['_struct.c'])],
 
           # Scripts to install
-          scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
+          scripts = ['Tools/scripts/pydoc2.6',
                      'Tools/scripts/2to3',
-                     'Lib/smtpd.py']
+                     'Lib/smtpd2.6.py']
         )
 
 # --install-platlib