From 35cd9d015e08c93d808538cb7f38adfedbdbfa99 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 16 Jul 2019 16:09:25 +0000 Subject: [PATCH] switch from without_prof/haddock to with_ghc_prof/haddock We now have build config consistent with standard bcond across our packages --- macros.ghc | 14 ++++---------- macros.ghc-extra | 8 ++++---- macros.ghc-os | 2 ++ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/macros.ghc b/macros.ghc index e4f7fc5..d9a0113 100644 --- a/macros.ghc +++ b/macros.ghc @@ -121,14 +121,14 @@ fi\ %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 %{?with_ghc_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 build %{?ghc_smp_mflags} %{?cabal_build_options}\ %{nil} # ghc_lib_build [name] [version] %ghc_lib_build()\ %ghc_lib_build_without_haddock %{?1} %{?2}\ -%if %{undefined without_haddock}\ +%if %{with haddock}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ if [ -n dist/build/libHS%{pkgname}-%{pkgver}*.so ]; then\ @@ -198,13 +198,7 @@ done\ # deprecated for f31 %ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || : -# deprecated -%ghc_bootstrap\ -%global without_prof 1\ -%global without_haddock 1\ -%global without_manual 1 - # skip prof libs and documentation %ghc_quick_build\ -%global without_prof 1\ -%global without_haddock 1 +%undefine with_ghc_prof\ +%undefine with_haddock diff --git a/macros.ghc-extra b/macros.ghc-extra index c8b8e38..2bdbfab 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -39,7 +39,7 @@ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %description -n %{basepkg}-devel\ This package provides the Haskell %{pkgname} library development files.\ \ -%if %{undefined without_haddock}\ +%if %{with haddock}\ %package -n %{basepkg}-doc\ Summary: Haskell %{pkgname} library documentation\ %{?1:Version: %{pkgver}}\ @@ -50,7 +50,7 @@ Supplements: (%{basepkg}-devel and ghc-doc)\ This package provides the Haskell %{pkgname} library documentation.\ %endif\ \ -%if %{undefined without_prof}\ +%if %{with ghc_prof}\ %package -n %{basepkg}-prof\ Summary: Haskell %{pkgname} profiling library\ %{?1:Version: %{pkgver}}\ @@ -67,11 +67,11 @@ This package provides the Haskell %{pkgname} profiling library.\ \ %files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\ \ -%if %{undefined without_haddock}\ +%if %{with haddock}\ %files -n %{basepkg}-doc -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-doc.files\ %endif\ \ -%if %{undefined without_prof}\ +%if %{with ghc_prof}\ %files -n %{basepkg}-prof -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-prof.files\ %endif\ %{nil} diff --git a/macros.ghc-os b/macros.ghc-os index cdab44c..cd0fbdf 100644 --- a/macros.ghc-os +++ b/macros.ghc-os @@ -5,5 +5,7 @@ %_ghcdynlibdir %{_libdir} %ghc_without_dynamic 1 +%with_ghc_prof 1 +%with_haddock 1 %cabal_install_options -v