diff options
Diffstat (limited to 'dev-haskell/dbus/files')
4 files changed, 42 insertions, 128 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 deleted file mode 100644 index 5c2c4c57cbb0..000000000000 --- a/dev-haskell/dbus/files/dbus-0.10.11-cereal-0.5.patch +++ /dev/null @@ -1,113 +0,0 @@ -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 deleted file mode 100644 index 5fbfa1f61981..000000000000 --- a/dev-haskell/dbus/files/dbus-0.10.12-QC-2.8.2.patch +++ /dev/null @@ -1,15 +0,0 @@ -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 - diff --git a/dev-haskell/dbus/files/dbus-1.2.22-disable-integration-tests.patch b/dev-haskell/dbus/files/dbus-1.2.22-disable-integration-tests.patch new file mode 100644 index 000000000000..d5c509ca58e3 --- /dev/null +++ b/dev-haskell/dbus/files/dbus-1.2.22-disable-integration-tests.patch @@ -0,0 +1,28 @@ +From: hololeap <hololeap@protonmail.com> +Signed-off-by: hololeap <hololeap@protonmail.com> + +dev-haskell/dbus: Disable integration tests + +These tests try to spin up an instance of dbus-daemon + +diff -urN dbus-1.2.22/tests/DBusTests.hs dbus-1.2.22-r1/tests/DBusTests.hs +--- dbus-1.2.22/tests/DBusTests.hs 2021-12-16 12:34:16.000000000 -0700 ++++ dbus-1.2.22-r1/tests/DBusTests.hs 2022-08-05 12:51:12.447871229 -0600 +@@ -23,7 +23,7 @@ + import DBusTests.BusName + import DBusTests.Client + import DBusTests.ErrorName +-import DBusTests.Integration ++--import DBusTests.Integration + import DBusTests.InterfaceName + import DBusTests.Introspection + import DBusTests.MemberName +@@ -55,7 +55,7 @@ + , test_BusName + , test_Client + , test_ErrorName +- , test_Integration ++-- , test_Integration + , test_InterfaceName + , test_Introspection + , test_MemberName diff --git a/dev-haskell/dbus/files/dbus-1.2.27-template-haskell.patch b/dev-haskell/dbus/files/dbus-1.2.27-template-haskell.patch new file mode 100644 index 000000000000..dab7aaff6aef --- /dev/null +++ b/dev-haskell/dbus/files/dbus-1.2.27-template-haskell.patch @@ -0,0 +1,14 @@ +--- dbus-1.2.27-orig/lib/DBus/Generation.hs 2022-07-13 00:32:15.000000000 +1000 ++++ dbus-1.2.27/lib/DBus/Generation.hs 2022-11-15 11:11:32.291154128 +1100 +@@ -148,7 +148,11 @@ + makeFromVariantApp name = AppE (VarE 'T.fromVariant) $ VarE name + + makeJustPattern :: Name -> Pat ++#if MIN_VERSION_template_haskell(2,18,0) + makeJustPattern name = ConP 'Just [] [VarP name] ++#else ++makeJustPattern name = ConP 'Just [VarP name] ++#endif + + mapOrHead :: + (Num a, Eq a) => a -> (t -> b) -> [t] -> ([b] -> b) -> b |