summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2012-03-26 09:01:54 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2012-03-26 09:01:54 +0000
commit22329a8a088780ce035906b061e767df247b4857 (patch)
tree5b7c846d63b16c3e91ce26e1e9d4bd95eb438a9b /dev-haskell/happy
parentVersion bump, remove old. (diff)
downloadhistorical-22329a8a088780ce035906b061e767df247b4857.tar.gz
historical-22329a8a088780ce035906b061e767df247b4857.tar.bz2
historical-22329a8a088780ce035906b061e767df247b4857.zip
Version bump. Compatible with ghc-7.4 (noticed by xvilka).
Package-Manager: portage-2.2.0_alpha93_p2/cvs/Linux x86_64
Diffstat (limited to 'dev-haskell/happy')
-rw-r--r--dev-haskell/happy/ChangeLog10
-rw-r--r--dev-haskell/happy/Manifest13
-rw-r--r--dev-haskell/happy/files/happy-1.18.9-missing-tests.patch260
-rw-r--r--dev-haskell/happy/happy-1.18.9.ebuild73
-rw-r--r--dev-haskell/happy/metadata.xml11
5 files changed, 356 insertions, 11 deletions
diff --git a/dev-haskell/happy/ChangeLog b/dev-haskell/happy/ChangeLog
index e81e148a965c..bcfbf3c0566c 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.52 2011/08/05 10:53:54 slyfox Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/happy/ChangeLog,v 1.53 2012/03/26 09:01:54 slyfox Exp $
+
+*happy-1.18.9 (26 Mar 2012)
+
+ 26 Mar 2012; Sergei Trofimovich <slyfox@gentoo.org>
+ +files/happy-1.18.9-missing-tests.patch, +happy-1.18.9.ebuild, metadata.xml:
+ Version bump. Compatible with ghc-7.4 (noticed by xvilka).
05 Aug 2011; Sergei Trofimovich <slyfox@gentoo.org> happy-1.18.6.ebuild:
Fix build failure for USE=-doc case. Discovered and fixed by Yvan Royon, bug
diff --git a/dev-haskell/happy/Manifest b/dev-haskell/happy/Manifest
index 42fd9b9e9213..431a2a3d2424 100644
--- a/dev-haskell/happy/Manifest
+++ b/dev-haskell/happy/Manifest
@@ -3,19 +3,22 @@ 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
+AUX happy-1.18.9-missing-tests.patch 5952 RMD160 4f9037af6619cd1b7fcd537b4473b24c925fdad6 SHA1 eb4e4c10ed7aeb8f5872689a650d5bb3ad263260 SHA256 165240b4862df981d8f96018d43bb9c3c651369cf4c4824d08b0cbbfb616da2a
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 happy-1.18.9.tar.gz 158476 RMD160 adfe119ffd485953fe7f8a81575191cdfea5a7f5 SHA1 23feb65cf5669e9fbbbf77104e3acd76cbcbe604 SHA256 7d34c512b8aecbc135f6b4c43bc18044ff50ae6d5afdd0d2570228dccecb618a
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
EBUILD happy-1.18.6.ebuild 1372 RMD160 ba175ef179d2da6969d8be3371e017b793345a94 SHA1 54a89da07386468a59f1ddeb3ef450e4a9aeca3b SHA256 e3d884bb71de39568b6dbac2c1fb17e90397cf4837947ff01b13b479ab44fa7d
-MISC ChangeLog 6459 RMD160 b37dd3d2b55532988112e080d9cc2e5d409a9739 SHA1 97437f856a256c9de363036369ef92141bce1bc1 SHA256 a1fd21114aaae7b2fa4cfdc5dc29b1bf5531f3953b389877109437e68d24418e
-MISC metadata.xml 223 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 SHA1 7b962c77f2e38479a9d1621ec8d307ca9f761753 SHA256 1d00c8be162a6cb87b3de440b3e63e10b39c12d56e8fbfe592e75aed872b2508
+EBUILD happy-1.18.9.ebuild 1700 RMD160 42f873d60405200dc4ada62563592abeb9d1bea8 SHA1 051db5f7800d714a31d79a156e4a3321324aeb6a SHA256 66c8e5d32d958a1c45daf36fe683f9c35f62c38186e2d7cd96a89dd1945ef1fb
+MISC ChangeLog 6683 RMD160 586a1c923701a1dcc7729b78c6f01bb6fbf091fa SHA1 645e6efa142da773f67a12c779ceb35a634f2532 SHA256 517eee0e87c2b030e71a8ff18c71bdcc0be2836df9c1f31314fcc9142da5bea5
+MISC metadata.xml 307 RMD160 36ac277243f540bf235afc164fb7180214ab48d7 SHA1 b94896fc3c715233323eeba8baf775215904a69e SHA256 ce829be1fc42dd20b0fab8cfda883f3999b32dd93e237db97f5e099e5543828b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAk47zJEACgkQcaHudmEf86pGdgCdEJuiIzmdvQboSLDh4TuPibO2
-lxEAn07LhgM3V3nOnCsJGop0LRQ5daM0
-=qe4L
+iEYEARECAAYFAk9wMJIACgkQcaHudmEf86pj5gCbB9YXrSEvg1A29buVMp9zAUFO
+i0IAnAr5kNhELALUbY18FqqfpAu+hdAf
+=6l7V
-----END PGP SIGNATURE-----
diff --git a/dev-haskell/happy/files/happy-1.18.9-missing-tests.patch b/dev-haskell/happy/files/happy-1.18.9-missing-tests.patch
new file mode 100644
index 000000000000..5b2b9b2cb42c
--- /dev/null
+++ b/dev-haskell/happy/files/happy-1.18.9-missing-tests.patch
@@ -0,0 +1,260 @@
+--- happy-1.18.9-orig/happy.cabal 2012-02-06 20:49:56.000000000 +1100
++++ happy-1.18.9/happy.cabal 2012-02-07 20:50:33.859004968 +1100
+@@ -100,10 +100,13 @@
+ 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
+ tests/monad001.y
++ tests/monaderror.y
+ tests/Makefile
+ tests/TestMulti.ly
+ tests/Partial.ly
+--- happy-1.18.9-orig/tests/Makefile 2012-02-06 20:49:55.000000000 +1100
++++ happy-1.18.9/tests/Makefile 2012-02-07 20:50:33.859004968 +1100
+@@ -1,5 +1,5 @@
+ HAPPY=../dist/build/happy/happy
+-HC=ghc
++HC=ghc -package array -package mtl
+
+ TESTS = Test.ly TestMulti.ly TestPrecedence.ly bug001.ly \
+ monad001.y monad002.ly precedence001.ly precedence002.y \
+--- /dev/null 2012-02-07 10:04:42.144206507 +1100
++++ happy-1.18.9/tests/AttrGrammar001.y 2012-02-07 20:50:47.013316418 +1100
+@@ -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"
++}
+--- /dev/null 2012-02-07 10:04:42.144206507 +1100
++++ happy-1.18.9/tests/AttrGrammar002.y 2012-02-07 20:50:47.013316418 +1100
+@@ -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"
++}
+--- /dev/null 2012-02-07 10:04:42.144206507 +1100
++++ happy-1.18.9/tests/ParGF.y 2012-02-07 20:50:47.014316443 +1100
+@@ -0,0 +1,40 @@
++{-
++
++With Happy 1.17 this file produces "Internal Happy error" when run:
++
++$ happy ParGF.y && runghc ParGF.hs
++ParGF.hs: Internal Happy error
++
++The problem is that we always pass around the "current token". When not
++using %lexer and we've run out of tokens, the current token is notHappyAtAll,
++which gets passed to happyError when there's an error.
++
++-}
++
++{
++}
++
++%name pGrammar
++
++%tokentype { String }
++%error { parseError }
++
++%token
++ 'a' { "a" }
++
++%%
++
++Grammar :: { () }
++Grammar : 'a' 'a' { () }
++
++{
++
++parseError :: [String] -> a
++-- commenting out the below line gets rid of the "Internal Happy Error"
++parseError ("":_) = error "bar"
++parseError _ = error "foo"
++
++main :: IO ()
++main = print $ pGrammar ["a"]
++
++}
+--- /dev/null 2012-02-07 10:04:42.144206507 +1100
++++ happy-1.18.9/tests/monaderror.y 2012-02-07 20:50:47.015316467 +1100
+@@ -0,0 +1,57 @@
++{
++module Main where
++
++import Data.Char
++import Control.Monad.Error
++import System.Exit
++}
++
++%name parseFoo
++%tokentype { Token }
++%error { handleError }
++
++%monad { ParseM } { (>>=) } { return }
++
++%token
++ 'S' { TokenSucc }
++ 'Z' { TokenZero }
++
++%%
++
++Exp : 'Z' { 0 }
++ | 'S' Exp { $2 + 1 }
++
++{
++
++type ParseM a = Either ParseError a
++data ParseError
++ = ParseError (Maybe Token)
++ | StringError String
++ deriving (Eq,Show)
++instance Error ParseError where
++ strMsg = StringError
++
++data Token
++ = TokenSucc
++ | TokenZero
++ deriving (Eq,Show)
++
++handleError :: [Token] -> ParseM a
++handleError [] = throwError $ ParseError Nothing
++handleError ts = throwError $ ParseError $ Just $ head ts
++
++lexer :: String -> [Token]
++lexer [] = []
++lexer (c:cs)
++ | isSpace c = lexer cs
++ | c == 'S' = TokenSucc:(lexer cs)
++ | c == 'Z' = TokenZero:(lexer cs)
++ | otherwise = error "lexer error"
++
++main :: IO ()
++main = do
++ let tokens = lexer "S S"
++ when (parseFoo tokens /= Left (ParseError Nothing)) $ do
++ print (parseFoo tokens)
++ exitWith (ExitFailure 1)
++}
diff --git a/dev-haskell/happy/happy-1.18.9.ebuild b/dev-haskell/happy/happy-1.18.9.ebuild
new file mode 100644
index 000000000000..44a0fce9f455
--- /dev/null
+++ b/dev-haskell/happy/happy-1.18.9.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/happy/happy-1.18.9.ebuild,v 1.1 2012/03/26 09:01:54 slyfox Exp $
+
+# ebuild generated by hackport 0.2.9
+
+EAPI="4"
+
+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
+ 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.9-missing-tests.patch")
+
+src_prepare() {
+ base_src_prepare
+
+ use doc && cd doc && eautoconf
+}
+
+src_configure() {
+ cabal_src_configure
+
+ if use doc; then
+ cd doc && econf || die "econf failed in /doc"
+ fi
+}
+
+src_compile() {
+ cabal_src_compile
+
+ if use doc; then
+ cd doc && emake -j1 || die "emake failed in /doc"
+ fi
+}
+
+src_test() {
+ if has_version "dev-haskell/monads-fd"; then
+ sed -e 's@HC=ghc@HC=ghc -hide-package monads-fd@' \
+ -i "${S}/tests/Makefile" || die "Could not patch tests Makefile"
+ fi
+ if has_version "dev-haskell/monads-tf"; then
+ sed -e 's@HC=ghc@HC=ghc -hide-package monads-tf@' \
+ -i "${S}/tests/Makefile" || die "Could not patch tests Makefile"
+ fi
+ 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
+}
diff --git a/dev-haskell/happy/metadata.xml b/dev-haskell/happy/metadata.xml
index 8c66906af531..2a4d5881edae 100644
--- a/dev-haskell/happy/metadata.xml
+++ b/dev-haskell/happy/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>haskell</herd>
-<maintainer>
- <email>haskell@gentoo.org</email>
-</maintainer>
+ <herd>haskell</herd>
+ <maintainer>
+ <email>haskell@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Happy is a parser generator for Haskell
+ </longdescription>
</pkgmetadata>