1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 # ebuild generated by hackport 0.4.6.9999
7 #hackport: flags: +small_base
9 CABAL_FEATURES="bin test-suite"
10 inherit autotools eutils haskell-cabal
12 DESCRIPTION="Alex is a tool for generating lexical analysers in Haskell"
13 HOMEPAGE="http://www.haskell.org/alex/"
14 SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
18 KEYWORDS="~alpha amd64 ~ia64 ~ppc ~ppc64 ~sparc x86"
21 RDEPEND=">=dev-haskell/quickcheck-2:2=
22 >=dev-lang/ghc-7.4.1:=
25 >=dev-haskell/cabal-1.8
26 doc? ( ~app-text/docbook-xml-dtd-4.2
27 app-text/docbook-xsl-stylesheets
28 >=dev-libs/libxslt-1.1.2 )
32 # drop depend on itself and happy, otherwise cabal tries to regenerate it
33 rm src/{Scan.x,Parser.y} || die
35 for f in Scan Parser; do
36 mv "${S}/dist/build/alex/alex-tmp/$f.hs" "${S}"/src/ || die
46 # make sure we don't accidentally use those
48 haskell-cabal_src_configure \
63 emake -C "${S}/doc/" -j1
68 # workaround https://github.com/haskell/cabal/issues/2398
69 emake -k -C tests all || die
76 doman "${S}/doc/alex.1"
77 dohtml -r "${S}/doc/alex/"