summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/haskell-cabal.eclass14
1 files changed, 9 insertions, 5 deletions
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index 473eb6dcbb30..edfdfae5cda3 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
}