On 10/7/12 7:36 PM, Jonathan Callen wrote: > On 10/07/2012 01:20 PM, justin wrote: >> Hi, > >> I want to add following change to fortran-2.eclass to achieve more >> simpler usage. > >> The patch will make the eclass depend on virtual/fortran so that >> no manual addition is needed. Two exception are present, a) the >> ebuild has the USE flag fortran, then we check for that, or b) the >> FORTRAN_OPTIONAL variable is set, which leaves the control to the >> ebuild (e.g. for cases like "lapack? ( virtual/fortran )"). > >> This is the best coverage of the use cases present, because > >> * most ebuild using the eclass want to have a fortran compiler * >> most other trigger optional fortran support through USE=fortran * >> only minor have different USE for this purpose (e.g. numpy) > >> Thanks for comments, > >> Justin > > > You cannot check the value of IUSE in global scope in an eclass, as at > least portage actually unsets it before sourcing an eclass (also, it > is not defined in PMS what value IUSE would have at that point). You > also got a conditional backwards -- if you don't set FORTRAN_OPTIONAL > with that patch, then *nothing* gets appended to DEPEND -- if you do > set it, then DEPEND="virtual/fortran" will always be set (with your > current logic). > >
Regarding your first point I copied the behavior from the toolchain.eclass and I thought it would work. Testing it, I see you are right. Any suggestion how to check for a USE being IUSE in an eclass? NAd your second point is completely right. I fix this when we sorted out the USE check. Thanks Justin
signature.asc
Description: OpenPGP digital signature
