|
|
@ -167,7 +167,7 @@ fi\
|
|
|
|
%{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\
|
|
|
|
%{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\
|
|
|
|
%{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\
|
|
|
|
%{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\
|
|
|
|
%cabal_install\
|
|
|
|
%cabal_install\
|
|
|
|
%{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\
|
|
|
|
%ghc_fix_rpaths\
|
|
|
|
%{nil}
|
|
|
|
%{nil}
|
|
|
|
|
|
|
|
|
|
|
|
# ghc_lib_install [name] [version]
|
|
|
|
# ghc_lib_install [name] [version]
|
|
|
@ -178,47 +178,22 @@ fi\
|
|
|
|
%cabal_install\
|
|
|
|
%cabal_install\
|
|
|
|
%cabal_pkg_conf %{?1} %{?2}\
|
|
|
|
%cabal_pkg_conf %{?1} %{?2}\
|
|
|
|
%ghc_gen_filelists %{?1} %{?2}\
|
|
|
|
%ghc_gen_filelists %{?1} %{?2}\
|
|
|
|
%{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\
|
|
|
|
%ghc_fix_rpaths\
|
|
|
|
%{nil}
|
|
|
|
%{nil}
|
|
|
|
|
|
|
|
|
|
|
|
# ghc_fix_rpath lib-ver ...
|
|
|
|
# ghc_fix_rpaths
|
|
|
|
%ghc_fix_rpath()\
|
|
|
|
%ghc_fix_rpaths\
|
|
|
|
%if %{undefined disable_ghc_fix_rpath}\
|
|
|
|
%if %{undefined disable_ghc_fix_rpaths}\
|
|
|
|
|
|
|
|
echo "running ghc_fix_rpaths:"\
|
|
|
|
if ! type chrpath > /dev/null; then exit 1; fi\
|
|
|
|
if ! type chrpath > /dev/null; then exit 1; fi\
|
|
|
|
echo "ghc_fix_rpath %*"\
|
|
|
|
|
|
|
|
for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\
|
|
|
|
for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\
|
|
|
|
for lib in %*; do\
|
|
|
|
|
|
|
|
if [ -x "$i" ]; then\
|
|
|
|
if [ -x "$i" ]; then\
|
|
|
|
rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\
|
|
|
|
|
|
|
|
case $rpath in\
|
|
|
|
|
|
|
|
*$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} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $pkgid library-dirs) ;;\
|
|
|
|
|
|
|
|
8.0)\
|
|
|
|
|
|
|
|
pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\
|
|
|
|
|
|
|
|
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\
|
|
|
|
|
|
|
|
*)\
|
|
|
|
|
|
|
|
syspath="" ;;\
|
|
|
|
|
|
|
|
esac\
|
|
|
|
|
|
|
|
newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g" -e "s/::/:/" -e "s/^://" -e "s/:$//")\
|
|
|
|
|
|
|
|
if [ "$newrpath" = "%{_libdir}" ]; then\
|
|
|
|
|
|
|
|
chrpath -d $i\
|
|
|
|
chrpath -d $i\
|
|
|
|
else\
|
|
|
|
|
|
|
|
chrpath -r $newrpath $i\
|
|
|
|
|
|
|
|
fi\
|
|
|
|
|
|
|
|
;;\
|
|
|
|
|
|
|
|
%{_libdir})\
|
|
|
|
|
|
|
|
chrpath -d $i\
|
|
|
|
|
|
|
|
;;\
|
|
|
|
|
|
|
|
esac\
|
|
|
|
|
|
|
|
else\
|
|
|
|
else\
|
|
|
|
echo "%%ghc_fix_rpath: no $i executable"\
|
|
|
|
echo "%%ghc_fix_rpath: no $i executable"\
|
|
|
|
exit 1\
|
|
|
|
exit 1\
|
|
|
|
fi\
|
|
|
|
fi\
|
|
|
|
done\
|
|
|
|
done\
|
|
|
|
done\
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
# deprecated for f31
|
|
|
|
# deprecated for f31
|
|
|
|