public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Jeff Stuart <jstuart@computer-city.net>
To: gentoo-dev@gentoo.org
Subject: [gentoo-dev] USE variables in ebuilds and using them for multiple install paths
Date: Fri, 18 Apr 2003 09:36:13 -0400	[thread overview]
Message-ID: <20030418093613.2dc30270.jstuart@computer-city.net> (raw)

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


             reply	other threads:[~2003-04-18 13:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-18 13:36 Jeff Stuart [this message]
2003-04-18 18:12 ` [gentoo-dev] USE variables in ebuilds and using them for multiple install paths Matt Tucker
2003-04-19 11:18 ` foser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030418093613.2dc30270.jstuart@computer-city.net \
    --to=jstuart@computer-city.net \
    --cc=gentoo-dev@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox