fix RPATHs of cabal and happy dynamically linked to HP libs; use new ghc_devel_package -m option
This commit is contained in:
parent
4ecbdd4c79
commit
6657375e68
@ -23,7 +23,9 @@ URL: http://hackage.haskell.org/platform
|
||||
Source0: http://lambda.haskell.org/platform/download/%{version}/%{name}-%{version}.tar.gz
|
||||
ExclusiveArch: %{ghc_arches}
|
||||
BuildRequires: ghc-Cabal-devel
|
||||
BuildRequires: ghc-rpm-macros >= 0.94, %{!?without_hscolour:hscolour}
|
||||
BuildRequires: ghc-rpm-macros >= 0.95.1, %{!?without_hscolour:hscolour}
|
||||
# for fixing RPATH in the binary programs
|
||||
BuildRequires: chrpath
|
||||
# END cabal2spec
|
||||
BuildRequires: ghc-compiler = %{ghc_compiler_version}
|
||||
# GLUT
|
||||
@ -146,8 +148,7 @@ hand-written or generated by another program).
|
||||
|
||||
|
||||
# devel subpackage
|
||||
%define ghc_without_shared 1
|
||||
%ghc_devel_package haskell-platform %{version}
|
||||
%ghc_devel_package -m haskell-platform %{version}
|
||||
%{?ghc_packages_list:Requires: %(echo %{ghc_packages_list} | sed -e "s/\([^ ]*\)-\([^ ]*\)/ghc-\1-devel = \2-%{release},/g")}
|
||||
Requires: ghc-libraries = %{ghc_compiler_version}
|
||||
# added in F17 devel cycle
|
||||
@ -221,6 +222,8 @@ PATH=$HOME/.cabal/bin:$PATH
|
||||
|
||||
cd packages
|
||||
|
||||
PACKAGES_DIR=$PWD
|
||||
|
||||
for i in $(cat platform.packages); do
|
||||
name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")
|
||||
ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")
|
||||
@ -256,6 +259,19 @@ mv %{buildroot}%{_docdir}/ghc-haskell-platform{,-devel}-%{version}
|
||||
mv */*.files ..
|
||||
cd ..
|
||||
|
||||
# fix RPATHs in programs linking to HP user libs
|
||||
%if %{undefined ghc_without_dynamic}
|
||||
for i in cabal happy; do
|
||||
PROG=%{buildroot}%{_bindir}/$i
|
||||
RPATH=$(chrpath $PROG| sed -e "s/^$PROG: RPATH=//")
|
||||
case $RPATH in
|
||||
$PACKAGES_DIR*)
|
||||
NEWRPATH=$(echo $RPATH | sed -e "s!$PACKAGES_DIR!%{ghclibdir}!g" -e "s!/dist/build!!g")
|
||||
chrpath -r $NEWRPATH $PROG
|
||||
;;
|
||||
esac
|
||||
done
|
||||
%endif
|
||||
|
||||
%ghc_devel_post_postun haskell-platform
|
||||
|
||||
@ -311,7 +327,8 @@ cd ..
|
||||
- drop common_summary and common_description for subpackaging
|
||||
- no longer need to unset debug_package
|
||||
- make sure all the dynamically linked files get stripped
|
||||
- needs ghc-rpm-macros 0.94 or later
|
||||
- needs ghc-rpm-macros 0.95.1 or later to build
|
||||
- use chrpath to fix RPATHs of cabal and happy dynamically linked to HP libs
|
||||
|
||||
* Wed May 9 2012 Jens Petersen <petersen@redhat.com> - 2011.4.0.741-2
|
||||
- update cabal-install to 0.14.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user