Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-haskell/dbus-core/files/, dev-haskell/dbus-core/
Date: Mon, 21 Sep 2015 20:24:44
Message-Id: 1442867028.b30b60e19d49886b714bc4e614fe0cac147e1c31.slyfox@gentoo
1 commit: b30b60e19d49886b714bc4e614fe0cac147e1c31
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 21 20:23:09 2015 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 21 20:23:48 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b30b60e1
7
8 dev-haskell/dbus-core: port to ghc-7.10, bug #561014
9
10 Reported-by: Toralf Förster
11 Bug: https://bugs.gentoo.org/561014
12
13 Package-Manager: portage-2.2.20
14
15 dev-haskell/dbus-core/dbus-core-0.9.3-r3.ebuild | 4 +-
16 .../dbus-core/files/dbus-core-0.9.3-ghc-7.10.patch | 96 ++++++++++++++++++++++
17 2 files changed, 99 insertions(+), 1 deletion(-)
18
19 diff --git a/dev-haskell/dbus-core/dbus-core-0.9.3-r3.ebuild b/dev-haskell/dbus-core/dbus-core-0.9.3-r3.ebuild
20 index dae07a2..a3dd10e 100644
21 --- a/dev-haskell/dbus-core/dbus-core-0.9.3-r3.ebuild
22 +++ b/dev-haskell/dbus-core/dbus-core-0.9.3-r3.ebuild
23 @@ -1,4 +1,4 @@
24 -# Copyright 1999-2014 Gentoo Foundation
25 +# Copyright 1999-2015 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27 # $Id$
28
29 @@ -31,6 +31,8 @@ DEPEND="${RDEPEND}
30 >=dev-haskell/cabal-1.6"
31
32 src_prepare() {
33 + epatch "${FILESDIR}"/${P}-ghc-7.10.patch
34 +
35 if has_version "<dev-haskell/haddock-2.9.2"; then
36 # Workaround http://hackage.haskell.org/trac/hackage/ticket/626
37 # The haddock --hoogle option does not like unicode characters, which causes
38
39 diff --git a/dev-haskell/dbus-core/files/dbus-core-0.9.3-ghc-7.10.patch b/dev-haskell/dbus-core/files/dbus-core-0.9.3-ghc-7.10.patch
40 new file mode 100644
41 index 0000000..402df00
42 --- /dev/null
43 +++ b/dev-haskell/dbus-core/files/dbus-core-0.9.3-ghc-7.10.patch
44 @@ -0,0 +1,96 @@
45 +diff --git a/hs/DBus/Connection/Authentication.hs b/hs/DBus/Connection/Authentication.hs
46 +index b909a38..c33d311 100644
47 +--- a/hs/DBus/Connection/Authentication.hs
48 ++++ b/hs/DBus/Connection/Authentication.hs
49 +@@ -25,3 +25,4 @@ module DBus.Connection.Authentication
50 + import Prelude hiding (getLine, head)
51 +-import Control.Monad (liftM)
52 ++import Control.Applicative
53 ++import Control.Monad
54 + import qualified Data.ByteString
55 +@@ -58,2 +59,9 @@ data Auth a = Auth
56 +
57 ++instance Functor Auth where
58 ++ fmap = liftM
59 ++
60 ++instance Applicative Auth where
61 ++ pure = return
62 ++ (<*>) = ap -- defined in Control.Monad
63 ++
64 + instance Monad Auth where
65 +diff --git a/hs/DBus/Introspection.hs b/hs/DBus/Introspection.hs
66 +index 96ff4a3..da82812 100644
67 +--- a/hs/DBus/Introspection.hs
68 ++++ b/hs/DBus/Introspection.hs
69 +@@ -29,3 +29,4 @@ module DBus.Introspection
70 + ) where
71 +-import Control.Monad ((>=>))
72 ++import Control.Applicative
73 ++import Control.Monad
74 + import Control.Monad.ST (runST)
75 +@@ -176,2 +177,9 @@ newtype XmlWriter a = XmlWriter { runXmlWriter :: Maybe (a, Text) }
76 +
77 ++instance Functor XmlWriter where
78 ++ fmap = liftM
79 ++
80 ++instance Applicative XmlWriter where
81 ++ pure = return
82 ++ (<*>) = ap -- defined in Control.Monad
83 ++
84 + instance Monad XmlWriter where
85 +diff --git a/hs/DBus/Types/Internal.hs b/hs/DBus/Types/Internal.hs
86 +index 7f5d9c5..7c73afe 100644
87 +--- a/hs/DBus/Types/Internal.hs
88 ++++ b/hs/DBus/Types/Internal.hs
89 +@@ -5,2 +5,3 @@
90 + {-# LANGUAGE IncoherentInstances #-}
91 ++{-# LANGUAGE FlexibleContexts #-}
92 +
93 +diff --git a/hs/DBus/Util/MonadError.hs b/hs/DBus/Util/MonadError.hs
94 +index 33b51ed..ef01df2 100644
95 +--- a/hs/DBus/Util/MonadError.hs
96 ++++ b/hs/DBus/Util/MonadError.hs
97 +@@ -23,2 +23,6 @@ module DBus.Util.MonadError
98 + ) where
99 ++
100 ++import Control.Applicative
101 ++import Control.Monad
102 ++
103 + newtype ErrorM e a = ErrorM { runErrorM :: Either e a }
104 +@@ -30,2 +34,6 @@ instance Functor (ErrorM e) where
105 +
106 ++instance Applicative (ErrorM e) where
107 ++ pure = return
108 ++ (<*>) = ap -- defined in Control.Monad
109 ++
110 + instance Monad (ErrorM e) where
111 +@@ -41,2 +49,9 @@ newtype ErrorT e m a = ErrorT { runErrorT :: m (Either e a) }
112 +
113 ++instance Monad m => Functor (ErrorT e m) where
114 ++ fmap = liftM
115 ++
116 ++instance Monad m => Applicative (ErrorT e m) where
117 ++ pure = return
118 ++ (<*>) = ap -- defined in Control.Monad
119 ++
120 + instance Monad m => Monad (ErrorT e m) where
121 +diff --git a/hs/DBus/Wire/Internal.hs b/hs/DBus/Wire/Internal.hs
122 +index b386eec..512ff1a 100644
123 +--- a/hs/DBus/Wire/Internal.hs
124 ++++ b/hs/DBus/Wire/Internal.hs
125 +@@ -19,3 +19,4 @@
126 + module DBus.Wire.Internal where
127 +-import Control.Monad (liftM, when, unless)
128 ++import Control.Applicative
129 ++import Control.Monad hiding (void)
130 +
131 +@@ -96,2 +97,9 @@ newtype Wire s a = Wire
132 +
133 ++instance Functor (Wire s) where
134 ++ fmap = liftM
135 ++
136 ++instance Applicative (Wire s) where
137 ++ pure = return
138 ++ (<*>) = ap -- defined in Control.Monad
139 ++
140 + instance Monad (Wire s) where