diff options
-rw-r--r-- | dev-haskell/happy/ChangeLog | 8 | ||||
-rw-r--r-- | dev-haskell/happy/Manifest | 12 | ||||
-rw-r--r-- | dev-haskell/happy/files/happy-1.18.6-man.patch | 12 | ||||
-rw-r--r-- | dev-haskell/happy/files/happy-1.18.6-missing-tests.patch | 164 | ||||
-rw-r--r-- | dev-haskell/happy/happy-1.18.6.ebuild | 62 |
5 files changed, 253 insertions, 5 deletions
diff --git a/dev-haskell/happy/ChangeLog b/dev-haskell/happy/ChangeLog index ac1071fca3eb..db6bb05ff9e9 100644 --- a/dev-haskell/happy/ChangeLog +++ b/dev-haskell/happy/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-haskell/happy # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/happy/ChangeLog,v 1.50 2011/08/02 09:50:03 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/happy/ChangeLog,v 1.51 2011/08/02 10:15:09 slyfox Exp $ + +*happy-1.18.6 (02 Aug 2011) + + 02 Aug 2011; Sergei Trofimovich <slyfox@gentoo.org> +happy-1.18.6.ebuild, + +files/happy-1.18.6-man.patch, +files/happy-1.18.6-missing-tests.patch: + Version bump. 02 Aug 2011; Sergei Trofimovich <slyfox@gentoo.org> -files/happy-1.15-ghc66.patch: diff --git a/dev-haskell/happy/Manifest b/dev-haskell/happy/Manifest index 14acbcb32f9e..7f460f380f91 100644 --- a/dev-haskell/happy/Manifest +++ b/dev-haskell/happy/Manifest @@ -1,17 +1,21 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX happy-1.18.6-man.patch 469 RMD160 aaf1f5eaf3ecbf766e1891606228ed146c29de68 SHA1 19af30ec92c4f34729606968d97b8d9ec32f9867 SHA256 7892274f9f0a8a0b884c4a80b852a7f41e43597efc3251613bdab36442dfd791 +AUX happy-1.18.6-missing-tests.patch 4051 RMD160 a368840178f9d5243144eaf081b6ddaa6efbd104 SHA1 f4daed3e0e360225437bd84963f33c15cbe14c54 SHA256 ba9de7d686e05e070639303862869c70c08b6d1d4d6b89749fa972b86a4ada08 DIST happy-1.18.2.tar.gz 158782 RMD160 9d42d701c51936d705646f32ac2facbfa305ac70 SHA1 1fe37e97f410dd4b4344d0b01e6a5f7cfeec7cf3 SHA256 7515922f3cfd32cd844a0abfefe0b4871f403f0d869b8644bf9cbfc0b67996ae DIST happy-1.18.4.tar.gz 157585 RMD160 846d90e2962c6053acae03ace90de3656ce271b5 SHA1 86c6a61ed8b3909c476c27343f41cb12971d52bd SHA256 909bec4541a92d3765e74756f752514d2d03ec7a5d3e74c18268a57fe7ffa832 +DIST happy-1.18.6.tar.gz 158096 RMD160 c0d0a69af1ec783e60623b3ee0ce07428bdd128e SHA1 728821fb7c8c4754d20ab240626c17a2c0528828 SHA256 840c8fb6b9795faa4fae3c3bf3fb28ad403bc6891002dc703007870823b7cd60 DIST mtl-1.1.0.2.tar.gz 18901 RMD160 e7032fc069c8b24b97725b259d2e6fb05ace208b SHA1 883deca3cdf8052173c995b741bdedccc3c91440 SHA256 a225aaf2b1e337f40c31e5c42f95eec9a4608322b0e4c135d2b31b8421a58d36 EBUILD happy-1.18.2.ebuild 967 RMD160 0f4c3cdc3834e3189a3d4696060ac1d8605dd7d8 SHA1 f7b325a57fb576c0934b5ef1dc7abc1e36b462ab SHA256 0c3a84a5f9f7580540f894351a8d295311d98c64bceb625521d1ddfa999edde4 EBUILD happy-1.18.4.ebuild 1727 RMD160 b8ecabdd63c36e7ec8e4920de262d12b2f6e59e1 SHA1 30513c7cfa307bbd5c80418c4a7d2ba44da954e0 SHA256 8e001a1c4ef7e1d28b03d88013982999ba2ed7aae7c62d06a799cbfc5bd26a89 -MISC ChangeLog 6097 RMD160 4b39c9f6766efb762d4c5f381d515408899ad6c7 SHA1 2d84d07d37ca511a5ea04c97b3cce7a68af17d2e SHA256 60bea2890ce4399fa491bc90376009a0faef8d54e1d18c0b8077db9e0832fcdc +EBUILD happy-1.18.6.ebuild 1348 RMD160 dc3811fdd9eb539bada44c15dbe919e25f03f862 SHA1 2cbb01e72fc394d4e07be78cf127e14ba6149c75 SHA256 cf6d90dcd2a895c7b42054e5c6a55103214a9c2fcfd3b8ceeb2a8c6d15a917e0 +MISC ChangeLog 6293 RMD160 63c14d2034a0fe44c61baa8ed5b02b0180080940 SHA1 c01890fccdaa64ba9a5b5cecbb0800e3c68a867d SHA256 50a23095f07430c918319729dc0952615b3e6dbab58174edee7fab55ee491b65 MISC metadata.xml 223 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 SHA1 7b962c77f2e38479a9d1621ec8d307ca9f761753 SHA256 1d00c8be162a6cb87b3de440b3e63e10b39c12d56e8fbfe592e75aed872b2508 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk43yRsACgkQcaHudmEf86riqQCfdiE694zCfkc8seA0qI5JoQS1 -M0wAnivBQjdZwIuXqJ6vlG+GtdWLDfFx -=8pyT +iEYEARECAAYFAk43zv4ACgkQcaHudmEf86qLxgCggGGIchGijsMH5zGnvmX159Q0 +CA4AmwSuIpZkVYbuIDEVcy6x21Nt1rAj +=zLtd -----END PGP SIGNATURE----- diff --git a/dev-haskell/happy/files/happy-1.18.6-man.patch b/dev-haskell/happy/files/happy-1.18.6-man.patch new file mode 100644 index 000000000000..cd5558cc6607 --- /dev/null +++ b/dev-haskell/happy/files/happy-1.18.6-man.patch @@ -0,0 +1,12 @@ +Tue Aug 2 12:16:38 EEST 2011 Sergei Trofimovich <slyfox@community.haskell.org> + * doc: make happy.1 be buildabale with doc/configure +diff -rN -u old-happy/doc/configure.ac new-happy/doc/configure.ac +--- old-happy/doc/configure.ac 2011-08-02 12:24:20.913926740 +0300 ++++ new-happy/doc/configure.ac 2011-08-02 12:24:20.923926615 +0300 +@@ -9,5 +9,5 @@ + + AC_PATH_PROG(DbLatexCmd,dblatex) + +-AC_CONFIG_FILES([config.mk]) ++AC_CONFIG_FILES([config.mk happy.1]) + AC_OUTPUT diff --git a/dev-haskell/happy/files/happy-1.18.6-missing-tests.patch b/dev-haskell/happy/files/happy-1.18.6-missing-tests.patch new file mode 100644 index 000000000000..b52d9061973a --- /dev/null +++ b/dev-haskell/happy/files/happy-1.18.6-missing-tests.patch @@ -0,0 +1,164 @@ +Tue Aug 2 12:17:31 EEST 2011 Sergei Trofimovich <slyfox@community.haskell.org> + * cabal: add missing tests to distribution tarball +diff -rN -u old-happy/happy.cabal new-happy/happy.cabal +--- old-happy/happy.cabal 2011-08-02 12:24:49.783565818 +0300 ++++ new-happy/happy.cabal 2011-08-02 12:24:49.858564882 +0300 +@@ -100,6 +100,8 @@ + templates/GLR_Base.hs + templates/GenericTemplate.hs + templates/GLR_Lib.hs ++ tests/AttrGrammar001.y ++ tests/AttrGrammar002.y + tests/error001.y + tests/error001.stdout + tests/error001.stderr +Tue Aug 2 12:27:33 EEST 2011 Sergei Trofimovich <slyfox@community.haskell.org> + * tests: fix linkage against haskell98 and array packages +diff -rN -u old-happy/tests/Makefile new-happy/tests/Makefile +--- old-happy/tests/Makefile 2011-08-02 12:28:42.855652016 +0300 ++++ new-happy/tests/Makefile 2011-08-02 12:28:43.009650091 +0300 +@@ -1,5 +1,5 @@ + HAPPY=../dist/build/happy/happy +-HC=ghc ++HC=ghc -package haskell98 -package array + + TESTS = Test.ly TestMulti.ly TestPrecedence.ly bug001.ly \ + monad001.y monad002.ly precedence001.ly precedence002.y \ +diff --git a/tests/AttrGrammar001.y b/tests/AttrGrammar001.y +new file mode 100644 +index 0000000..4454dd6 +--- /dev/null ++++ b/tests/AttrGrammar001.y +@@ -0,0 +1,68 @@ ++{ ++import Control.Monad (unless) ++} ++ ++%tokentype { Char } ++ ++%token a { 'a' } ++%token b { 'b' } ++%token c { 'c' } ++ ++%attributetype { Attrs a } ++%attribute value { a } ++%attribute len { Int } ++ ++%name parse abcstring ++ ++%monad { Maybe } ++ ++%% ++ ++abcstring ++ : alist blist clist ++ { $$ = $1 ++ $2 ++ $3 ++ ; $2.len = $1.len ++ ; $3.len = $1.len ++ } ++ ++alist ++ : a alist ++ { $$ = $1 : $> ++ ; $$.len = $>.len + 1 ++ } ++ | { $$ = []; $$.len = 0 } ++ ++blist ++ : b blist ++ { $$ = $1 : $> ++ ; $>.len = $$.len - 1 ++ } ++ | { $$ = [] ++ ; where failUnless ($$.len == 0) "blist wrong length" ++ } ++ ++clist ++ : c clist ++ { $$ = $1 : $> ++ ; $>.len = $$.len - 1 ++ } ++ | { $$ = [] ++ ; where failUnless ($$.len == 0) "clist wrong length" ++ } ++ ++{ ++happyError = error "parse error" ++failUnless b msg = unless b (fail msg) ++ ++main = case parse "" of { Just _ -> ++ case parse "abc" of { Just _ -> ++ case parse "aaaabbbbcccc" of { Just _ -> ++ case parse "abbcc" of { Nothing -> ++ case parse "aabcc" of { Nothing -> ++ case parse "aabbc" of { Nothing -> ++ putStrLn "Test works"; ++ _ -> quit } ; _ -> quit }; _ -> quit }; ++ _ -> quit } ; _ -> quit }; _ -> quit } ++ ++quit = putStrLn "Test failed" ++} +diff --git a/tests/AttrGrammar002.y b/tests/AttrGrammar002.y +new file mode 100644 +index 0000000..6041951 +--- /dev/null ++++ b/tests/AttrGrammar002.y +@@ -0,0 +1,58 @@ ++ ++%tokentype { Char } ++ ++%token minus { '-' } ++%token plus { '+' } ++%token one { '1' } ++%token zero { '0' } ++ ++%attributetype { Attrs } ++%attribute value { Integer } ++%attribute pos { Int } ++ ++%name parse start ++ ++%monad { Maybe } ++ ++%% ++ ++start ++ : num { $$ = $1 } ++ ++num ++ : bits { $$ = $1 ; $1.pos = 0 } ++ | plus bits { $$ = $2 ; $2.pos = 0 } ++ | minus bits { $$ = negate $2; $2.pos = 0 } ++ ++bits ++ : bit { $$ = $1 ++ ; $1.pos = $$.pos ++ } ++ ++ | bits bit { $$ = $1 + $2 ++ ; $1.pos = $$.pos + 1 ++ ; $2.pos = $$.pos ++ } ++ ++bit ++ : zero { $$ = 0 } ++ | one { $$ = 2^($$.pos) } ++ ++ ++{ ++happyError msg = fail $ "parse error: "++msg ++ ++main = case parse "" of { Nothing -> ++ case parse "abc" of { Nothing -> ++ case parse "0" of { Just 0 -> ++ case parse "1" of { Just 1 -> ++ case parse "101" of { Just 5 -> ++ case parse "111" of { Just 7 -> ++ case parse "10001" of { Just 17 -> ++ putStrLn "Test worked"; ++ _ -> quit }; _ -> quit }; _ -> quit }; ++ _ -> quit }; _ -> quit }; _ -> quit }; ++ _ -> quit } ++ ++quit = putStrLn "Test Failed" ++} diff --git a/dev-haskell/happy/happy-1.18.6.ebuild b/dev-haskell/happy/happy-1.18.6.ebuild new file mode 100644 index 000000000000..b0ba2a830a22 --- /dev/null +++ b/dev-haskell/happy/happy-1.18.6.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/happy/happy-1.18.6.ebuild,v 1.1 2011/08/02 10:15:09 slyfox Exp $ + +# ebuild generated by hackport 0.2.9 + +EAPI="3" + +CABAL_FEATURES="bin" +inherit base haskell-cabal autotools + +DESCRIPTION="Happy is a parser generator for Haskell" +HOMEPAGE="http://www.haskell.org/happy/" +SRC_URI="http://hackage.haskell.org/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.2.3 + >=dev-haskell/mtl-1.0 + >=dev-lang/ghc-6.8.2 + dev-lang/perl + doc? ( ~app-text/docbook-xml-dtd-4.2 + app-text/docbook-xsl-stylesheets )" + +PATCHES=("${FILESDIR}/${PN}-1.18.6-man.patch" + "${FILESDIR}/${PN}-1.18.6-missing-tests.patch") + +src_prepare() { + base_src_prepare + + use doc && cd doc && eautoconf +} + +src_configure() { + cabal_src_configure + + use doc && cd doc && econf || die "econf failed in /doc" +} + +src_compile() { + cabal_src_compile + + use doc && cd doc && emake -j1 || die "emake failed in /doc" +} + +src_test() { + emake -C "${S}/tests/" || die "emake for tests failed" +} + +src_install() { + cabal_src_install + if use doc; then + cd doc + dohtml -r happy/* + doman "${S}/doc/happy.1" + fi +} |