diff -Nru hedgewars-0.9.17/debian/changelog hedgewars-0.9.17/debian/changelog --- hedgewars-0.9.17/debian/changelog 2011-11-20 06:39:12.000000000 -0800 +++ hedgewars-0.9.17/debian/changelog 2011-11-22 23:59:41.000000000 -0800 @@ -1,3 +1,16 @@ +hedgewars (0.9.17-1~maverick0.1) maverick-proposed; urgency=low + + * Backport 0.9.17-1 to Maverick to fix network play (LP: #852603): + - debian/patches/haskell-backwards-compat.patch: Replace or + reimplement functions used by the server that weren't available in + Maverick's Haskell stack + - Drop libghc-bytestring-show-dev build-dependency. + - Add 6's to get libghc6-deepseq-dev, libghc6-utf8-string-dev + build-dependencies + - Change libghc6-network-dev build-dependency to libghc6-network-bytestring-dev + + -- Evan Broder Tue, 22 Nov 2011 04:49:51 -0800 + hedgewars (0.9.17-1) unstable; urgency=low * [Paul Wise] diff -Nru hedgewars-0.9.17/debian/control hedgewars-0.9.17/debian/control --- hedgewars-0.9.17/debian/control 2011-11-20 06:25:05.000000000 -0800 +++ hedgewars-0.9.17/debian/control 2011-11-22 03:44:00.000000000 -0800 @@ -1,7 +1,8 @@ Source: hedgewars Section: games Priority: extra -Maintainer: Dmitry E. Oboukhov +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Dmitry E. Oboukhov Uploaders: Debian Games Team Build-Depends: debhelper (>= 7), cmake, cdbs, libqt4-dev (>= 4.2), @@ -15,14 +16,13 @@ fp-units-gfx, ghc6, libghc6-stm-dev, - libghc6-network-dev, + libghc6-network-bytestring-dev, libghc6-dataenc-dev, libghc6-hslogger-dev, - libghc-utf8-string-dev, + libghc6-utf8-string-dev, liblua5.1-dev, imagemagick, - libghc-bytestring-show-dev, - libghc-deepseq-dev + libghc6-deepseq-dev Standards-Version: 3.9.2 Homepage: http://hedgewars.org VCS-Browser: http://git.debian.org/?p=collab-maint/hedgewars.git;a=summary diff -Nru hedgewars-0.9.17/debian/patches/haskell-backwards-compat.patch hedgewars-0.9.17/debian/patches/haskell-backwards-compat.patch --- hedgewars-0.9.17/debian/patches/haskell-backwards-compat.patch 1969-12-31 16:00:00.000000000 -0800 +++ hedgewars-0.9.17/debian/patches/haskell-backwards-compat.patch 2011-11-22 17:57:13.000000000 -0800 @@ -0,0 +1,87 @@ +Description: Make game server compatible with older Haskell stack + The Hedgewars server uses several Haskell libraries and functions + that weren't available in older versions of Ubuntu: + . + 1. Reimplement Control.Exception.mask, as it wasn't available. + . + 2. Use the Control.Monad.State.State type constructor instead of the + Control.Monad.State.state function; the latter wasn't available. + . + 3. Utils.hs contains showB, which uses Text.Show.ByteString. Instead + of using the Text.Show.ByteString.Show class, use plain old Show + instead (which should be able to render everything + Text.Show.ByteString.Show could). + . + Thanks to Anders Kaseorg for helping generate the patch. +Forwarded: not-needed +Author: Evan Broder +Author: Anders Kaseorg +Last-Update: 2011-11-22 + +Index: hedgewars-0.9.17/gameServer/Actions.hs +=================================================================== +--- hedgewars-0.9.17.orig/gameServer/Actions.hs 2011-11-22 17:57:10.482642522 -0800 ++++ hedgewars-0.9.17/gameServer/Actions.hs 2011-11-22 17:57:11.838642515 -0800 +@@ -1,4 +1,4 @@ +-{-# LANGUAGE CPP, OverloadedStrings #-} ++{-# LANGUAGE CPP, OverloadedStrings, RankNTypes #-} + module Actions where + + import Control.Concurrent +@@ -85,6 +85,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 () + + +@@ -429,7 +434,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)) + +Index: hedgewars-0.9.17/gameServer/ClientIO.hs +=================================================================== +--- hedgewars-0.9.17.orig/gameServer/ClientIO.hs 2011-11-22 17:57:10.502642524 -0800 ++++ hedgewars-0.9.17/gameServer/ClientIO.hs 2011-11-22 17:57:11.838642515 -0800 +@@ -22,7 +22,7 @@ + takePacks :: State B.ByteString [[B.ByteString]] + takePacks + = do modify (until (not . B.isPrefixOf pDelim) (B.drop 2)) +- packet <- state $ B.breakSubstring pDelim ++ packet <- State $ B.breakSubstring pDelim + buf <- get + if B.null buf then put packet >> return [] else + if B.null packet then return [] else +Index: hedgewars-0.9.17/gameServer/Utils.hs +=================================================================== +--- hedgewars-0.9.17.orig/gameServer/Utils.hs 2011-11-22 17:57:10.530642521 -0800 ++++ hedgewars-0.9.17/gameServer/Utils.hs 2011-11-22 17:57:11.842642515 -0800 +@@ -13,7 +13,6 @@ + import Control.Monad + import qualified Codec.Binary.Base64 as Base64 + import qualified Data.ByteString.Lazy as BL +-import qualified Text.Show.ByteString as BS + import qualified Data.ByteString.Char8 as B + import qualified Data.ByteString.UTF8 as UTF8 + import qualified Data.ByteString as BW +@@ -105,8 +104,8 @@ + Right (a, new_b) -> let (a', b') = unfoldrE f new_b in (a : a', b') + Left new_b -> ([], new_b) + +-showB :: (BS.Show a) => a -> B.ByteString +-showB = B.concat . BL.toChunks . BS.show ++showB :: (Show a) => a -> B.ByteString ++showB = B.pack . show + + readInt_ :: (Num a) => B.ByteString -> a + readInt_ str = diff -Nru hedgewars-0.9.17/debian/patches/series hedgewars-0.9.17/debian/patches/series --- hedgewars-0.9.17/debian/patches/series 1969-12-31 16:00:00.000000000 -0800 +++ hedgewars-0.9.17/debian/patches/series 2011-11-22 17:51:24.000000000 -0800 @@ -0,0 +1 @@ +haskell-backwards-compat.patch