use ghcliblib/ghclibplatform paths for Hadrian dependency generation

epel9
Jens Petersen 3 years ago
parent 839272fa3a
commit ac98514a64

@ -1,15 +1,15 @@
#!/bin/sh
# find rpm provides and requires for Haskell GHC libraries
[ $# -lt 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot}%{ghclibdir} [%{?ghc_name}]" && exit 1
[ $# -lt 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot}%{ghcliblib} [%{?ghc_name}]" && exit 1
set +x
MODE=$1
PKGBASEDIR=$2
if [ -z "$3" -o "$3" = "ghc" ];
if [ -z "$3" ];
then GHCPREFIX=ghc
else GHCPREFIX=$(basename $PKGBASEDIR)
else GHCPREFIX=$3
fi
PKGCONFDIR=$PKGBASEDIR/package.conf.d

@ -1,13 +1,16 @@
#!/bin/sh
[ $# -lt 1 ] && echo "Usage: `basename $0` %{buildroot}%{ghclibdir} ..." && exit 1
[ $# -lt 1 ] && echo "Usage: `basename $0` %{buildroot}%{ghcliblib} ..." && exit 1
set +x
PKGBASEDIR=$1
shift
PKGCONFDIR=$PKGBASEDIR/package.conf.d
GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//)
case $(basename "$PKGBASEDIR") in
lib) GHC_VER=$(basename $(dirname $PKGBASEDIR) | sed -e s/ghc-//) ;;
*) GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) ;;
esac
# for a ghc build use the new ghc-pkg
INPLACE_GHCPKG=$PKGBASEDIR/../../bin/ghc-pkg-$GHC_VER

@ -186,6 +186,7 @@ EOF
%changelog
* Sat Dec 18 2021 Jens Petersen <petersen@redhat.com> - 2.3.2-1
- Cabal uses ppc64 in paths for ppc64le
- fix ghc-deps.sh dependency generation for Hadrian
* Fri Dec 17 2021 Jens Petersen <petersen@redhat.com> - 2.3.1-1
- ghc_gen_filelists: support ghc Hadrian install

@ -1,3 +1,3 @@
%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %{?ghc_name}
%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} %{?ghc_name}
%__ghc_path ^%{ghclibdir}/(.*/libHS.*_p\.a|package.conf.d/.*\.conf)$
%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghcliblib} %{?ghc_name:ghc-%{ghc_version}}
%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghcliblib} %{?ghc_name:ghc-%{ghc_version}}
%__ghc_path ^(%{ghcliblib}/package.conf.d/.*\.conf|%{ghclibplatform}/.*/libHS.*_p\.a)$

@ -128,10 +128,10 @@ done\
if [ -d %{pkgnamever}.conf ]; then\
for i in $(ls "%{pkgnamever}.conf/"); do\
sub=$(echo $i | sed -e "s/^[0-9]\\+-//")\
install -D --mode=0644 %{pkgnamever}.conf/${i} %{buildroot}%{ghclibdir}/package.conf.d/${sub}.conf\
install -D --mode=0644 %{pkgnamever}.conf/${i} %{buildroot}%{ghcliblib}/package.conf.d/${sub}.conf\
done\
else\
install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}.conf\
install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}.conf\
fi\
%{nil}
@ -214,11 +214,11 @@ for lib in %*; do\
*$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) ;;\
pkgid=$(cd %{buildroot}%{ghcliblib}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghcliblib} --global --package-db=%{buildroot}%{ghcliblib}/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=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghcliblib} --global --package-db=%{buildroot}%{ghcliblib}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\
*)\
syspath="" ;;\
esac\

Loading…
Cancel
Save