]> git.pld-linux.org Git - packages/BNFC.git/commitdiff
- cope with alex3
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 28 Oct 2011 18:23:57 +0000 (18:23 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    BNFC-alex3.patch -> 1.1
    BNFC.spec -> 1.10

BNFC-alex3.patch [new file with mode: 0644]
BNFC.spec

diff --git a/BNFC-alex3.patch b/BNFC-alex3.patch
new file mode 100644 (file)
index 0000000..d1c67db
--- /dev/null
@@ -0,0 +1,29 @@
+diff -ur BNFC-2.4.2.0/formats/haskell2/CFtoAlex2.hs BNFC-2.4.2.0-alex3/formats/haskell2/CFtoAlex2.hs
+--- BNFC-2.4.2.0/formats/haskell2/CFtoAlex2.hs 2011-10-28 20:22:20.884850258 +0200
++++ BNFC-2.4.2.0-alex3/formats/haskell2/CFtoAlex2.hs   2011-10-28 20:18:30.612414990 +0200
+@@ -1,5 +1,5 @@
+ {-
+-    BNF Converter: Alex 2.0 Generator
++    BNF Converter: Alex 3.0 Generator
+     Copyright (C) 2004  Author:  Peter Gammie
+     This program is free software; you can redistribute it and/or modify
+@@ -59,6 +59,7 @@
+   -- "import " ++ errMod,
+   if shareStrings then "import " ++ shareMod else "",
+   if byteStrings  then "import qualified Data.ByteString.Char8 as BS" else "",
++  "import Data.Word (Word8)",
+   "}",
+   ""
+   ]
+@@ -210,6 +211,10 @@
+   "",
+   "alexInputPrevChar :: AlexInput -> Char",
+   "alexInputPrevChar (p, c, s) = c",
++  "alexGetByte :: AlexInput -> Maybe (Word8, AlexInput)",
++  "alexGetByte (p,[]) = Nothing",
++  "alexGetByte (p, (c:s)) = let p' = alexMove p c in p' `seq`",
++  "                           Just ((fromIntegral $ ord c), (p', s))",
+   "}"
+   ]
+  where
index aa32ea798506f899f7cab257d7aa1453dfea34f5..7791968a39639f7a7a5215b14ce5e9818c119e17 100644 (file)
--- a/BNFC.spec
+++ b/BNFC.spec
@@ -2,13 +2,14 @@ Summary:      BNF Converter
 Summary(pl.UTF-8):     Konwerter BNF
 Name:          BNFC
 Version:       2.4.2.0
-Release:       3
+Release:       3.1
 Epoch:         1
 License:       GPL
 Group:         Development/Tools
 Source0:       http://hackage.haskell.org/packages/archive/BNFC/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5: fda25414352413879bc8f76d0558fcb4
 Patch0:                %{name}-ghc72.patch
+Patch1:                %{name}-alex3.patch
 URL:           http://www.cse.chalmers.se/research/group/Language-technology/BNFC/
 BuildRequires: ghc
 BuildRequires: gmp-devel
@@ -34,6 +35,7 @@ potrafi także generować kod w Javie, C++ i C.
 find -type f -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
 
 %patch0 -p1
+%patch1 -p1
 
 %build
 runhaskell Setup.lhs configure -v2 --enable-library-profiling \
This page took 0.655408 seconds and 4 git commands to generate.