blob: 3c98546bff60d2acd95ff8ab056ec189d60ecb16 (
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
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-haskell/c2hs/c2hs-0.13.4.ebuild,v 1.1.1.1 2005/11/30 09:48:22 chriswhite Exp $
inherit ghc-package
DESCRIPTION="An interface generator for Haskell"
HOMEPAGE="http://www.cse.unsw.edu.au/~chak/haskell/c2hs/"
SRC_URI="http://www.cse.unsw.edu.au/~chak/haskell/c2hs/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64 ~ppc"
IUSE=""
DEPEND=">=virtual/ghc-6.0
!>=virtual/ghc-6.4"
src_unpack() {
unpack ${A}
# don't add ghc version to libdir
sed -i 's:-$(PCKVERSION)/$(SYS)::' ${S}/mk/config.mk.in \
|| die "config.mk.in patch didn't apply"
sed -i 's:-@C2HS_VERSION@/@SYS@::' ${S}/c2hs/c2hs.conf.in \
|| die "c2hs.conf.in patch didn't apply"
}
src_compile() {
econf \
--disable-add-package \
--libdir=$(ghc-libdir) \
|| die "configure failed"
# tested -j2; doesn't work
emake -j1 || die "make failed"
}
src_install() {
make DESTDIR=${D} install || die "make install failed"
cp ${D}/$(ghc-libdir)/c2hs/c2hs.conf ${S}/$(ghc-localpkgconf)
ghc-makeghcilib ${D}/$(ghc-libdir)/c2hs/libc2hs.a
ghc-install-pkg
}
|