[hedgewars] Try to deal with haskell error

Bruno Wolff III bruno at fedoraproject.org
Sun Jun 23 15:46:18 UTC 2013


commit 52505db387928b98bd7391cc11aec437aecdd13e
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sun Jun 23 10:45:13 2013 -0500

    Try to deal with haskell error
    
    A ghc update is doing stricter checking and a problem that slipped
    by previously is now a fatal build error.

 hedgewars-0.9.18-instance.patch |   37 +++++++++++++++++++++++++++++++++++++
 hedgewars.spec                  |    7 +++++++
 2 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/hedgewars-0.9.18-instance.patch b/hedgewars-0.9.18-instance.patch
new file mode 100644
index 0000000..0bf5e8b
--- /dev/null
+++ b/hedgewars-0.9.18-instance.patch
@@ -0,0 +1,37 @@
+--- gameServer/Actions.hs.orig	2012-11-02 12:41:55.000000000 -0500
++++ gameServer/Actions.hs	2013-06-23 10:40:02.377382001 -0500
+@@ -1,4 +1,4 @@
+-{-# LANGUAGE CPP, OverloadedStrings #-}
++{-# LANGUAGE CPP, OverloadedStrings, RankNTypes #-}
+ {-# OPTIONS_GHC -fno-warn-orphans #-}
+ module Actions where
+ 
+@@ -83,7 +83,6 @@
+     rnf (AnswerClients chans msg) = chans `deepseq` msg `deepseq` ()
+     rnf a = a `seq` ()
+ 
+-instance NFData B.ByteString
+ instance NFData (Chan a)
+ 
+ 
+@@ -93,6 +92,11 @@
+     ri <- clientRoomA
+     liftM (map sendChan . filter (/= cl)) $ roomClientsS ri
+ 
++exceptionMask:: ((forall a. IO a -> IO a) -> IO b) -> IO b
++exceptionMask io = do
++    b <- blocked
++    if b then io id else block (io unblock)
++
+ processAction :: Action -> StateT ServerState IO ()
+ 
+ 
+@@ -521,7 +525,7 @@
+     si <- gets serverInfo
+     newClId <- io $ do
+         ci <- addClient rnc cl
+-        _ <- Exception.mask (forkIO . clientRecvLoop (clientSocket cl) (coreChan si) (sendChan cl) ci)
++        _ <- exceptionMask (forkIO . clientRecvLoop (clientSocket cl) (coreChan si) (sendChan cl) ci)
+ 
+         infoM "Clients" (show ci ++ ": New client. Time: " ++ show (connectTime cl))
+ 
diff --git a/hedgewars.spec b/hedgewars.spec
index 50ac882..e367d11 100644
--- a/hedgewars.spec
+++ b/hedgewars.spec
@@ -18,6 +18,12 @@ Patch0:         hedgewars-compiler-opts.patch
 Patch1:         hedgewars-no-bytestring.patch
 # Lua 5.2
 Patch2:		hedgewars-0.9.18-lua-5.2.patch
+# A ghc update is doing stricter checking that causes a fatal error.
+# This won't be needed in 0.9.19.
+# I am not sure if removing the extra definition is right, but if builds 
+# now, so I can do some more testing. But given it was probably wrong before 
+# and still worked, it has a reasonable chance of working.
+Patch3:		hedgewars-0.9.18-instance.patch
 BuildRequires:  fpc qt4-devel SDL_mixer-devel SDL_net-devel SDL_image-devel
 BuildRequires:  SDL_ttf-devel openssl-devel cmake desktop-file-utils
 BuildRequires:  libpng-devel lua-devel
@@ -58,6 +64,7 @@ A standalone server that can be used for LAN play or a private internet server.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1 -b .lua-52
+%patch3 -p0
 # Make sure that we don't use bundled libraries
 rm -r misc/libfreetype misc/libtremor misc/libopenalbridge
 


More information about the scm-commits mailing list