summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-15 17:13:11 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-15 17:13:11 +0100
commit0c80ffd3caee224555f8b394b6b2c05b2752f440 (patch)
tree926db40c52646ba8a4f07fecfd4e64971ac28f4e /eclass
parentd9339ace1b5d6cf11ad869751abc1a474f46931d (diff)
gentoo auto-resync : 15:09:2022 - 17:13:11
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin37144 -> 37139 bytes
-rw-r--r--eclass/haskell-cabal.eclass51
2 files changed, 49 insertions, 2 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index ce8e5a1d6f98..7a8302689a45 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index 0f7f67a244d7..5c0fcba0ebe1 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -180,7 +180,6 @@ fi
# )
: ${CABAL_CHDEPS:=}
-
# @ECLASS_VARIABLE: CABAL_LIVE_VERSION
# @PRE_INHERIT
# @DEFAULT_UNSET
@@ -188,6 +187,16 @@ fi
# Set this to any value to prevent SRC_URI from being set automatically.
: ${CABAL_LIVE_VERSION:=}
+# @ECLASS_VARIABLE: GHC_BOOTSTRAP_PACKAGES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Extra packages that need to be exposed when compiling Setup.hs
+# @EXAMPLE:
+# GHC_BOOTSTRAP_PACKAGES=(
+# cabal-doctest
+# )
+: ${GHC_BOOTSTRAP_PACKAGES:=}
+
# 'dev-haskell/cabal' passes those options with ./configure-based
# configuration, but most packages don't need/don't accept it:
# #515362, #515362
@@ -269,6 +278,10 @@ cabal-version() {
# We ask portage, not ghc, so that we only pick up
# portage-installed cabal versions.
_CABAL_VERSION_CACHE="$(ghc-extract-pm-version dev-haskell/cabal)"
+ # exception for live (9999) version
+ if [[ "${_CABAL_VERSION_CACHE}" == 9999 ]]; then
+ _CABAL_VERSION_CACHE="$(ghc-cabal-version)"
+ fi
fi
fi
echo "${_CABAL_VERSION_CACHE}"
@@ -301,8 +314,42 @@ cabal-bootstrap() {
setup_bootstrap_args+=(-threaded)
fi
+ # The packages available when compiling Setup.hs need to be controlled,
+ # otherwise module name collisions are possible.
+ local -a bootstrap_pkg_args=(-hide-all-packages)
+
+ # Expose common packages bundled with GHC
+ # See: <https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history>
+ local default_exposed_pkgs="
+ Cabal
+ base
+ binary
+ bytestring
+ containers
+ deepseq
+ directory
+ exceptions
+ filepath
+ haskeline
+ mtl
+ parsec
+ pretty
+ process
+ stm
+ template-haskell
+ terminfo
+ text
+ transformers
+ unix
+ xhtml
+ "
+
+ for pkg in $default_exposed_pkgs ${GHC_BOOTSTRAP_PACKAGES[*]}; do
+ bootstrap_pkg_args+=(-package "$pkg")
+ done
+
make_setup() {
- set -- -package "${cabalpackage}" --make "${setupmodule}" \
+ set -- "${bootstrap_pkg_args[@]}" --make "${setupmodule}" \
$(ghc-make-args) \
"${setup_bootstrap_args[@]}" \
${HCFLAGS} \