From 2fe9bf97f11b02acc42997a6261f96be6bdeaa94 Mon Sep 17 00:00:00 2001 From: Lennart Kolmodin Date: Wed, 11 Oct 2006 21:52:53 +0000 Subject: Made bnfc-* play nice with dev-lang/ghc-6.6 (Portage version: 2.1.2_pre1-r1) --- dev-util/bnfc/ChangeLog | 8 +++- dev-util/bnfc/bnfc-2.1.2.ebuild | 5 ++- dev-util/bnfc/bnfc-2.2.ebuild | 12 ++++-- dev-util/bnfc/files/bnfc-2.2-ghc66-utf8.patch | 60 +++++++++++++++++++++++++++ dev-util/bnfc/files/digest-bnfc-2.1.2 | 2 + dev-util/bnfc/files/digest-bnfc-2.2 | 2 + 6 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 dev-util/bnfc/files/bnfc-2.2-ghc66-utf8.patch (limited to 'dev-util/bnfc') diff --git a/dev-util/bnfc/ChangeLog b/dev-util/bnfc/ChangeLog index fd46d4a62e65..95f27ab0599c 100644 --- a/dev-util/bnfc/ChangeLog +++ b/dev-util/bnfc/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-util/bnfc -# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/bnfc/ChangeLog,v 1.4 2005/10/08 17:22:30 kosmikus Exp $ +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/bnfc/ChangeLog,v 1.5 2006/10/11 21:52:53 kolmodin Exp $ + + 11 Oct 2006; +files/bnfc-2.2-ghc66-utf8.patch, + bnfc-2.1.2.ebuild, bnfc-2.2.ebuild: + Made bnfc-* compatible with dev-lang/ghc-6.6 *bnfc-2.2 (08 Oct 2005) diff --git a/dev-util/bnfc/bnfc-2.1.2.ebuild b/dev-util/bnfc/bnfc-2.1.2.ebuild index e8f758c3f22d..3ff27e149dfe 100644 --- a/dev-util/bnfc/bnfc-2.1.2.ebuild +++ b/dev-util/bnfc/bnfc-2.1.2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/bnfc/bnfc-2.1.2.ebuild,v 1.3 2005/05/03 20:47:10 dholm Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/bnfc/bnfc-2.1.2.ebuild,v 1.4 2006/10/11 21:52:53 kolmodin Exp $ DESCRIPTION="BNF Converter -- a sophisticated parser generator" HOMEPAGE="http://www.cs.chalmers.se/~markus/BNFC/" @@ -12,6 +12,7 @@ KEYWORDS="~x86 ~ppc" IUSE="doc" DEPEND=">=virtual/ghc-6.2 + !>=virtual/ghc-6.6 doc? ( virtual/tetex )" RDEPEND="virtual/libc" diff --git a/dev-util/bnfc/bnfc-2.2.ebuild b/dev-util/bnfc/bnfc-2.2.ebuild index 2e167e8f77df..cf695a1c62c1 100644 --- a/dev-util/bnfc/bnfc-2.2.ebuild +++ b/dev-util/bnfc/bnfc-2.2.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/bnfc/bnfc-2.2.ebuild,v 1.1 2005/10/08 17:22:30 kosmikus Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/bnfc/bnfc-2.2.ebuild,v 1.2 2006/10/11 21:52:53 kolmodin Exp $ -inherit ghc-package +inherit base ghc-package MY_PN="BNFC" @@ -22,6 +22,12 @@ RDEPEND="virtual/libc" S="${WORKDIR}/${MY_PN}_${PV}" +src_unpack() { + base_src_unpack + cd "${S}" + epatch "${FILESDIR}/${P}-ghc66-utf8.patch" +} + src_compile() { emake GHC="$(ghc-getghc) -O" || die "emake failed" if use doc ; then diff --git a/dev-util/bnfc/files/bnfc-2.2-ghc66-utf8.patch b/dev-util/bnfc/files/bnfc-2.2-ghc66-utf8.patch new file mode 100644 index 000000000000..9b819b9b69ee --- /dev/null +++ b/dev-util/bnfc/files/bnfc-2.2-ghc66-utf8.patch @@ -0,0 +1,60 @@ +diff -urw --exclude='*.o' --exclude='*.hi' BNFC_2.2.orig/CF.hs BNFC_2.2/CF.hs +--- BNFC_2.2.orig/CF.hs 2004-09-22 18:10:57.000000000 +0200 ++++ BNFC_2.2/CF.hs 2006-09-13 16:53:52.000000000 +0200 +@@ -469,7 +469,7 @@ + badtypes = filter isBadType $ cat : [c | Left c <- rhs] + isBadType c = not (isUpper (head c) || isList c || c == "#") + badFunName = not (isUpper (head f) +- || isCoercion f || isNilFun f || isOneFun f || isConsFun f) ++ || isCoercion f || isNilFun f || isOneFun f || isConsFun f) + + isPositionCat :: CFG f -> Cat -> Bool + isPositionCat cf cat = or [b | TokenReg name b _ <- pragmasOfCF cf, name == cat] +diff -urw --exclude='*.o' --exclude='*.hi' BNFC_2.2.orig/GetCF.hs BNFC_2.2/GetCF.hs +--- BNFC_2.2.orig/GetCF.hs 2004-09-26 18:45:35.000000000 +0200 ++++ BNFC_2.2/GetCF.hs 2006-09-13 16:54:13.000000000 +0200 +@@ -117,7 +117,7 @@ + pragma = [r | Left (Left r) <- rs] + errors = [s | Right s <- rs, not (null s)] + (symbols,keywords) = partition (any isSpec) reservedWords +- isSpec = flip elem "$+-*=<>[](){}!?.,;:^§~|&%#/\\$_@\"\'" ++ isSpec = flip elem "$+-*=<>[](){}!?.,;:^\167~|&%#/\\$_@\"\'" + reservedWords = nub [t | (_,(_,its)) <- rules, Right t <- its] + cats = [] + in (((pragma,(literals,symbols,keywords,cats)),rules),errors) +Only in BNFC_2.2.orig/: ParBNF.y +Only in BNFC_2.2: bnfc +diff -urw --exclude='*.o' --exclude='*.hi' BNFC_2.2.orig/formats/cpp/RegToFlex.hs BNFC_2.2/formats/cpp/RegToFlex.hs +--- BNFC_2.2.orig/formats/cpp/RegToFlex.hs 2004-02-03 17:04:42.000000000 +0100 ++++ BNFC_2.2/formats/cpp/RegToFlex.hs 2006-09-13 16:49:01.000000000 +0200 +@@ -69,5 +69,5 @@ + mkEsc :: String -> String + mkEsc = concatMap escChar + where escChar c +- | c `elem` "$+-*=<>[](){}!?.,;:^§~|&%#/\\$_@\"" = '\\':[c] ++ | c `elem` "$+-*=<>[](){}!?.,;:^\167~|&%#/\\$_@\"" = '\\':[c] + | otherwise = [c] +diff -urw --exclude='*.o' --exclude='*.hi' BNFC_2.2.orig/formats/haskell2/CFtoAlex.hs BNFC_2.2/formats/haskell2/CFtoAlex.hs +--- BNFC_2.2.orig/formats/haskell2/CFtoAlex.hs 2004-10-14 18:34:56.000000000 +0200 ++++ BNFC_2.2/formats/haskell2/CFtoAlex.hs 2006-09-13 16:55:02.000000000 +0200 +@@ -84,7 +84,7 @@ + where + mkEsc = unwords . map ( f . (:[])) + f s = if all isSpec s then '^':s else s +- isSpec = flip elem "$+-*=<>[](){}!?.,;:^§~|&%#/\\$_@\"" ++ isSpec = flip elem "$+-*=<>[](){}!?.,;:^\167~|&%#/\\$_@\"" + + restOfAlex :: CF -> [String] + restOfAlex cf = [ +diff -urw --exclude='*.o' --exclude='*.hi' BNFC_2.2.orig/formats/haskell2/CFtoAlex2.hs BNFC_2.2/formats/haskell2/CFtoAlex2.hs +--- BNFC_2.2.orig/formats/haskell2/CFtoAlex2.hs 2004-12-08 15:22:47.000000000 +0100 ++++ BNFC_2.2/formats/haskell2/CFtoAlex2.hs 2006-09-13 16:54:44.000000000 +0200 +@@ -105,7 +105,7 @@ + where + mkEsc = unwords . map ( f . (:[])) + f s = if all isSpec s then '\\':s else s +- isSpec = flip elem "$+-*=<>[](){}!?.,;:^§~|&%#/\\$_@\"" ++ isSpec = flip elem "$+-*=<>[](){}!?.,;:^\167~|&%#/\\$_@\"" + + restOfAlex :: String -> Bool -> CF -> [String] + restOfAlex shareMod shareStrings cf = [ diff --git a/dev-util/bnfc/files/digest-bnfc-2.1.2 b/dev-util/bnfc/files/digest-bnfc-2.1.2 index 0ec5e8ccdd2b..137c15f101ce 100644 --- a/dev-util/bnfc/files/digest-bnfc-2.1.2 +++ b/dev-util/bnfc/files/digest-bnfc-2.1.2 @@ -1 +1,3 @@ MD5 2570c1c6ffba25b8824804bae372710d bnfc_2.1.2.tgz 113340 +RMD160 b4975061ada09df109bb657f27c9181fd06f868b bnfc_2.1.2.tgz 113340 +SHA256 a45cd22d727c9246fca31d580f42a3e2aa8bed4e094f8d608f7fe0d38c167eb1 bnfc_2.1.2.tgz 113340 diff --git a/dev-util/bnfc/files/digest-bnfc-2.2 b/dev-util/bnfc/files/digest-bnfc-2.2 index 94f9d7f073f6..91b0fcc8b068 100644 --- a/dev-util/bnfc/files/digest-bnfc-2.2 +++ b/dev-util/bnfc/files/digest-bnfc-2.2 @@ -1 +1,3 @@ MD5 1fff9eb84ba294639292d14a6d47a410 BNFC_2.2.tgz 264246 +RMD160 5f1055fc45916eb489e7f1628dc24c5ecb153500 BNFC_2.2.tgz 264246 +SHA256 8f035b5d0850d5010a0c754f360a9f91cfab526b8b5cf4b61c207b89223c3a33 BNFC_2.2.tgz 264246 -- cgit v1.2.3-65-gdbad