Ticket #62391: patch-fix-scanner-in-build-execution.diff
File patch-fix-scanner-in-build-execution.diff, 3.4 KB (added by VinDuv, 4 years ago) |
---|
-
giscanner/ccompiler.py
old new 184 184 if os.name == 'nt': 185 185 runtime_path_envvar = ['LIB', 'PATH'] 186 186 else: 187 runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] 187 if sys.platform == "darwin": 188 runtime_path_envvar = ['DYLD_LIBRARY_PATH'] 189 else: 190 runtime_path_envvar = ['LD_LIBRARY_PATH'] 188 191 # Search the current directory first 189 192 # (This flag is not supported nor needed for Visual C++) 190 193 args.append('-L.') -
giscanner/dumper.py
old new 236 236 237 237 args.extend(sources) 238 238 239 pkg_config_libs = pkgconfig.libs(self._packages, 240 msvc_syntax=self._compiler.check_is_msvc()) 239 pkg_config_libs, pkg_config_libs_only_L = pkgconfig.libs( 240 self._packages, msvc_syntax=self._compiler.check_is_msvc()) 241 this_L = [lib[len('-L'):] for lib in pkg_config_libs_only_L] 242 243 # uniquely merge pkg_config and options library paths 244 # set() returns them in random order, so sort them for predictiveness 245 library_paths = sorted (set().union (self._options.library_paths, 246 this_L)) 247 248 # remove anything in LIBRARY_PATH 249 env_LIBRARY_PATH = os.environ['LIBRARY_PATH'].split(':') if \ 250 'LIBRARY_PATH' in os.environ else [] 251 library_paths = [l for l in library_paths if l not in env_LIBRARY_PATH] 252 253 if os.name == 'nt': 254 runtime_path_envvar = ['LIB', 'PATH'] 255 else: 256 runtime_path_envvar = ['LIBRARY_PATH'] 257 for envvar in runtime_path_envvar: 258 os.environ[envvar] = os.pathsep.join \ 259 (sorted (set().union (os.environ[envvar].split(':'), this_L))) \ 260 if envvar in os.environ else os.pathsep.join(this_L) 241 261 242 262 if not self._options.external_library: 243 263 self._compiler.get_internal_link_flags(args, 244 264 libtool, 245 265 self._options.libraries, 246 266 self._options.extra_libraries, 247 self._options.library_paths)267 library_paths) 248 268 args.extend(pkg_config_libs) 249 269 250 270 else: -
giscanner/pkgconfig.py
old new 52 52 53 53 def libs(packages, msvc_syntax=False, ignore_errors=True, command=None): 54 54 flags = ['--msvc-syntax'] if msvc_syntax else [] 55 flags.append('--libs') 55 flags.append('--libs-only-l') 56 flags.append('--libs-only-other') 56 57 flags.extend(packages) 57 out = check_output(flags, ignore_errors, command) 58 return shlex.split(out) 58 out_libs_only_not_L = shlex.split(check_output(flags, ignore_errors, command)) 59 flags = ['--msvc-syntax'] if msvc_syntax else [] 60 flags.append('--libs-only-L') 61 flags.extend(packages) 62 out_libs_only_L = shlex.split(check_output(flags, ignore_errors, command)) 63 return out_libs_only_not_L, out_libs_only_L