Gentoo Archives: gentoo-dev

From: Tom Payne <gentoo@××××××××.org>
To: Peter Simons <simons@××××.to>
Cc: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Haskell support in Gentoo
Date: Wed, 02 Apr 2003 11:50:15
Message-Id: 20030402115050.GB2318@tompayne.org
In Reply to: [gentoo-dev] Haskell support in Gentoo by Peter Simons
1 Surely user preferences are best expressed with USE flags?
2
3 ghc and nhc should both provide virtual/haskell-compiler.
4 Packages that can only be compiled with ghc should depend on ghc. Similarly
5 nhc.
6
7 If a package can be built with either ghc or nhc then use a USE variable
8 (nhc?) to choose which compiler. Since ghc seems more widely used than nhc I
9 suggest the USE variable:
10 nhc Use nhc in preference to ghc where possible
11
12 e.g.
13
14 IUSE="nhc"
15 DEPEND="virtual/haskell-compiler"
16
17 src_compile() {
18 if [ `use nhc` ]; then
19 # compile with nhc
20 else
21 # compile with ghc
22 fi
23 }
24
25 The nhc USE variable would work similarly to the gtk2 USE variable (use gtk2
26 in preference to gtk where possible).
27
28 [Side note: is it OK for two installed packages to provide the same
29 virtual?]
30
31 Regards,
32
33 Tom
34
35 On Wed, Apr 02, 2003 at 01:14:14PM +0200, Peter Simons wrote:
36 > We are moving the discussion from
37 >
38 > http://bugs.gentoo.org/show_bug.cgi?id=10155
39 >
40 > to this forum in the hope of getting some feedback from the general
41 > Gentoo crowd. The problems we're facing are not so much
42 > Haskell-specific, but center around the problem of how to support
43 > Haskell in the Gentoo framework.
44 >
45 > Currently we try to find the best solution for the following problem:
46 > There are at least two compilers for the Haskell language: ghc and
47 > nhc. Unfortunately, not every program can be compiled with either of
48 > them; most packages require ghc specifically.
49 >
50 > Now we wonder how to organize this in the ebuild. A virtual
51 > "haskell-compiler" target won't do us any good, because -- as I said
52 > -- many packages require ghc. Hard-coding the ebuilds to depend on ghc
53 > only is not the right thing to do either, because some packages _can_
54 > be build with either ghc or nhc, and ideally, the user would be able
55 > to choose which compiler should be used.
56 >
57 > How can this best be expressed in an ebuild?
58 >
59 > Peter
60 >
61 >
62 > --
63 > gentoo-dev@g.o mailing list
64 >
65
66 --
67 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Haskell support in Gentoo Matthew Kennedy <mkennedy@g.o>
Re: [gentoo-dev] Haskell support in Gentoo Andres Loeh <andres@×××××.nl>