[hedgewars] Fix up Text.Show.ByteString not available patch

Bruno Wolff III bruno at fedoraproject.org
Sat Jan 3 22:37:03 UTC 2015


commit a185aac781cbab54dcf3e78da4bf78966d55415f
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sat Jan 3 02:22:29 2015 -0600

    Fix up Text.Show.ByteString not available patch

 hedgewars-no-bytestring.patch |   56 +++++++++++++++++++++++++++++++---------
 hedgewars.spec                |    2 +-
 2 files changed, 44 insertions(+), 14 deletions(-)
---
diff --git a/hedgewars-no-bytestring.patch b/hedgewars-no-bytestring.patch
index 3f415d0..88b1a31 100644
--- a/hedgewars-no-bytestring.patch
+++ b/hedgewars-no-bytestring.patch
@@ -1,12 +1,15 @@
---- hedgewars-src-0.9.18/gameServer/Actions.hs	2012-10-31 21:48:12.000000000 +0100
-+++ hedgewars-src-0.9.18.new/gameServer/Actions.hs	2012-11-01 21:13:01.257303511 +0100
-@@ -1,4 +1,4 @@
--{-# LANGUAGE CPP, OverloadedStrings #-}
-+{-# LANGUAGE CPP, OverloadedStrings, RankNTypes #-}
+--- gameServer/Actions.hs.orig	2014-11-10 13:08:33.000000000 -0600
++++ gameServer/Actions.hs	2015-01-02 16:44:27.775816183 -0600
+@@ -16,7 +16,7 @@
+  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+  \-}
+ 
+-{-# LANGUAGE CPP, OverloadedStrings, ScopedTypeVariables #-}
++{-# LANGUAGE CPP, OverloadedStrings, ScopedTypeVariables, RankNTypes #-}
  {-# OPTIONS_GHC -fno-warn-orphans #-}
  module Actions where
  
-@@ -92,6 +92,11 @@
+@@ -61,6 +61,11 @@
      ri <- clientRoomA
      liftM (map sendChan . filter (/= cl)) $ roomClientsS ri
  
@@ -18,18 +21,25 @@
  processAction :: Action -> StateT ServerState IO ()
  
  
-@@ -509,7 +514,7 @@
+@@ -589,7 +594,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)
+-        _ <- Exception.mask (\x -> forkIO $ clientRecvLoop (clientSocket cl) (coreChan si) (sendChan cl) ci x)
++        _ <- exceptionMask (\x -> forkIO $ clientRecvLoop (clientSocket cl) (coreChan si) (sendChan cl) ci x)
  
          infoM "Clients" (show ci ++ ": New client. Time: " ++ show (connectTime cl))
  
---- hedgewars-src-0.9.18/gameServer/Utils.hs	2012-10-29 07:10:05.000000000 +0100
-+++ hedgewars-src-0.9.18.new/gameServer/Utils.hs	2012-11-01 21:12:29.897291647 +0100
-@@ -11,7 +11,6 @@
+@@ -823,4 +828,4 @@
+     forM_ (actions `deepseq` actions) processAction
+ 
+ processAction CheckVotes =
+-    checkVotes >>= mapM_ processAction
+\ No newline at end of file
++    checkVotes >>= mapM_ processAction
+--- gameServer/Utils.hs.orig	2014-12-24 14:28:23.000000000 -0600
++++ gameServer/Utils.hs	2015-01-03 02:11:52.739756034 -0600
+@@ -29,7 +29,6 @@
  import qualified Data.List as List
  import Control.Monad
  import qualified Data.ByteString.Lazy as BL
@@ -37,7 +47,7 @@
  import qualified Data.ByteString.Char8 as B
  import qualified Data.ByteString.UTF8 as UTF8
  import Data.Maybe
-@@ -105,8 +104,8 @@
+@@ -130,8 +129,8 @@
          Right (a, new_b) -> let (a', b') = unfoldrE f new_b in (a : a', b')
          Left new_b       -> ([], new_b)
  
@@ -48,3 +58,23 @@
  
  readInt_ :: (Num a) => B.ByteString -> a
  readInt_ str =
+--- gameServer/CMakeLists.txt.orig	2015-01-03 01:50:32.109994576 -0600
++++ gameServer/CMakeLists.txt	2015-01-03 01:51:15.603522380 -0600
+@@ -9,7 +9,6 @@
+ check_haskell_module_exists("Data.Map" size 1 containers)
+ check_haskell_module_exists("Data.Vector" length 1 vector)
+ check_haskell_module_exists("Data.ByteString" pack 1 bytestring)
+-check_haskell_module_exists("Text.Show.ByteString" putDigit 1 bytestring-show)
+ check_haskell_module_exists("Network.BSD" getHostName 0 network)
+ check_haskell_module_exists("Data.Time" getCurrentTime 0 time)
+ check_haskell_module_exists("Control.Monad.State" fix 1 mtl)
+--- gameServer/hedgewars-server.cabal.orig	2015-01-03 01:50:20.883567755 -0600
++++ gameServer/hedgewars-server.cabal	2015-01-03 01:52:04.890786538 -0600
+@@ -21,7 +21,6 @@
+     containers,
+     vector,
+     bytestring,
+-    bytestring-show,
+     network >= 2.3,
+     random,
+     time,
diff --git a/hedgewars.spec b/hedgewars.spec
index c284286..f3cc5f6 100644
--- a/hedgewars.spec
+++ b/hedgewars.spec
@@ -65,7 +65,7 @@ A standalone server that can be used for LAN play or a private internet server.
 %prep
 %setup -q -n %{name}-src-%{version}
 #%patch0 -p1
-#%patch1 -p1
+%patch1 -p0
 #%patch2 -p1 -b .lua-52
 #%patch3 -p0
 %ifarch %{arm}


More information about the scm-commits mailing list