From d88e1ae4dd79ed302569d27f82b2c3fa3c5f51a5 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 22 Apr 2020 17:01:13 -0700 Subject: [PATCH] meson: fix rpath handling This was uncovered with glib2 where the host builds were linking to the actual host instead of the generated libraries. Patch taken from buildroot. Signed-off-by: Rosen Penev --- devel/meson/Makefile | 2 +- ...-RPATH-if-install_rpath-is-not-empty.patch | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 devel/meson/patches/010-Only-fix-RPATH-if-install_rpath-is-not-empty.patch diff --git a/devel/meson/Makefile b/devel/meson/Makefile index 5762ad773..6c06fefcc 100644 --- a/devel/meson/Makefile +++ b/devel/meson/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=meson PKG_VERSION:=0.54.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=meson PKG_HASH:=dde5726d778112acbd4a67bb3633ab2ee75d33d1e879a6283a7b4a44c3363c27 diff --git a/devel/meson/patches/010-Only-fix-RPATH-if-install_rpath-is-not-empty.patch b/devel/meson/patches/010-Only-fix-RPATH-if-install_rpath-is-not-empty.patch new file mode 100644 index 000000000..c5651d26f --- /dev/null +++ b/devel/meson/patches/010-Only-fix-RPATH-if-install_rpath-is-not-empty.patch @@ -0,0 +1,34 @@ +From 4db4fd79d9bb2b98cea1117f22b6c97942ab2ecd Mon Sep 17 00:00:00 2001 +From: Eric Le Bihan +Date: Sat, 14 Jul 2018 11:18:45 +0200 +Subject: [PATCH] Only fix RPATH if install_rpath is not empty + +Signed-off-by: Eric Le Bihan +[Fix: remove leftover from original/unconditional code] +Signed-off-by: Peter Seiderer +--- + mesonbuild/minstall.py | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py +index 8ac6aab1..7ef04116 100644 +--- a/mesonbuild/minstall.py ++++ b/mesonbuild/minstall.py +@@ -508,8 +508,14 @@ class Installer: + if file_copied: + self.did_install_something = True + try: +- depfixer.fix_rpath(outname, install_rpath, final_path, +- install_name_mappings, verbose=False) ++ # Buildroot check-host-rpath script expects RPATH ++ # But if install_rpath is empty, it will stripped. ++ # So, preserve it in this case ++ if install_rpath: ++ depfixer.fix_rpath(outname, install_rpath, final_path, ++ install_name_mappings, verbose=False) ++ else: ++ print("Skipping RPATH fixing") + except SystemExit as e: + if isinstance(e.code, int) and e.code == 0: + pass +