commit: f2d428d12bab9b6d26b8e44f5e9006d019744c09 Author: Jack Todaro <jackmtodaro <AT> gmail <DOT> com> AuthorDate: Sat Nov 10 05:54:22 2018 +0000 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> CommitDate: Sun Nov 11 11:33:25 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2d428d1
eclass: update haskell-cabal.eclass for EAPI 7, sync with ::haskell Signed-off-by: Jack Todaro <jackmtodaro <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/10390 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> eclass/haskell-cabal.eclass | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass index 473eb6dcbb3..edfdfae5cda 100644 --- a/eclass/haskell-cabal.eclass +++ b/eclass/haskell-cabal.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: haskell-cabal.eclass @@ -74,7 +74,7 @@ HASKELL_CABAL_EXPF="pkg_setup src_compile src_test src_install pkg_postinst pkg_ QA_CONFIGURE_OPTIONS+=" --with-compiler --with-hc --with-hc-pkg --with-gcc" case "${EAPI:-0}" in - 2|3|4|5|6) HASKELL_CABAL_EXPF+=" src_configure" ;; + 2|3|4|5|6|7) HASKELL_CABAL_EXPF+=" src_configure" ;; *) ;; esac @@ -365,7 +365,7 @@ cabal-configure() { if $(ghc-supports-shared-libraries); then # Experimental support for dynamically linked binaries. # We are enabling it since 7.10.1_rc3 - if version_is_at_least "7.10.0.20150316" "$(ghc-version)"; then + if ver_test "$(ghc-version)" -ge "7.10.0.20150316"; then # we didn't enable it before as it was not stable on all arches cabalconf+=(--enable-shared) # Known to break on ghc-7.8/Cabal-1.18 @@ -428,7 +428,11 @@ cabal-pkg() { if [[ -n ${CABAL_HAS_LIBRARIES} ]]; then # Newer cabal can generate a package conf for us: ./setup register --gen-pkg-config="${T}/${P}.conf" - ghc-install-pkg "${T}/${P}.conf" + if [[ -d "${T}/${P}.conf" ]]; then + ghc-install-pkg "${T}/${P}.conf"/* + else + ghc-install-pkg "${T}/${P}.conf" + fi fi } @@ -590,7 +594,7 @@ cabal_src_install() { # remove EPREFIX dodir ${ghc_confdir_with_prefix#${EPREFIX}} local hint_db="${D}/$(ghc-confdir)" - local hint_file="${hint_db}/${PF}.conf" + local hint_file="${hint_db}/gentoo-empty-${CATEGORY}-${PF}.conf" mkdir -p "${hint_db}" || die touch "${hint_file}" || die }