On 21 April 2010 21:03, Axel Simon <axel.si...@in.tum.de> wrote:

> Hm, yes, I think I have briefly considered adding something to Setup.hs. I
> tried to use the magic of Cabal since it seemed to be the appropriate thing
> to do (rather than to complicate Setup).

Aye, unfortunately the conditionals are not that great for that
purpose at the moment.

> What I would really like is to keep
> the Setup file the same for all Gtk2Hs packages. That way, there is one
> (very complicated) file less to write for each add-on library.

Yeah, I noticed that. I'm trying to make it generic.

>> Also, for the pango package, I've got some code to generate a .h file
>> with the pango version defines, rather than needing flags for that.
>>
>
> That is a bit tricky since Pango doesn't define its version before a certain
> version number. This is done in the hspango.h file. But I think you're aware
> of that. In a nutshell: I'm not quite sure what you mean. I'll wait for the
> patch.

It will mean a small variation in the Setup.hs for the pango package.
I'll try and keep it clean.

>>> When compiling the Setup.hs program, you will see a warning that the
>>> Cabal
>>> version is guessed. If compilation succeeds, this warning can be ignored.
>>> (Cabal should really define CPP macros with it's version when it builds
>>> Setup.hs, see http://hackage.haskell.org/trac/hackage/ticket/326 )
>>
>> This is not likely to change until Cabal-2 because currently the
>> Setup.hs is the primary interface for packages, so it is not possible
>> to provide extra CPP defines, since people and package managers cannot
>> be expected to do that even if cabal-install could do.
>
> Ah, true. So the future will bring the possibility to specify different
> Setup.hs files for different Cabal versions?! That's of course also
> possible.

It'd be something more like specifying in the .cabal file what
packages are needed for the Setup.hs (as opposed to the package in
general), including version ranges. It'd make sense to have that be
compiled with cpp defines to let the Setup.hs work with several
versions.

Don't hold your breath.

Duncan

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

Reply via email to