Le Sun, 07 Oct 2012 13:36:20 -0400, Jonathan Callen <[email protected]> a écrit :
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > 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). Example: numpy, used by many gtk applications. fortran is only needed when lapack USE is enabled. I disabled fortran, an now, I /need/ to have it because the ebuild. https://bugs.gentoo.org/show_bug.cgi?id=437536 Xavier Miller.
