Gentoo Archives: gentoo-dev

From: justin <jlec@g.o>
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 17:59:04
Message-Id: 5071C2AC.60902@gentoo.org
In Reply to: [gentoo-dev] Re: RFC: fortran-2.eclass to depend on virtual/fortran by Jonathan Callen
1 On 10/7/12 7:36 PM, Jonathan Callen wrote:
2 > On 10/07/2012 01:20 PM, justin wrote:
3 >> Hi,
4 >
5 >> I want to add following change to fortran-2.eclass to achieve more
6 >> simpler usage.
7 >
8 >> The patch will make the eclass depend on virtual/fortran so that
9 >> no manual addition is needed. Two exception are present, a) the
10 >> ebuild has the USE flag fortran, then we check for that, or b) the
11 >> FORTRAN_OPTIONAL variable is set, which leaves the control to the
12 >> ebuild (e.g. for cases like "lapack? ( virtual/fortran )").
13 >
14 >> This is the best coverage of the use cases present, because
15 >
16 >> * most ebuild using the eclass want to have a fortran compiler *
17 >> most other trigger optional fortran support through USE=fortran *
18 >> only minor have different USE for this purpose (e.g. numpy)
19 >
20 >> Thanks for comments,
21 >
22 >> Justin
23 >
24 >
25 > You cannot check the value of IUSE in global scope in an eclass, as at
26 > least portage actually unsets it before sourcing an eclass (also, it
27 > is not defined in PMS what value IUSE would have at that point). You
28 > also got a conditional backwards -- if you don't set FORTRAN_OPTIONAL
29 > with that patch, then *nothing* gets appended to DEPEND -- if you do
30 > set it, then DEPEND="virtual/fortran" will always be set (with your
31 > current logic).
32 >
33 >
34
35 Regarding your first point I copied the behavior from the
36 toolchain.eclass and I thought it would work. Testing it, I see you are
37 right. Any suggestion how to check for a USE being IUSE in an eclass?
38
39 NAd your second point is completely right. I fix this when we sorted out
40 the USE check.
41
42 Thanks
43 Justin

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Re: RFC: fortran-2.eclass to depend on virtual/fortran Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
Re: [gentoo-dev] Re: RFC: fortran-2.eclass to depend on virtual/fortran Mike Frysinger <vapier@g.o>