Gentoo Archives: gentoo-dev

From: Xavier Miller <xavier.miller@×××××.org>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: RFC: fortran-2.eclass to depend on virtual/fortran
Date: Sun, 07 Oct 2012 18:13:18
Message-Id: 20121007201234.10f340cd@n0n4m3.alchemist.homelinux.net
In Reply to: [gentoo-dev] Re: RFC: fortran-2.eclass to depend on virtual/fortran by Jonathan Callen
1 Le Sun, 07 Oct 2012 13:36:20 -0400,
2 Jonathan Callen <abcd@g.o> a écrit :
3
4 > -----BEGIN PGP SIGNED MESSAGE-----
5 > Hash: SHA512
6 >
7 > On 10/07/2012 01:20 PM, justin wrote:
8 > > Hi,
9 > >
10 > > I want to add following change to fortran-2.eclass to achieve more
11 > > simpler usage.
12 > >
13 > > The patch will make the eclass depend on virtual/fortran so that
14 > > no manual addition is needed. Two exception are present, a) the
15 > > ebuild has the USE flag fortran, then we check for that, or b) the
16 > > FORTRAN_OPTIONAL variable is set, which leaves the control to the
17 > > ebuild (e.g. for cases like "lapack? ( virtual/fortran )").
18 > >
19 > > This is the best coverage of the use cases present, because
20 > >
21 > > * most ebuild using the eclass want to have a fortran compiler *
22 > > most other trigger optional fortran support through USE=fortran *
23 > > only minor have different USE for this purpose (e.g. numpy)
24 > >
25 > > Thanks for comments,
26 > >
27 > > Justin
28 > >
29 >
30 > You cannot check the value of IUSE in global scope in an eclass, as at
31 > least portage actually unsets it before sourcing an eclass (also, it
32 > is not defined in PMS what value IUSE would have at that point). You
33 > also got a conditional backwards -- if you don't set FORTRAN_OPTIONAL
34 > with that patch, then *nothing* gets appended to DEPEND -- if you do
35 > set it, then DEPEND="virtual/fortran" will always be set (with your
36 > current logic).
37
38 Example: numpy, used by many gtk applications.
39 fortran is only needed when lapack USE is enabled.
40
41 I disabled fortran, an now, I /need/ to have it because the ebuild.
42
43 https://bugs.gentoo.org/show_bug.cgi?id=437536
44
45 Xavier Miller.