spack/var/spack/repos/builtin/packages/meson/rpath-0.49.patch

21 lines
589 B
Diff
Raw Normal View History

--- a/mesonbuild/scripts/depfixer.py
+++ b/mesonbuild/scripts/depfixer.py
@@ -15,6 +15,7 @@
import sys, struct
import shutil, subprocess
+import os
from ..mesonlib import OrderedSet
@@ -429,6 +430,9 @@ def fix_jar(fname):
subprocess.check_call(['jar', 'ufm', fname, 'META-INF/MANIFEST.MF'])
def fix_rpath(fname, new_rpath, final_path, install_name_mappings, verbose=True):
+ # Do not strip rpath when run from within Spack
+ if 'SPACK_RPATH_DIRS' in os.environ:
+ return
# Static libraries never have rpaths
if fname.endswith('.a'):
return