summaryrefslogtreecommitdiff
path: root/dev-haskell/happy
diff options
context:
space:
mode:
Diffstat (limited to 'dev-haskell/happy')
-rw-r--r--dev-haskell/happy/Manifest6
-rw-r--r--dev-haskell/happy/files/happy-1.19.5-ghc-7.10.2.patch27
-rw-r--r--dev-haskell/happy/happy-1.19.4.ebuild66
-rw-r--r--dev-haskell/happy/happy-1.19.5.ebuild73
-rw-r--r--dev-haskell/happy/metadata.xml11
5 files changed, 183 insertions, 0 deletions
diff --git a/dev-haskell/happy/Manifest b/dev-haskell/happy/Manifest
new file mode 100644
index 000000000000..45c59a73de2a
--- /dev/null
+++ b/dev-haskell/happy/Manifest
@@ -0,0 +1,6 @@
+AUX happy-1.19.5-ghc-7.10.2.patch 940 BLAKE2B c3c87413be01ad73b33ee7cda3e95063c94dd901045491b3ec6a7b78a05447cc7f917c76c9f8497fa7887ec0315893566af3d0d13a0c6a5fff194b917695da65 SHA512 8866180fc18c7390132cef311b40b890f2d768296302f3a85cba2fcfc6abb523de6280dd6046da3fbc45915a7d866df5ec6725fe229c168482854d00cbe66d65
+DIST happy-1.19.4.tar.gz 160497 BLAKE2B a8a271ea69100d24b9a293d53e2a3262ad34c26cc9b511648cf64df719c49936b5badc6651191ca52b48ed96660335e86e706763e186f5275de1b58ae528631c SHA512 d49893098f9982321fc03dad464bf787873a1a82167165d53f617ba04923c7e5d8f177def7fa045a5669d1c7f886a88087ba8f668ef1900a71498b5800cc4b1a
+DIST happy-1.19.5.tar.gz 159280 BLAKE2B 5cfbddd981d689cfd076367e49f5b9fcfa38eca071a3d1d347a2074eb9c56436f6c7169d524b6628228472ee31ae1ccce3b5e1bcd0ae2b70d31283e3b4e33ee8 SHA512 7b43ef5236bdfba82bbddedb7edc7a8094990a389c0d3f5f848cb6208c3577e7b394cb290e51a2b2eebca25c97978a85ee932e74bbf6a792e261e5b5bff25a2b
+EBUILD happy-1.19.4.ebuild 1401 BLAKE2B c4ccf7a7e454cfd189ac431d2894232580ade8d0cf78386b1abc60d9b856eddbdda6ad0cc048356a27e6e491db24aebfccf75524ef399084abebaddefd8e621b SHA512 a904577fb3a6a8fa989cba8366f6785be84be9df612bb659ad95d45e125b03fe0e3d0f2af930257a8dcee91864fed7b2a62060b1c79476e9a79f725085905be9
+EBUILD happy-1.19.5.ebuild 1564 BLAKE2B a35d8f94b47e326768bef76cf1be980c05f3a3c2451ebd4e6ef235b55491864b8c5e119871ad6a8ce98da31f99392d92990e06dcc04647cb452f904cd7564fdf SHA512 d03e33ce278eb9da0457d7ec53ebc223ed2e1746c4461fe9f8c3db7b03fe3e7196450759b00cb874a7281083917d2fd684bf9688656358efd24c2845b425a727
+MISC metadata.xml 330 BLAKE2B 12dc311da8b192ead3d26e96a70e56d8aaed9ca86162993d1277f5738c0929cd058cde3a47e72ea0e0bbf268bf404b88cf602738f8dd34f0bb95fbd66afdeb78 SHA512 505782103d2814ce34e9e6e7ad91cd466c3f6593e636f9e38eb70e5c89892c2231e24feb310ebd4a33af0d15cc0cc58bd083da6573f65a1604fdbc3dd9380889
diff --git a/dev-haskell/happy/files/happy-1.19.5-ghc-7.10.2.patch b/dev-haskell/happy/files/happy-1.19.5-ghc-7.10.2.patch
new file mode 100644
index 000000000000..dee216b029fb
--- /dev/null
+++ b/dev-haskell/happy/files/happy-1.19.5-ghc-7.10.2.patch
@@ -0,0 +1,27 @@
+I'm not sure if it's a ghc feature or a bug.
+Should happy emable that extension for -g option?
+
+The build error is Kind mismatch:
+
+ monad002.g.hs:296:26:
+ Couldn't match kind ‘*’ with ‘#’
+ When matching types
+ t0 :: *
+ Happy_GHC_Exts.Int# :: #
+ Relevant bindings include
+ cont :: t0 -> [Char] -> Int -> ParseResult a
+ (bound at monad002.g.hs:293:13)
+ In the first argument of ‘cont’, namely ‘8#’
+ In the expression: cont 8#
+ In a case alternative: TokenLet -> cont 8#
+
+Slightly related bug: https://ghc.haskell.org/trac/ghc/ticket/8739
+
+diff --git a/tests/monad002.ly b/tests/monad002.ly
+index 35cc5b0..4c526ca 100644
+--- a/tests/monad002.ly
++++ b/tests/monad002.ly
+@@ -5,2 +5,3 @@ Test for monadic Happy Parsers, Simon Marlow 1996.
+ > {-# OPTIONS_GHC -fglasgow-exts #-}
++> {-# LANGUAGE MonoLocalBinds #-}
+ > -- -fglasgow-exts required because P is a type synonym, and Happy uses it
diff --git a/dev-haskell/happy/happy-1.19.4.ebuild b/dev-haskell/happy/happy-1.19.4.ebuild
new file mode 100644
index 000000000000..8961425f8b2e
--- /dev/null
+++ b/dev-haskell/happy/happy-1.19.4.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.4.9999
+
+CABAL_FEATURES="bin test-suite"
+inherit eutils haskell-cabal autotools
+
+DESCRIPTION="Happy is a parser generator for Haskell"
+HOMEPAGE="http://www.haskell.org/happy/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+ >=dev-haskell/mtl-1.0
+ >=dev-lang/ghc-6.10.4
+ doc? ( ~app-text/docbook-xml-dtd-4.2
+ app-text/docbook-xsl-stylesheets )
+"
+
+src_prepare() {
+ for f in AttrGrammarParser Parser; do
+ # drop broken autogenerated
+ mv "dist/build/happy/happy-tmp/$f.hs" src/ || die
+ # drop depend on itself, otherwise cabal tries to regenerate it
+ rm "src/$f.ly" || die
+ done
+ use doc && cd doc && eautoconf
+}
+
+src_configure() {
+ # '--with-happy=false' allows detecting circular
+ # depends even when 'happy' is installed in system
+ haskell-cabal_src_configure --with-happy=false
+
+ if use doc; then
+ # does not like out-of-source builds
+ cd doc || die
+ econf
+ fi
+}
+
+src_compile() {
+ haskell-cabal_src_compile
+
+ if use doc; then
+ emake -C doc -j1
+ fi
+}
+
+src_install() {
+ haskell-cabal_src_install
+ if use doc; then
+ cd doc || die
+ dohtml -r happy/*
+ doman "${S}/doc/happy.1"
+ fi
+}
diff --git a/dev-haskell/happy/happy-1.19.5.ebuild b/dev-haskell/happy/happy-1.19.5.ebuild
new file mode 100644
index 000000000000..5ba52024b7dc
--- /dev/null
+++ b/dev-haskell/happy/happy-1.19.5.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.4.9999
+
+CABAL_FEATURES="bin test-suite"
+inherit eutils haskell-cabal autotools
+
+DESCRIPTION="Happy is a parser generator for Haskell"
+HOMEPAGE="http://www.haskell.org/happy/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+ >=dev-haskell/mtl-1.0
+ >=dev-lang/ghc-6.10.4
+ doc? ( ~app-text/docbook-xml-dtd-4.2
+ app-text/docbook-xsl-stylesheets )
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.19.5-ghc-7.10.2.patch
+
+ for f in AttrGrammarParser Parser; do
+ # drop broken autogenerated
+ mv "dist/build/happy/happy-tmp/$f.hs" src/ || die
+ # drop depend on itself, otherwise cabal tries to regenerate it
+ rm "src/$f.ly" || die
+ done
+ use doc && cd doc && eautoconf
+}
+
+src_configure() {
+ # '--with-happy=false' allows detecting circular
+ # depends even when 'happy' is installed in system
+ haskell-cabal_src_configure --with-happy=false
+
+ if use doc; then
+ # does not like out-of-source builds
+ cd doc || die
+ econf
+ fi
+}
+
+src_compile() {
+ haskell-cabal_src_compile
+
+ if use doc; then
+ emake -C doc -j1
+ fi
+}
+
+src_test() {
+ # workaround https://github.com/haskell/cabal/issues/2398
+ emake -k -C tests all || die
+}
+
+src_install() {
+ haskell-cabal_src_install
+ if use doc; then
+ cd doc || die
+ dohtml -r happy/*
+ doman "${S}/doc/happy.1"
+ fi
+}
diff --git a/dev-haskell/happy/metadata.xml b/dev-haskell/happy/metadata.xml
new file mode 100644
index 000000000000..74ae0f3e98e6
--- /dev/null
+++ b/dev-haskell/happy/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+ <longdescription>
+ Happy is a parser generator for Haskell
+ </longdescription>
+</pkgmetadata>