fixes for when (subpackage) pkg-ver already installed
macros.ghc no longer uses ghc-pkg-wrapper - %ghc_fix_rpath gets lib dir directly by globbing buildroot - %ghc_gen_filelists reads pkg key from .conf - ghc-deps.sh: read unique pkg id from .conf before this preinstalled libs were interfering and this was further exasperated on ghc8 where .conf filenames are not keyed so we were querying `ghc-pkg list pkg` instead of pkg-ver.
This commit is contained in:
parent
09527a512d
commit
b1fc196577
@ -23,8 +23,8 @@ for i in $files; do
|
|||||||
case $i in
|
case $i in
|
||||||
# exclude builtin_rts.conf
|
# exclude builtin_rts.conf
|
||||||
$pkgconfdir/*-*.conf)
|
$pkgconfdir/*-*.conf)
|
||||||
pkgver=$(echo $i | sed -e "s%$pkgconfdir/\(.\+\)-.\+.conf%\1%")
|
id=$(grep "id: " $i | sed -e "s/id: //")
|
||||||
ids=$($ghc_pkg field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//")
|
ids=$($ghc_pkg field $id $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//")
|
||||||
|
|
||||||
for d in $ids; do
|
for d in $ids; do
|
||||||
case $d in
|
case $d in
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#%%global without_hscolour 1
|
#%%global without_hscolour 1
|
||||||
|
|
||||||
Name: ghc-rpm-macros
|
Name: ghc-rpm-macros
|
||||||
Version: 1.6.17
|
Version: 1.6.18
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: RPM macros for building Haskell packages for GHC
|
Summary: RPM macros for building Haskell packages for GHC
|
||||||
|
|
||||||
@ -147,6 +147,10 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 2 2017 Jens Petersen <petersen@redhat.com> - 1.6.18-1
|
||||||
|
- fix ghc_fix_rpath, ghc_gen_filelists, and ghc-deps.sh when pkg-ver already
|
||||||
|
installed
|
||||||
|
|
||||||
* Wed Feb 22 2017 Jens Petersen <petersen@redhat.com> - 1.6.17-1
|
* Wed Feb 22 2017 Jens Petersen <petersen@redhat.com> - 1.6.17-1
|
||||||
- setup --global/--user in cabal_configure
|
- setup --global/--user in cabal_configure
|
||||||
- allow subpackage names to contain digits
|
- allow subpackage names to contain digits
|
||||||
|
10
macros.ghc
10
macros.ghc
@ -70,11 +70,12 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\
|
|||||||
%define pkgnamever %{pkgname}-%{pkgver}\
|
%define pkgnamever %{pkgname}-%{pkgver}\
|
||||||
%define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\
|
%define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\
|
||||||
%define docdir %{ghclibdocdir}/%{pkgnamever}\
|
%define docdir %{ghclibdocdir}/%{pkgnamever}\
|
||||||
keyname=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field %{pkgnamever} key)\
|
pkgconf=$(echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf")\
|
||||||
pkgdir="%{ghclibdir}/${keyname}"\
|
key=$(grep "key: " %{buildroot}${pkgconf} | sed -e "s/key: //")\
|
||||||
|
pkgdir="%{ghclibdir}/${key}"\
|
||||||
rm -f %{basepkg}.files %{basepkg}-devel.files\
|
rm -f %{basepkg}.files %{basepkg}-devel.files\
|
||||||
touch %{basepkg}.files %{basepkg}-devel.files\
|
touch %{basepkg}.files %{basepkg}-devel.files\
|
||||||
echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\
|
echo ${pkgconf} >> %{basepkg}-devel.files\
|
||||||
if [ -d "%{buildroot}${pkgdir}" ]; then\
|
if [ -d "%{buildroot}${pkgdir}" ]; then\
|
||||||
echo "%%dir ${pkgdir}" >> %{basepkg}.files\
|
echo "%%dir ${pkgdir}" >> %{basepkg}.files\
|
||||||
%if %{undefined ghc_without_shared}\
|
%if %{undefined ghc_without_shared}\
|
||||||
@ -168,7 +169,8 @@ 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*)\
|
||||||
syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs)\
|
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)\
|
||||||
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