View previous topic :: View next topic |
Author |
Message |
amax Tux's lil' helper

Joined: 22 Feb 2004 Posts: 76 Location: Russia, Novosibirsk (Silicon Taiga)
|
|
Back to top |
|
 |
Laitr Keiows Bodhisattva


Joined: 04 Jul 2005 Posts: 891 Location: Kobe, Japan
|
Posted: Tue Nov 22, 2005 8:41 am Post subject: |
|
|
Вот тут еще написано, про версии и все такое:
STEALER.net wrote: | henrik wrote: | Quote: | - support for per-package USE flags and ACCEPT_KEYWORDS settings with package.use and package.keywords in /etc/portage |
is there a way to do the same thing for packages that uses variables like:
LIRC_OPTS="--with-driver=pctv" emerge lirc
or
XMLTV_OPTS="tv_grab_sn" emerge xmltv?
|
That was one thing I was looking for, but it can be implemented with the existing features in portage-2.0.50_pre16
The man page to portage states:
/etc/portage/bashrc If needed this file can be used to setup a different environment for ebuilds than the root environment. Syntax is the same as any other bash scripts.
So, just create /etc/portage/bashrc with something like:
Code: |
for MY_ENV in ${PN} ${P} ${PF} ; do
if [ -f /etc/portage/env.d/${CATEGORY}/${MY_ENV} ] ; then
. /etc/portage/env.d/${CATEGORY}/${MY_ENV}
fi
done
|
Then create /etc/portage/env.d and e.g. you would like to emerge app-office/openoffice compiled in you local language you create /etc/portage/env.d/app-office/openoffice with content:
Code: |
LANGUAGE=<language code e.g. GER>
|
Now emerge app-office/openoffice as usual, the result should be that it compiles in your language, without the need to specify LANGUAGE on command-line.
The shell script in /etc/portage/bashrc loads the the files /etc/portage/env.d in the following order, allowing you to overwrite values in later loaded files:
/etc/portage/env.d/app-offic/openoffice
/etc/portage/env.d/app-offic/openoffice-1.1.0
/etc/portage/env.d/app-offic/openoffice-1.1.0-r2
This way has one disadvantage:
Code: | LANGUAGE=ENUS emerge app-office/openoffice |
would lead to have LANGUAGE overwritten via /etc/portage/env.d If you still need this feature, you should do checks in /etc/portage/env.d if the variable has already been set. Or supply a special variable on command-line and add a check to /etc/portage/bashrc that skips the load of /etc/portage/env.d is the special variable has been set.
Just my way to solve the problem
|
|
|
Back to top |
|
 |
fank l33t

Joined: 16 Oct 2004 Posts: 794 Location: Minsk, Belarus
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|