1 |
commit: 73586f6429fd6ddaec2e32447886f7122cfa5840 |
2 |
Author: Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 28 21:15:52 2015 +0000 |
4 |
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 19 13:17:07 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73586f64 |
7 |
|
8 |
perl-module.eclass: Allow EAPI=6, ban PERL_EXPORT_PHASE_FUNCTIONS, GENTOO_DEPEND_ON_PERL_SUBSLOT, simplify dependency |
9 |
|
10 |
eclass/perl-module.eclass | 47 +++++++++++++++++++++++++++++++++++++---------- |
11 |
1 file changed, 37 insertions(+), 10 deletions(-) |
12 |
|
13 |
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass |
14 |
index 0ef8d3d..f380730 100644 |
15 |
--- a/eclass/perl-module.eclass |
16 |
+++ b/eclass/perl-module.eclass |
17 |
@@ -37,21 +37,48 @@ case "${EAPI:-0}" in |
18 |
RDEPEND="${DEPEND}" |
19 |
;; |
20 |
esac |
21 |
+ |
22 |
+ case "${PERL_EXPORT_PHASE_FUNCTIONS:-yes}" in |
23 |
+ yes) |
24 |
+ EXPORT_FUNCTIONS ${PERL_EXPF} |
25 |
+ ;; |
26 |
+ no) |
27 |
+ debug-print "PERL_EXPORT_PHASE_FUNCTIONS=no" |
28 |
+ ;; |
29 |
+ *) |
30 |
+ die "PERL_EXPORT_PHASE_FUNCTIONS=${PERL_EXPORT_PHASE_FUNCTIONS} is not supported by perl-module.eclass" |
31 |
+ ;; |
32 |
+ esac |
33 |
;; |
34 |
- *) |
35 |
- die "EAPI=${EAPI} is not supported by perl-module.eclass" |
36 |
- ;; |
37 |
-esac |
38 |
+ 6) |
39 |
+ [[ ${CATEGORY} == "perl-core" ]] && \ |
40 |
+ PERL_EXPF+=" pkg_postinst pkg_postrm" |
41 |
+ |
42 |
+ case "${GENTOO_DEPEND_ON_PERL:-yes}" in |
43 |
+ yes) |
44 |
+ DEPEND="dev-lang/perl:=" |
45 |
+ RDEPEND="dev-lang/perl:=" |
46 |
+ ;; |
47 |
+ noslotop) |
48 |
+ DEPEND="dev-lang/perl" |
49 |
+ RDEPEND="dev-lang/perl" |
50 |
+ ;; |
51 |
+ esac |
52 |
+ |
53 |
+ if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT}" ]]; then |
54 |
+ eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT is banned in EAPI=6. If you don't want a slot operator" |
55 |
+ die "set GENTOO_DEPEND_ON_PERL=noslotop instead." |
56 |
+ fi |
57 |
+ |
58 |
+ if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then |
59 |
+ eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6. Use perl-module.eclass if you need" |
60 |
+ die "phase functions, perl-functions.eclass if not." |
61 |
+ fi |
62 |
|
63 |
-case "${PERL_EXPORT_PHASE_FUNCTIONS:-yes}" in |
64 |
- yes) |
65 |
EXPORT_FUNCTIONS ${PERL_EXPF} |
66 |
;; |
67 |
- no) |
68 |
- debug-print "PERL_EXPORT_PHASE_FUNCTIONS=no" |
69 |
- ;; |
70 |
*) |
71 |
- die "PERL_EXPORT_PHASE_FUNCTIONS=${PERL_EXPORT_PHASE_FUNCTIONS} is not supported by perl-module.eclass" |
72 |
+ die "EAPI=${EAPI} is not supported by perl-module.eclass" |
73 |
;; |
74 |
esac |