It's a good idea. I believe the problem I had when I tried it last was 
that cabal doesn't like ".." as part of an hs-source-dirs directive. But 
my memory is a bit fuzzy. After I have a look at the various cabal-1.18 
patches floating around it seems like a good thing to think about.

Of course, the idea is that our moderately experienced Haskeller will be 
installing from Hackage, not darcs, and so most of these things are 
aimed at very experienced Haskellers who need to hack on gtk2hs. But 
your point stands: it would be nice to have more and/or easier 
instructions.

See also bootstrap.sh, which builds both the gtk and gtk3 packages.

~d

On 2013-09-22 11:00, Ben Gamari wrote:
> Since Daniel Wagner's patch[1] from 11 July 2012, gtk/gtk.cabal in the
> gtk2hs repository declares the package name to be gtk3. This is a fine
> approach to take for differentiating the Gtk3 bindings from their Gtk2
> counterparts but the implementation needs to be finished.
> 
> In addition to editing gtk.cabal, the patch also adds gtk.cabal-0 and
> gtk.cabal-3. The naming of these files is quite mysterious (why does 
> the
> Gtk 2 cabal file end in "-0"?) and it's completely unclear how to
> convince cabal-install to build bindings for a given Gtk version short
> of copying one of these files over gtk.cabal. At very least, we need to
> add some notes to INSTALL describing how to build both the Gtk3 and
> Gtk2 bindings.
> 
> Really, it would be better if things were laid out in such a way that
> the desired workflow was apparent to a moderately experienced 
> Haskeller.
> One way to accomplish this would be,
> 
>   * remove gtk/gtk.cabal
>   * move gtk/gtk.cabal-0 to gtk2/gtk.cabal and gtk/gtk.cabal-3 to
>     gtk3/gtk3.cabal
>   * possibly rename gtk/ to gtk-common/ to suggest to the user that 
> this
>     directory contains no package of its own
>   * add hs-source-dirs definitions pointing to gtk/ to both files
>   * move Gtk2/3 specific files in gtk-common/ to the appropriate
>     version-specific directory
>   * Of course, update installation documentation in INSTALL
> 
> Thoughts?
> 
> Cheers,
> 
> - Ben
> 
> 
> [1]
> https://github.com/bgamari/gtk2hs/commit/adf06373654d32b5b5838b813807faeb8bb3819b

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to