/[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.3 Revision 1.5
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.3 2004/11/04 13:13:59 kosmikus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.5 2004/11/24 15:05:49 kosmikus 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.
53 53
54# make a ghci foo.o file from a libfoo.a file 54# make a ghci foo.o file from a libfoo.a file
55ghc-makeghcilib() { 55ghc-makeghcilib() {
56 local outfile 56 local outfile
57 outfile="$(dirname $1)/$(basename $1 | sed 's:^lib\?\(.*\)\.a$:\1.o:')" 57 outfile="$(dirname $1)/$(basename $1 | sed 's:^lib\?\(.*\)\.a$:\1.o:')"
58 ld --relocatable --discard-all --output="${outfile}" $1 58 ld --relocatable --discard-all --output="${outfile}" --whole-archive $1
59} 59}
60 60
61# creates a local (package-specific) package 61# creates a local (package-specific) package
62# configuration file; the arguments should be 62# configuration file; the arguments should be
63# uninstalled package description files, each 63# uninstalled package description files, each
99# re-adds all available .conf files to the global 99# re-adds all available .conf files to the global
100# package conf file, to be used on a ghc reinstallation 100# package conf file, to be used on a ghc reinstallation
101ghc-reregister() { 101ghc-reregister() {
102 einfo "Re-adding packages ..." 102 einfo "Re-adding packages ..."
103 ewarn "This may cause several warnings, but they should be harmless." 103 ewarn "This may cause several warnings, but they should be harmless."
104 if [ -d "$(ghc-confdir)" ]; then
104 pushd $(ghc-confdir) 105 pushd $(ghc-confdir)
105 for conf in *.conf; do 106 for conf in *.conf; do
106 einfo "Processing ${conf} ..." 107 einfo "Processing ${conf} ..."
107 ghc-register-pkg ${conf} 108 ghc-register-pkg ${conf}
108 done 109 done
109 popd 110 popd
111 fi
110} 112}
111 113
112# unregisters ... 114# unregisters ...
113ghc-unregister-pkg() { 115ghc-unregister-pkg() {
114 local localpkgconf 116 local localpkgconf

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20