-----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). - -- Jonathan Callen -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBCgAGBQJQcb2UAAoJELHSF2kinlg4jQMP/Rt4UJBDCPE6lJyEoHzTp60l GapkNJRpBjiihYZ1n5pAtBpUvbKqgAo4zvvXX2AvLDfUazcpnPh3ZdW8Gc8JtycF cvCrUoUfV+0MY29DEcvL0tV5wX9ha5B5YEurR/zoPQ29V6eJqho21G+GZJ6L4Mdj rIcTRDf4izaDqiunRDRQp51udYEnAQLR8I9FAA4ybh1Dd536xmnm3jdDkGtpvgrW 15vWMdr8ETkmy5eK59K/iP6U4IzPldBXff+rKyIlss/D6CNrXI0WqeYY2PdFUHGk E+C4Sqx633AjevfS04c+6feAcsS3gIpZWVuzA0BZSXeFUFB7Cdph1RwHpLOYM50Q OoGi9/ha2llD3J/iS+76ddlP953ZfRrt3ZfjWzCaTsec73AA/srBuaxtoiOGjC/r 5DecDgL6OrOPJdad29VE1B/xEkccj+C7/YYXtwxsS2MzzL5oi8hpnnrLH/wmqOK9 Y/uf1H02swPu6m+ER8De/5KAgKc7LCaTmgvZVKetZHgZw2TqG0dwAwJ7FickiE/W 49yfc6wf8kQGtaH/BqHb+ja0T18y90jHhrexaGPK7mSU2LCzvQnMHDMAIEuSRzgz iM8JPsqJ6Jwc/dD3MMW7WKWf/aSP1fy+wJXGaK4eI25U5LmPzmNn7E68W1WUjKRc 5pfLsVRThwg2Md1UjlDO =P5yK -----END PGP SIGNATURE-----
