blob: 7f6b5b946c60222a781e7529532a6655cd946783 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/ghc-bin/ghc-bin-6.2.1.ebuild,v 1.4 2005/02/19 18:53:42 weeve Exp $
IUSE=""
S="${WORKDIR}"
DESCRIPTION="Glasgow Haskell Compiler (binary-only version for amd64)"
SRC_URI="http://debian-amd64.alioth.debian.org/pure64/pool/unstable/main/amd64/g/ghc6/ghc6_6.2.1-5_amd64.deb"
HOMEPAGE="http://www.haskell.org"
LICENSE="as-is"
KEYWORDS="-* ~amd64 -sparc"
SLOT="0"
DEPEND="app-arch/dpkg"
RDEPEND=">=dev-lang/perl-5.6.1
>=sys-devel/gcc-2.95.3
>=dev-libs/gmp-4.1"
PROVIDE="virtual/ghc"
src_unpack() {
for i in ${A}; do
dpkg -x ${DISTDIR}/${i} .
done
}
src_install () {
# Copy it
mkdir -p ${D}/opt/ghc
for i in lib share; do
cp -rl usr/$i/ghc-6.2.1 ${D}/opt/ghc/$i
done
# Provide package.conf
pushd ${D}/opt/ghc/lib
cp -a package.conf.shipped package.conf
popd
# Generate symlinks in ${D}/opt/ghc/bin
mkdir -p ${D}/opt/ghc/bin
pushd ${D}/opt/ghc/bin
ln -s ../lib/bin/ghc ghc-${PV}
ln -s ../lib/bin/ghci ghci-${PV}
ln -s ../lib/bin/ghc-pkg ghc-pkg-${PV}
ln -s ghc-${PV} ghc
ln -s ghci-${PV} ghci
ln -s ghc-pkg-${PV} ghc-pkg
popd
# TODO: what about documentation
# TODO: can clean_wrappers be reused from the other ghc-bin
# ebuilds; isn't RDEPEND perl needed if we call perl here?
# Adjust paths in ${D}/opt/ghc/lib/bin
pushd ${D}/opt/ghc/lib/bin
perl -i -ne "s:/usr/lib/ghc-${PV}:/opt/ghc/lib:g;
s:/usr/share/ghc-${PV}:/opt/ghc/share:g;print" \
ghc-${PV} ghci-${PV} ghcprof hsc2hs ghc-pkg-${PV}
popd
insinto /etc/env.d
doins ${FILESDIR}/10ghc
}
|