diff --git a/ghc-gen_contents_index-nodocs.patch b/ghc-gen_contents_index-nodocs.patch new file mode 100644 index 0000000..bb7f9a6 --- /dev/null +++ b/ghc-gen_contents_index-nodocs.patch @@ -0,0 +1,11 @@ +--- ghc-8.6.5/libraries/gen_contents_index~ 2020-02-24 15:02:26.318866694 +0800 ++++ ghc-8.6.5/libraries/gen_contents_index 2020-04-09 18:18:40.290722327 +0800 +@@ -47,6 +47,8 @@ + HADDOCK_ARGS="$HADDOCK_ARGS $HADDOCK_ARG" + done + else ++ if ! ls */*.haddock &>/dev/null; then exit 0; fi ++ + HADDOCK=/usr/bin/haddock + # We don't want the GHC API to swamp the index + HADDOCK_FILES=`ls -1 */*.haddock | grep -v '/ghc\.haddock' | sort` diff --git a/ghc.spec b/ghc.spec index 91e49f1..c47e015 100644 --- a/ghc.spec +++ b/ghc.spec @@ -49,7 +49,7 @@ Version: 8.6.5 # - release can only be reset if *all* library versions get bumped simultaneously # (sometimes after a major release) # - minor release numbers for a branch should be incremented monotonically -Release: 102%{?dist} +Release: 103%{?dist} Summary: Glasgow Haskell Compiler License: BSD and HaskellReport @@ -64,6 +64,7 @@ Source7: runghc.man # absolute haddock path (was for html/libraries -> libraries) Patch1: ghc-gen_contents_index-haddock-path.patch Patch2: ghc-Cabal-install-PATH-warning.patch +Patch3: ghc-gen_contents_index-nodocs.patch # https://phabricator.haskell.org/rGHC4eebc8016f68719e1ccdf460754a97d1f4d6ef05 Patch6: ghc-8.6.3-sphinx-1.8.patch @@ -232,6 +233,7 @@ License: BSD Obsoletes: ghc-doc-cron < %{version}-%{release} Requires: ghc-compiler = %{version}-%{release} BuildArch: noarch +#Recommends: ghc-base-doc = %{base_ver}-%{release} %description doc-index The package enables re-indexing of installed library documention. @@ -322,6 +324,7 @@ packages to be automatically installed too. %setup -q -n %{name}-%{version} %{?with_testsuite:-b1} %patch1 -p1 -b .orig +%patch3 -p1 -b .orig %patch2 -p1 -b .orig %patch6 -p1 -b .orig @@ -574,11 +577,11 @@ make test %if %{with haddock} %transfiletriggerin doc-index -- %{ghc_html_libraries_dir} -%{ghc_html_libraries_dir}/gen_contents_index +env -C %{ghc_html_libraries_dir} ./gen_contents_index %end %transfiletriggerpostun doc-index -- %{ghc_html_libraries_dir} -%{ghc_html_libraries_dir}/gen_contents_index +env -C %{ghc_html_libraries_dir} ./gen_contents_index %end %endif @@ -681,8 +684,8 @@ make test %changelog -* Tue Mar 10 2020 Jens Petersen -- add bcond for dwarf info +* Thu Apr 9 2020 Jens Petersen - 8.6.5-103 +- fix running of gen_contents_index when no haddocks (#1813548) * Mon Feb 10 2020 Jens Petersen - 8.6.5-102 - rebuild against ghc-rpm-macros fixed for subpackage prof deps