From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QfDeX-0001Gz-JA for garchives@archives.gentoo.org; Fri, 08 Jul 2011 16:11:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A0A4121C0A9 for ; Fri, 8 Jul 2011 16:11:40 +0000 (UTC) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 9384321C03B for ; Fri, 8 Jul 2011 15:20:54 +0000 (UTC) Received: by wyh22 with SMTP id 22so1901514wyh.40 for ; Fri, 08 Jul 2011 08:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:content-type; bh=03P6m/E4i0q8Tc6Kc141egOIlYd9mLlrhMK2xxVcg6c=; b=ps4H1bPU2oW8ps8VNsSe98w7pV8ysGekjtQdHSVcn6UY4wbMhl9wZ3ZIiCKEH2m36R b8o47Sylpd9nNsolzcsBGjqH74N9lX/XGv3DvNpXCZmGV16L5c9YWw7Ye89OFZ9q28TQ /n+AEhg+IOIO2lMy9y3lRWdzNe124uI8lfmSI= Received: by 10.216.68.200 with SMTP id l50mr1779372wed.106.1310138453638; Fri, 08 Jul 2011 08:20:53 -0700 (PDT) Received: from nazgul.localnet (196-215-19-196.dynamic.isadsl.co.za [196.215.19.196]) by mx.google.com with ESMTPS id d7sm5415585wek.21.2011.07.08.08.20.51 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jul 2011 08:20:52 -0700 (PDT) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Is Gentoo wiping out Gtk 2 support from packages that support it? Date: Fri, 08 Jul 2011 17:19:46 +0200 Message-ID: <1562264.5oy8gnuzIK@nazgul> User-Agent: KMail/4.6.0 (Linux/2.6.39-ck; KDE/4.6.4; x86_64; ; ) In-Reply-To: <1310130876.229332.5.camel@localhost.localdomain> References: <1310130876.229332.5.camel@localhost.localdomain> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" X-Archives-Salt: X-Archives-Hash: d91ab012e82c8a143080dfbde4c8fe6a On Friday 08 July 2011 09:14:36 Albert Hopkins did opine thusly: > On Friday, July 8 at 13:11 (+0100), Stroller said: > > Taking a look at this bug today, is there any reason why the > > ebuild shouldn't simply RDEPEND="x11-libs/gtk+" (i.e. remove > > the explicit dep on gtk3), detect what version you have > > installed on your system and then either run --enable-gtk3 or > > --enable-gtk2 during src_configure(), depending upon which > > you're using? > > ebuilds generally don't do this, because it is bad. What you have > and what you want aren't necessarily the same thing. Consider: > > * You don't yet have any gtk installed > * You have gtk2 but actually *want* the gtk3 version, so you > want the ebuild to pull in gtk3 (or vice versa) > * You have both gtk2 and gtk3 installed. > * You have gtk installed, but don't want gtk support for a > particular package (if gtk support is optional for that > package). easy. Two USE flags: gtk2 and gtk3 in ebuild: DEPEND=" gtk2? (x11-libs/gtk+:2) gtk3? (x11-libs/gtk+:3) " in src-configure() write the code such that it establishes a precedence If both flags are set, build against gtk+:3 If only one flag is set, build against that toolkit If no flags are set, do something appropriate. IIRC, it is frowned upon to have conditionals in DEPENDS based on USE flags so the above is best - take the small hit on disk space if both are set and gtk+:2 is used nowhere else (highly unlikely for quite a while still) -- alan dot mckinnon at gmail dot com