blob: 8290cfaa8e03584b0819dcd29f812b74e3c91a47 (
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
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haskell-src-exts/haskell-src-exts-0.2.ebuild,v 1.12 2010/07/12 18:53:17 slyfox Exp $
CABAL_FEATURES="lib happy"
inherit base haskell-cabal eutils versionator
DESCRIPTION="An extension to haskell-src that handles most common syntactic extensions to Haskell"
HOMEPAGE="http://www.cs.chalmers.se/~d00nibro/haskell-src-exts/"
SRC_URI="http://www.cs.chalmers.se/~d00nibro/haskell-src-exts/haskell-src-exts-${PV}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
IUSE=""
DEPEND=">=dev-lang/ghc-6.2
dev-haskell/happy"
S=${WORKDIR}/haskell-src-exts/src/haskell-src-exts
CABAL_CONFIGURE_FLAGS="--constraint=base<4"
src_unpack() {
base_src_unpack
# Make it work with ghc 6.6
cd "${S}"
epatch "${FILESDIR}/${P}-hiding-isSymbol.patch"
# Make it work with ghc pre-6.4
sed -i 's/{-# OPTIONS_GHC /{-# OPTIONS /' \
"${S}/Language/Haskell/Hsx/Syntax.hs" \
"${S}/Language/Haskell/Hsx/Pretty.hs"
sed -i 's/#ifdef __GLASGOW_HASKELL__/#if __GLASGOW_HASKELL__>=604/' \
"${S}/Language/Haskell/Hsx/Syntax.hs"
if version_is_at_least "6.8" "$(ghc-version)"; then
sed -i -e '/Build-Depends:/a \
, array, pretty' \
"${S}/${PN}.cabal"
fi
}
|