On 11/19/2017 01:00 PM, William L. Thomson Jr. wrote: >> >> This is broken: Static metadata like DEPEND must not depend >> on dynamic data like environment variables which are supposed >> to change at emerge time. > > I wondered about that. I guess adding to DEPEND via eclass is bad then. >
So long as you add to DEPEND unconditionally, the issue that Martin pointed out does not apply. If you need to fudge the conditional, you can put it behind a USE flag; for example, DEPEND+=" some_use_expand_flag_foo? ( foo )" in the eclass. That's still adding to DEPEND unconditionally, even though its effect on the dependency tree (at "emerge" time) is conditional on the USE flag.