1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 # ebuild generated by hackport 0.5.9999
7 #hackport: flags: +small_base
9 CABAL_FEATURES="test-suite"
10 inherit autotools haskell-cabal
12 DESCRIPTION="Alex is a tool for generating lexical analysers in Haskell"
13 HOMEPAGE="http://www.haskell.org/alex/"
14 SRC_URI="https://hackage.haskell.org/package/${P}/${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 )
31 RESTRICT=test # fails tests
36 # drop depend on itself and happy, otherwise cabal tries to regenerate it
37 rm src/{Scan.x,Parser.y} || die
39 for f in Scan Parser; do
40 mv "${S}/dist/build/alex/alex-tmp/$f.hs" "${S}"/src/ || die
50 # make sure we don't accidentally use those
52 haskell-cabal_src_configure \
64 haskell-cabal_src_compile
67 emake -C "${S}/doc/" -j1
72 # workaround https://github.com/haskell/cabal/issues/2398
77 haskell-cabal_src_install
80 doman "${S}/doc/alex.1"
81 dohtml -r "${S}/doc/alex/"