summaryrefslogtreecommitdiff
blob: 61ca31f58a53a07b94a45b472602928b2fd18d23 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
diff -Naurp Python-2.4.orig/Lib/distutils/command/install.py Python-2.4/Lib/distutils/command/install.py
--- Python-2.4.orig/Lib/distutils/command/install.py	2004-11-10 14:23:15.000000000 -0800
+++ Python-2.4/Lib/distutils/command/install.py	2005-02-07 12:13:14.000000000 -0800
@@ -39,14 +39,14 @@ else:
 INSTALL_SCHEMES = {
     'unix_prefix': {
         'purelib': '$base/lib/python$py_version_short/site-packages',
-        'platlib': '$platbase/lib/python$py_version_short/site-packages',
+        'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
         'headers': '$base/include/python$py_version_short/$dist_name',
         'scripts': '$base/bin',
         'data'   : '$base',
         },
     'unix_home': {
         'purelib': '$base/lib/python',
-        'platlib': '$base/lib/python',
+        'platlib': '$base/@@GENTOO_LIBDIR@@/python',
         'headers': '$base/include/python/$dist_name',
         'scripts': '$base/bin',
         'data'   : '$base',
diff -Naurp Python-2.4.orig/Lib/distutils/sysconfig.py Python-2.4/Lib/distutils/sysconfig.py
--- Python-2.4.orig/Lib/distutils/sysconfig.py	2004-10-13 08:54:16.000000000 -0700
+++ Python-2.4/Lib/distutils/sysconfig.py	2005-02-07 12:16:17.000000000 -0800
@@ -99,8 +99,12 @@ def get_python_lib(plat_specific=0, stan
         prefix = plat_specific and EXEC_PREFIX or PREFIX
 
     if os.name == "posix":
+        if plat_specific:
+            lib = "@@GENTOO_LIBDIR@@"
+        else:
+            lib = "lib"
         libpython = os.path.join(prefix,
-                                 "lib", "python" + get_python_version())
+                                 lib, "python" + get_python_version())
         if standard_lib:
             return libpython
         else:
diff -Naurp Python-2.4.orig/Lib/site.py Python-2.4/Lib/site.py
--- Python-2.4.orig/Lib/site.py	2004-07-19 19:28:28.000000000 -0700
+++ Python-2.4/Lib/site.py	2005-02-07 12:17:13.000000000 -0800
@@ -179,9 +179,14 @@ def addsitepackages(known_paths):
                 sitedirs = [os.path.join(prefix, "Lib", "site-packages")]
             elif os.sep == '/':
                 sitedirs = [os.path.join(prefix,
+                                         "@@GENTOO_LIBDIR@@",
+                                         "python" + sys.version[:3],
+                                         "site-packages"),
+                            os.path.join(prefix,
                                          "lib",
                                          "python" + sys.version[:3],
                                          "site-packages"),
+                                                       os.path.join(prefix, "lib64", "site-python"),
                             os.path.join(prefix, "lib", "site-python")]
             else:
                 sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
diff -Naurp Python-2.4.orig/Makefile.pre.in Python-2.4/Makefile.pre.in
--- Python-2.4.orig/Makefile.pre.in	2004-09-26 10:26:55.000000000 -0700
+++ Python-2.4/Makefile.pre.in	2005-02-07 12:18:39.000000000 -0800
@@ -79,7 +79,7 @@ exec_prefix=	@exec_prefix@
 
 # Expanded directories
 BINDIR=		$(exec_prefix)/bin
-LIBDIR=		$(exec_prefix)/lib
+LIBDIR=		$(exec_prefix)/@@GENTOO_LIBDIR@@
 MANDIR=		@mandir@
 INCLUDEDIR=	@includedir@
 CONFINCLUDEDIR=	$(exec_prefix)/include
diff -Naurp Python-2.4.orig/Modules/Setup.dist Python-2.4/Modules/Setup.dist
--- Python-2.4.orig/Modules/Setup.dist	2004-08-31 06:50:12.000000000 -0700
+++ Python-2.4/Modules/Setup.dist	2005-02-07 12:19:48.000000000 -0800
@@ -325,7 +325,7 @@ GLHACK=-Dclear=__GLclear
 # *** Uncomment and edit to reflect your Tcl/Tk versions:
 #	-ltk8.2 -ltcl8.2 \
 # *** Uncomment and edit to reflect where your X11 libraries are:
-#	-L/usr/X11R6/lib \
+# 	-L/usr/X11R6/lib \
 # *** Or uncomment this for Solaris:
 #	-L/usr/openwin/lib \
 # *** Uncomment these for TOGL extension only:
@@ -396,7 +396,7 @@ GLHACK=-Dclear=__GLclear
 #DB=/usr/local/BerkeleyDB.4.0
 #DBLIBVER=4.0
 #DBINC=$(DB)/include
-#DBLIB=$(DB)/lib
+DBLIB=$(DB)/@@GENTOO_LIBDIR@@
 #_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
 
 # Historical Berkeley DB 1.85
@@ -442,7 +442,7 @@ GLHACK=-Dclear=__GLclear
 # Andrew Kuchling's zlib module.
 # This require zlib 1.1.3 (or later).
 # See http://www.gzip.org/zlib/
-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
 
 # Interface to the Expat XML parser
 #
diff -Naurp Python-2.4.orig/Modules/getpath.c Python-2.4/Modules/getpath.c
--- Python-2.4.orig/Modules/getpath.c	2004-08-07 18:00:47.000000000 -0700
+++ Python-2.4/Modules/getpath.c	2005-02-07 12:22:15.137580048 -0800
@@ -113,7 +113,7 @@
 
 #ifndef PYTHONPATH
 #define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
-              EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
+              EXEC_PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION "/lib-dynload"
 #endif
 
 #ifndef LANDMARK
@@ -525,7 +525,7 @@ calculate_path(void)
             fprintf(stderr,
                 "Could not find platform dependent libraries <exec_prefix>\n");
         strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
-        joinpath(exec_prefix, "lib/lib-dynload");
+        joinpath(exec_prefix, "@@GENTOO_LIBDIR@@/lib-dynload");
     }
     /* If we found EXEC_PREFIX do *not* reduce it!  (Yet.) */
 
diff -Naurp Python-2.4.orig/setup.py Python-2.4/setup.py
--- Python-2.4.orig/setup.py	2005-02-07 12:11:30.000000000 -0800
+++ Python-2.4/setup.py	2005-02-07 12:25:21.746978894 -0800
@@ -248,6 +248,7 @@ class PyBuildExt(build_ext):
         global disable_ssl
         # Ensure that /usr/local is always used
         add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+        add_dir_to_list(self.compiler.library_dirs, '/usr/local/@@GENTOO_LIBDIR@@')
         add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
 
         # Add paths to popular package managers on OS X/darwin
@@ -274,7 +275,7 @@ class PyBuildExt(build_ext):
         # if a file is found in one of those directories, it can
         # be assumed that no additional -I,-L directives are needed.
         lib_dirs = self.compiler.library_dirs + [
-            '/lib64', '/usr/lib64',
+            '/@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@',
             '/lib', '/usr/lib',
             ]
         inc_dirs = self.compiler.include_dirs + ['/usr/include']
@@ -437,11 +438,11 @@ class PyBuildExt(build_ext):
             elif self.compiler.find_library_file(lib_dirs, 'curses'):
                 readline_libs.append('curses')
             elif self.compiler.find_library_file(lib_dirs +
-                                               ['/usr/lib/termcap'],
+                                               ['/usr/@@GENTOO_LIBDIR@@/termcap'],
                                                'termcap'):
                 readline_libs.append('termcap')
             exts.append( Extension('readline', ['readline.c'],
-                                   library_dirs=['/usr/lib/termcap'],
+                                   library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'],
                                    libraries=readline_libs) )
         if platform not in ['mac']:
             # crypt module.
@@ -507,7 +508,7 @@ class PyBuildExt(build_ext):
                                 '/usr/local/BerkeleyDB.4.0/lib',
                                 '/usr/local/lib',
                                 '/opt/sfw',
-                                '/sw/lib',
+                                '/sw/libi64',
                                 ),
                     'incdirs': ('/usr/include/db4.2',
                                 '/usr/include/db4.1',
@@ -996,7 +997,7 @@ class PyBuildExt(build_ext):
             added_lib_dirs.append('/usr/openwin/lib')
         elif os.path.exists('/usr/X11R6/include'):
             include_dirs.append('/usr/X11R6/include')
-            added_lib_dirs.append('/usr/X11R6/lib64')
+            added_lib_dirs.append('/usr/X11R6/lib')
             added_lib_dirs.append('/usr/X11R6/lib')
         elif os.path.exists('/usr/X11R5/include'):
             include_dirs.append('/usr/X11R5/include')