Sorry if the summary is not clear. Here is my problem. I would like to emerge openoffice with vi support. openoffice requires LINGUAS set to "vi" to be able to build with vi support. This is not good because when i upgrade openoffice, LINGUAS is not set and the result is openoffice without vi support. I would like something like /etc/portage/package.env that behaves similar to /etc/portage/package.use. The difference is that it used to store environment variables for specified ebuilds. I may probably use /etc/portage/bashrc (not tried yet) but i don't want to set LINGUAS for every ebuilds just because i need it for openoffice. /etc/portage/package.env's content would be: =app-office/openoffice-2* LINGUAS="en vi"
As a workaround in this specific case, you can put [[ ${CATEGORY}/${P} == app-office/openoffice-2* ]] && export LINGUAS="en vi" in your /etc/portage/bashrc. This is not a panacea - it won't work with ebuilds which use linguas_## USE variables instead of LINGUAS directly, for example - but it should work with openoffice with the LINGUAS you want. Bug #44796 contains a pointer to a simple bashrc which does some extra work allowing you do specify this in a way somewhat similar to how you describe it, but with the same problems. *** This bug has been marked as a duplicate of 44796 ***