diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-haskell/dbus/files | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-haskell/dbus/files')
-rw-r--r-- | dev-haskell/dbus/files/dbus-0.10.11-cereal-0.5.patch | 113 | ||||
-rw-r--r-- | dev-haskell/dbus/files/dbus-0.10.12-QC-2.8.2.patch | 15 |
2 files changed, 128 insertions, 0 deletions
diff --git a/dev-haskell/dbus/files/dbus-0.10.11-cereal-0.5.patch b/dev-haskell/dbus/files/dbus-0.10.11-cereal-0.5.patch new file mode 100644 index 000000000000..5c2c4c57cbb0 --- /dev/null +++ b/dev-haskell/dbus/files/dbus-0.10.11-cereal-0.5.patch @@ -0,0 +1,113 @@ +diff --git a/lib/DBus/Transport.hs b/lib/DBus/Transport.hs +index 8c50ab9..9517212 100644 +--- a/lib/DBus/Transport.hs ++++ b/lib/DBus/Transport.hs +@@ -42,3 +42,5 @@ import qualified Data.ByteString + import Data.ByteString (ByteString) ++import qualified Data.ByteString.Lazy as BL + import qualified Data.Map as Map ++import qualified Data.Monoid as M + import Data.Typeable (Typeable) +@@ -49,3 +51,3 @@ import qualified System.Info + +-import qualified Data.Serialize.Builder as Builder ++import qualified Data.ByteString.Builder as Builder + +@@ -151,3 +153,3 @@ instance Transport SocketTransport where + recvLoop :: Socket -> Int -> IO ByteString +-recvLoop s = loop Builder.empty where ++recvLoop s = loop M.mempty where + chunkSize = 4096 +@@ -156,3 +158,3 @@ recvLoop s = loop Builder.empty where + chunk <- recv s chunkSize +- let builder = Builder.append acc (Builder.fromByteString chunk) ++ let builder = M.mappend acc (Builder.byteString chunk) + loop builder (n - Data.ByteString.length chunk) +@@ -163,8 +165,8 @@ recvLoop s = loop Builder.empty where + -- Return what we've got so far. +- 0 -> return (Builder.toByteString acc) ++ 0 -> return (BL.toStrict $ Builder.toLazyByteString acc) + + len -> do +- let builder = Builder.append acc (Builder.fromByteString chunk) ++ let builder = M.mappend acc (Builder.byteString chunk) + if len == n +- then return (Builder.toByteString builder) ++ then return (BL.toStrict $ Builder.toLazyByteString builder) + else loop builder (n - Data.ByteString.length chunk) +diff --git a/lib/DBus/Wire.hs b/lib/DBus/Wire.hs +index 43ae315..09bf8bd 100644 +--- a/lib/DBus/Wire.hs ++++ b/lib/DBus/Wire.hs +@@ -34,2 +34,3 @@ import qualified Data.ByteString.Char8 + import Data.Int (Int16, Int32, Int64) ++import qualified Data.ByteString.Lazy as BL + import qualified Data.Map +@@ -37,2 +38,3 @@ import Data.Map (Map) + import Data.Maybe (fromJust, listToMaybe, fromMaybe) ++import qualified Data.Monoid as M + import Data.Text (Text) +@@ -45,3 +47,3 @@ import System.Posix.Types (Fd(..)) + +-import qualified Data.Serialize.Builder as Builder ++import qualified Data.ByteString.Builder as Builder + import qualified Data.Serialize.Get as Get +@@ -180,3 +182,3 @@ appendB :: Word64 -> Builder.Builder -> Marshal () + appendB size bytes = Wire (\_ (MarshalState builder count) -> let +- builder' = Builder.append builder bytes ++ builder' = M.mappend builder bytes + count' = count + size +@@ -187,3 +189,3 @@ appendS bytes = appendB + (fromIntegral (Data.ByteString.length bytes)) +- (Builder.fromByteString bytes) ++ (Builder.byteString bytes) + +@@ -275,3 +277,3 @@ unmarshalGet count be le = do + marshalWord8 :: Word8 -> Marshal () +-marshalWord8 x = appendB 1 (Builder.singleton x) ++marshalWord8 x = appendB 1 (Builder.word8 x) + +@@ -282,4 +284,4 @@ marshalWord16 :: Word16 -> Marshal () + marshalWord16 = marshalBuilder 2 +- Builder.putWord16be +- Builder.putWord16le ++ Builder.word16BE ++ Builder.word16LE + +@@ -287,4 +289,4 @@ marshalWord32 :: Word32 -> Marshal () + marshalWord32 = marshalBuilder 4 +- Builder.putWord32be +- Builder.putWord32le ++ Builder.word32BE ++ Builder.word32LE + +@@ -292,4 +294,4 @@ marshalWord64 :: Word64 -> Marshal () + marshalWord64 = marshalBuilder 8 +- Builder.putWord64be +- Builder.putWord64le ++ Builder.word64BE ++ Builder.word64LE + +@@ -441,6 +443,6 @@ getArrayBytes itemType vs = do + +- putState (MarshalState Builder.empty afterPadding) ++ putState (MarshalState M.mempty afterPadding) + (MarshalState itemBuilder _) <- Data.Vector.mapM_ marshal vs >> getState + +- let itemBytes = Builder.toByteString itemBuilder ++ let itemBytes = BL.toStrict $ Builder.toLazyByteString itemBuilder + paddingSize = fromIntegral (afterPadding - afterLength) +@@ -568,3 +570,3 @@ marshalMessage e serial msg = runMarshal where + marshal (toValue (encodeEndianness e)) +- let bodyBytes = Builder.toByteString bodyBytesB ++ let bodyBytes = BL.toStrict $ Builder.toLazyByteString bodyBytesB + marshalHeader msg serial sig (fromIntegral (Data.ByteString.length bodyBytes)) +@@ -573,6 +575,6 @@ marshalMessage e serial msg = runMarshal where + checkMaximumSize +- emptyState = MarshalState Builder.empty 0 ++ emptyState = MarshalState M.mempty 0 + runMarshal = case unWire marshaler e emptyState of + WireRL err -> Left (MarshalError err) +- WireRR _ (MarshalState builder _) -> Right (Builder.toByteString builder) ++ WireRR _ (MarshalState builder _) -> Right (BL.toStrict $ Builder.toLazyByteString builder) + diff --git a/dev-haskell/dbus/files/dbus-0.10.12-QC-2.8.2.patch b/dev-haskell/dbus/files/dbus-0.10.12-QC-2.8.2.patch new file mode 100644 index 000000000000..5fbfa1f61981 --- /dev/null +++ b/dev-haskell/dbus/files/dbus-0.10.12-QC-2.8.2.patch @@ -0,0 +1,15 @@ +diff --git a/tests/DBusTests/Util.hs b/tests/DBusTests/Util.hs +index cc83cef..972afb1 100644 +--- a/tests/DBusTests/Util.hs ++++ b/tests/DBusTests/Util.hs +@@ -1,2 +1,2 @@ +-{-# LANGUAGE TemplateHaskell #-} ++{-# LANGUAGE TemplateHaskell, CPP #-} + +@@ -194,4 +194,6 @@ countFileDescriptors = liftIO io where + ++#if ! MIN_VERSION_QuickCheck(2,8,2) + instance (Arbitrary a, Ord a) => Arbitrary (Data.Set.Set a) where + arbitrary = fmap Data.Set.fromList arbitrary ++#endif + |