[packages] remove xyssl package, it's discontinued upstream and replaced by polarssl
[packages.git] / lang / python / patches / 001-cross-compile.patch
1 Index: Python-2.5.1/setup.py
2 ===================================================================
3 --- Python-2.5.1.orig/setup.py  2007-07-30 12:55:24.000000000 -0500
4 +++ Python-2.5.1/setup.py       2007-07-30 12:57:03.000000000 -0500
5 @@ -244,7 +244,18 @@
6          return sys.platform
7  
8      def detect_modules(self):
9 -        # Ensure that /usr/local is always used
10 +        try:
11 +            modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
12 +        except KeyError:
13 +            modules_include_dirs = ['/usr/include']
14 +        try:
15 +            modules_lib_dirs = os.environ["PYTHON_MODULES_LIB"].split()
16 +        except KeyError:
17 +            modules_lib_dirs = ['/usr/lib']
18 +        for dir in modules_include_dirs:
19 +                add_dir_to_list(self.compiler.include_dirs, dir)
20 +        for dir in modules_lib_dirs:
21 +                add_dir_to_list(self.compiler.library_dirs, dir)
22  
23          # Add paths specified in the environment variables LDFLAGS and
24          # CPPFLAGS for header and library files.
25 @@ -286,11 +297,8 @@
26          # lib_dirs and inc_dirs are used to search for files;
27          # if a file is found in one of those directories, it can
28          # be assumed that no additional -I,-L directives are needed.
29 -        lib_dirs = self.compiler.library_dirs + [
30 -            '/lib64', '/usr/lib64',
31 -            '/lib', '/usr/lib',
32 -            ]
33 -        inc_dirs = self.compiler.include_dirs + ['/usr/include']
34 +        lib_dirs = self.compiler.library_dirs
35 +        inc_dirs = self.compiler.include_dirs
36          exts = []
37  
38          config_h = sysconfig.get_config_h_filename()