Kevin F. Quinn wrote:
> Aside from that, what you're really after is per-package CFLAGS (or
> more generally, per-package FEATURES) which is a long-standing portage
> feature request. You can do it via a bashrc script
> (in /etc/portage/bashrc) although it's not 100% - bashrc scripts are not
> sourced in all phases of emerge (in particular, fetch), although they
> are for the ones you're most likely to care about.
per package env vars are supported through the base profile.bashrc. You
don't have to clutter /etc/portage/bashrc, you can just do e.g.
cat > /etc/portage/env/app-foo/bar << EOF
CFLAGS="-O -march=k8 -pipe"
CXXFLAGS="${CFLAGS}"
EOF
And it will set C(XX)FLAGS for app-foo/bar based on that.
/etc/portage/env/app-foo/bar-1.0 and /etc/portage/env/app-foo/bar-1.0-r1
would also work.
That being said, "fetch" is not a phase, that's why there are no hooks
for it.
--
Kind Regards,
Simon Stelling
Gentoo/AMD64 developer
--
[email protected] mailing list