/[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.23 Revision 1.26
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.23 2007/07/25 18:07:02 dcoutts Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.26 2008/01/06 19:30:24 swegener 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# Maintained by: Haskell herd <haskell@gentoo.org>
7# 7#
8# This eclass helps with the Glasgow Haskell Compiler's package 8# This eclass helps with the Glasgow Haskell Compiler's package
82 done 82 done
83 return 1 83 return 1
84} 84}
85 85
86# checks if ghc and ghc-bin are installed in the same version 86# checks if ghc and ghc-bin are installed in the same version
87# (if they're both installed); if this is not the case, we 87# (if they're both installed); if this is not the case, we
88# unfortunately cannot trust portage's dependency resolution 88# unfortunately cannot trust portage's dependency resolution
89ghc-saneghc() { 89ghc-saneghc() {
90 local ghcversion 90 local ghcversion
91 local ghcbinversion 91 local ghcbinversion
92 if [[ "${PN}" == "ghc" || "${PN}" == "ghc-bin" ]]; then 92 if [[ "${PN}" == "ghc" || "${PN}" == "ghc-bin" ]]; then
265 if ghc-cabal; then 265 if ghc-cabal; then
266 echo $($(ghc-getghcpkg) list -f "${i}") \ 266 echo $($(ghc-getghcpkg) list -f "${i}") \
267 | sed \ 267 | sed \
268 -e "s|^.*${i}:\([^:]*\).*$|\1|" \ 268 -e "s|^.*${i}:\([^:]*\).*$|\1|" \
269 -e "s|/.*$||" \ 269 -e "s|/.*$||" \
270 -e "s|,| |g" -e "s|[()]||g" 270 -e "s|,| |g" -e "s|[(){}]||g"
271 else 271 else
272 echo $($(ghc-getghcpkgbin) -l -f "${i}") \ 272 echo $($(ghc-getghcpkgbin) -l -f "${i}") \
273 | cut -f2 -d':' \ 273 | cut -f2 -d':' \
274 | sed 's:,: :g' 274 | sed 's:,: :g'
275 fi 275 fi

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.20