Hi Axel,

Andy Stewart <lazycat.mana...@gmail.com> writes:

> Hi Axel,
>
> Axel Simon <axel.si...@in.tum.de> writes:
>
>> On 27.04.2010, at 18:08, Andy Stewart wrote:
>>
>>> Hi Axel,
>>>
>>> I'm try to convert last package -- gstreamer.
>>> I found gstreamer need MiniObject, it's need hacking TypeGen.hs to
>>> generate MiniObject hierarchy.
>>
>>
>> No it doesn't! But it needs to be run twice, once for the GObject  
>> based hierarchy and once for the Mini hierarchy. So Setup.hs needs  
>> changing.
>>
>>> Below is gsteamer package:
>>>
>>> <gstreamer.tar.gz>
>>> Almost finish, i have finish gstreamer.cabal and necessary work  
>>> (such as LANGUAGE_CPP).
>>> You just need make TypeGen.hs generate module
>>> `Media.Streaming.GStreamer.Core.MiniHierarchy` and do "cabal install".
>>>
>>> Hope it will save your time.
>>>
>>> BTW, what's plan for "Graphics.UI.Gtk.General.Threading" and
>>> "Graphics.UI.Gtk.Types" ?
>>> Expose those modules is simplest way, but i think you don't like  
>>> it. :)
>>>
>>
>> Well, there is not the new Internal module. Instead of requesting (in  
>> each .cabal file) that Threading and Types should be forwarded, simply  
>> forward Internal. Then Internal will be imported and re-exported from  
>> each type module.
> I have test, and found new error:
>
> Resolving dependencies...
> Configuring gtk-0.10.5...
> Preprocessing library gtk-0.10.5...
> Building gtk-0.10.5...
> Module imports form a cycle for modules:
>   Graphics.UI.Gtk.Abstract.Object 
> (dist/build/Graphics/UI/Gtk/Abstract/Object.hs)
>     imports: Graphics.UI.Gtk.Signals
>   Graphics.UI.Gtk.Signals (dist/build/Graphics/UI/Gtk/Signals.hs)
>     imports: Graphics.UI.GtkInternals
>   Graphics.UI.GtkInternals (dist/build/Graphics/UI/GtkInternals.hs)
>     imports: Graphics.UI.Gtk.Multiline.Types
>   Graphics.UI.Gtk.Multiline.Types 
> (dist/build/Graphics/UI/Gtk/Multiline/Types.hs)
>     imports: Graphics.UI.Gtk.General.Structs
>   Graphics.UI.Gtk.General.Structs 
> (dist/build/Graphics/UI/Gtk/General/Structs.hs)
>     imports: Graphics.UI.Gtk.Abstract.Object
> cabal: Error: some packages failed to install:
> gtk-0.10.5 failed during the building phase. The exception was:
> ExitFailure 1
I have push new patch to fix "cycle import" error when compile gtk
package:

------------------------------> patch detail start 
<------------------------------
* Fix cycle import problem, and expose `Threading` modules for use in 
Signals.chs
  
  * Signal.chs.template : restore to "import Graphics.UI.Gtk.General.Threading".
  * GtkInternals.chs    : remove Graphics.UI.Gtk.General.Threading, otherwise 
cycle import when compile gtk.
  * Threading.hs        : Add nots that don't use this module in application.
  * gtk.cabal           : expose Graphics.UI.Gtk.General.Threading
------------------------------> patch detail end   
<------------------------------

I can't think better solution than this, for avoid user use
`Graphics.UI.Gtk.General.Threading`, i have write below notes in it:

------------------------------> notes start <------------------------------
-- This file contains functions that are needed by other library wrappers that 
build
-- on Gtk2Hs. An application should not need this function nor include this 
file.
------------------------------> notes end   <------------------------------

This patch did not affect other patches, you can continue to test my Cabal 
patches.

Cheers,

  -- Andy


------------------------------------------------------------------------------
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to