summaryrefslogtreecommitdiff
path: root/community/haskell-dbus/dbus-0.4.patch
blob: b983801cfb011a63d2abbe0c28f5be343837f69c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
diff -aru DBus-0.4/DBus/Internal.hsc DBus-0.4.new/DBus/Internal.hsc
--- DBus-0.4/DBus/Internal.hsc	2008-09-08 01:28:20.000000000 +0200
+++ DBus-0.4.new/DBus/Internal.hsc	2011-02-15 08:07:45.222787595 +0100
@@ -9,7 +9,7 @@
 
 module DBus.Internal where
 
-import Control.Exception (throwDyn)
+import Control.Exception (throwIO)
 import Control.Monad (when)
 import DBus (Error(..))
 import Foreign
@@ -57,6 +57,6 @@
       else do name <- #{peek DBusError, name} err >>= peekCString
               msg  <- #{peek DBusError, message} err >>= peekCString
               error_free err
-              throwDyn $ Error name msg
+              throwIO $ Error name msg
 
 -- vim: set ts=2 sw=2 tw=72 et ft=haskell :
diff -aru DBus-0.4/DBus.cabal DBus-0.4.new/DBus.cabal
--- DBus-0.4/DBus.cabal	2008-09-08 01:28:20.000000000 +0200
+++ DBus-0.4.new/DBus.cabal	2011-02-15 08:09:19.376168928 +0100
@@ -11,7 +11,8 @@
 description:    Bindings for the D-Bus API.
   For details on D-Bus, see the D-Bus wiki at:
   <http://www.freedesktop.org/wiki/Software/dbus>
-build-depends:  base, bytestring
+build-depends:  base >= 4, bytestring
+pkgconfig-depends:  dbus-1
 build-type:     Configure
 extensions:     ForeignFunctionInterface, OverlappingInstances,
                 ExistentialQuantification
diff -aru DBus-0.4/DBus.hsc DBus-0.4.new/DBus.hsc
--- DBus-0.4/DBus.hsc	2008-09-08 01:28:20.000000000 +0200
+++ DBus-0.4.new/DBus.hsc	2011-02-15 08:08:49.974771904 +0100
@@ -2,7 +2,7 @@
 -- Copyright (C) 2006 Evan Martin <martine@danga.com>
 
 #define DBUS_API_SUBJECT_TO_CHANGE
-#include "dbus/dbus.h"
+#include <dbus/dbus.h>
 
 module DBus (
   module DBus.Shared,
@@ -24,6 +24,7 @@
 
 import DBus.Shared
 import Data.Typeable (Typeable(..), mkTyConApp, mkTyCon)
+import Control.Exception
 
 -- |'Error's carry a name (like \"org.freedesktop.dbus.Foo\") and a
 -- message (like \"connection failed\").
@@ -32,5 +33,6 @@
   typeOf _ = mkTyConApp (mkTyCon "DBus.Error") []
 instance Show Error where
   show (Error name message) = "D-Bus Error (" ++ name ++ "): " ++ message
+instance Exception Error
 
 -- vim: set ts=2 sw=2 tw=72 et ft=haskell :