summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2012-04-19 17:33:19 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2012-04-19 17:33:19 +0000
commitfd2a45ba5414c095ef86050ebd6b24bc139c18f7 (patch)
tree89a380bf5c302175551799bc76d34b616f243093 /eclass
parent[bump] dev-perl/Sys-Virt-0.9.11 (diff)
downloadgentoo-2-fd2a45ba5414c095ef86050ebd6b24bc139c18f7.tar.gz
gentoo-2-fd2a45ba5414c095ef86050ebd6b24bc139c18f7.tar.bz2
gentoo-2-fd2a45ba5414c095ef86050ebd6b24bc139c18f7.zip
Added CABAL_FEATURES=test-suite by Alexander Vershilov. It enables building of test suites introduced in Cabal-1.8
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/haskell-cabal.eclass11
2 files changed, 15 insertions, 2 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 01dd43421be9..b8cee14249a3 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.215 2012/04/19 14:52:12 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.216 2012/04/19 17:33:19 slyfox Exp $
+
+ 19 Apr 2012; Sergei Trofimovich <slyfox@gentoo.org> haskell-cabal.eclass:
+ Added CABAL_FEATURES=test-suite by Alexander Vershilov. It enables building
+ of test suites introduced in Cabal-1.8
19 Apr 2012; Davide Pesavento <pesa@gentoo.org> qt4-build.eclass:
Add appropriate blockers for qt-bearer.
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index 671b6518d3ae..911f5d63a466 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.31 2012/04/14 20:22:23 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.32 2012/04/19 17:33:19 slyfox Exp $
# @ECLASS: haskell-cabal.eclass
# @MAINTAINER:
@@ -30,6 +30,7 @@
# nocabaldep -- don't add dependency on cabal.
# only used for packages that _must_ not pull the dependency
# on cabal, but still use this eclass (e.g. haskell-updater).
+# test-suite -- add support for cabal test-suites (introduced in Cabal-1.8)
inherit ghc-package multilib
@@ -76,6 +77,7 @@ for feature in ${CABAL_FEATURES}; do
bin) CABAL_HAS_BINARIES=yes;;
lib) CABAL_HAS_LIBRARIES=yes;;
nocabaldep) CABAL_FROM_GHC=yes;;
+ test-suite) CABAL_TEST_SUITE=yes;;
*) CABAL_UNKNOWN="${CABAL_UNKNOWN} ${feature}";;
esac
done
@@ -112,6 +114,10 @@ if [[ -n "${CABAL_USE_PROFILE}" ]]; then
IUSE="${IUSE} profile"
fi
+if [[ -n "${CABAL_TEST_SUITE}" ]]; then
+ IUSE="${IUSE} test"
+fi
+
# We always use a standalone version of Cabal, rather than the one that comes
# with GHC. But of course we can't depend on cabal when building cabal itself.
if [[ -z ${CABAL_MIN_VERSION} ]]; then
@@ -247,6 +253,9 @@ cabal-configure() {
if [[ -n "${CABAL_USE_CPPHS}" ]]; then
cabalconf="${cabalconf} --with-cpphs=${EPREFIX}/usr/bin/cpphs"
fi
+ if [[ -n "${CABAL_TEST_SUITE}" ]]; then
+ cabalconf="${cabalconf} $(use_enable test tests)"
+ fi
local option
for option in ${HCFLAGS}