pass CFLAGS and LDFLAGS to ghc via %cabal_configure
thanks to Ville for pushing for this in #1138982 and Sergei Trofimovich for explaining how Archlinux does it
This commit is contained in:
parent
87f872d02b
commit
83e7a4f045
@ -6,7 +6,7 @@
|
||||
#%%global without_hscolour 1
|
||||
|
||||
Name: ghc-rpm-macros
|
||||
Version: 1.3.8
|
||||
Version: 1.3.9
|
||||
Release: 1%{?dist}
|
||||
Summary: RPM macros for building packages for GHC
|
||||
|
||||
@ -93,6 +93,10 @@ EOF
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 27 2014 Jens Petersen <petersen@redhat.com> - 1.3.9-1
|
||||
- macros.ghc: cabal_configure now passes CFLAGS and LDFLAGS to ghc (#1138982)
|
||||
(thanks to Sergei Trofimovich and Ville Skyttä)
|
||||
|
||||
* Thu Oct 23 2014 Jens Petersen <petersen@redhat.com> - 1.3.8-1
|
||||
- ghc-deps.sh: support ghc-pkg for ghc build <= 7.4.2 as well
|
||||
|
||||
|
@ -21,7 +21,9 @@ fi
|
||||
# configure
|
||||
%cabal_configure\
|
||||
%ghc_check_bootstrap\
|
||||
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?cabal_configure_options} $cabal_configure_extra_options
|
||||
CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\
|
||||
LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\
|
||||
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-opts="$(echo \ $CFLAGS | sed -e 's/ / -optc/g') $(echo \ $LDFLAGS | sed -e 's/ / -optc/g')" %{?cabal_configure_options} $cabal_configure_extra_options
|
||||
|
||||
# install
|
||||
%cabal_install %cabal copy --destdir=%{buildroot} -v
|
||||
|
Loading…
Reference in New Issue
Block a user