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