/[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.1 Revision 1.2
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.1 2005/09/13 12:53:34 kosmikus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.2 2005/12/05 12:24:53 dcoutts Exp $
4# 4#
5# Original authors: Andres Loeh <kosmikus@gentoo.org> 5# Original authors: Andres Loeh <kosmikus@gentoo.org>
6# Duncan Coutts <dcoutts@gentoo.org> 6# Duncan Coutts <dcoutts@gentoo.org>
7# Maintained by: Haskell herd <haskell@gentoo.org> 7# Maintained by: Haskell herd <haskell@gentoo.org>
8# 8#
113 ./setup haddock || die "setup haddock failed" 113 ./setup haddock || die "setup haddock failed"
114} 114}
115 115
116cabal-configure() { 116cabal-configure() {
117 if [[ -n "${CABAL_USE_PROFILE}" ]] && use profile; then 117 if [[ -n "${CABAL_USE_PROFILE}" ]] && use profile; then
118 cabalconf="${cabalconf} --enable-executable-profiling" 118 cabalconf="${cabalconf} --enable-executable-profiling";
119 cabalconf="${cabalconf} --enable-library-profiling"
119 fi 120 fi
120 121
121 ./setup configure \ 122 ./setup configure \
122 --ghc --prefix=/usr \ 123 --ghc --prefix=/usr \
123 --with-compiler="$(ghc-getghc)" \ 124 --with-compiler="$(ghc-getghc)" \
150 151
151cabal-pkg() { 152cabal-pkg() {
152 # This does not actually register since we're using /usr/bin/true instead 153 # This does not actually register since we're using /usr/bin/true instead
153 # of ghc-pkg. So it just leaves the .installed-pkg-config and we can 154 # of ghc-pkg. So it just leaves the .installed-pkg-config and we can
154 # register that ourselves (if it exists). 155 # register that ourselves (if it exists).
156 local result
157 local err
158
155 sed -i 's:ghc-pkg:/usr/bin/true:' .setup-config 159 sed -i 's:ghc-pkg:/usr/bin/true:' .setup-config
156 ./setup register || die "setup register failed" 160 result="$(./setup register 2>&1)"
161 err="$?"
162 if ! echo ${result} | grep -q "no library to register"; then
163 $(exit "${err}") || die "setup register failed"
164 fi
157 if [[ -f .installed-pkg-config ]]; then 165 if [[ -f .installed-pkg-config ]]; then
158 ghc-setup-pkg .installed-pkg-config 166 ghc-setup-pkg .installed-pkg-config
159 ghc-install-pkg 167 ghc-install-pkg
160 fi 168 fi
161} 169}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20