From 1862405783e3e0e8e82a185031ba74b53a9ead26 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 15 Jul 2019 16:33:38 +0000 Subject: [PATCH] %ghc_fix_rpath: remove _libdir --- macros.ghc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/macros.ghc b/macros.ghc index 29562cc..f20863c 100644 --- a/macros.ghc +++ b/macros.ghc @@ -157,6 +157,7 @@ fi\ # ghc_fix_rpath lib-ver ... %ghc_fix_rpath()\ +%if %{undefined disable_ghc_fix_rpath}\ if ! type chrpath > /dev/null; then exit 1; fi\ for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ for lib in %*; do\ @@ -175,7 +176,14 @@ for lib in %*; do\ syspath="" ;;\ esac\ newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g" -e "s/::/:/" -e "s/^://" -e "s/:$//")\ - chrpath -r $newrpath $i\ + if [ "$newrpath" = "%{_libdir}" ]; then\ + chrpath -d $i\ + else\ + chrpath -r $newrpath $i\ + fi\ + ;;\ + %{_libdir})\ + chrpath -d $i\ ;;\ esac\ else\ @@ -184,7 +192,7 @@ for lib in %*; do\ fi\ done\ done\ -%{nil} +%endif # deprecated for f31 %ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || :