Blame SOURCES/00001-rpath.patch

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