
On Thu, 2005-07-28 at 23:42 +0100, Simon Marlow wrote:
build-depends: (gconf>=1.0 [gconf] ||) (libglade>=1.0 [libglade] ||)
But this is starting to get a bit subtle.
Just on a note about syntax. Gentoo uses this syntax for optional dependencies: flag? ( dep ) So for example we write the Gtk2Hs build dependencies like this: DEPEND=">=virtual/ghc-5.04 >=x11-libs/gtk+-2 gnome? ( >=gnome-base/libglade-2 >=x11-libs/gtksourceview-0.6 >=gnome-base/gconf-2 ) mozilla? ( >=www-client/mozilla-1.4 ) doc? ( >=dev-haskell/haddock-0.6 )" Of course cabal doesn't have the complication of package catageories and such so for a cabal style it'd look more like: build-depends: ghc >= 5.04, gnome? ( libglade >= 2, gtksourceview >= 0.6, gconf >= 2 ), mozilla? ( mozilla >= 1.4 ), doc? ( haddock >= 0.6 ) and also of course these Gtk2Hs deps are actually mostly C libraries. But you get the idea. And then we match up these "use" flags (more or less) 1-to-1 with configure flags that enable/disable optional features. Just an idea. Duncan