Gentoo Archives: gentoo-dev

From: Jonathan Callen <abcd@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: RFC: fortran-2.eclass to depend on virtual/fortran
Date: Sun, 07 Oct 2012 17:37:08
Message-Id: 5071BD94.4040308@gentoo.org
In Reply to: [gentoo-dev] RFC: fortran-2.eclass to depend on virtual/fortran by justin
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA512
3
4 On 10/07/2012 01:20 PM, justin wrote:
5 > Hi,
6 >
7 > I want to add following change to fortran-2.eclass to achieve more
8 > simpler usage.
9 >
10 > The patch will make the eclass depend on virtual/fortran so that
11 > no manual addition is needed. Two exception are present, a) the
12 > ebuild has the USE flag fortran, then we check for that, or b) the
13 > FORTRAN_OPTIONAL variable is set, which leaves the control to the
14 > ebuild (e.g. for cases like "lapack? ( virtual/fortran )").
15 >
16 > This is the best coverage of the use cases present, because
17 >
18 > * most ebuild using the eclass want to have a fortran compiler *
19 > most other trigger optional fortran support through USE=fortran *
20 > only minor have different USE for this purpose (e.g. numpy)
21 >
22 > Thanks for comments,
23 >
24 > Justin
25 >
26
27 You cannot check the value of IUSE in global scope in an eclass, as at
28 least portage actually unsets it before sourcing an eclass (also, it
29 is not defined in PMS what value IUSE would have at that point). You
30 also got a conditional backwards -- if you don't set FORTRAN_OPTIONAL
31 with that patch, then *nothing* gets appended to DEPEND -- if you do
32 set it, then DEPEND="virtual/fortran" will always be set (with your
33 current logic).
34
35 - --
36 Jonathan Callen
37 -----BEGIN PGP SIGNATURE-----
38 Version: GnuPG v2.0.19 (GNU/Linux)
39 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
40
41 iQIcBAEBCgAGBQJQcb2UAAoJELHSF2kinlg4jQMP/Rt4UJBDCPE6lJyEoHzTp60l
42 GapkNJRpBjiihYZ1n5pAtBpUvbKqgAo4zvvXX2AvLDfUazcpnPh3ZdW8Gc8JtycF
43 cvCrUoUfV+0MY29DEcvL0tV5wX9ha5B5YEurR/zoPQ29V6eJqho21G+GZJ6L4Mdj
44 rIcTRDf4izaDqiunRDRQp51udYEnAQLR8I9FAA4ybh1Dd536xmnm3jdDkGtpvgrW
45 15vWMdr8ETkmy5eK59K/iP6U4IzPldBXff+rKyIlss/D6CNrXI0WqeYY2PdFUHGk
46 E+C4Sqx633AjevfS04c+6feAcsS3gIpZWVuzA0BZSXeFUFB7Cdph1RwHpLOYM50Q
47 OoGi9/ha2llD3J/iS+76ddlP953ZfRrt3ZfjWzCaTsec73AA/srBuaxtoiOGjC/r
48 5DecDgL6OrOPJdad29VE1B/xEkccj+C7/YYXtwxsS2MzzL5oi8hpnnrLH/wmqOK9
49 Y/uf1H02swPu6m+ER8De/5KAgKc7LCaTmgvZVKetZHgZw2TqG0dwAwJ7FickiE/W
50 49yfc6wf8kQGtaH/BqHb+ja0T18y90jHhrexaGPK7mSU2LCzvQnMHDMAIEuSRzgz
51 iM8JPsqJ6Jwc/dD3MMW7WKWf/aSP1fy+wJXGaK4eI25U5LmPzmNn7E68W1WUjKRc
52 5pfLsVRThwg2Md1UjlDO
53 =P5yK
54 -----END PGP SIGNATURE-----

Replies