Blame SOURCES/00001-rpath.patch

09e27f
From 8ecb6d320c03242ca94bf2e99d9d80510d5011e1 Mon Sep 17 00:00:00 2001
09e27f
From: David Malcolm <dmalcolm@redhat.com>
09e27f
Date: Wed, 13 Jan 2010 21:25:18 +0000
09e27f
Subject: [PATCH] 00001: Fixup distutils/unixccompiler.py to remove standard
09e27f
 library path from rpath Was Patch0 in ivazquez' python3000 specfile
09e27f
09e27f
---
09e27f
 Lib/distutils/unixccompiler.py | 9 +++++++++
09e27f
 1 file changed, 9 insertions(+)
09e27f
09e27f
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
09e27f
index d10a78da31..4df4b67810 100644
09e27f
--- a/Lib/distutils/unixccompiler.py
09e27f
+++ b/Lib/distutils/unixccompiler.py
09e27f
@@ -82,6 +82,15 @@ class UnixCCompiler(CCompiler):
09e27f
     if sys.platform == "cygwin":
09e27f
         exe_extension = ".exe"
09e27f
 
09e27f
+    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
09e27f
+        """Remove standard library path from rpath"""
09e27f
+        libraries, library_dirs, runtime_library_dirs = super()._fix_lib_args(
09e27f
+            libraries, library_dirs, runtime_library_dirs)
09e27f
+        libdir = sysconfig.get_config_var('LIBDIR')
09e27f
+        if runtime_library_dirs and (libdir in runtime_library_dirs):
09e27f
+            runtime_library_dirs.remove(libdir)
09e27f
+        return libraries, library_dirs, runtime_library_dirs
09e27f
+
09e27f
     def preprocess(self, source, output_file=None, macros=None,
09e27f
                    include_dirs=None, extra_preargs=None, extra_postargs=None):
09e27f
         fixed_args = self._fix_compile_args(None, macros, include_dirs)
09e27f
-- 
09e27f
2.21.0
09e27f