From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-haskell/dbus/Manifest | 13 +++ dev-haskell/dbus/dbus-0.10.10.ebuild | 36 +++++++ dev-haskell/dbus/dbus-0.10.11-r1.ebuild | 43 ++++++++ dev-haskell/dbus/dbus-0.10.12.ebuild | 40 ++++++++ dev-haskell/dbus/dbus-0.10.13.ebuild | 37 +++++++ .../dbus/files/dbus-0.10.11-cereal-0.5.patch | 113 +++++++++++++++++++++ dev-haskell/dbus/files/dbus-0.10.12-QC-2.8.2.patch | 15 +++ dev-haskell/dbus/metadata.xml | 59 +++++++++++ 8 files changed, 356 insertions(+) create mode 100644 dev-haskell/dbus/Manifest create mode 100644 dev-haskell/dbus/dbus-0.10.10.ebuild create mode 100644 dev-haskell/dbus/dbus-0.10.11-r1.ebuild create mode 100644 dev-haskell/dbus/dbus-0.10.12.ebuild create mode 100644 dev-haskell/dbus/dbus-0.10.13.ebuild create mode 100644 dev-haskell/dbus/files/dbus-0.10.11-cereal-0.5.patch create mode 100644 dev-haskell/dbus/files/dbus-0.10.12-QC-2.8.2.patch create mode 100644 dev-haskell/dbus/metadata.xml (limited to 'dev-haskell/dbus') diff --git a/dev-haskell/dbus/Manifest b/dev-haskell/dbus/Manifest new file mode 100644 index 000000000000..4c503fbd98e6 --- /dev/null +++ b/dev-haskell/dbus/Manifest @@ -0,0 +1,13 @@ +AUX dbus-0.10.11-cereal-0.5.patch 4545 SHA256 ce97706caf0f906c958e8d68ccc1e78ba32f9a8b6ce62a89f93d7aa7423b506b SHA512 40b8996d4e5b8f77beeca0947f1f46a969a54fb34a875f7b04766767a1188f83f1f2e1aecc0f82be56146c496ccf2cf2c4d85d6fd48d22581a3a128768eb52ba WHIRLPOOL 2e7d3a1ff908c01a797a619c3bf3fe41b30a62ba9e037af330c027d68dc271d8aa1da35985e4d5b523bbb33eae3c2613c0f82c2a6faf2e5641d17fed0392455e +AUX dbus-0.10.12-QC-2.8.2.patch 466 SHA256 1ef24698121b3ae291e758720823a7b41ac282b984a04120b9785e63acb9746d SHA512 d1c4da222986b1570a4e9777d39f83d282471039abae1a65ec158b781bcd56fbc02ce1ed2592fa9541814b2943c22697a475c66b526eeda7d95fc67950544d5d WHIRLPOOL 3a58619db54e4fedfda3691b1bc39a9a4664987187ba7e43f24d17e013b56be4e95a1f05dbadacb90e5a7a46c7ce223fd7cdb4ef9d1eb27e0e7cd9b5b6cedd2b +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.12.tar.gz 74960 SHA256 f6d7b5640eb03e9598e38b1a2b2e7af1e9d357f3f845fc9528f9750965b92d54 SHA512 e725adc1b9dbbef4e2f47fd96ae60894f6553a15d5524071f7d6a48ab60cd6c25cda9be3cf84c5f4090f9769810abab7939a7333dcf77f31d1a71690bb6852d9 WHIRLPOOL 4063c80318fa6c59ac3e80fe24d19f8bb77c4e3fb127fd30decace452c4094e8d6332f2961bd958545ba95445435b929ccebbba255ef6e7bb6bcf213a0d66f2b +DIST dbus-0.10.13.tar.gz 75603 SHA256 aa94aefba8a0be240faddec88442afd8db1fa4e994423d474b112ec1c67e7aca SHA512 e3cbb4153cd9df9308d89662b83659e13f07881f4d652c6f02dc6b6768ac1009552a7cfa9c610ededc9b630d26290eec153a9b08b7a3d70b44a6946af3d030ec WHIRLPOOL e9b2b7243f98f13e8f496c9bb915d15f874efe3900f2817763a2aebe766214765b6850d7afd8506bea9d90dc21699eef7eda9b8b1e9ab0e9a408f30f13b7e02e +EBUILD dbus-0.10.10.ebuild 1346 SHA256 b70f0fb9e57c242f471602876cb0909c7cd70681262c0fcbc8e5cc966cc979c2 SHA512 8ff25ca95ab099a4c6c1a814c6486c7f721483002b43e80319ab2385e92b0766eb9e88468769671dc1b43ea8ad4412c71034748a818709f0924437bc14300e67 WHIRLPOOL 35cb5bfa5aa108e78df26318d2717a8fd08e4bfaed2e351280cdb2fa0133980fee90d7543e50c9d4fa1586fcad2b8caf9e3e76a78a910655eea9a5f06a60c11b +EBUILD dbus-0.10.11-r1.ebuild 1444 SHA256 e22110fed72559c54921d48da56ae0324709fef46f493cdc3c2835f436f72079 SHA512 271975c1830e055831b335cfce2a7b1dce5b04816de14fb7e7c74557abed7a4ddfc4c6d8db954a97a5887c280f60d567a30321523b2902b008e05e138b82feb6 WHIRLPOOL 64b0da38cc9ff83b7f3a14eceb18e910801ed9e5e37b130a32e43696033e5eff6f0ef9a060382af3b2ed64385ee4e46acdaafad0400b3b4e8afab6cdd6775320 +EBUILD dbus-0.10.12.ebuild 1419 SHA256 ca81b92a35832ce2630c5c0d0114b9cf6bcec0f0de95b6682f7d0c2b771fd4cb SHA512 ce25f343860b26a00f5e6ce9b7de6264681036dbe9081245fb571767c3dd375b0ee8cffef29246e4b3084fa3cc46a0d7de0f5e135d934c68d368441759628d6c WHIRLPOOL ecfce09b56b1359544858b9e562c4a818f5eaaf35e634b6696e4dc8e11a1a6740f6ca6f512f56670840405cda446fb78dd3b49fa729784b12d02c34265e5bf86 +EBUILD dbus-0.10.13.ebuild 1005 SHA256 b493845fd05d5ef8aaa29bd06643ac81f6ec9a5817c7e554c6ddcbed01cc5805 SHA512 773085e8b23cb2a25b54aedc35e7192481b6c5d5ed1c4a067dec8e439ebde152c6a328a3199e9b9449f84829d07998783fef17404176d75c96e184f1b4ea7717 WHIRLPOOL 399d4813077ddf4224d7313bae4a9abfcda91f685378372e7156bad287c5be4fed2d9b2d29443b01930836064c456352039016f09d13f2f6c085225993fd4904 +MISC ChangeLog 3811 SHA256 96f46aa694f456a0548487d5f953805470da951dcd2e1d3cd1c7ca265be0c6e8 SHA512 2949618c5e3d5a28802a33aa9dc39faae9af7ed671f20460b6d3c0e40ba5b4b8c1423dd8848ba23edc5a341b136e6196c90d8e9e264afa1121f23a24b3d49434 WHIRLPOOL c78c1efdf29e9431347de600800284879ebcce11cc4cbfd6e6c59b0ca99a19b6a2111247f5cf52cc6aff44388a6cd2d1e477c70d0ed02de1db4582c9b21e6ba1 +MISC ChangeLog-2015 3492 SHA256 50990ece7ef142c4fca95de39d1d463e27027068250ddef71b55d6bdb17c0a8a SHA512 c1d40149938edbe26863bdd96a6425b8bf043d019e4ad9e78a5a0f03cbe1ffa480b57af42effd81554add2fab80a11a11b0c1b55b7d821a3f6f2e18943a96c13 WHIRLPOOL 8f4103f4c55a08ece6e18dfdce0b39fc14694ff07e5b16455faa9ec5021a890ba834293e5841cd8890ed01b4c02607557e70771a122d19666b6307f433f6335a +MISC metadata.xml 2059 SHA256 94af88662f26b3a55b46e72b6c1b1adfc0be94614ffbda20c9fe9e545d4a9476 SHA512 5fe5ada12b86da78282ff30e5bf0c8218ec81a451988695907c82759aba1dc022539d1d852d078023b37263c1f21a58831edc69a02730caca79487a897065a3b WHIRLPOOL beb5e990e00943362d7bdc674efb2a7499283183798164a1597007a68322c73f43dee2ae4681493cbd24e426a9d8357f73318d6904b9aa67c43535892a3e1967 diff --git a/dev-haskell/dbus/dbus-0.10.10.ebuild b/dev-haskell/dbus/dbus-0.10.10.ebuild new file mode 100644 index 000000000000..7ceb8c0cb097 --- /dev/null +++ b/dev-haskell/dbus/dbus-0.10.10.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +# ebuild generated by hackport 0.4.5.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/network-2.2.3:=[profile?] + >=dev-haskell/parsec-2.0:=[profile?] =dev-haskell/random-1.0:=[profile?] =dev-haskell/text-0.11.1.5:=[profile?] + >=dev-haskell/transformers-0.2:=[profile?] + >=dev-haskell/vector-0.7:=[profile?] =dev-haskell/xml-types-0.3:=[profile?] =dev-lang/ghc-7.4.1:= +" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.8 + test? ( >=dev-haskell/chell-0.4 =dev-haskell/chell-quickcheck-0.2 =dev-haskell/quickcheck-2.4 ) +" 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..bd88e89c19b7 --- /dev/null +++ b/dev-haskell/dbus/dbus-0.10.11-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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/network-2.2.3:=[profile?] + >=dev-haskell/parsec-2.0:=[profile?] =dev-haskell/random-1.0:=[profile?] =dev-haskell/text-0.11.1.5:=[profile?] + >=dev-haskell/transformers-0.2:=[profile?] + >=dev-haskell/vector-0.7:=[profile?] =dev-haskell/xml-types-0.3:=[profile?] =dev-lang/ghc-7.4.1:= +" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.8 + test? ( >=dev-haskell/chell-0.4 =dev-haskell/chell-quickcheck-0.2 =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/dbus-0.10.12.ebuild b/dev-haskell/dbus/dbus-0.10.12.ebuild new file mode 100644 index 000000000000..0aba52d5a793 --- /dev/null +++ b/dev-haskell/dbus/dbus-0.10.12.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +# ebuild generated by hackport 0.4.7.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/network-2.2.3:=[profile?] + >=dev-haskell/parsec-2.0:=[profile?] =dev-haskell/random-1.0:=[profile?] =dev-haskell/text-0.11.1.5:=[profile?] + >=dev-haskell/transformers-0.2:=[profile?] + >=dev-haskell/vector-0.7:=[profile?] =dev-haskell/xml-types-0.3:=[profile?] =dev-lang/ghc-7.8.2:= +" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.18.1.3 + test? ( >=dev-haskell/chell-0.4 =dev-haskell/chell-quickcheck-0.2 =dev-haskell/quickcheck-2.4 ) +" + +src_prepare() { + epatch "${FILESDIR}"/${P}-QC-2.8.2.patch +} diff --git a/dev-haskell/dbus/dbus-0.10.13.ebuild b/dev-haskell/dbus/dbus-0.10.13.ebuild new file mode 100644 index 000000000000..c03d412ebff0 --- /dev/null +++ b/dev-haskell/dbus/dbus-0.10.13.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# ebuild generated by hackport 0.5.2.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://github.com/rblaze/haskell-dbus#readme" +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="" + +RESTRICT=test # don't allow access to running dbus + +RDEPEND="dev-haskell/cereal:=[profile?] + dev-haskell/libxml-sax:=[profile?] + dev-haskell/network:=[profile?] + dev-haskell/parsec:=[profile?] + dev-haskell/random:=[profile?] + dev-haskell/text:=[profile?] + dev-haskell/vector:=[profile?] + dev-haskell/xml-types:=[profile?] + >=dev-lang/ghc-7.8.2:= +" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.18.1.3 + test? ( dev-haskell/chell + dev-haskell/chell-quickcheck + dev-haskell/quickcheck ) +" 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 + diff --git a/dev-haskell/dbus/metadata.xml b/dev-haskell/dbus/metadata.xml new file mode 100644 index 000000000000..ffab7be7b225 --- /dev/null +++ b/dev-haskell/dbus/metadata.xml @@ -0,0 +1,59 @@ + + + + + haskell@gentoo.org + + + D-Bus is a simple, message-based protocol for inter-process + communication, which allows applications to interact with other parts of + the machine and the user's session using remote procedure calls. + + D-Bus is a essential part of the modern Linux desktop, where it replaces + earlier protocols such as CORBA and DCOP. + + This library is an implementation of the D-Bus protocol in Haskell. It + can be used to add D-Bus support to Haskell applications, without the + awkward interfaces common to foreign bindings. + + Example: connect to the session bus, and get a list of active names. + + @ + &#x7b;-\# LANGUAGE OverloadedStrings \#-&#x7d; + + import Data.List (sort) + import DBus + import DBus.Client + + main = do + &#x20; client <- connectSession + &#x20; // + &#x20; \-- Request a list of connected clients from the bus + &#x20; reply <- call_ client (methodCall \"\/org\/freedesktop\/DBus\" \"org.freedesktop.DBus\" \"ListNames\") + &#x20; &#x7b; methodCallDestination = Just \"org.freedesktop.DBus\" + &#x20; &#x7d; + &#x20; // + &#x20; \-- org.freedesktop.DBus.ListNames() returns a single value, which is + &#x20; \-- a list of names (here represented as [String]) + &#x20; let Just names = fromVariant (methodReturnBody reply !! 0) + &#x20; // + &#x20; \-- Print each name on a line, sorted so reserved names are below + &#x20; \-- temporary names. + &#x20; mapM_ putStrLn (sort names) + @ + + >$ ghc --make list-names.hs + >$ ./list-names + >:1.0 + >:1.1 + >:1.10 + >:1.106 + >:1.109 + >:1.110 + >ca.desrt.dconf + >org.freedesktop.DBus + >org.freedesktop.Notifications + >org.freedesktop.secrets + >org.gnome.ScreenSaver + + -- cgit v1.2.3