[kaya] fix build with ghc-7.4

Jens Petersen petersen at fedoraproject.org
Thu Nov 29 08:36:02 UTC 2012


commit 9f823935c1fde7204644af56c3c8493db66d20df
Author: Jens Petersen <petersen at redhat.com>
Date:   Thu Nov 29 17:35:50 2012 +0900

    fix build with ghc-7.4

 kaya-0.5.2-ghc74-base.patch |  243 +++++++++++++++++++++++++++++++++++++++++++
 kaya.spec                   |   44 ++++++---
 2 files changed, 274 insertions(+), 13 deletions(-)
---
diff --git a/kaya-0.5.2-ghc74-base.patch b/kaya-0.5.2-ghc74-base.patch
new file mode 100644
index 0000000..1060040
--- /dev/null
+++ b/kaya-0.5.2-ghc74-base.patch
@@ -0,0 +1,243 @@
+diff -ur --exclude configure kaya-0.5.2/compiler/APIDocs.hs kaya-0.5.2.new/compiler/APIDocs.hs
+--- kaya-0.5.2/compiler/APIDocs.hs	2009-04-12 19:02:24.000000000 +0900
++++ kaya-0.5.2.new/compiler/APIDocs.hs	2012-11-29 15:11:29.776824971 +0900
+@@ -11,7 +11,7 @@
+ import Language
+ import Debug.Trace
+ import System.Directory
+-import List
++import Data.List
+ import Module
+ 
+ xmlise :: String -> String
+diff -ur --exclude configure kaya-0.5.2/compiler/CallGraph.hs kaya-0.5.2.new/compiler/CallGraph.hs
+--- kaya-0.5.2/compiler/CallGraph.hs	2009-04-12 19:02:21.000000000 +0900
++++ kaya-0.5.2.new/compiler/CallGraph.hs	2012-11-29 15:11:20.039896908 +0900
+@@ -11,7 +11,7 @@
+ -- Implements a call graph, showing which functions call which others
+ 
+ import Language
+-import List
++import Data.List
+ 
+ -- List of names paired with the names that function calls
+ type CG = [(Name, [Name])]
+diff -ur --exclude configure kaya-0.5.2/compiler/Chaser.hs kaya-0.5.2.new/compiler/Chaser.hs
+--- kaya-0.5.2/compiler/Chaser.hs	2009-04-12 19:02:23.000000000 +0900
++++ kaya-0.5.2.new/compiler/Chaser.hs	2012-11-29 16:17:45.794070992 +0900
+@@ -15,13 +15,11 @@
+ import Lib
+ import Lexer
+ 
+-import Char
+-import IO
+-import System
++import Data.Char
+ import System.IO
+ import System.Directory
+ import Debug.Trace
+-import Monad
++import Control.Monad
+ 
+ import System.IO.Unsafe
+ import Foreign
+diff -ur --exclude configure kaya-0.5.2/compiler/CodegenCPP.hs kaya-0.5.2.new/compiler/CodegenCPP.hs
+--- kaya-0.5.2/compiler/CodegenCPP.hs	2012-11-29 16:18:32.889066600 +0900
++++ kaya-0.5.2.new/compiler/CodegenCPP.hs	2012-11-29 15:11:48.018717431 +0900
+@@ -12,10 +12,10 @@
+ import Options
+ import TAC
+ import Language
+-import IO
++import System.IO
+ import Debug.Trace
+ import Lib
+-import List
++import Data.List
+ 
+ data Output = RawOutput String
+ 	    | FNOutput (Name, Type, String, [(ArgType, Var)], String)
+diff -ur --exclude configure kaya-0.5.2/compiler/Context.hs kaya-0.5.2.new/compiler/Context.hs
+--- kaya-0.5.2/compiler/Context.hs	2009-04-12 19:02:22.000000000 +0900
++++ kaya-0.5.2.new/compiler/Context.hs	2012-11-29 15:09:05.411900784 +0900
+@@ -2,7 +2,7 @@
+ 
+ import AbsSyntax
+ 
+-import List
++import Data.List
+ import Portability
+ 
+ -- Contexts containing names and type information
+diff -ur --exclude configure kaya-0.5.2/compiler/Driver.hs kaya-0.5.2.new/compiler/Driver.hs
+--- kaya-0.5.2/compiler/Driver.hs	2009-04-12 19:02:24.000000000 +0900
++++ kaya-0.5.2.new/compiler/Driver.hs	2012-11-29 16:12:58.701077365 +0900
+@@ -29,13 +29,14 @@
+ import REPL
+ import RunTests
+ 
+-import System
++import System.Cmd
++import System.Exit
+ import System.Directory
+ import Portability
+ import System.Random
+-import IO
++import System.IO
+ import Debug.Trace
+-import List
++import Data.List
+ import Control.Monad
+ 
+ -- Compile a file, with extra options to gcc, and main options. Returns the
+diff -ur --exclude configure kaya-0.5.2/compiler/Inference.hs kaya-0.5.2.new/compiler/Inference.hs
+--- kaya-0.5.2/compiler/Inference.hs	2009-04-12 19:02:24.000000000 +0900
++++ kaya-0.5.2.new/compiler/Inference.hs	2012-11-29 15:09:20.591907214 +0900
+@@ -19,7 +19,7 @@
+ import Taint
+ 
+ import Debug.Trace
+-import List
++import Data.List
+ import Control.Monad
+ 
+ -- Step one : insert type declarations (with UnknownType) so that at least
+diff -ur --exclude configure kaya-0.5.2/compiler/KeyGen.hs kaya-0.5.2.new/compiler/KeyGen.hs
+--- kaya-0.5.2/compiler/KeyGen.hs	2012-11-29 16:18:32.875066591 +0900
++++ kaya-0.5.2.new/compiler/KeyGen.hs	2012-11-29 16:04:49.216052312 +0900
+@@ -1,6 +1,6 @@
+ module KeyGen(mkkey) where
+ 
+-import Char
++import Data.Char
+ import System.Random
+ import System.Directory
+ import System.IO
+diff -ur --exclude configure kaya-0.5.2/compiler/Language.hs kaya-0.5.2.new/compiler/Language.hs
+--- kaya-0.5.2/compiler/Language.hs	2009-04-12 19:02:24.000000000 +0900
++++ kaya-0.5.2.new/compiler/Language.hs	2012-11-29 15:09:13.001903758 +0900
+@@ -12,7 +12,7 @@
+ 
+ ----- Useful gadgets on the abstract syntax; also reexports syntax types.
+ 
+-import List
++import Data.List
+ import Debug.Trace
+ import AbsSyntax
+ import Context
+diff -ur --exclude configure kaya-0.5.2/compiler/Lexer.hs kaya-0.5.2.new/compiler/Lexer.hs
+--- kaya-0.5.2/compiler/Lexer.hs	2009-04-12 19:02:24.000000000 +0900
++++ kaya-0.5.2.new/compiler/Lexer.hs	2012-11-29 15:09:51.773920642 +0900
+@@ -8,7 +8,7 @@
+ 
+ module Lexer where
+ 
+-import Char
++import Data.Char
+ import Language
+ import Debug.Trace
+ 
+diff -ur --exclude configure kaya-0.5.2/compiler/Main.hs kaya-0.5.2.new/compiler/Main.hs
+--- kaya-0.5.2/compiler/Main.hs	2009-04-12 19:02:24.000000000 +0900
++++ kaya-0.5.2.new/compiler/Main.hs	2012-11-29 16:14:55.980069788 +0900
+@@ -26,9 +26,11 @@
+ import Module
+ import REPL
+ 
+-import Monad
++import Control.Monad
+ import Debug.Trace
+-import System
++import System.Cmd
++import System.Environment
++import System.Exit
+ import System.Directory
+ 
+ main :: IO ()
+diff -ur --exclude configure kaya-0.5.2/compiler/Module.hs kaya-0.5.2.new/compiler/Module.hs
+--- kaya-0.5.2/compiler/Module.hs	2009-04-12 19:02:24.000000000 +0900
++++ kaya-0.5.2.new/compiler/Module.hs	2012-11-29 15:09:35.221912727 +0900
+@@ -16,7 +16,7 @@
+ import Language
+ import Debug.Trace
+ import System.Directory
+-import List
++import Data.List
+ import Lib
+ import Options
+ import Portability
+diff -ur --exclude configure kaya-0.5.2/compiler/Options.hs kaya-0.5.2.new/compiler/Options.hs
+--- kaya-0.5.2/compiler/Options.hs	2009-04-12 19:02:24.000000000 +0900
++++ kaya-0.5.2.new/compiler/Options.hs	2012-11-29 16:06:57.638061272 +0900
+@@ -8,9 +8,9 @@
+ 
+ module Options where
+ 
+-import System
++import System.Exit
+ import Lib
+-import List
++import Data.List
+ 
+ data Option = NoPrelude | DumpTAC | DumpTree | DumpRaw | KeepC | ShowGCC
+ 	    | DumpEqns | DumpCG | DumpDeps | Libdir String | XMLDocs | HTMLDocs
+--- kaya-0.5.2/compiler/Parser.y~	2009-04-12 19:02:24.000000000 +0900
++++ kaya-0.5.2/compiler/Parser.y	2012-11-29 16:35:21.599005811 +0900
+@@ -10,13 +10,13 @@
+ 
+ module Parser where
+ 
+-import Char
++import Data.Char
+ import Language
+ import Debug.Trace
+ import System.IO.Unsafe
+ import Lib
+ import Module
+-import IO
++import System.IO
+ import Lexer
+ 
+ }
+diff -ur --exclude configure kaya-0.5.2/compiler/PMComp.hs kaya-0.5.2.new/compiler/PMComp.hs
+--- kaya-0.5.2/compiler/PMComp.hs	2009-04-12 19:02:23.000000000 +0900
++++ kaya-0.5.2.new/compiler/PMComp.hs	2012-11-29 15:09:42.803916132 +0900
+@@ -17,7 +17,7 @@
+ 
+ import Control.Monad.State
+ import Debug.Trace
+-import List(group,sort,sortBy,transpose,nub)
++import Data.List(group,sort,sortBy,transpose,nub)
+ 
+ mkCase :: String -> Int -> Context -> Name -> -- for finding constructor names
+           Int -> -- first variable to introduce (we might need this several times per function, so names we introduce need to be unique!)
+diff -ur --exclude configure kaya-0.5.2/compiler/TAC.hs kaya-0.5.2.new/compiler/TAC.hs
+--- kaya-0.5.2/compiler/REPL.hs.in~	2009-04-12 19:02:24.000000000 +0900
++++ kaya-0.5.2/compiler/REPL.hs.in	2012-11-29 16:31:14.289016276 +0900
+@@ -27,11 +27,11 @@
+ import Language
+ import Errors
+ import Lib
+-import List
++import Data.List
+ 
+-import CForeign
+-import Ptr
+-import IO
++import Foreign.C
++import Foreign.Ptr
++import System.IO
+ import @readlinemodule@
+ import System.Directory
+ 
+--- kaya-0.5.2/compiler/TAC.hs	2009-04-12 19:02:24.000000000 +0900
++++ kaya-0.5.2.new/compiler/TAC.hs	2012-11-29 16:05:02.483054061 +0900
+@@ -15,7 +15,7 @@
+ 
+ import Language
+ import Debug.Trace
+-import List
++import Data.List
+ import Control.Monad.State
+ import Data.Maybe
+ 
diff --git a/kaya.spec b/kaya.spec
index c089c18..b69ccd5 100644
--- a/kaya.spec
+++ b/kaya.spec
@@ -4,7 +4,7 @@
 
 Name:		kaya
 Version:	0.5.2
-Release:	16%{?dist}
+Release:	17%{?dist}
 Summary:	A Statically typed, imperative programming-language
 
 Group:		Development/Languages
@@ -21,21 +21,33 @@ Patch3:		kaya-0.5.2-gc.patch
 Patch4:		kaya-0.5.2-dyn.patch
 Patch5:		kaya-0.5.2-codegen.patch
 Patch6:		kaya-0.5.2-gcc47.patch
+Patch7:		kaya-0.5.2-ghc74-base.patch
 
-# fedora ghc has only been bootstrapped on the following archs:
-#ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9
-ExcludeArch:	sparc64 s390x
+ExcludeArch:	sparc64
 
-BuildRequires:  libtool, autoconf, pkgconfig, ghc-devel, 
-BuildRequires:	ghc >= 6.10.3, gc-devel, happy, zlib-devel, gnutls-devel
-BuildRequires:  libgcrypt-devel, pcre-devel ghc-editline-devel
+BuildRequires:  libtool, autoconf, pkgconfig
+BuildRequires:	gc-devel, happy, zlib-devel, gnutls-devel
+BuildRequires:  libgcrypt-devel, pcre-devel
 BuildRequires:	postgresql-devel, mysql-devel, sqlite-devel
 BuildRequires:  gd-devel, SDL-devel, mesa-libGL-devel
-BuildRequires:  ncurses-devel, freeglut-devel, ghc-unix-devel
-
-# %if 0%{?fedora} > 12
-BuildRequires: ghc-mtl-devel
-# %endif
+BuildRequires:  ncurses-devel, freeglut-devel
+
+BuildRequires:  ghc-array-devel
+BuildRequires:  ghc-base-devel
+BuildRequires:  ghc-bytestring-devel
+BuildRequires:  ghc-containers-devel
+BuildRequires:  ghc-deepseq-devel
+BuildRequires:  ghc-directory-devel
+BuildRequires:  ghc-editline-devel
+BuildRequires:  ghc-filepath-devel
+BuildRequires:  ghc-mtl-devel
+BuildRequires:  ghc-old-locale-devel
+BuildRequires:  ghc-old-time-devel
+BuildRequires:  ghc-process-devel
+BuildRequires:  ghc-random-devel
+BuildRequires:  ghc-time-devel
+BuildRequires:  ghc-transformers-devel
+BuildRequires:  ghc-unix-devel
 
 %description
 Kaya is a compiled statically typed (ie, types are checked at compile time)
@@ -66,6 +78,7 @@ Additional you may find samples for this language.
 %patch4 -p1 -b .dyn
 %patch5 -p1 -b .codegen
 %patch6 -p1 -b .gcc47
+%patch7 -p1 -b .haskell98
 
 %build
 autoconf
@@ -109,7 +122,12 @@ make test ||:
 %doc examples/ docs/
 
 %changelog
-* Mon Nov 26 2012 Jochen Schmitt <JOchen herr-schmitt de> - 0.5.2-16
+* Thu Nov 29 2012 Jens Petersen <petersen at redhat.com> - 0.5.2-17
+- fix build with ghc-7.4 using base instead of haskell98
+- no longer exclude s390x
+- list haskell library deps explicitly
+
+* Mon Nov 26 2012 Jochen Schmitt <Jochen herr-schmitt de> - 0.5.2-16
 - Rebuild for new release of ghc-editline
 - Remove obsolete stuff from SPEC file
 - Add ghc-unix-devel as a BR


More information about the scm-commits mailing list