summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2016-01-16 17:46:59 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2016-01-16 19:42:39 +0000
commita4f2e99c139506ba2c050858fb185c46e4c2867a (patch)
treefd812dccbc62cb8e99a993440180cf76acece024 /dev-haskell/dbus
parentdev-haskell/dataenc: allow quickcheck-2.8, rename tests binary (diff)
downloadgentoo-a4f2e99c139506ba2c050858fb185c46e4c2867a.tar.gz
gentoo-a4f2e99c139506ba2c050858fb185c46e4c2867a.tar.bz2
gentoo-a4f2e99c139506ba2c050858fb185c46e4c2867a.zip
dev-haskell/dbus: port to cereal-0.5
Package-Manager: portage-2.2.26
Diffstat (limited to 'dev-haskell/dbus')
-rw-r--r--dev-haskell/dbus/Manifest1
-rw-r--r--dev-haskell/dbus/dbus-0.10.11-r1.ebuild44
-rw-r--r--dev-haskell/dbus/files/dbus-0.10.11-cereal-0.5.patch113
3 files changed, 158 insertions, 0 deletions
diff --git a/dev-haskell/dbus/Manifest b/dev-haskell/dbus/Manifest
index 0454ed108324..edb8a63eb84d 100644
--- a/dev-haskell/dbus/Manifest
+++ b/dev-haskell/dbus/Manifest
@@ -1,3 +1,4 @@
DIST dbus-0.10.10.tar.gz 73707 SHA256 cd68c5613fbad01a31be17501e2b4cf242b09625d5fed9474db6c4b5c4f22468 SHA512 c2faa76c32abb19ab903c015f6fc133beb605bbb4459d018fa544ffe4e04110cc63fc45815d862e8311f5b99de9c180c8eeb8e135fd6c7eb388ff579529a8ead WHIRLPOOL 919905324f7910a9b0a4ef77ca418a6610f974b79941141822eab8eb7c2505b918868f0a74c33d5d928612992ba6d03ad6889cd9fd3e726b57181247a252abef
+DIST dbus-0.10.11.tar.gz 74853 SHA256 73e6b2b2021215dd8b9540d770e5cc353427f37083c7d84ebc244ac48e630482 SHA512 290c1e9b142b920d56c59f3b250da88e114d850c8d846c37b400b21e92fae2d58983b4821497b61d0ff96f54179aedb70a5eb3ca40e1fbb6bbe59dee2f9256ff WHIRLPOOL d126478c8d041362b7cee452c17960e620670618905b64bd6697a0895762c8c9bfc03722829a77d20d4a3bdd98525fb994b1264f2b203ac5e8a7d509c3985cd3
DIST dbus-0.10.5.tar.gz 73715 SHA256 3d103e5f119ca15ebb64ca43e10d7a96ab6b010715132b3eec6b6c4ef9c474f1 SHA512 be0c78cf042e536c7a9e8630259f209a8d7bd1f1e0e8b653ab53dea63460e92a4158efcb9808c336bb82a7b6e473bc5148245890f47b2f826a7b6a0c1ca06d92 WHIRLPOOL bbc67894b56146a0454a4c87f47b99b719b2fda71e6f3a8fe8ec1d72ce364931dc7b3196bc8e5bc882b743cbeb9873026382092d4699a244302c2f2b9baeaa73
DIST dbus-0.10.9.2.tar.gz 73294 SHA256 d4c888d03e32d590528e8b7452cba9dc3fc3c675318215840dbb66f4a48ae177 SHA512 b72f1f3676dcefbc22677899cbd148f068ac49951ec8821f7b0c1e0e026964fc1a6060c8ab83943ef9ff92529fd6726d653b788f1a0eaf0edf71ac0d61cec7fa WHIRLPOOL 6d9872e88c4921d89b316f7275bf5e37619096b70772ade000a8b237473da6e315b7ae23c4836dabbfd169c3d30b7dda00a497aae0172f299590c10c0305852c
diff --git a/dev-haskell/dbus/dbus-0.10.11-r1.ebuild b/dev-haskell/dbus/dbus-0.10.11-r1.ebuild
new file mode 100644
index 000000000000..8a9f3bab2b29
--- /dev/null
+++ b/dev-haskell/dbus/dbus-0.10.11-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.6.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
+inherit haskell-cabal
+
+DESCRIPTION="A client library for the D-Bus IPC system"
+HOMEPAGE="https://john-millikin.com/software/haskell-dbus/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND=">=dev-haskell/cereal-0.3.4:=[profile?]
+ >=dev-haskell/libxml-sax-0.7:=[profile?] <dev-haskell/libxml-sax-0.8:=[profile?]
+ >=dev-haskell/network-2.2.3:=[profile?]
+ >=dev-haskell/parsec-2.0:=[profile?] <dev-haskell/parsec-3.2:=[profile?]
+ >=dev-haskell/random-1.0:=[profile?] <dev-haskell/random-2.0:=[profile?]
+ >=dev-haskell/text-0.11.1.5:=[profile?]
+ >=dev-haskell/transformers-0.2:=[profile?]
+ >=dev-haskell/vector-0.7:=[profile?] <dev-haskell/vector-0.12:=[profile?]
+ >=dev-haskell/xml-types-0.3:=[profile?] <dev-haskell/xml-types-0.4:=[profile?]
+ >=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+ test? ( >=dev-haskell/chell-0.4 <dev-haskell/chell-0.5
+ >=dev-haskell/chell-quickcheck-0.2 <dev-haskell/chell-quickcheck-0.3
+ >=dev-haskell/quickcheck-2.4 )
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cereal-0.5.patch
+
+ cabal_chdeps \
+ 'cereal >= 0.3.4 && < 0.5' 'cereal >= 0.3.4'
+}
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)
+