Portage slots for GHC?

kahl at cas.mcmaster.ca kahl at cas.mcmaster.ca
Thu Dec 13 12:09:14 EST 2007


Duncan Coutts wrote:
 > >  > We could slot multiple versions of a lib for the same ghc, but not slot
 > >  > ghc itself.
 > > 
 > > 
 > > Why not library slots named
 > > 
 > > ghc-6.4
 > > ghc-6.6
 > > ghc-6.8
 > > 
 > > (or finer), each depending on the repective compiler slot?
 > > 
 > > The different slots of gtk+ also depend on different slots of glib.
 > 
 > But those are actually different versions of the Gtk+ library. Our
 > situation is worse, we have the exact same library version slotted for
 > multiple versions of ghc.
 > 
 > We'd want to be able to say something like:
 > 
 > SLOT="${GHC_PV}-${PV}"
 > 
 > to slot on the ghc version and library version. But where does ${GHC_PV}
 > come from?
 > 
 > Well, suppose we could do that, now how do we specify the deps:
 > 
 > DEPEND="dev-haskell/foo:???"
 > 
 > it's supposed to be the same ghc slot as our own slot is. But we can't
 > get that information.

Until portage actually can do this in a better way,
you would have to multiply ebuilds
(probably each with common import and a one-line variable setting)
(I don't know the exact restrictions on portage version strings):


=== mtl-common-X.Y.Z ===
...
SLOT="${GHC_PV}-${PV}"
DEPEND="dev-haskell/ghc-${GHC_PV}"
...


=== mtl-ghc.6.6..X.Y.Z ===
GHC_PV=ghc.6.6
include mtl-common-X.Y.Z


=== mtl-ghc.6.8..X.Y.Z ===
GHC_PV=ghc.6.8
include mtl-common-X.Y.Z



One day, you may even want mtl for other compilers...


Wolfram


More information about the Glasgow-haskell-users mailing list