projects/guix·blob ruby-team · refs

25 lines · 1.4 KiB

1Make sure the build system honors C_INCLUDE_PATH and LIBRARY_PATH when
2looking for headers and libraries.
3
4--- a/setup.py 2015-10-07 23:32:58.891329173 +0200
5+++ b/setup.py 2015-10-07 23:46:29.653349924 +0200
6@@ -676,15 +676,15 @@
7 # if a file is found in one of those directories, it can
8 # be assumed that no additional -I,-L directives are needed.
9 if not CROSS_COMPILING:
10- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs
11- self.inc_dirs = self.compiler.include_dirs + system_include_dirs
12+ self.lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep)
13+ self.inc_dirs = os.getenv('C_INCLUDE_PATH', '').split(os.pathsep)
14 else:
15 # Add the sysroot paths. 'sysroot' is a compiler option used to
16 # set the logical path of the standard system headers and
17 # libraries.
18- self.lib_dirs = (self.compiler.library_dirs +
19+ self.lib_dirs = (os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep) +
20 sysroot_paths(('LDFLAGS', 'CC'), system_lib_dirs))
21- self.inc_dirs = (self.compiler.include_dirs +
22+ self.inc_dirs = (os.getenv('CROSS_C_INCLUDE_PATH', '').split(os.pathsep) +
23 sysroot_paths(('CPPFLAGS', 'CFLAGS', 'CC'),
24 system_include_dirs))
25