From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27343 invoked by uid 1002); 2 Apr 2003 11:50:15 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 15223 invoked from network); 2 Apr 2003 11:50:15 -0000 Date: Wed, 2 Apr 2003 12:50:50 +0100 From: Tom Payne To: Peter Simons Cc: gentoo-dev@gentoo.org Message-ID: <20030402115050.GB2318@tompayne.org> Mail-Followup-To: Peter Simons , gentoo-dev@gentoo.org References: <87he9hqhh5.fsf@peti.cryp.to> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87he9hqhh5.fsf@peti.cryp.to> User-Agent: Mutt/1.4i Subject: Re: [gentoo-dev] Haskell support in Gentoo X-Archives-Salt: ffe03a20-70d1-47ae-a200-247e5573472a X-Archives-Hash: e5a8e606eb87756566fb63057724f064 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