summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJack Todaro <jackmtodaro@gmail.com>2018-11-10 16:54:22 +1100
committerSergei Trofimovich <slyfox@gentoo.org>2018-11-11 11:33:25 +0000
commitf2d428d12bab9b6d26b8e44f5e9006d019744c09 (patch)
tree027441604c3375fad34e670a7792da439a85bb79 /eclass
parentmedia-video/libav: security cleanup (diff)
downloadgentoo-f2d428d12bab9b6d26b8e44f5e9006d019744c09.tar.gz
gentoo-f2d428d12bab9b6d26b8e44f5e9006d019744c09.tar.bz2
gentoo-f2d428d12bab9b6d26b8e44f5e9006d019744c09.zip
eclass: update haskell-cabal.eclass for EAPI 7, sync with ::haskell
Signed-off-by: Jack Todaro <jackmtodaro@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/10390 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass')
-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
}