/[gentoo-x86]/eclass/haskell-cabal.eclass
Gentoo

Diff of /eclass/haskell-cabal.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.52 Revision 1.53
1# Copyright 1999-2015 Gentoo Foundation 1# Copyright 1999-2015 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.52 2015/07/20 15:05:49 slyfox Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.53 2015/08/06 08:20:33 slyfox Exp $
4 4
5# @ECLASS: haskell-cabal.eclass 5# @ECLASS: haskell-cabal.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Haskell herd <haskell@gentoo.org> 7# Haskell herd <haskell@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
201 setup_bootstrap_args+=(-threaded) 201 setup_bootstrap_args+=(-threaded)
202 fi 202 fi
203 203
204 make_setup() { 204 make_setup() {
205 set -- -package "${cabalpackage}" --make "${setupmodule}" \ 205 set -- -package "${cabalpackage}" --make "${setupmodule}" \
206 ${setup_bootstrap_args} \ 206 "${setup_bootstrap_args[@]}" \
207 ${HCFLAGS} \ 207 ${HCFLAGS} \
208 ${GHC_BOOTSTRAP_FLAGS} \ 208 ${GHC_BOOTSTRAP_FLAGS} \
209 "$@" \ 209 "$@" \
210 -o setup 210 -o setup
211 echo $(ghc-getghc) "$@" 211 echo $(ghc-getghc) "$@"
485# Those versions are taken as-is from ghc `--numeric-version`. 485# Those versions are taken as-is from ghc `--numeric-version`.
486# Package manager versions are also supported: 486# Package manager versions are also supported:
487# CABAL_CORE_LIB_GHC_PV="7.10.* PM:7.8.4-r1". 487# CABAL_CORE_LIB_GHC_PV="7.10.* PM:7.8.4-r1".
488cabal-is-dummy-lib() { 488cabal-is-dummy-lib() {
489 local bin_ghc_version=$(ghc-version) 489 local bin_ghc_version=$(ghc-version)
490 local pm_ghc_p=$(best_version dev-lang/ghc)
491 local pm_ghc_version version 490 local pm_ghc_version=$(ghc-pm-version)
492 491
493 pm_ghc_version=PM:${pm_ghc_p#dev-lang/ghc-}
494
495 for version in ${CABAL_CORE_LIB_GHC_PV[*]}; do 492 for version in ${CABAL_CORE_LIB_GHC_PV}; do
496 [[ "${bin_ghc_version}" == ${version} ]] && return 0 493 [[ "${bin_ghc_version}" == ${version} ]] && return 0
497 [[ "${pm_ghc_version}" == ${version} ]] && return 0 494 [[ "${pm_ghc_version}" == ${version} ]] && return 0
498 done 495 done
499 496
500 return 1 497 return 1

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

  ViewVC Help
Powered by ViewVC 1.1.20