diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2012-01-20 18:24:09 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2012-01-20 18:24:09 +0000 |
commit | e19cfa425606bd89ff15af9ab4dbe754679cbb36 (patch) | |
tree | a372ed8e2f32776fea02b99f50cbeab4cb04b89d /eclass/haskell-cabal.eclass | |
parent | Backport --with-udev and --with-udev-rules change from 1.1.2. (diff) | |
download | historical-e19cfa425606bd89ff15af9ab4dbe754679cbb36.tar.gz historical-e19cfa425606bd89ff15af9ab4dbe754679cbb36.tar.bz2 historical-e19cfa425606bd89ff15af9ab4dbe754679cbb36.zip |
Added stdout echoing of most executed phase commands. Added stub for CABAL_USE_HSCOLOUR feature to ease ebuild syncing from haskell overlay.
Diffstat (limited to 'eclass/haskell-cabal.eclass')
-rw-r--r-- | eclass/haskell-cabal.eclass | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass index 2de1388aaeab..74e19bc70a21 100644 --- a/eclass/haskell-cabal.eclass +++ b/eclass/haskell-cabal.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# 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.25 2011/08/22 04:46:32 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.26 2012/01/20 18:24:09 slyfox Exp $ # @ECLASS: haskell-cabal.eclass # @MAINTAINER: @@ -73,6 +73,7 @@ for feature in ${CABAL_FEATURES}; do case ${feature} in haddock) CABAL_USE_HADDOCK=yes;; hscolour) CABAL_USE_HSCOLOUR=yes;; + hoogle) CABAL_USE_HOOGLE=yes;; alex) CABAL_USE_ALEX=yes;; happy) CABAL_USE_HAPPY=yes;; c2hs) CABAL_USE_C2HS=yes;; @@ -175,10 +176,12 @@ cabal-bootstrap() { einfo "Using cabal-$(cabal-version)." make_setup() { - $(ghc-getghc) -package "${cabalpackage}" --make "${setupmodule}" \ + set -- -package "${cabalpackage}" --make "${setupmodule}" \ ${GHC_BOOTSTRAP_FLAGS} \ "$@" \ -o setup + echo $(ghc-getghc) "$@" + $(ghc-getghc) "$@" } if $(ghc-supports-shared-libraries); then # some custom build systems might use external libraries, @@ -205,16 +208,22 @@ cabal-mksetup() { } cabal-hscolour() { - ./setup hscolour || die "setup hscolour failed" + set -- hscolour "$@" + echo ./setup "$@" + ./setup "$@" || die "setup hscolour failed" } cabal-haddock() { - ./setup haddock || die "setup haddock failed" + set -- haddock "$@" + echo ./setup "$@" + ./setup "$@" || die "setup haddock failed" } cabal-hscolour-haddock() { # --hyperlink-source implies calling 'setup hscolour' - ./setup haddock --hyperlink-source || die "setup haddock failed" + set -- haddock --hyperlink-source + echo ./setup "$@" + ./setup "$@" --hyperlink-source || die "setup haddock --hyperlink-source failed" } cabal-configure() { @@ -279,7 +288,7 @@ cabal-configure() { $(ghc-supports-shared-libraries) && \ cabalconf="${cabalconf} --enable-shared" - ./setup configure \ + set -- configure \ --ghc --prefix="${EPREFIX}"/usr \ --with-compiler="$(ghc-getghc)" \ --with-hc-pkg="$(ghc-getghcpkg)" \ @@ -291,21 +300,25 @@ cabal-configure() { ${cabalconf} \ ${CABAL_CONFIGURE_FLAGS} \ ${CABAL_EXTRA_CONFIGURE_FLAGS} \ - "$@" || die "setup configure failed" + "$@" + echo ./setup "$@" + ./setup "$@" || die "setup configure failed" } cabal-build() { unset LANG LC_ALL LC_MESSAGES - ./setup build \ + set -- build "$@" + echo ./setup "$@" + ./setup "$@" \ || die "setup build failed" } cabal-copy() { has "${EAPI:-0}" 0 1 2 && ! use prefix && ED=${D} - ./setup copy \ - --destdir="${D}" \ - || die "setup copy failed" + set -- copy --destdir="${D}" "$@" + echo ./setup "$@" + ./setup "$@" || die "setup copy failed" # cabal is a bit eager about creating dirs, # so remove them if they are empty @@ -451,7 +464,9 @@ haskell-cabal_src_test() { einfo ">>> No tests for dummy library: ${CATEGORY}/${PF}" else einfo ">>> Test phase [cabal test]: ${CATEGORY}/${PF}" - ./setup test || die "cabal test failed" + set -- test "$@" + echo ./setup "$@" + ./setup "$@" || die "cabal test failed" fi popd > /dev/null |