[kaya/f20] Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

Jochen Schmitt s4504kr at fedoraproject.org
Wed Aug 28 10:19:34 UTC 2013


commit 4b56b9acced385f48474c5b53df2a76b05e50fd6
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date:   Wed Aug 28 12:19:20 2013 +0200

    Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
    
    - Remove -fstack-protector-stong, Fix BZ #995626
    - Use of System.Environment.lookupEnv to fix FTBFS
    - hinding findfile from System.Directory to fix FTBFS

 kaya-0.5.2-ghc76.patch |  106 ++++++++++++++++++++++++++++++++++++++++++++++++
 kaya.spec              |    8 ++++
 2 files changed, 114 insertions(+), 0 deletions(-)
---
diff --git a/kaya-0.5.2-ghc76.patch b/kaya-0.5.2-ghc76.patch
new file mode 100644
index 0000000..0d39325
--- /dev/null
+++ b/kaya-0.5.2-ghc76.patch
@@ -0,0 +1,106 @@
+diff -up kaya-0.5.2/compiler/CodegenCPP.hs.ghc76 kaya-0.5.2/compiler/CodegenCPP.hs
+--- kaya-0.5.2/compiler/CodegenCPP.hs.ghc76	2013-08-28 10:49:13.712430846 +0200
++++ kaya-0.5.2/compiler/CodegenCPP.hs	2013-08-28 10:49:13.769427124 +0200
+@@ -17,6 +17,8 @@ import Debug.Trace
+ import Lib
+ import Data.List
+ 
++import Control.Exception
++
+ data Output = RawOutput String
+ 	    | FNOutput (Name, Type, String, [(ArgType, Var)], String)
+ 	    | ExternOutput (Name, Type)
+@@ -151,7 +153,7 @@ findFile (x:xs) path
+          (do --putStrLn $ "Trying " ++ x ++ path
+ 	     f <- readFile (x++path)
+ 	     return f)
+-         (\e -> findFile xs path)
++         (\ (e :: SomeException) -> findFile xs path)
+ 
+ writecpp :: [CompileResult] -> [Output]
+ writecpp [] = []
+diff -up kaya-0.5.2/compiler/Driver.hs.ghc76 kaya-0.5.2/compiler/Driver.hs
+--- kaya-0.5.2/compiler/Driver.hs.ghc76	2013-08-28 10:49:13.719430389 +0200
++++ kaya-0.5.2/compiler/Driver.hs	2013-08-28 11:36:40.662637353 +0200
+@@ -37,6 +37,7 @@ import System.Random
+ import System.IO
+ import Debug.Trace
+ import Data.List
++import Control.Exception
+ import Control.Monad
+ 
+ -- Compile a file, with extra options to gcc, and main options. Returns the
+@@ -68,8 +69,8 @@ compileFile prtype modname fn extra opts
+        catch (do startup <- getStartup prtype libdirs
+                  let pt = addToPT (parse newroot libdirs (prog++startup) fn) pinput 
+                  compile newroot libdirs opts pt extra mainfile)
+-             (\e -> do putStrLn (show e)
+-                       return CompError)
++             (\ (e :: SomeException) -> do putStrLn (show e)
++                                           return CompError)
+ 
+ outputfile Module mod = showuser mod ++ ".o"
+ -- TMP HACK: This should probably be a %extension "cgi" directive in the .ks
+diff -up kaya-0.5.2/compiler/Module.hs.ghc76 kaya-0.5.2/compiler/Module.hs
+--- kaya-0.5.2/compiler/Module.hs.ghc76	2013-08-28 10:49:13.738429149 +0200
++++ kaya-0.5.2/compiler/Module.hs	2013-08-28 10:49:13.774426798 +0200
+@@ -14,8 +14,9 @@ module Module(importVersion, findFile, f
+               getAllLibDirs, linkFiles, getObjs) where
+ 
+ import Language
++import Control.Exception
+ import Debug.Trace
+-import System.Directory
++import System.Directory hiding (findFile)
+ import Data.List
+ import Lib
+ import Options
+@@ -252,7 +253,7 @@ findFile (x:xs) path
+          (do --putStrLn $ "Trying " ++ x ++ path
+ 	     f <- readFile (x++path)
+ 	     return (Just f))
+-         (\e -> findFile xs path)
++         (\ (e :: SomeException) -> findFile xs path)
+ 
+ -- Get all the library directories, looking at the options and the
+ -- KAYA_LIBRARY_PATH environment variable.
+diff -up kaya-0.5.2/compiler/Portability64.hs.ghc76 kaya-0.5.2/compiler/Portability64.hs
+--- kaya-0.5.2/compiler/Portability64.hs.ghc76	2009-04-12 12:02:24.000000000 +0200
++++ kaya-0.5.2/compiler/Portability64.hs	2013-08-28 10:49:13.777426602 +0200
+@@ -5,12 +5,14 @@ import System.IO
+ import System.Environment
+ import qualified Data.Map as Map
+ 
++import Control.Exception
++
+ -- GHC 6.4 and above library incompatibilities.
+ 
+ environment :: String -> IO (Maybe String)
+ environment x = catch (do e <- getEnv x
+ 		          return (Just e))
+-		      (\_ -> return Nothing)
++		      ( \ ( _ :: SomeException) -> return Nothing)
+ 
+ tempfile :: IO (FilePath, Handle)
+ tempfile = do env <- environment "TMPDIR"
+diff -up kaya-0.5.2/compiler/REPL.hs.in.ghc76 kaya-0.5.2/compiler/REPL.hs.in
+--- kaya-0.5.2/compiler/REPL.hs.in.ghc76	2013-08-28 10:49:13.750428365 +0200
++++ kaya-0.5.2/compiler/REPL.hs.in	2013-08-28 10:49:13.780426406 +0200
+@@ -35,6 +35,8 @@ import System.IO
+ import @readlinemodule@
+ import System.Directory
+ 
++import Control.Exception
++
+ foreign import ccall "repl_load.h" interp_load :: Ptr CChar -> IO ()
+ foreign import ccall "repl_load.h" interp_close :: IO ()
+ foreign import ccall "repl_load.h" interp_clear :: IO ()
+@@ -160,7 +162,7 @@ runREPL so mod libdirs ctxt ectxt gctxt
+                      xfn <- substTerm mod ctxt phi xrv
+                      let xinft = subst phi ity
+                      catch (runProg xfn xinft)
+-                           (\e -> putStrLn(show e))
++                           (\ (e :: SomeException)  -> putStrLn(show e))
+                   Failure err file line -> do reportError err
+     processREPL (Failure err file line)
+         = do reportError err
diff --git a/kaya.spec b/kaya.spec
index bb51e15..d1b07fd 100644
--- a/kaya.spec
+++ b/kaya.spec
@@ -22,6 +22,7 @@ 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
+Patch8:         kaya-0.5.2-ghc76.patch
 
 ExcludeArch:	sparc64
 
@@ -80,6 +81,10 @@ Additional you may find samples for this language.
 %patch6 -p1 -b .gcc47
 %patch7 -p1 -b .haskell98
 
+%if 0%{?fedora} > 19
+%patch8 -p1 -b .ghc76
+%endif
+
 %build
 autoreconf
 CFLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/\-wp,\-D_FORTIFY_SOURCE=2//g' | \
@@ -124,6 +129,8 @@ make test ||:
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.2-19
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 - Remove -fstack-protector-stong, Fix BZ #995626
+- Use of System.Environment.lookupEnv to fix FTBFS
+- hinding findfile from System.Directory to fix FTBFS
 
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.2-18
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
@@ -147,6 +154,7 @@ make test ||:
 * Thu Jan 19 2012 Jochen Schmitt <Jochen herr-schmitt de> - 0.5.2-133
 - Set ExcludeArch to the same values as ghc
 - Add include to unistd.h to fix gcc-4.7 build issue
+- Import Control.Exception to fix catch not in scope
 
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.2-12.2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild


More information about the scm-commits mailing list