Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Новая дока: Per-package cflags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Russian
View previous topic :: View next topic  
Author Message
amax
Tux's lil' helper
Tux's lil' helper


Joined: 22 Feb 2004
Posts: 76
Location: Russia, Novosibirsk (Silicon Taiga)

PostPosted: Tue Nov 22, 2005 8:32 am    Post subject: Новая дока: Per-package cflags Reply with quote

http://wiki.fantoo.ru/index.php/Per-package_CFLAGS

Принимаются детальные пожелания по доработке
Back to top
View user's profile Send private message
Laitr Keiows
Moderator
Moderator


Joined: 04 Jul 2005
Posts: 891
Location: Kobe, Japan

PostPosted: Tue Nov 22, 2005 8:41 am    Post subject: Reply with quote

Вот тут еще написано, про версии и все такое:
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:
  1. /etc/portage/env.d/app-offic/openoffice
  2. /etc/portage/env.d/app-offic/openoffice-1.1.0
  3. /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 :D
Back to top
View user's profile Send private message
fank
l33t
l33t


Joined: 16 Oct 2004
Posts: 794
Location: Minsk, Belarus

PostPosted: Thu Nov 24, 2005 2:18 pm    Post subject: Reply with quote

я бы предложил гораздо более удобный путь для per package {C,CXX}flags
https://forums.gentoo.org/viewtopic-t-280748-highlight-flags.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Russian All times are GMT
Page 1 of 1

 
Jump to:  
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