/[gentoo-x86]/eclass/ghc-package.eclass
Gentoo

Diff of /eclass/ghc-package.eclass

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

Revision 1.15 Revision 1.17
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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/ghc-package.eclass,v 1.15 2005/09/13 12:51:30 kosmikus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.17 2006/06/15 11:27:38 dcoutts Exp $
4# 4#
5# Author: Andres Loeh <kosmikus@gentoo.org> 5# Author: Andres Loeh <kosmikus@gentoo.org>
6# Maintained by: Haskell herd <haskell@gentoo.org>
6# 7#
7# This eclass helps with the Glasgow Haskell Compiler's package 8# This eclass helps with the Glasgow Haskell Compiler's package
8# configuration utility. 9# configuration utility.
9 10
10inherit versionator 11inherit versionator
40 41
41# returns the version of ghc 42# returns the version of ghc
42_GHC_VERSION_CACHE="" 43_GHC_VERSION_CACHE=""
43ghc-version() { 44ghc-version() {
44 if [[ -z "${_GHC_VERSION_CACHE}" ]]; then 45 if [[ -z "${_GHC_VERSION_CACHE}" ]]; then
45 _GHC_VERSION_CACHE="$($(ghc-getghc) --version | sed 's:^.*version ::')" 46 _GHC_VERSION_CACHE="$($(ghc-getghc) --numeric-version)"
46 fi 47 fi
47 echo "${_GHC_VERSION_CACHE}" 48 echo "${_GHC_VERSION_CACHE}"
48} 49}
49 50
50# this function can be used to determine if ghc itself 51# this function can be used to determine if ghc itself

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20