fix ghc-deps.sh to handle obsoleted meta libraries
use --disable-shared for %ghc_without_shared
This commit is contained in:
parent
c2213a0236
commit
0b6b0198da
26
ghc-deps.sh
26
ghc-deps.sh
@ -35,28 +35,26 @@ case $MODE in
|
|||||||
*) echo "`basename $0`: Need --provides or --requires" ; exit 1
|
*) echo "`basename $0`: Need --provides or --requires" ; exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -d "$PKGBASEDIR" ]; then
|
|
||||||
SHARED=$(find $PKGBASEDIR -type f -name '*.so')
|
|
||||||
fi
|
|
||||||
|
|
||||||
files=$(cat)
|
files=$(cat)
|
||||||
|
|
||||||
for i in $files; do
|
for i in $files; do
|
||||||
LIB_FILE=$(echo $i | grep /libHS | egrep -v "/libHSrts")
|
|
||||||
if [ "$LIB_FILE" ]; then
|
|
||||||
if [ -d "$PKGCONFDIR" ]; then
|
|
||||||
META=""
|
META=""
|
||||||
SELF=""
|
SELF=""
|
||||||
case $LIB_FILE in
|
case $i in
|
||||||
*.so) META=ghc ;;
|
*/libHSrts.*) ;;
|
||||||
*.a) META=ghc-devel
|
*/libHS*.so)
|
||||||
if [ "$SHARED" ]; then
|
META=ghc
|
||||||
|
PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%")
|
||||||
|
;;
|
||||||
|
*/package.conf.d/*.conf)
|
||||||
|
META=ghc-devel
|
||||||
|
PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\).conf%\1%")
|
||||||
|
if [ -f $PKGBASEDIR/$PKGVER/libHS$PKGVER-*.so ]; then
|
||||||
SELF=ghc
|
SELF=ghc
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if [ "$META" ]; then
|
if [ "$META" -a -d "$PKGCONFDIR" ]; then
|
||||||
PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%")
|
|
||||||
HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//")
|
HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//")
|
||||||
for i in $HASHS; do
|
for i in $HASHS; do
|
||||||
case $i in
|
case $i in
|
||||||
@ -70,8 +68,6 @@ for i in $files; do
|
|||||||
echo "$SELF($i)"
|
echo "$SELF($i)"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
fi
|
|
||||||
elif [ "$MODE" = "--requires" ]; then
|
elif [ "$MODE" = "--requires" ]; then
|
||||||
if file $i | grep -q 'executable, .* dynamically linked'; then
|
if file $i | grep -q 'executable, .* dynamically linked'; then
|
||||||
BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}.so%\1%")
|
BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}.so%\1%")
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#%%global without_hscolour 1
|
#%%global without_hscolour 1
|
||||||
|
|
||||||
Name: ghc-rpm-macros
|
Name: ghc-rpm-macros
|
||||||
Version: 1.4.10
|
Version: 1.4.11
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: RPM macros for building packages for GHC
|
Summary: RPM macros for building packages for GHC
|
||||||
|
|
||||||
@ -32,6 +32,7 @@ Requires: redhat-rpm-config > 20-1.fc21
|
|||||||
# for ghc_version
|
# for ghc_version
|
||||||
Requires: ghc-compiler
|
Requires: ghc-compiler
|
||||||
%if %{undefined without_hscolour}
|
%if %{undefined without_hscolour}
|
||||||
|
# could use ghc_arches here
|
||||||
%ifarch %{ix86} %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x ppc64le aarch64
|
%ifarch %{ix86} %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x ppc64le aarch64
|
||||||
Requires: hscolour
|
Requires: hscolour
|
||||||
%endif
|
%endif
|
||||||
@ -88,6 +89,10 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 2 2015 Jens Petersen <petersen@redhat.com> - 1.4.11-1
|
||||||
|
- fix ghc-deps.sh to handle meta-packages
|
||||||
|
- configure --disable-shared if ghc_without_shared
|
||||||
|
|
||||||
* Fri Feb 27 2015 Jens Petersen <petersen@fedoraproject.org> - 1.4.10-1
|
* Fri Feb 27 2015 Jens Petersen <petersen@fedoraproject.org> - 1.4.10-1
|
||||||
- have to turn off hardening in cabal_configure: set _hardened_ldflags to nil
|
- have to turn off hardening in cabal_configure: set _hardened_ldflags to nil
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.
|
|||||||
# ghc_lib_build_without_haddock [name] [version]
|
# ghc_lib_build_without_haddock [name] [version]
|
||||||
%ghc_lib_build_without_haddock()\
|
%ghc_lib_build_without_haddock()\
|
||||||
%global debug_package %{nil}\
|
%global debug_package %{nil}\
|
||||||
%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
|
%cabal_configure %{!?without_prof:-p} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
|
||||||
%cabal build\
|
%cabal build\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user