/[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.10 Revision 1.14
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.10 2005/05/08 14:49:25 dcoutts Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.14 2005/07/11 15:08:06 swegener Exp $
4# 4#
5# Author: Andres Loeh <kosmikus@gentoo.org> 5# Author: Andres Loeh <kosmikus@gentoo.org>
6# 6#
7# This eclass helps with the Glasgow Haskell Compiler's package 7# This eclass helps with the Glasgow Haskell Compiler's package
8# configuration utility. 8# configuration utility.
9 9
10inherit versionator 10inherit versionator
11 11
12ECLASS="ghc-package"
13INHERITED="${INHERITED} ${ECLASS}"
14 12
15# promote /opt/ghc/bin to a better position in the search path 13# promote /opt/ghc/bin to a better position in the search path
16PATH="/usr/bin:/opt/ghc/bin:${PATH}" 14PATH="/usr/bin:/opt/ghc/bin:${PATH}"
17 15
18# for later configuration using environment variables/ 16# for later configuration using environment variables/
90 local localpkgconf 88 local localpkgconf
91 localpkgconf="${S}/$(ghc-localpkgconf)" 89 localpkgconf="${S}/$(ghc-localpkgconf)"
92 echo '[]' > ${localpkgconf} 90 echo '[]' > ${localpkgconf}
93 for pkg in $*; do 91 for pkg in $*; do
94 $(ghc-getghcpkgbin) -f ${localpkgconf} -u --force \ 92 $(ghc-getghcpkgbin) -f ${localpkgconf} -u --force \
95 < ${pkg} 93 < ${pkg} || die "failed to register ${pkg}"
96 done 94 done
97} 95}
98 96
99# fixes the library and import directories path 97# fixes the library and import directories path
100# of the package configuration file 98# of the package configuration file
101ghc-fixlibpath() { 99ghc-fixlibpath() {
102 sed -i "s|$1|$(ghc-libdir)|g" ${S}/$(ghc-localpkgconf) 100 sed -i "s|$1|$(ghc-libdir)|g" ${S}/$(ghc-localpkgconf)
103 if [[ -n "$2" ]]; then 101 if [[ -n "$2" ]]; then
104 sed -i "s|$2|$(ghc-libdir)/imports|g" ${S}/$(ghc-localpkgconf) 102 sed -i "s|$2|$(ghc-libdir)/imports|g" ${S}/$(ghc-localpkgconf)
105 fi 103 fi
106} 104}
107 105

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20