reenable dynlink on arm archs; condition _defaultlicensedir
This commit is contained in:
parent
a3ef23ec78
commit
3a48002a94
@ -10,8 +10,8 @@
|
|||||||
#%%global without_hscolour 1
|
#%%global without_hscolour 1
|
||||||
|
|
||||||
Name: ghc-rpm-macros
|
Name: ghc-rpm-macros
|
||||||
Version: 1.6.10
|
Version: 1.6.11
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: RPM macros for building Haskell packages for GHC
|
Summary: RPM macros for building Haskell packages for GHC
|
||||||
|
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -106,19 +106,6 @@ install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver
|
|||||||
install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag
|
install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag
|
||||||
install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper
|
install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper
|
||||||
|
|
||||||
# remove for ghc-8.0.1
|
|
||||||
# binutils-2.27-7.fc26 and later break Haskell dynamic linking on aarch64 and armv7hl
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1386126
|
|
||||||
%if 0%{?fedora} == 26
|
|
||||||
%ifarch aarch64 armv7hl
|
|
||||||
# dynlinking failing with ghc-7.10.3
|
|
||||||
cat >> %{buildroot}/%{macros_dir}/macros.ghc <<EOF
|
|
||||||
|
|
||||||
%%ghc_without_dynamic 1
|
|
||||||
EOF
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 7
|
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||||
cat >> %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh <<EOF
|
cat >> %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh <<EOF
|
||||||
|
|
||||||
@ -150,6 +137,11 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 25 2016 Jens Petersen <petersen@redhat.com> - 1.6.11-1
|
||||||
|
- re-enable dynlink on armv7hl and aarch64 since binutils was fixed (#1386126)
|
||||||
|
- condition use of _defaultlicensedir
|
||||||
|
- quote some echo'd macros
|
||||||
|
|
||||||
* Mon Oct 31 2016 Jens Petersen <petersen@redhat.com> - 1.6.10-2
|
* Mon Oct 31 2016 Jens Petersen <petersen@redhat.com> - 1.6.10-2
|
||||||
- only disable arm dynlinking for f26 (#1386126)
|
- only disable arm dynlinking for f26 (#1386126)
|
||||||
|
|
||||||
|
10
macros.ghc
10
macros.ghc
@ -28,7 +28,7 @@ fi
|
|||||||
CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\
|
CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\
|
||||||
%endif\
|
%endif\
|
||||||
LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\
|
LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\
|
||||||
%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_defaultlicensedir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --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
|
%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --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
|
||||||
|
|
||||||
# install
|
# install
|
||||||
%cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot}
|
%cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot}
|
||||||
@ -73,9 +73,9 @@ 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 "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{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}\
|
||||||
echo "%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\
|
echo "%%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\
|
||||||
%endif\
|
%endif\
|
||||||
find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\
|
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\
|
find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\
|
||||||
@ -83,7 +83,7 @@ fi\
|
|||||||
if [ -d "%{buildroot}%{docdir}" ]; then\
|
if [ -d "%{buildroot}%{docdir}" ]; then\
|
||||||
echo "%{docdir}" >> %{basepkg}-devel.files\
|
echo "%{docdir}" >> %{basepkg}-devel.files\
|
||||||
fi\
|
fi\
|
||||||
for i in $(ls %{buildroot}%{_defaultlicensedir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\
|
for i in $(ls %{buildroot}%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\
|
||||||
echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\
|
echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\
|
||||||
done\
|
done\
|
||||||
for i in %{basepkg}.files %{basepkg}-devel.files; do\
|
for i in %{basepkg}.files %{basepkg}-devel.files; do\
|
||||||
@ -115,7 +115,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} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_defaultlicensedir}/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:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\
|
||||||
%cabal build %{?cabal_verbose}\
|
%cabal build %{?cabal_verbose}\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user