fix %ghc_fix_rpath for ghc-7.10
This commit is contained in:
parent
7855aaa8f1
commit
38f99a79b3
@ -36,6 +36,8 @@ Requires: ghc-compiler
|
|||||||
Requires: hscolour
|
Requires: hscolour
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
# this package could now be noarch again
|
||||||
|
#BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A set of macros for building GHC packages following the Haskell Guidelines
|
A set of macros for building GHC packages following the Haskell Guidelines
|
||||||
|
@ -172,8 +172,14 @@ for lib in %*; do\
|
|||||||
rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\
|
rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\
|
||||||
case $rpath in\
|
case $rpath in\
|
||||||
*$PWD/$lib/dist/build*)\
|
*$PWD/$lib/dist/build*)\
|
||||||
|
case %{ghc_version} in\
|
||||||
|
7.10.*)\
|
||||||
|
pkgid=$(cd %{buildroot}%{ghclibdir}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\
|
||||||
|
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $pkgid library-dirs) ;;\
|
||||||
|
*)\
|
||||||
pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\
|
pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\
|
||||||
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid)\
|
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\
|
||||||
|
esac\
|
||||||
newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g")\
|
newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g")\
|
||||||
chrpath -r $newrpath $i\
|
chrpath -r $newrpath $i\
|
||||||
;;\
|
;;\
|
||||||
|
Loading…
Reference in New Issue
Block a user