From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21173 invoked by uid 1002); 18 Apr 2003 13:36:09 -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 1358 invoked from network); 18 Apr 2003 13:36:08 -0000 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@gentoo.org From: Jeff Stuart Date: Fri, 18 Apr 2003 09:36:13 -0400 Organization: Computer City Message-ID: <20030418093613.2dc30270.jstuart@computer-city.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@main.gmane.org X-Newsreader: Sylpheed version 0.8.11claws (GTK+ 1.2.10; i686-pc-linux-gnu) Sender: news Subject: [gentoo-dev] USE variables in ebuilds and using them for multiple install paths X-Archives-Salt: 11392e28-1b79-4881-9ebb-3dc904d96aa4 X-Archives-Hash: 5ca48ea8a943793a9359fc97747f2589 OK, I've got the following ebuild that I tried to make work with both GTK1 and GTK2. # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/x11-themes/gtk-engines-geramik/gtk-engines-geramik-0.18-r2.ebuild,v 1.2 2003/02/13 17:39:09 vapier Exp $ DESCRIPTION="GTK-2 theme engine to make GTK look like KDE" HOMEPAGE="http://www.kde-look.org/content/show.php?content=3952" SLOT="2" inherit gtk-engines KEYWORDS="~x86" newdepend ">=media-libs/gdk-pixbuf-0.21" src_install() { einstall \ THEME_DIR=${D}/usr/share/themes \ ENGINE_DIR=${D}/usr/lib/gtk/themes/engines \ || die "Installation failed" for dc in AUTHORS BUGS ChangeLog CONFIGURATION COPYING CUSTOMIZATION \ NEWS README THANKS TODO do [ -s $doc ] && dodoc $doc done } What I WANTED to do in the src_install was to check if gtk and/or gtk2 was in the USE flag. IF both, then it would copy both the gtk1 and gtk2 theme for Geramik. If only gtk1, then it would copy just the gtk1 files and remove the gtk2 files. If GTK2 only, well... that would be an odd case. ;) Then I'd copy the gtk2 files, then grab the .png's from the gtk1 theme, and finally awk the gtkrc for gtk2 theme to point to the right pixmap. What I TRIED was the following: if [ "`use gtk2`" -a "`use gtk`" ] then einfo "AHH gtk1 AND gtk2 OK..." fi if [ ! "`use gtk2`" -a "`use gtk`" ] then einfo "AHH OK, just gtk1..." fi of [ "`use gtk2`" -a ! "`use gtk`" ] then einfo "You're doing what??? LOL OK.. just gtk2!" fi And no matter WHAT I did including modifying my make.conf, passing env USE="-gtk2", etc. It STILL thought that both gtk1 AND gtk2 were set!!!! Why? :D Finally, would that be the proper use of the USE flags? -- gentoo-dev@gentoo.org mailing list