diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2013-01-06 13:06:35 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2013-01-06 13:06:35 +0000 |
commit | 3d2f8b5be2a13858186dd9adf43271fbe4ca733d (patch) | |
tree | ea628ffae2b8bb35db33604174b910eb7fa062b6 /eclass | |
parent | Cleanup. (diff) | |
download | gentoo-2-3d2f8b5be2a13858186dd9adf43271fbe4ca733d.tar.gz gentoo-2-3d2f8b5be2a13858186dd9adf43271fbe4ca733d.tar.bz2 gentoo-2-3d2f8b5be2a13858186dd9adf43271fbe4ca733d.zip |
Added 'ghc-supports-threaded-runtime' function. Removed implicit RDEPEND on 'ghc'.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 7 | ||||
-rw-r--r-- | eclass/ghc-package.eclass | 12 | ||||
-rw-r--r-- | eclass/haskell-cabal.eclass | 14 |
3 files changed, 23 insertions, 10 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index fffba7408441..1302b2256b8b 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.601 2013/01/05 10:02:44 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.602 2013/01/06 13:06:35 slyfox Exp $ + + 06 Jan 2013; Sergei Trofimovich <slyfox@gentoo.org> ghc-package.eclass, + haskell-cabal.eclass: + Added 'ghc-supports-threaded-runtime' function. Removed implicit RDEPEND on + 'ghc'. 05 Jan 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass: Support overriding job-count for parallel build. diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass index a9b8e7a1ba37..feef71e7e6f3 100644 --- a/eclass/ghc-package.eclass +++ b/eclass/ghc-package.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.35 2012/11/16 15:47:17 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.36 2013/01/06 13:06:35 slyfox Exp $ # @ECLASS: ghc-package.eclass # @MAINTAINER: @@ -94,6 +94,14 @@ ghc-supports-shared-libraries() { $(ghc-getghc) --info | grep "RTS ways" | grep -q "dyn" } +# @FUNCTION: ghc-supports-threaded-runtime +# @DESCRIPTION: +# checks if ghc is built with support for threaded +# runtime (aka '-threaded' option) +ghc-supports-threaded-runtime() { + $(ghc-getghc) --info | grep "RTS ways" | grep -q "thr" +} + # @FUNCTION: ghc-extractportageversion # @DESCRIPTION: # extract the version of a portage-installed package diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass index 064e4b593589..0db7ec192535 100644 --- a/eclass/haskell-cabal.eclass +++ b/eclass/haskell-cabal.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.37 2012/11/19 21:27:56 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.38 2013/01/06 13:06:35 slyfox Exp $ # @ECLASS: haskell-cabal.eclass # @MAINTAINER: @@ -134,11 +134,6 @@ if [[ -z "${CABAL_BOOTSTRAP}" && -z "${CABAL_FROM_GHC}" ]]; then DEPEND="${DEPEND} >=dev-haskell/cabal-${CABAL_MIN_VERSION}" fi -# Libraries require GHC to be installed. -if [[ -n "${CABAL_HAS_LIBRARIES}" ]]; then - RDEPEND="${RDEPEND} dev-lang/ghc" -fi - # returns the version of cabal currently in use _CABAL_VERSION_CACHE="" cabal-version() { @@ -384,6 +379,9 @@ cabal-is-dummy-lib() { # exported function: check if cabal is correctly installed for # the currently active ghc (we cannot guarantee this with portage) haskell-cabal_pkg_setup() { + if [[ -n ${CABAL_HAS_LIBRARIES} ]]; then + [[ ${RDEPEND} == *dev-lang/ghc* ]] || eqawarn "QA Notice: A library does not have runtime dependency on dev-lang/ghc." + fi if [[ -z "${CABAL_HAS_BINARIES}" ]] && [[ -z "${CABAL_HAS_LIBRARIES}" ]]; then eqawarn "QA Notice: Neither bin nor lib are in CABAL_FEATURES." fi @@ -514,6 +512,8 @@ haskell-cabal_src_install() { popd > /dev/null } +# @FUNCTION: cabal_flag +# @DESCRIPTION: # ebuild.sh:use_enable() taken as base # # Usage examples: |