Gentoo Archives: gentoo-commits

From: "Mark Wright (gienah)" <gienah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-haskell/gtk/files: gtk-0.12.3.1-ghc-7.6.patch
Date: Sun, 25 Nov 2012 06:23:04
Message-Id: 20121125060415.317B721604@flycatcher.gentoo.org
1 gienah 12/11/25 06:04:15
2
3 Added: gtk-0.12.3.1-ghc-7.6.patch
4 Log:
5 Bump gtk to 0.12.3.1
6
7 (Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 618E971F)
8
9 Revision Changes Path
10 1.1 dev-haskell/gtk/files/gtk-0.12.3.1-ghc-7.6.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/gtk/files/gtk-0.12.3.1-ghc-7.6.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/gtk/files/gtk-0.12.3.1-ghc-7.6.patch?rev=1.1&content-type=text/plain
14
15 Index: gtk-0.12.3.1-ghc-7.6.patch
16 ===================================================================
17 --- gtk-0.12.3.1-orig/Graphics/UI/Gtk/Windows/Assistant.chs 2012-06-18 07:39:34.000000000 +1000
18 +++ gtk-0.12.3.1/Graphics/UI/Gtk/Windows/Assistant.chs 2012-10-11 12:51:38.040935853 +1100
19 @@ -274,7 +274,7 @@
20 {#pointer AssistantPageFunc#}
21
22 foreign import ccall "wrapper" mkAssistantPageFunc ::
23 - ({#type glong#} -> Ptr () -> IO {#type glong#})
24 + ({#type gint#} -> Ptr () -> IO {#type gint#})
25 -> IO AssistantPageFunc
26
27 -- | Sets the page type for @page@. The page type determines the page behavior
28 --- gtk-0.12.3.1-orig/Graphics/UI/Gtk/Multiline/TextIter.chs 2012-06-18 07:39:34.000000000 +1000
29 +++ gtk-0.12.3.1/Graphics/UI/Gtk/Multiline/TextIter.chs 2012-10-11 12:50:59.510893025 +1100
30 @@ -797,7 +797,7 @@
31 {#pointer TextCharPredicate#}
32
33 foreign import ccall "wrapper" mkTextCharPredicate ::
34 - ({#type gunichar#} -> Ptr () -> {#type gboolean#}) -> IO TextCharPredicate
35 + ({#type gunichar#} -> Ptr () -> IO {#type gboolean#}) -> IO TextCharPredicate
36
37 -- | Move 'TextIter' forward until a
38 -- predicate function returns True.
39 @@ -810,7 +810,7 @@
40 textIterForwardFindChar :: TextIter -> (Char -> Bool) -> Maybe TextIter ->
41 IO Bool
42 textIterForwardFindChar ti pred limit = do
43 - fPtr <- mkTextCharPredicate (\c _ -> fromBool $ pred (chr (fromIntegral c)))
44 + fPtr <- mkTextCharPredicate (\c _ -> return $ fromBool $ pred (chr (fromIntegral c)))
45 res <- liftM toBool $ {#call text_iter_forward_find_char#}
46 ti fPtr nullPtr (fromMaybe (TextIter nullForeignPtr) limit)
47 freeHaskellFunPtr fPtr
48 @@ -827,7 +827,7 @@
49 textIterBackwardFindChar :: TextIter -> (Char -> Bool) -> Maybe TextIter ->
50 IO Bool
51 textIterBackwardFindChar ti pred limit = do
52 - fPtr <- mkTextCharPredicate (\c _ -> fromBool $ pred (chr (fromIntegral c)))
53 + fPtr <- mkTextCharPredicate (\c _ -> return $ fromBool $ pred (chr (fromIntegral c)))
54 res <- liftM toBool $ {#call text_iter_backward_find_char#}
55 ti fPtr nullPtr (fromMaybe (TextIter nullForeignPtr) limit)
56 freeHaskellFunPtr fPtr
57 --- gtk-0.12.3.1-orig/Graphics/UI/Gtk/ModelView/TreeView.chs 2012-06-18 07:39:34.000000000 +1000
58 +++ gtk-0.12.3.1/Graphics/UI/Gtk/ModelView/TreeView.chs 2012-10-11 12:50:02.711356413 +1100
59 @@ -582,7 +582,7 @@
60 {#pointer TreeViewColumnDropFunc#}
61
62 foreign import ccall "wrapper" mkTreeViewColumnDropFunc ::
63 - (Ptr () -> Ptr TreeViewColumn -> Ptr TreeViewColumn -> Ptr TreeViewColumn ->
64 + (Ptr TreeView -> Ptr TreeViewColumn -> Ptr TreeViewColumn -> Ptr TreeViewColumn ->
65 Ptr () -> IO {#type gboolean#}) -> IO TreeViewColumnDropFunc
66
67 -- | Scroll to a coordinate.
68 @@ -798,7 +798,7 @@
69 {#pointer TreeViewMappingFunc#}
70
71 foreign import ccall "wrapper" mkTreeViewMappingFunc ::
72 - (Ptr () -> Ptr NativeTreePath -> Ptr () -> IO ()) ->
73 + (Ptr TreeView -> Ptr NativeTreePath -> Ptr () -> IO ()) ->
74 IO TreeViewMappingFunc
75
76 -- | Check if row is expanded.
77 --- gtk-0.12.3.1-orig/Graphics/UI/Gtk/ModelView/TreeSelection.chs 2012-06-18 07:39:34.000000000 +1000
78 +++ gtk-0.12.3.1/Graphics/UI/Gtk/ModelView/TreeSelection.chs 2012-10-11 12:49:22.402264615 +1100
79 @@ -151,7 +151,7 @@
80 treeSelectionSetSelectFunction :: TreeSelectionClass self => self
81 -> TreeSelectionCB -> IO ()
82 treeSelectionSetSelectFunction ts fun = do
83 - fPtr <- mkTreeSelectionFunc (\_ _ tp _ -> do
84 + fPtr <- mkTreeSelectionFunc (\_ _ tp _ _ -> do
85 path <- peekTreePath (castPtr tp)
86 liftM fromBool $ fun path
87 )
88 @@ -168,7 +168,7 @@
89 {#pointer TreeSelectionFunc#}
90
91 foreign import ccall "wrapper" mkTreeSelectionFunc ::
92 - (Ptr () -> Ptr () -> Ptr TreePath -> Ptr () -> IO CInt)->
93 + (Ptr TreeSelection -> Ptr TreeModel -> Ptr NativeTreePath -> {#type gint#} -> Ptr () -> IO CInt)->
94 IO TreeSelectionFunc
95
96 -- | Retrieve the 'TreeView' widget that this 'TreeSelection' works on.
97 @@ -199,7 +199,7 @@
98 -> TreeSelectionForeachCB
99 -> IO ()
100 treeSelectionSelectedForeach self fun = do
101 - fPtr <- mkTreeSelectionForeachFunc (\_ _ iterPtr -> do
102 + fPtr <- mkTreeSelectionForeachFunc (\_ _ iterPtr _ -> do
103 -- make a deep copy of the iterator. This makes it possible to store this
104 -- iterator in Haskell land somewhere. The TreeModel parameter is not
105 -- passed to the function due to performance reasons. But since it is
106 @@ -219,7 +219,7 @@
107 {#pointer TreeSelectionForeachFunc#}
108
109 foreign import ccall "wrapper" mkTreeSelectionForeachFunc ::
110 - (Ptr () -> Ptr () -> Ptr TreeIter -> IO ()) -> IO TreeSelectionForeachFunc
111 + (Ptr TreeModel -> Ptr NativeTreePath -> Ptr TreeIter -> Ptr () -> IO ()) -> IO TreeSelectionForeachFunc
112
113 #if GTK_CHECK_VERSION(2,2,0)
114 -- | Creates a list of paths of all selected rows.
115 --- gtk-0.12.3.1-orig/Graphics/UI/Gtk/ModelView/TreeModelFilter.chs 2012-06-18 07:39:34.000000000 +1000
116 +++ gtk-0.12.3.1/Graphics/UI/Gtk/ModelView/TreeModelFilter.chs 2012-10-11 12:47:30.867237897 +1100
117 @@ -160,7 +160,7 @@
118 {#pointer TreeModelFilterVisibleFunc #}
119
120 foreign import ccall "wrapper" mkTreeModelFilterVisibleFunc ::
121 - (Ptr TreeModelFilter -> Ptr TreeIter -> Ptr () -> IO {#type gboolean#}) ->
122 + (Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO {#type gboolean#}) ->
123 IO TreeModelFilterVisibleFunc
124
125 -- %hash c:a56d d:b42e
126 --- gtk-0.12.3.1-orig/Graphics/UI/Gtk/ModelView/TreeModel.chs 2012-06-18 07:39:34.000000000 +1000
127 +++ gtk-0.12.3.1/Graphics/UI/Gtk/ModelView/TreeModel.chs 2012-10-11 12:47:06.478576590 +1100
128 @@ -427,7 +427,7 @@
129 {#pointer TreeModelForeachFunc#}
130
131 foreign import ccall "wrapper" mkTreeModelForeachFunc ::
132 - (Ptr () -> Ptr () -> Ptr TreeIter -> Ptr () -> IO CInt) ->
133 + (Ptr TreeModel -> Ptr NativeTreePath -> Ptr TreeIter -> Ptr () -> IO CInt) ->
134 IO TreeModelForeachFunc
135
136 #if GTK_CHECK_VERSION(2,2,0)
137 --- gtk-0.12.3.1-orig/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs 2012-06-18 07:39:34.000000000 +1000
138 +++ gtk-0.12.3.1/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs 2012-10-11 12:46:41.970912216 +1100
139 @@ -493,17 +493,17 @@
140 {# call gtk_combo_box_set_row_separator_func #}
141 (toComboBox self) nullFunPtr nullPtr nullFunPtr
142 comboBoxSetRowSeparatorSource self (Just (model, extract)) = do
143 - funPtr <- mkRowSeparatorFunc $ \_ iterPtr -> do
144 + funPtr <- mkRowSeparatorFunc $ \_ iterPtr _ -> do
145 iter <- peek iterPtr
146 value <- customStoreGetRow model iter
147 - return (extract value)
148 + return (fromBool $ extract value)
149 {# call gtk_combo_box_set_row_separator_func #}
150 (toComboBox self) funPtr (castFunPtrToPtr funPtr) destroyFunPtr
151
152 {#pointer TreeViewRowSeparatorFunc#}
153
154 foreign import ccall "wrapper" mkRowSeparatorFunc ::
155 - (Ptr TreeModel -> Ptr TreeIter -> IO Bool) -> IO TreeViewRowSeparatorFunc
156 + (Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO {#type gboolean #}) -> IO TreeViewRowSeparatorFunc
157
158 -- %hash c:5bf8
159 -- | Sets whether the popup menu should have a tearoff menu item.
160 --- gtk-0.12.3.1-orig/Graphics/UI/Gtk/General/Clipboard.chs 2012-06-18 07:39:34.000000000 +1000
161 +++ gtk-0.12.3.1/Graphics/UI/Gtk/General/Clipboard.chs 2012-10-11 12:45:41.325267512 +1100
162 @@ -260,7 +260,7 @@
163 -- data succeeded.
164 clipboardSetWithData self targets getFunc clearFunc = do
165 gFunPtr <- mkClipboardGetFunc
166 - (\_ sPtr info -> runReaderT (getFunc info) sPtr >> return ())
167 + (\_ sPtr info _ -> runReaderT (getFunc info) sPtr >> return ())
168 cFunPtr <- mkClipboardClearFunc
169 (\_ _ -> clearFunc)
170 res <- withTargetEntries targets $ \nTargets targets ->
171 @@ -282,7 +282,7 @@
172 {#pointer ClipboardClearFunc#}
173
174 foreign import ccall "wrapper" mkClipboardGetFunc ::
175 - (Ptr Clipboard -> Ptr () -> {#type guint#} -> IO ()) -> IO ClipboardGetFunc
176 + (Ptr Clipboard -> Ptr () -> {#type guint#} -> Ptr () -> IO ()) -> IO ClipboardGetFunc
177
178 foreign import ccall "wrapper" mkClipboardClearFunc ::
179 (Ptr Clipboard -> Ptr () -> IO ()) -> IO ClipboardClearFunc
180 @@ -313,7 +313,7 @@
181 -- ignored.
182 clipboardSetWithOwner self targets getFunc clearFunc owner = do
183 gFunPtr <- mkClipboardGetFunc
184 - (\_ sPtr info -> runReaderT (getFunc info) sPtr >> return ())
185 + (\_ sPtr info _ -> runReaderT (getFunc info) sPtr >> return ())
186 cFunPtr <- mkClipboardClearFunc
187 (\_ _ -> clearFunc)
188 res <- withTargetEntries targets $ \nTargets targets ->
189 @@ -404,7 +404,7 @@
190 clipboardRequestContents self (Atom target) callback = do
191 cbRef <- newIORef nullFunPtr
192 cbPtr <- mkClipboardReceivedFunc
193 - (\_ sPtr -> do
194 + (\_ sPtr _ -> do
195 freeHaskellFunPtr =<< readIORef cbRef
196 runReaderT callback sPtr
197 return ())
198 @@ -418,7 +418,7 @@
199 {#pointer ClipboardReceivedFunc#}
200
201 foreign import ccall "wrapper" mkClipboardReceivedFunc ::
202 - (Ptr Clipboard -> Ptr () -> IO ()) -> IO ClipboardReceivedFunc
203 + (Ptr Clipboard -> Ptr () -> Ptr () -> IO ()) -> IO ClipboardReceivedFunc
204
205 -- %hash c:7bb1 d:4ef1
206 -- | Requests the contents of the clipboard as text. When the text is later
207 @@ -439,7 +439,7 @@
208 clipboardRequestText self callback = do
209 cbRef <- newIORef nullFunPtr
210 cbPtr <- mkClipboardTextReceivedFunc
211 - (\_ sPtr -> do
212 + (\_ sPtr _ -> do
213 freeHaskellFunPtr =<< readIORef cbRef
214 mStr <- if sPtr==nullPtr then return Nothing else
215 liftM Just $ peekUTFString sPtr
216 @@ -453,7 +453,7 @@
217 {#pointer ClipboardTextReceivedFunc#}
218
219 foreign import ccall "wrapper" mkClipboardTextReceivedFunc ::
220 - (Ptr Clipboard -> CString -> IO ()) -> IO ClipboardTextReceivedFunc
221 + (Ptr Clipboard -> CString -> Ptr () -> IO ()) -> IO ClipboardTextReceivedFunc
222
223
224 #if GTK_CHECK_VERSION(2,6,0)
225 @@ -477,7 +477,7 @@
226 clipboardRequestImage self callback = do
227 cbRef <- newIORef nullFunPtr
228 cbPtr <- mkClipboardImageReceivedFunc
229 - (\_ sPtr -> do
230 + (\_ sPtr _ -> do
231 freeHaskellFunPtr =<< readIORef cbRef
232 mPixbuf <- maybeNull (makeNewGObject mkPixbuf) (return sPtr)
233 callback mPixbuf)
234 @@ -490,7 +490,7 @@
235 {#pointer ClipboardImageReceivedFunc#}
236
237 foreign import ccall "wrapper" mkClipboardImageReceivedFunc ::
238 - (Ptr Clipboard -> Ptr Pixbuf -> IO ()) -> IO ClipboardImageReceivedFunc
239 + (Ptr Clipboard -> Ptr Pixbuf -> Ptr () -> IO ()) -> IO ClipboardImageReceivedFunc
240
241 #endif
242
243 @@ -513,7 +513,7 @@
244 clipboardRequestTargets self callback = do
245 cbRef <- newIORef nullFunPtr
246 cbPtr <- mkClipboardTargetsReceivedFunc
247 - (\_ tPtr len -> do
248 + (\_ tPtr len _ -> do
249 -- We must free Haskell pointer *in* the callback to avoid segfault.
250 freeHaskellFunPtr =<< readIORef cbRef
251 mTargets <- if tPtr==nullPtr then return Nothing else
252 @@ -528,7 +528,7 @@
253 {#pointer ClipboardTargetsReceivedFunc#}
254
255 foreign import ccall "wrapper" mkClipboardTargetsReceivedFunc ::
256 - (Ptr Clipboard -> Ptr (Ptr ()) -> {#type gint#} -> IO ()) -> IO ClipboardTargetsReceivedFunc
257 + (Ptr Clipboard -> Ptr (Ptr ()) -> {#type gint#} -> Ptr () -> IO ()) -> IO ClipboardTargetsReceivedFunc
258
259 #if GTK_CHECK_VERSION(2,10,0)
260 -- %hash c:5601 d:d6a6
261 @@ -552,10 +552,10 @@
262 clipboardRequestRichText self buffer callback = do
263 cbRef <- newIORef nullFunPtr
264 cbPtr <- mkClipboardRichTextReceivedFunc
265 - (\_ tPtr sPtr len -> do
266 + (\_ tPtr sPtr len _ -> do
267 freeHaskellFunPtr =<< readIORef cbRef
268 mRes <- if sPtr==nullPtr then return Nothing else liftM Just $ do
269 - str <- peekUTFStringLen (sPtr,fromIntegral len)
270 + str <- peekUTFStringLen (castPtr sPtr,fromIntegral len)
271 return (Atom tPtr, str)
272 callback mRes)
273 writeIORef cbRef cbPtr
274 @@ -568,7 +568,7 @@
275 {#pointer ClipboardRichTextReceivedFunc#}
276
277 foreign import ccall "wrapper" mkClipboardRichTextReceivedFunc ::
278 - (Ptr Clipboard -> Ptr () -> CString -> {#type gsize#} -> IO ()) ->
279 + (Ptr Clipboard -> Ptr () -> Ptr CUChar -> {#type gsize#} -> Ptr () -> IO ()) ->
280 IO ClipboardRichTextReceivedFunc
281 #endif
282 #endif
283 --- gtk-0.12.3.1-orig/Graphics/UI/Gtk/Abstract/Object.chs 2012-06-18 07:39:34.000000000 +1000
284 +++ gtk-0.12.3.1/Graphics/UI/Gtk/Abstract/Object.chs 2012-10-11 12:40:38.320051642 +1100
285 @@ -126,7 +126,8 @@
286
287 {#pointer GWeakNotify#}
288
289 -foreign import ccall "wrapper" mkDestructor :: IO () -> IO GWeakNotify
290 +foreign import ccall "wrapper" mkDestructor
291 + :: (Ptr () -> Ptr GObject -> IO ()) -> IO GWeakNotify
292
293 -- | Attach a callback that will be called after the
294 -- destroy hooks have been called
295 @@ -134,7 +135,7 @@
296 objectWeakref :: ObjectClass o => o -> IO () -> IO GWeakNotify
297 objectWeakref obj uFun = do
298 funPtrContainer <- newIORef nullFunPtr
299 - uFunPtr <- mkDestructor $ do
300 + uFunPtr <- mkDestructor $ \_ _ -> do
301 uFun
302 funPtr <- readIORef funPtrContainer
303 freeHaskellFunPtr funPtr