Gentoo Archives: gentoo-user

From: John Covici <covici@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Environment variables on package granularity
Date: Fri, 02 Oct 2020 10:47:09
Message-Id: m3y2ko7vmk.wl-covici@ccs.covici.com
In Reply to: [gentoo-user] Environment variables on package granularity by Daniel Armbruster
1 On Fri, 02 Oct 2020 05:14:01 -0400,
2 Daniel Armbruster wrote:
3 >
4 > [1 <text/plain; us-ascii (7bit)>]
5 > Hi gentoo-user,
6 >
7 > is there a way to set environment variables on package/ebuild granularity? I'm
8 > aware, that plenty of portage related environment variables are configurable by
9 > means of the package.env feature
10 > (https://wiki.gentoo.org/wiki//etc/portage/package.env). However, I didn't find
11 > a way to set additional environment variables.
12 >
13 > The actual reason, why I'm asking is the following: When compiling
14 > app-emulation/qemu, package installation fails when calling the preprocessor.
15 > Though, I'm able to manually solve the issue when setting the CPP environment
16 > variable:
17 >
18 > # export CPP="gcc -E"
19 >
20 > before running emerge. Instead of running the command again and again i.e.
21 > before every reinstallation of app-emulation/qemu, I'd like to set this
22 > environment variable for the package once (in e.g. a configuration file) and
23 > it's done for every future reinstallation.
24
25 You can use the env feature to set any environment variable you want,
26 they don't have to be portage related. You can drill down to the
27 category/package quite nicely.
28
29 --
30 Your life is like a penny. You're going to lose it. The question is:
31 How do
32 you spend it?
33
34 John Covici wb2una
35 covici@××××××××××.com