1 |
Dnia 2013-07-18, o godz. 09:07:22 |
2 |
Justin <jlec@g.o> napisał(a): |
3 |
|
4 |
> Index: fortran-2.eclass |
5 |
> =================================================================== |
6 |
> RCS file: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v |
7 |
> retrieving revision 1.18 |
8 |
> diff -u -B -b -u -p -r1.18 fortran-2.eclass |
9 |
> --- fortran-2.eclass 18 Jul 2013 07:03:33 -0000 1.18 |
10 |
> +++ fortran-2.eclass 18 Jul 2013 07:06:41 -0000 |
11 |
> @@ -203,11 +203,11 @@ _fortran_test_function() { |
12 |
> fi |
13 |
> } |
14 |
> |
15 |
> -# @FUNCTION: fortran-2_pkg_setup |
16 |
> +# @FUNCTION: _fortran-2_pkg_setup |
17 |
> +# @INTERNAL |
18 |
> # @DESCRIPTION: |
19 |
> -# Setup functionallity, |
20 |
> -# checks for a valid fortran compiler and optionally for its openmp |
21 |
> support. |
22 |
> -fortran-2_pkg_setup() { |
23 |
> +# _The_ fortran-2_pkg_setup() |
24 |
|
25 |
Looks like useful comment ;P. |
26 |
|
27 |
> +_fortran-2_pkg_setup() { |
28 |
> for _f_use in ${FORTRAN_NEEDED}; do |
29 |
> case ${_f_use} in |
30 |
> always) |
31 |
> @@ -229,6 +229,29 @@ fortran-2_pkg_setup() { |
32 |
> done |
33 |
> } |
34 |
> |
35 |
> + |
36 |
> +# @FUNCTION: fortran-2_pkg_setup |
37 |
> +# @DESCRIPTION: |
38 |
> +# Setup functionallity, |
39 |
> +# checks for a valid fortran compiler and optionally for its openmp |
40 |
> support. |
41 |
> +fortran-2_pkg_setup() { |
42 |
> + if [[ ${EAPI:-0} -lt 4 ]]; then |
43 |
|
44 |
Someone else's going to tell you this, so I'll tell you it first hand: |
45 |
EAPI is not guaranteed to be a number and you shouldn't be using |
46 |
numerical comparison against it. |
47 |
|
48 |
Not that you support any non-numerical EAPI. But then some people who |
49 |
fork eclasses in overlays will have to patch it more to support their |
50 |
weird EAPIs. And I'm not pointing my finger at anyone in particular. |
51 |
|
52 |
> + eqawarn "The fortran-2.eclass is going to deprecate support for" |
53 |
> + eqawarn "EAPI < 4. Please migrate your package to a higher EAPI" |
54 |
> + eqawarn "or file a bug at https://bugs.gentoo.org" |
55 |
> + fi |
56 |
> + |
57 |
> + case ${EAPI:-0} in |
58 |
> + 0|1|2|3) |
59 |
> + _fortran-2_pkg_setup ;; |
60 |
> + 4|5) |
61 |
> + if [[ ${MERGE_TYPE} != binary ]]; then |
62 |
> + _fortran-2_pkg_setup |
63 |
> + fi |
64 |
> + ;; |
65 |
> + esac |
66 |
> +} |
67 |
> + |
68 |
> case ${EAPI:-0} in |
69 |
> 0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;; |
70 |
> *) die "EAPI=${EAPI} is not supported" ;; |
71 |
|
72 |
-- |
73 |
Best regards, |
74 |
Michał Górny |