summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorWolfgang E. Sanyer <WolfgangESanyer@gmail.com>2020-12-27 00:03:47 -0500
committerSergei Trofimovich <slyfox@gentoo.org>2021-01-30 09:54:38 +0000
commit90c014c455793cc026666b108fe37adc642e1f22 (patch)
treeeaa6439ce32280c1edcf1a87c3ecb2e65776df36 /eclass
parenthaskell-cabal.eclass: filter out -flto|-flto=* flags (diff)
downloadgentoo-90c014c455793cc026666b108fe37adc642e1f22.tar.gz
gentoo-90c014c455793cc026666b108fe37adc642e1f22.tar.bz2
gentoo-90c014c455793cc026666b108fe37adc642e1f22.zip
haskell-cabal.eclass: add CABAL_FEATURE=rebuild-after-doc-workaround
This is added as a temporary workaround until [this upstream][1] issue can be closed out [1]: https://github.com/haskell/cabal/issues/7213 Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/haskell-cabal.eclass16
1 files changed, 16 insertions, 0 deletions
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index 8706cc99478e..505eab437386 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -29,6 +29,15 @@
# only used for packages that use libghc internally and _must_
# not pull upper versions
# test-suite -- add support for cabal test-suites (introduced in Cabal-1.8)
+# rebuild-after-doc-workaround -- enable doctest test failue workaround.
+# Symptom: when `./setup haddock` is run in a `build-type: Custom`
+# package it might cause cause the test-suite to fail with
+# errors like:
+# > <command line>: cannot satisfy -package-id singletons-2.7-3Z7pnljD8tU1NrslJodXmr
+# Workaround re-reginsters the package to avoid the failure
+# (and rebuilds changes).
+# FEATURE can be removed once https://github.com/haskell/cabal/issues/7213
+# is fixed.
inherit eutils ghc-package multilib toolchain-funcs
@@ -99,6 +108,7 @@ for feature in ${CABAL_FEATURES}; do
nocabaldep) CABAL_FROM_GHC=yes;;
ghcdeps) CABAL_GHC_CONSTRAINT=yes;;
test-suite) CABAL_TEST_SUITE=yes;;
+ rebuild-after-doc-workaround) CABAL_REBUILD_AFTER_DOC_WORKAROUND=yes;;
# does nothing, removed 2016-09-04
bin) ;;
@@ -554,6 +564,12 @@ cabal_src_compile() {
cabal-haddock
fi
fi
+ if [[ -n "${CABAL_REBUILD_AFTER_DOC_WORKAROUND}" ]]; then
+ ewarn "rebuild-after-doc-workaround is enabled. This is a"
+ ewarn "temporary worakround to deal with https://github.com/haskell/cabal/issues/7213"
+ ewarn "until the upstream issue can be resolved."
+ cabal-build
+ fi
else
if [[ -n "${CABAL_USE_HSCOLOUR}" ]] && use hscolour; then
if [[ -n "${CABAL_USE_HOOGLE}" ]] && use hoogle; then