0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 4db4fd79d9bb2b98cea1117f22b6c97942ab2ecd Mon Sep 17 00:00:00 2001
  2. From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
  3. Date: Sat, 14 Jul 2018 11:18:45 +0200
  4. Subject: [PATCH] Only fix RPATH if install_rpath is not empty
  5. Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
  6. [Fix: remove leftover from original/unconditional code]
  7. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  8. ---
  9. mesonbuild/minstall.py | 10 ++++++++--
  10. 1 file changed, 8 insertions(+), 2 deletions(-)
  11. diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
  12. index 8ac6aab1..7ef04116 100644
  13. --- a/mesonbuild/minstall.py
  14. +++ b/mesonbuild/minstall.py
  15. @@ -489,8 +489,14 @@ class Installer:
  16. printed_symlink_error = True
  17. if os.path.isfile(outname):
  18. try:
  19. - depfixer.fix_rpath(outname, install_rpath, final_path,
  20. - install_name_mappings, verbose=False)
  21. + # Buildroot check-host-rpath script expects RPATH
  22. + # But if install_rpath is empty, it will stripped.
  23. + # So, preserve it in this case
  24. + if install_rpath:
  25. + depfixer.fix_rpath(outname, install_rpath, final_path,
  26. + install_name_mappings, verbose=False)
  27. + else:
  28. + print("Skipping RPATH fixing")
  29. except SystemExit as e:
  30. if isinstance(e.code, int) and e.code == 0:
  31. pass
  32. --
  33. 2.20.1