diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2011-07-31 15:38:07 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2011-07-31 15:38:07 +0000 |
commit | dff67c80eefd3c58fe4d865a1702da38a63a8827 (patch) | |
tree | b10c13ff8039672d857740d265660cf4453d1206 /dev-haskell/alex | |
parent | alpha/ia64/sparc stable wrt #373393 (diff) | |
download | historical-dff67c80eefd3c58fe4d865a1702da38a63a8827.tar.gz historical-dff67c80eefd3c58fe4d865a1702da38a63a8827.tar.bz2 historical-dff67c80eefd3c58fe4d865a1702da38a63a8827.zip |
Version bump. Added tests support.
Package-Manager: portage-2.1.10.7/cvs/Linux x86_64
Diffstat (limited to 'dev-haskell/alex')
-rw-r--r-- | dev-haskell/alex/ChangeLog | 8 | ||||
-rw-r--r-- | dev-haskell/alex/Manifest | 16 | ||||
-rw-r--r-- | dev-haskell/alex/alex-2.3.5.ebuild | 73 | ||||
-rw-r--r-- | dev-haskell/alex/files/alex-2.3.5-ghc-7.2.patch | 24 | ||||
-rw-r--r-- | dev-haskell/alex/files/alex-2.3.5-missing-test.patch | 72 |
5 files changed, 191 insertions, 2 deletions
diff --git a/dev-haskell/alex/ChangeLog b/dev-haskell/alex/ChangeLog index 9ac9e6c3cb5c..c3a136f0ff5c 100644 --- a/dev-haskell/alex/ChangeLog +++ b/dev-haskell/alex/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-haskell/alex # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/alex/ChangeLog,v 1.45 2011/02/27 20:15:23 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/alex/ChangeLog,v 1.46 2011/07/31 15:38:07 slyfox Exp $ + +*alex-2.3.5 (31 Jul 2011) + + 31 Jul 2011; Sergei Trofimovich <slyfox@gentoo.org> +alex-2.3.5.ebuild, + +files/alex-2.3.5-ghc-7.2.patch, +files/alex-2.3.5-missing-test.patch: + Version bump. Added tests support. 27 Feb 2011; Sergei Trofimovich <slyfox@gentoo.org> -alex-2.1.0.ebuild, -alex-2.2.ebuild: diff --git a/dev-haskell/alex/Manifest b/dev-haskell/alex/Manifest index 28727eeb9f25..292edeb39fc5 100644 --- a/dev-haskell/alex/Manifest +++ b/dev-haskell/alex/Manifest @@ -1,6 +1,20 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX alex-2.3.5-ghc-7.2.patch 612 RMD160 b0bc3b135e5b0d94142bc48e80a296d5ced6b300 SHA1 10438efcc3cb9579f75c9a933d5da1689d1c4325 SHA256 27ff231ac38b3f9baf359403fad14058a15e4593d1276f057370903b9a01dd01 +AUX alex-2.3.5-missing-test.patch 1967 RMD160 1fc1d10b682b9d005d42c1785791d163e4bc1c77 SHA1 63fbf61e8e2a91395c0ca4c7ec5e010fad8ab560 SHA256 29fb8f7136f8b23b317febe1658dfcaadba00d356e698ca9b2056bc2af40d6a9 DIST alex-2.3.1.tar.gz 78951 RMD160 cee02283325638fc9929ca6ae40c153b626d4b69 SHA1 0dbd9d34849602f9b59d30122b27727d6f79fc4f SHA256 cdd42fd992a72fedeff1f38debc21aa315d90dc070f0945d7819c0bccd549a44 DIST alex-2.3.2.tar.gz 79373 RMD160 864616a2d2406da475af8c7473743e2ed45ae244 SHA1 fe6b23f894d3e0c029a8e3e6f26a8cc106ff1d1e SHA256 6715a4c27b15a74d8f31cbb6a7d654b9cb6766d74980c75b65dee7c627049f43 +DIST alex-2.3.5.tar.gz 79147 RMD160 26dbfff80ded650a4daf0da744cd7289cf280a00 SHA1 fa6420b08256d374a92e2bbe0f0193789b91e90b SHA256 2ea6d30b98881c0fd57bfafae024050cd98dc5b0140d64a6d722c64a098ed253 EBUILD alex-2.3.1.ebuild 1123 RMD160 8e461b925cc9026fdb69c3702c9e2677c4c3d817 SHA1 67b1949accaeff06147574ca4233f4babf609a6f SHA256 690cf6b768c48978e64c2791fe1007ee81e9becf2981b2e9febb450b08c6bd8a EBUILD alex-2.3.2.ebuild 1135 RMD160 6fd7bd3a9a6781f3044068a7da42b8e7aca17aa4 SHA1 1929888e22bee0f5dc6280c78d3d63c20215274a SHA256 c218d20de43ce1840ddb960176a50e454c092329d2fb34f5be530d70894e5287 -MISC ChangeLog 5074 RMD160 c756475a102045d952ebff2f7c775b33467532db SHA1 2bbf75c0958c6e113da747df9e7c15b7a0764b98 SHA256 39b8b964f433ad404b80193d07cd0e06b20d670492c749d19a023a4623f4e441 +EBUILD alex-2.3.5.ebuild 1552 RMD160 866faf585a549ba497c9c63f0203bcef8ca8e379 SHA1 205b399b3dbe23127f49e38cb397764609eb4001 SHA256 95e13b94cedf980c75030aed6ed906ac2684df8c7d565192d4738dfcd847a957 +MISC ChangeLog 5286 RMD160 50a631d53a769f7b97909a691cfc67f58fbbae38 SHA1 0cac2ff6e4b18aac070f1d28cba1c9f965fff5aa SHA256 1fc6c5d45959fc9d342e6fd0d4c872706f87dcab4d99f3548a42d443d4912580 MISC metadata.xml 223 RMD160 7783e6057effb8b8f0b79cffe8b557b32c633839 SHA1 7b962c77f2e38479a9d1621ec8d307ca9f761753 SHA256 1d00c8be162a6cb87b3de440b3e63e10b39c12d56e8fbfe592e75aed872b2508 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iEYEARECAAYFAk41d7YACgkQcaHudmEf86pHFACfXYGLh+zZqCR312i5WprkzphX +mqUAn3XTZfKLbDayWHXvVtPiFYjj5XoF +=xmIn +-----END PGP SIGNATURE----- diff --git a/dev-haskell/alex/alex-2.3.5.ebuild b/dev-haskell/alex/alex-2.3.5.ebuild new file mode 100644 index 000000000000..1b96a11b1907 --- /dev/null +++ b/dev-haskell/alex/alex-2.3.5.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/alex/alex-2.3.5.ebuild,v 1.1 2011/07/31 15:38:07 slyfox Exp $ + +# ebuild generated by hackport 0.2.9 + +EAPI="3" + +CABAL_FEATURES="bin" +inherit autotools eutils haskell-cabal + +DESCRIPTION="Alex is a tool for generating lexical analysers in Haskell" +HOMEPAGE="http://www.haskell.org/alex/" +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 + >=dev-lang/ghc-6.8.2 + doc? ( ~app-text/docbook-xml-dtd-4.2 + app-text/docbook-xsl-stylesheets + >=dev-libs/libxslt-1.1.2 )" + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.3.5-missing-test.patch" + epatch "${FILESDIR}/${PN}-2.3.5-ghc-7.2.patch" + + for f in Scan Parser; do + rm "${S}/src/$f."* + mv "${S}/dist/build/alex/alex-tmp/$f.hs" "${S}"/src/ + done + + if use doc; then + cd "${S}/doc/" + eautoreconf || die "eautoreconf for docs failed" + fi +} + +src_configure() { + cabal_src_configure + + if use doc; then + cd "${S}/doc/" + econf || die "econf for docs failed" + fi +} + +src_compile() { + cabal_src_compile + + if use doc; then + emake -C "${S}/doc/" -j1 || die "emake for docs failed" + fi +} + +src_test() { + emake -C "${S}/tests/" || die "emake for tests failed" +} + +src_install() { + cabal_src_install + + if use doc; then + doman "${S}/doc/alex.1" + dohtml -r "${S}/doc/alex/" + fi + dodoc README +} diff --git a/dev-haskell/alex/files/alex-2.3.5-ghc-7.2.patch b/dev-haskell/alex/files/alex-2.3.5-ghc-7.2.patch new file mode 100644 index 000000000000..31ab1ceee597 --- /dev/null +++ b/dev-haskell/alex/files/alex-2.3.5-ghc-7.2.patch @@ -0,0 +1,24 @@ +diff --git a/alex.cabal b/alex.cabal +index d04467b..b262af7 100644 +--- a/alex.cabal ++++ b/alex.cabal +@@ -72,7 +72,7 @@ executable alex + + build-depends: base < 5 + +- extensions: CPP ++ extensions: CPP, BangPatterns + ghc-options: -Wall + other-modules: + AbsSyn +diff --git a/doc/configure.ac b/doc/configure.ac +index 51fa85d..6e772c0 100644 +--- a/doc/configure.ac ++++ b/doc/configure.ac +@@ -9,5 +9,5 @@ FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/ + + AC_PATH_PROG(DbLatexCmd,dblatex) + +-AC_CONFIG_FILES([config.mk]) ++AC_CONFIG_FILES([config.mk alex.1]) + AC_OUTPUT diff --git a/dev-haskell/alex/files/alex-2.3.5-missing-test.patch b/dev-haskell/alex/files/alex-2.3.5-missing-test.patch new file mode 100644 index 000000000000..3c80b88a2096 --- /dev/null +++ b/dev-haskell/alex/files/alex-2.3.5-missing-test.patch @@ -0,0 +1,72 @@ +commit 883587ca4feecab72381991533b2f686a57a4d57 +Author: Sergei Trofimovich <slyfox@gentoo.org> +Date: Mon Jul 25 08:20:13 2011 +0300 + + added missing tokens_bytestring test + + Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> + +diff --git a/alex.cabal b/alex.cabal +index b262af7..c6f6e22 100644 +--- a/alex.cabal ++++ b/alex.cabal +@@ -57,6 +57,7 @@ extra-source-files: + tests/tokens.x + tests/tokens_gscan.x + tests/tokens_posn.x ++ tests/tokens_bytestring.x + + flag small_base + description: Choose the new smaller, split-up base package. +diff --git a/tests/tokens_bytestring.x b/tests/tokens_bytestring.x +new file mode 100644 +index 0000000..0cb23c8 +--- /dev/null ++++ b/tests/tokens_bytestring.x +@@ -0,0 +1,46 @@ ++{ ++{-# LANGUAGE OverloadedStrings #-} ++module Main (main) where ++import System.Exit ++import Data.ByteString.Lazy.Char8 (unpack) ++} ++ ++%wrapper "posn-bytestring" ++ ++$digit = 0-9 -- digits ++$alpha = [a-zA-Z] -- alphabetic characters ++ ++tokens :- ++ ++ $white+ ; ++ "--".* ; ++ let { tok (\p s -> Let p) } ++ in { tok (\p s -> In p) } ++ $digit+ { tok (\p s -> Int p (read (unpack s))) } ++ [\=\+\-\*\/\(\)] { tok (\p s -> Sym p (head (unpack s))) } ++ $alpha [$alpha $digit \_ \']* { tok (\p s -> Var p (unpack s)) } ++ ++{ ++-- Each right-hand side has type :: AlexPosn -> String -> Token ++ ++-- Some action helpers: ++tok f p s = f p s ++ ++-- The token type: ++data Token = ++ Let AlexPosn | ++ In AlexPosn | ++ Sym AlexPosn Char | ++ Var AlexPosn String | ++ Int AlexPosn Int | ++ Err AlexPosn ++ deriving (Eq,Show) ++ ++main = if test1 /= result1 then exitFailure ++ else exitWith ExitSuccess ++ ++test1 = alexScanTokens " let in 012334\n=+*foo bar__'" ++result1 = [Let (AlexPn 2 1 3),In (AlexPn 6 1 7),Int (AlexPn 9 1 10) 12334,Sym (AlexPn 16 2 1) '=',Sym (AlexPn 17 2 2) '+',Sym (AlexPn 18 2 3) '*',Var (AlexPn 19 2 4) "foo",Var (AlexPn 23 2 8) "bar__'"] ++ ++ ++} |