* [gentoo-dev] Haskell support in Gentoo
@ 2003-04-02 11:14 Peter Simons
2003-04-02 11:50 ` Tom Payne
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Peter Simons @ 2003-04-02 11:14 UTC (permalink / raw
To: gentoo-dev
We are moving the discussion from
http://bugs.gentoo.org/show_bug.cgi?id=10155
to this forum in the hope of getting some feedback from the general
Gentoo crowd. The problems we're facing are not so much
Haskell-specific, but center around the problem of how to support
Haskell in the Gentoo framework.
Currently we try to find the best solution for the following problem:
There are at least two compilers for the Haskell language: ghc and
nhc. Unfortunately, not every program can be compiled with either of
them; most packages require ghc specifically.
Now we wonder how to organize this in the ebuild. A virtual
"haskell-compiler" target won't do us any good, because -- as I said
-- many packages require ghc. Hard-coding the ebuilds to depend on ghc
only is not the right thing to do either, because some packages _can_
be build with either ghc or nhc, and ideally, the user would be able
to choose which compiler should be used.
How can this best be expressed in an ebuild?
Peter
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] Haskell support in Gentoo
2003-04-02 11:14 [gentoo-dev] Haskell support in Gentoo Peter Simons
@ 2003-04-02 11:50 ` Tom Payne
2003-04-02 12:31 ` Matthew Kennedy
2003-04-02 15:34 ` Andres Loeh
2003-04-02 12:25 ` Matthew Kennedy
2003-04-02 22:49 ` Oliver Burnett-Hall
2 siblings, 2 replies; 6+ messages in thread
From: Tom Payne @ 2003-04-02 11:50 UTC (permalink / raw
To: Peter Simons; +Cc: gentoo-dev
Surely user preferences are best expressed with USE flags?
ghc and nhc should both provide virtual/haskell-compiler.
Packages that can only be compiled with ghc should depend on ghc. Similarly
nhc.
If a package can be built with either ghc or nhc then use a USE variable
(nhc?) to choose which compiler. Since ghc seems more widely used than nhc I
suggest the USE variable:
nhc Use nhc in preference to ghc where possible
e.g.
IUSE="nhc"
DEPEND="virtual/haskell-compiler"
src_compile() {
if [ `use nhc` ]; then
# compile with nhc
else
# compile with ghc
fi
}
The nhc USE variable would work similarly to the gtk2 USE variable (use gtk2
in preference to gtk where possible).
[Side note: is it OK for two installed packages to provide the same
virtual?]
Regards,
Tom
On Wed, Apr 02, 2003 at 01:14:14PM +0200, Peter Simons wrote:
> We are moving the discussion from
>
> http://bugs.gentoo.org/show_bug.cgi?id=10155
>
> to this forum in the hope of getting some feedback from the general
> Gentoo crowd. The problems we're facing are not so much
> Haskell-specific, but center around the problem of how to support
> Haskell in the Gentoo framework.
>
> Currently we try to find the best solution for the following problem:
> There are at least two compilers for the Haskell language: ghc and
> nhc. Unfortunately, not every program can be compiled with either of
> them; most packages require ghc specifically.
>
> Now we wonder how to organize this in the ebuild. A virtual
> "haskell-compiler" target won't do us any good, because -- as I said
> -- many packages require ghc. Hard-coding the ebuilds to depend on ghc
> only is not the right thing to do either, because some packages _can_
> be build with either ghc or nhc, and ideally, the user would be able
> to choose which compiler should be used.
>
> How can this best be expressed in an ebuild?
>
> Peter
>
>
> --
> gentoo-dev@gentoo.org mailing list
>
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] Haskell support in Gentoo
2003-04-02 11:14 [gentoo-dev] Haskell support in Gentoo Peter Simons
2003-04-02 11:50 ` Tom Payne
@ 2003-04-02 12:25 ` Matthew Kennedy
2003-04-02 22:49 ` Oliver Burnett-Hall
2 siblings, 0 replies; 6+ messages in thread
From: Matthew Kennedy @ 2003-04-02 12:25 UTC (permalink / raw
To: gentoo-dev
Peter Simons <simons@cryp.to> writes:
> We are moving the discussion from
>
> http://bugs.gentoo.org/show_bug.cgi?id=10155
>
> to this forum in the hope of getting some feedback from the general
> Gentoo crowd. The problems we're facing are not so much
> Haskell-specific, but center around the problem of how to support
> Haskell in the Gentoo framework.
This is also the situation with the Lisp and Scheme compilers. It was
also the case for Emacs and XEmacs (if you think of them both as
interpreters).
In the case of Emacs and XEmacs, we thought it would be better to
provide two distinct categories: app-emacs/ and app-xemacs/. This has
worked out well IMO.
Matt
--
Matthew Kennedy
Gentoo Linux Developer
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] Haskell support in Gentoo
2003-04-02 11:50 ` Tom Payne
@ 2003-04-02 12:31 ` Matthew Kennedy
2003-04-02 15:34 ` Andres Loeh
1 sibling, 0 replies; 6+ messages in thread
From: Matthew Kennedy @ 2003-04-02 12:31 UTC (permalink / raw
To: Peter Simons; +Cc: gentoo-dev
Tom Payne <gentoo@tompayne.org> writes:
> If a package can be built with either ghc or nhc then use a USE variable
> (nhc?) to choose which compiler. Since ghc seems more widely used than nhc I
> suggest the USE variable:
> nhc Use nhc in preference to ghc where possible
>
> e.g.
>
> IUSE="nhc"
> DEPEND="virtual/haskell-compiler"
>
Whatever you guys come up with, please see if you can get it to map
into our Lisp and Scheme stuff too. I'll happily help out with the
scheme and lisp stuff. For Lisp we have (currently): gcl, clisp,
cmucl, sbcl and ecls. For Scheme we have bigloo, drscheme, gauche,
kawa, guile, plt, mzschme scheme48 and scsh.
> [Side note: is it OK for two installed packages to provide the same
> virtual?]
I *think* it is okay, as I often have both app-editors/emacs and
app-editors/emacs-cvs installed at the same time (both provide
virtual/emacs).
Matt
--
Matthew Kennedy
Gentoo Linux Developer
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] Haskell support in Gentoo
2003-04-02 11:50 ` Tom Payne
2003-04-02 12:31 ` Matthew Kennedy
@ 2003-04-02 15:34 ` Andres Loeh
1 sibling, 0 replies; 6+ messages in thread
From: Andres Loeh @ 2003-04-02 15:34 UTC (permalink / raw
To: gentoo-dev
> IUSE="nhc"
> DEPEND="virtual/haskell-compiler"
>
> src_compile() {
> if [ `use nhc` ]; then
> # compile with nhc
> else
> # compile with ghc
> fi
> }
>
> The nhc USE variable would work similarly to the gtk2 USE variable (use gtk2
> in preference to gtk where possible).
There are a few tools that might only work with nhc, but if something
can be compiled with both ghc and nhc, then usually ghc is the preferred
compiler, so an nhc USE flag seems the right way to go.
However, the use of a virtual seems to be counterproductive here. A better
way would be to just make the dependencies depend on the USE flag if there
is a choice. Something like
IUSE="nhc"
DEPEND="nhc? (dev-lang/nhc98 : dev-lang/ghc)"
But I think the syntax above or something equivalent is not really
allowed. Or does
IUSE="nhc"
if [ `use nhc`]; then
DEPEND="dev-lang/nhc98"
else
DEPEND="dev-lang/ghc"
fi
work?
Anyway, in the example given above, if dev-lang/ghc provides
virtual/haskell-compiler, but USE="nhc" is set on a system where only
dev-lang/ghc is installed, then installation will fail.
Best,
Andres
--
Andres Loeh, Universiteit Utrecht
mailto:andres@cs.uu.nl mailto:mail@andres-loeh.de
http://www.andres-loeh.de
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] Haskell support in Gentoo
2003-04-02 11:14 [gentoo-dev] Haskell support in Gentoo Peter Simons
2003-04-02 11:50 ` Tom Payne
2003-04-02 12:25 ` Matthew Kennedy
@ 2003-04-02 22:49 ` Oliver Burnett-Hall
2 siblings, 0 replies; 6+ messages in thread
From: Oliver Burnett-Hall @ 2003-04-02 22:49 UTC (permalink / raw
To: gentoo-dev
On Wed, 2003-04-02 at 12:14, Peter Simons wrote:
> Now we wonder how to organize this in the ebuild. A virtual
> "haskell-compiler" target won't do us any good, because -- as I said
> -- many packages require ghc. Hard-coding the ebuilds to depend on ghc
> only is not the right thing to do either, because some packages _can_
> be build with either ghc or nhc, and ideally, the user would be able
> to choose which compiler should be used.
You could create virtual/haskellc (or virtual/hc or whatever) and
packages could then depend on any of:
o virtual/haskellc
o dev-lang/ghc
o dev-lang/nhc98
according to their compiler requirements.
If you want to give the user the choice of which compiler to use (for
packages that could be built with either compiler) then provide a tool,
along the lines of gcc-config, which either creates symlinks or plays
around with the path to select one of these compilers.
HTH,
- olly
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-04-03 21:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-02 11:14 [gentoo-dev] Haskell support in Gentoo Peter Simons
2003-04-02 11:50 ` Tom Payne
2003-04-02 12:31 ` Matthew Kennedy
2003-04-02 15:34 ` Andres Loeh
2003-04-02 12:25 ` Matthew Kennedy
2003-04-02 22:49 ` Oliver Burnett-Hall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox