Compare commits

...

3 Commits
master ... f27

Author SHA1 Message Date
Jens Petersen 6d99e4fb15 revert to pkgkey in libsubdir
with pkgid libsubdir, dynlibs still live in pkgkey dir
2018-08-31 00:32:36 +09:00
Jens Petersen 7b69982ffe backports from F28
- drop hash from libsubdir
- cabal-tweak-drop-dep: quote grep pattern to allow whitespace
- ghc_fix_rpath: remove leading or trailing ':'
- drop ghc_without_shared
2018-05-08 23:13:56 +09:00
Jens Petersen 73e3ea8c4d add %ghc_set_cflags macro 2018-02-28 17:48:32 +09:00
3 changed files with 26 additions and 13 deletions

View File

@ -22,7 +22,7 @@ if [ ! -f $CABALFILE.orig ]; then
BACKUP=.orig
fi
if grep $DEP $CABALFILE | sed -e "s/$DEP//" | grep -q -e "[A-Za-z]"; then
if grep "$DEP" $CABALFILE | sed -e "s/$DEP//" | grep -q -e "[A-Za-z]"; then
echo "$0: deleting whole $DEP lines not safe - try more precise pattern"
exit 1
fi

View File

@ -10,8 +10,8 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 1.6.50
Release: 9%{?dist}
Version: 1.6.53
Release: 1%{?dist}
Summary: RPM macros for building Haskell packages for GHC
License: GPLv3+
@ -164,6 +164,18 @@ EOF
%changelog
* Thu Aug 30 2018 Jens Petersen <petersen@redhat.com> - 1.6.53-1
- bring the hash to libsubdir
* Tue May 8 2018 Jens Petersen <petersen@redhat.com> - 1.6.52-1
- drop hash from libsubdir
- cabal-tweak-drop-dep: quote grep pattern to allow whitespace
- ghc_fix_rpath: remove leading or trailing ':'
- drop ghc_without_shared
* Mon Dec 4 2017 Jens Petersen <petersen@fedoraproject.org> - 1.6.51-1
- add ghc_set_cflags macro
* Wed Nov 15 2017 Jens Petersen <petersen@redhat.com> - 1.6.50-9
- obsolete ghc-webkit (#1375825)

View File

@ -22,10 +22,7 @@ proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\
%endif\
fi
# configure
%cabal_configure\
%ghc_check_bootstrap\
%global _hardened_ldflags %{nil}\
%ghc_set_cflags\
# -Wunused-label is extremely noisy\
%ifarch aarch64 s390x\
CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall -Werror=format-security //')}"\
@ -33,6 +30,13 @@ CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall -Werror=format-security //'
CFLAGS="${CFLAGS:-%optflags}"\
%endif\
export CFLAGS\
%{nil}
# configure
%cabal_configure\
%ghc_check_bootstrap\
%ghc_set_cflags\
%global _hardened_ldflags %{nil}\
LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\
%cabal --version\
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options
@ -88,9 +92,7 @@ touch %{basepkg}.files %{basepkg}-devel.files\
echo ${pkgconf} >> %{basepkg}-devel.files\
if [ -d "%{buildroot}${pkgdir}" ]; then\
echo "%%dir ${pkgdir}" >> %{basepkg}.files\
%if %{undefined ghc_without_shared}\
echo "%%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\
%endif\
find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\
find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\
fi\
@ -131,7 +133,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.
%if 0%{?rhel} && 0%{?rhel} < 8\
licensedirversion=%{?2:-%2}\
%endif\
%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
%cabal_configure %{!?without_prof:-p} --enable-shared %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
%cabal build %{?ghc_smp_mflags} %{?cabal_build_options}\
%{nil}
@ -192,7 +194,7 @@ for lib in %*; do\
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) ;;\
esac\
newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g")\
newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g" -e "s/::/:/" -e "s/^://" -e "s/:$//")\
chrpath -r $newrpath $i\
;;\
esac\
@ -234,8 +236,7 @@ done\
%ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || :
# - without_hscolour, without_testsuite, and ghc_bootstrapping
# need to be set locally in the spec file
# without_hscolour and without_testsuite need to be set locally in the spec file
# skip prof libs and documentation
%ghc_bootstrap\