From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27291 invoked by uid 1002); 2 Apr 2003 15:34:56 -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 1412 invoked from network); 2 Apr 2003 15:34:56 -0000 Date: Wed, 2 Apr 2003 17:34:54 +0200 From: Andres Loeh To: gentoo-dev@gentoo.org Message-ID: <20030402153454.GA129@cs.uu.nl> References: <87he9hqhh5.fsf@peti.cryp.to> <20030402115050.GB2318@tompayne.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030402115050.GB2318@tompayne.org> User-Agent: Mutt/1.4i Subject: Re: [gentoo-dev] Haskell support in Gentoo X-Archives-Salt: d4248853-2ae0-4b6c-a511-21e776dab6c4 X-Archives-Hash: 1a6abb24bfc22ee4e74c4fc3521c55a7 > 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