forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
colour-2.3.3-r1.ebuild
38 lines (31 loc) · 1.16 KB
/
colour-2.3.3-r1.ebuild
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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
# ebuild generated by hackport 0.3.2.9999
CABAL_FEATURES="lib profile haddock hoogle hscolour"
inherit haskell-cabal
DESCRIPTION="A model for human colour/color perception"
HOMEPAGE="http://www.haskell.org/haskellwiki/Colour"
SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/${PV}"
KEYWORDS="amd64 x86"
IUSE=""
RDEPEND=">=dev-lang/ghc-6.10.4:="
DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.6"
src_prepare() {
if has_version "<dev-haskell/haddock-2.9.2"; then
# Workaround http://hackage.haskell.org/trac/hackage/ticket/626
# The haddock --hoogle option does not like unicode characters, which causes
# haddock 2.7.2 to fail like:
# haddock: internal Haddock or GHC error: dist/doc/html/enumerator/enumerator.txt: commitAndReleaseBuffer: invalid argument (Invalid or incomplete multibyte or wide character)
sed -e 's@°@ degrees@g' \
-i "${S}/Data/Colour/CIE.hs" \
-i "${S}/Data/Colour/CIE/Chromaticity.hs"
sed -e 's@“@"@g' \
-e 's@”@"@g' \
-i "${S}/Data/Colour/RGB.hs"
fi
}