[ghc-rpm-macros] disable generating ghci .o files by default; add variable cabal_configure_extra_options to cabal_con

Jens Petersen petersen at fedoraproject.org
Tue Jun 5 10:17:11 UTC 2012


commit 88a603f5373eba2cabcc32137d9e93cbd25ff0c7
Author: Jens Petersen <petersen at redhat.com>
Date:   Tue Jun 5 19:16:29 2012 +0900

    disable generating ghci .o files by default; add variable cabal_configure_extra_options to cabal_configure

 ghc-rpm-macros.ghc  |    7 ++-----
 ghc-rpm-macros.spec |    4 +++-
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc
index 7ade6fb..07a2717 100644
--- a/ghc-rpm-macros.ghc
+++ b/ghc-rpm-macros.ghc
@@ -21,10 +21,7 @@ fi
 # configure
 %cabal_configure\
 %ghc_check_bootstrap\
-%ifnarch %{ghc_arches_with_ghci}\
-%define disable_library_for_ghci --disable-library-for-ghci\
-%endif\
-%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?disable_library_for_ghci} %{?cabal_configure_options}
+%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{!?ghc_with_lib_for_ghci:--disable-library-for-ghci} %{?cabal_configure_options} $cabal_configure_extra_options
 
 # install
 %cabal_install %cabal copy --destdir=%{buildroot} -v
@@ -261,7 +258,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
 
 # ghc_lib_build [name] [version]
 %ghc_lib_build()\
-%ghc_lib_build_without_haddock()\
+%ghc_lib_build_without_haddock\
 %if %{undefined without_haddock}\
 %cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\
 %endif\
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index 080923f..88334d9 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -61,13 +61,15 @@ EOF
 
 %changelog
 * Tue Jun  5 2012 Jens Petersen <petersen at redhat.com> - 0.91-1
-- only build ghci .o library files on ghc_arches_with_ghci
+- no longer build redundant ghci .o library files
 - support meta packages like haskell-platform without base lib files
 - make it possible not to have to use common_summary and common_description
 - rename ghc_binlib_package to ghc_lib_subpackage
 - add ghc_lib_build_without_haddock
 - no longer drop into package dirs when subpackaging with ghc_lib_build and
   ghc_lib_install
+- add shell variable cabal_configure_extra_options to cabal_configure for
+  local configuration
 
 * Mon Mar 19 2012 Jens Petersen <petersen at redhat.com> - 0.90-1
 - use new rpm metadata hash format for ghc-7.4


More information about the scm-commits mailing list