/[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.40 Revision 1.41
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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.40 2013/05/11 12:46:32 slyfox Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.41 2013/07/29 12:31:35 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:
240 set -- haddock --hyperlink-source 240 set -- haddock --hyperlink-source
241 echo ./setup "$@" 241 echo ./setup "$@"
242 ./setup "$@" --hyperlink-source || die "setup haddock --hyperlink-source failed" 242 ./setup "$@" --hyperlink-source || die "setup haddock --hyperlink-source failed"
243} 243}
244 244
245cabal-die-if-nonempty() {
246 local breakage_type=$1
247 shift
248
249 [[ "${#@}" == 0 ]] && return 0
250 eerror "Detected ${breakage_type} packages: ${@}"
251 die "//==-- Please, run 'haskell-updater' to fix ${breakage_type} packages --==//"
252}
253
245cabal-show-brokens() { 254cabal-show-brokens() {
246 # pretty-printer 255 # pretty-printer
247 $(ghc-getghcpkg) check 2>&1 \ 256 $(ghc-getghcpkg) check 2>&1 \
248 | egrep -v '^Warning: haddock-(html|interfaces): ' \ 257 | egrep -v '^Warning: haddock-(html|interfaces): ' \
249 | egrep -v '^Warning: include-dirs: ' 258 | egrep -v '^Warning: include-dirs: '
250 259
260 cabal-die-if-nonempty 'broken' \
251 set -- $($(ghc-getghcpkg) check --simple-output) 261 $($(ghc-getghcpkg) check --simple-output)
252 [[ "${#@}" == 0 ]] && return 0 262}
253 263
254 eerror "Detected broken packages: ${@}" 264cabal-show-old() {
255 265 cabal-die-if-nonempty 'outdated' \
256 die "//==-- Please, run 'haskell-updater' to fix broken packages --==//" 266 $("${EPREFIX}"/usr/sbin/haskell-updater --quiet --upgrade --list-only)
257} 267}
258 268
259cabal-show-brokens-and-die() { 269cabal-show-brokens-and-die() {
260 cabal-show-brokens 270 cabal-show-brokens
271 cabal-show-old
261 272
262 die "$@" 273 die "$@"
263} 274}
264 275
265cabal-configure() { 276cabal-configure() {

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.20