[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] USE variables in ebuilds and using them for multiple install paths
From:       Jeff Stuart <jstuart () computer-city ! net>
Date:       2003-04-18 13:36:13
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic