dev-haskell/edisonapi: bump up to 1.3.1-r1
[gentoo.git] / dev-haskell / happy / happy-1.19.12.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 # ebuild generated by hackport 0.6.9999
7 #hackport: flags: +small_base
8
9 CABAL_FEATURES="test-suite"
10 inherit haskell-cabal autotools
11
12 DESCRIPTION="Happy is a parser generator for Haskell"
13 HOMEPAGE="https://www.haskell.org/happy/"
14 SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
15
16 LICENSE="BSD-2"
17 SLOT="0"
18 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
19 IUSE="doc"
20
21 RDEPEND=">=dev-haskell/mtl-2.2.1:=
22         >=dev-lang/ghc-7.4.1:=
23 "
24 DEPEND="${RDEPEND}
25         >=dev-haskell/cabal-1.8
26         doc? ( ~app-text/docbook-xml-dtd-4.2
27                         app-text/docbook-xsl-stylesheets )
28 "
29
30 src_prepare() {
31         default
32
33         if use doc; then
34                 cd doc || die
35                 eautoconf
36         fi
37 }
38
39 src_configure() {
40         # '--with-happy=false' allows detecting circular
41         # depends even when 'happy' is installed in system
42         haskell-cabal_src_configure \
43                 --with-happy=false\
44                 --flag=small_base
45
46         if use doc; then
47                 # does not like out-of-source builds
48                 cd doc || die
49                 econf
50         fi
51 }
52
53 src_compile() {
54         haskell-cabal_src_compile
55
56         if use doc; then
57                 emake -C doc -j1
58         fi
59 }
60
61 src_install() {
62         haskell-cabal_src_install
63
64         if use doc; then
65                 docinto html
66                 dodoc -r doc/happy/.
67                 doman doc/happy.1
68         fi
69 }