From 891aa19d14688a95171dc6dcf14ce08d6ab237c5 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 5 Jul 2021 23:03:35 +0100 Subject: haskell-cabal.eclass: drop EAPI={0..5} support Signed-off-by: Sergei Trofimovich --- eclass/haskell-cabal.eclass | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'eclass') diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass index 5b67f43f0c5a..f7a6d35e6102 100644 --- a/eclass/haskell-cabal.eclass +++ b/eclass/haskell-cabal.eclass @@ -4,7 +4,7 @@ # @ECLASS: haskell-cabal.eclass # @MAINTAINER: # Haskell herd -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 +# @SUPPORTED_EAPIS: 6 7 # @AUTHOR: # Original author: Andres Loeh # Original author: Duncan Coutts @@ -113,20 +113,17 @@ inherit eutils ghc-package multilib toolchain-funcs # Set to anything else to disable. : ${CABAL_REPORT_OTHER_BROKEN_PACKAGES:=yes} -HASKELL_CABAL_EXPF="pkg_setup src_compile src_test src_install pkg_postinst pkg_postrm" - # 'dev-haskell/cabal' passes those options with ./configure-based # configuration, but most packages don't need/don't accept it: # #515362, #515362 QA_CONFIGURE_OPTIONS+=" --with-compiler --with-hc --with-hc-pkg --with-gcc" case "${EAPI:-0}" in - 0|1) ;; - 2|3|4|5|6|7) HASKELL_CABAL_EXPF+=" src_configure" ;; + 6|7) ;; *) die "EAPI ${EAPI} unsupported." ;; esac -EXPORT_FUNCTIONS ${HASKELL_CABAL_EXPF} +EXPORT_FUNCTIONS pkg_setup src_configure src_compile src_test src_install pkg_postinst pkg_postrm for feature in ${CABAL_FEATURES}; do case ${feature} in @@ -141,9 +138,6 @@ for feature in ${CABAL_FEATURES}; do test-suite) CABAL_TEST_SUITE=yes;; rebuild-after-doc-workaround) CABAL_REBUILD_AFTER_DOC_WORKAROUND=yes;; - # does nothing, removed 2016-09-04 - bin) ;; - *) CABAL_UNKNOWN="${CABAL_UNKNOWN} ${feature}";; esac done @@ -315,7 +309,6 @@ cabal-show-brokens-and-die() { cabal-configure() { local cabalconf=() - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= if [[ -n "${CABAL_USE_HADDOCK}" ]] && use doc; then # We use the bundled with GHC version if exists @@ -452,8 +445,6 @@ cabal-build() { } cabal-copy() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && ED=${D} - set -- copy --destdir="${D}" "$@" echo ./setup "$@" ./setup "$@" || die "setup copy failed" @@ -535,20 +526,8 @@ cabal_src_configure() { # exported function: cabal-style bootstrap configure and compile cabal_src_compile() { - # it's a common mistake when one bumps ebuild to EAPI="2" (and upper) - # and forgets to separate src_compile() to src_configure()/src_compile(). - # Such error leads to default src_configure and we lose all passed flags. - if ! has "${EAPI:-0}" 0 1; then - local passed_flag - for passed_flag in "$@"; do - [[ ${passed_flag} == --flags=* ]] && \ - eqawarn "QA Notice: Cabal option '${passed_flag}' has effect only in src_configure()" - done - fi - cabal-is-dummy-lib && return - has src_configure ${HASKELL_CABAL_EXPF} || haskell-cabal_src_configure "$@" cabal-build if [[ -n "$CABAL_USE_HADDOCK" ]] && use doc; then @@ -616,8 +595,6 @@ haskell-cabal_src_test() { # exported function: cabal-style copy and register cabal_src_install() { - has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= - if ! cabal-is-dummy-lib; then cabal-copy cabal-pkg -- cgit v1.2.3-65-gdbad