1 |
On Wed, 14 Aug 2019 03:43:12 +1200 |
2 |
kentnl@g.o wrote: |
3 |
|
4 |
> From: Andreas K. Hüttel <dilfridge@g.o> |
5 |
> |
6 |
> Signed-off-by: Andreas K. Hüttel <dilfridge@g.o> |
7 |
> --- |
8 |
> eclass/perl-module.eclass | 30 +++++++++++++++--------------- |
9 |
> 1 file changed, 15 insertions(+), 15 deletions(-) |
10 |
> |
11 |
> diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass |
12 |
> index 20b9947caca..81f79992d76 100644 |
13 |
> --- a/eclass/perl-module.eclass |
14 |
> +++ b/eclass/perl-module.eclass |
15 |
> @@ -44,61 +44,61 @@ esac |
16 |
> case ${EAPI:-0} in |
17 |
> 5) |
18 |
> [[ ${CATEGORY} == perl-core ]] && \ |
19 |
> PERL_EXPF+=" pkg_postinst pkg_postrm" |
20 |
> |
21 |
> case "${GENTOO_DEPEND_ON_PERL:-yes}" in |
22 |
> yes) |
23 |
> case "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" in |
24 |
> yes) |
25 |
> DEPEND="dev-lang/perl:=[-build(-)]" |
26 |
> ;; |
27 |
> *) |
28 |
> DEPEND="dev-lang/perl[-build(-)]" |
29 |
> ;; |
30 |
> esac |
31 |
> RDEPEND="${DEPEND}" |
32 |
> ;; |
33 |
> esac |
34 |
> |
35 |
> case "${PERL_EXPORT_PHASE_FUNCTIONS:-yes}" in |
36 |
> yes) |
37 |
> EXPORT_FUNCTIONS ${PERL_EXPF} |
38 |
> ;; |
39 |
> no) |
40 |
> debug-print "PERL_EXPORT_PHASE_FUNCTIONS=no" |
41 |
> ;; |
42 |
> *) |
43 |
> die "PERL_EXPORT_PHASE_FUNCTIONS=${PERL_EXPORT_PHASE_FUNCTIONS} is not supported by perl-module.eclass" |
44 |
> ;; |
45 |
> esac |
46 |
> ;; |
47 |
> - 6) |
48 |
> + 6|7) |
49 |
> [[ ${CATEGORY} == perl-core ]] && \ |
50 |
> PERL_EXPF+=" pkg_postinst pkg_postrm" |
51 |
> |
52 |
> case "${GENTOO_DEPEND_ON_PERL:-yes}" in |
53 |
> yes) |
54 |
> DEPEND="dev-lang/perl:=" |
55 |
> RDEPEND="dev-lang/perl:=" |
56 |
> ;; |
57 |
> noslotop) |
58 |
> DEPEND="dev-lang/perl" |
59 |
> RDEPEND="dev-lang/perl" |
60 |
> ;; |
61 |
> esac |
62 |
> |
63 |
> if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then |
64 |
> - eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6. If you don't want a slot operator" |
65 |
> + eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later. If you don't want a slot operator" |
66 |
> die "set GENTOO_DEPEND_ON_PERL=noslotop instead." |
67 |
> fi |
68 |
> |
69 |
> if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then |
70 |
> - eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6. Use perl-module.eclass if you need" |
71 |
> + eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later. Use perl-module.eclass if you need" |
72 |
> die "phase functions, perl-functions.eclass if not." |
73 |
> fi |
74 |
> |
75 |
> EXPORT_FUNCTIONS ${PERL_EXPF} |
76 |
> ;; |
77 |
> *) |
78 |
> die "EAPI=${EAPI:-0} is not supported by perl-module.eclass" |
79 |
> ;; |
80 |
|
81 |
First off, I don't think the SLOT operator in DEPEND actually does |
82 |
anything? I believe it's only meaningful for RDEPEND? |
83 |
|
84 |
Apart from that, I would say that dev-lang/perl should go in BDEPEND |
85 |
too, again without the SLOT operator. You need to execute Perl to build |
86 |
Perl modules, right? Whether it's also needed in DEPEND is a little |
87 |
more nuanced. For modules including native code, yes definitely. For |
88 |
others, maybe not but it's not worth complicating things here. |
89 |
|
90 |
Unfortunately there's currently no way to say that the versions of a |
91 |
package across BDEPEND, DEPEND, and RDEPEND must be (roughly?) equal so |
92 |
there's nothing to stop an ancient Perl in / building a module for a |
93 |
newer Perl in ROOT but that's a problem that goes far beyond Perl. |
94 |
Cross-compiling Perl modules is still a bit of a car crash anyway. |
95 |
|
96 |
Regards, |
97 |
-- |
98 |
James Le Cuirot (chewi) |
99 |
Gentoo Linux Developer |