1 |
From: Andreas K. Hüttel <dilfridge@g.o> |
2 |
|
3 |
Signed-off-by: Andreas K. Hüttel <dilfridge@g.o> |
4 |
--- |
5 |
eclass/perl-module.eclass | 30 +++++++++++++++--------------- |
6 |
1 file changed, 15 insertions(+), 15 deletions(-) |
7 |
|
8 |
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass |
9 |
index 20b9947caca..81f79992d76 100644 |
10 |
--- a/eclass/perl-module.eclass |
11 |
+++ b/eclass/perl-module.eclass |
12 |
@@ -1,19 +1,19 @@ |
13 |
-# Copyright 1999-2015 Gentoo Foundation |
14 |
+# Copyright 1999-2019 Gentoo Authors |
15 |
# Distributed under the terms of the GNU General Public License v2 |
16 |
|
17 |
# @ECLASS: perl-module.eclass |
18 |
# @MAINTAINER: |
19 |
# perl@g.o |
20 |
# @AUTHOR: |
21 |
# Seemant Kulleen <seemant@g.o> |
22 |
# Andreas K. Hüttel <dilfridge@g.o> |
23 |
-# @SUPPORTED_EAPIS: 5 6 |
24 |
+# @SUPPORTED_EAPIS: 5 6 7 |
25 |
# @BLURB: eclass for installing Perl module distributions |
26 |
# @DESCRIPTION: |
27 |
# The perl-module eclass is designed to allow easier installation of Perl |
28 |
# module distributions, and their incorporation into the Gentoo Linux system. |
29 |
# All exported functions from perl-functions.eclass (inherited here) |
30 |
# explicitly also belong to the interface of perl-module.eclass. |
31 |
# If your package does not use any Perl-specific build system (as, e.g., |
32 |
# ExtUtils::MakeMaker or Module::Build), we recommend to use perl-functions.eclass |
33 |
# instead. |
34 |
@@ -21,12 +21,12 @@ |
35 |
case ${EAPI:-0} in |
36 |
5) |
37 |
inherit eutils multiprocessing unpacker perl-functions |
38 |
PERL_EXPF="src_unpack src_prepare src_configure src_compile src_test src_install" |
39 |
;; |
40 |
- 6) |
41 |
+ 6|7) |
42 |
inherit multiprocessing perl-functions |
43 |
PERL_EXPF="src_prepare src_configure src_compile src_test src_install" |
44 |
;; |
45 |
*) |
46 |
die "EAPI=${EAPI} is not supported by perl-module.eclass" |
47 |
;; |
48 |
@@ -44,61 +44,61 @@ esac |
49 |
case ${EAPI:-0} in |
50 |
5) |
51 |
[[ ${CATEGORY} == perl-core ]] && \ |
52 |
PERL_EXPF+=" pkg_postinst pkg_postrm" |
53 |
|
54 |
case "${GENTOO_DEPEND_ON_PERL:-yes}" in |
55 |
yes) |
56 |
case "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" in |
57 |
yes) |
58 |
DEPEND="dev-lang/perl:=[-build(-)]" |
59 |
;; |
60 |
*) |
61 |
DEPEND="dev-lang/perl[-build(-)]" |
62 |
;; |
63 |
esac |
64 |
RDEPEND="${DEPEND}" |
65 |
;; |
66 |
esac |
67 |
|
68 |
case "${PERL_EXPORT_PHASE_FUNCTIONS:-yes}" in |
69 |
yes) |
70 |
EXPORT_FUNCTIONS ${PERL_EXPF} |
71 |
;; |
72 |
no) |
73 |
debug-print "PERL_EXPORT_PHASE_FUNCTIONS=no" |
74 |
;; |
75 |
*) |
76 |
die "PERL_EXPORT_PHASE_FUNCTIONS=${PERL_EXPORT_PHASE_FUNCTIONS} is not supported by perl-module.eclass" |
77 |
;; |
78 |
esac |
79 |
;; |
80 |
- 6) |
81 |
+ 6|7) |
82 |
[[ ${CATEGORY} == perl-core ]] && \ |
83 |
PERL_EXPF+=" pkg_postinst pkg_postrm" |
84 |
|
85 |
case "${GENTOO_DEPEND_ON_PERL:-yes}" in |
86 |
yes) |
87 |
DEPEND="dev-lang/perl:=" |
88 |
RDEPEND="dev-lang/perl:=" |
89 |
;; |
90 |
noslotop) |
91 |
DEPEND="dev-lang/perl" |
92 |
RDEPEND="dev-lang/perl" |
93 |
;; |
94 |
esac |
95 |
|
96 |
if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then |
97 |
- eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6. If you don't want a slot operator" |
98 |
+ eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later. If you don't want a slot operator" |
99 |
die "set GENTOO_DEPEND_ON_PERL=noslotop instead." |
100 |
fi |
101 |
|
102 |
if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then |
103 |
- eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6. Use perl-module.eclass if you need" |
104 |
+ eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later. Use perl-module.eclass if you need" |
105 |
die "phase functions, perl-functions.eclass if not." |
106 |
fi |
107 |
|
108 |
EXPORT_FUNCTIONS ${PERL_EXPF} |
109 |
;; |
110 |
*) |
111 |
die "EAPI=${EAPI:-0} is not supported by perl-module.eclass" |
112 |
;; |
113 |
@@ -107,43 +107,43 @@ esac |
114 |
LICENSE="${LICENSE:-|| ( Artistic GPL-1+ )}" |
115 |
|
116 |
# @ECLASS-VARIABLE: DIST_NAME |
117 |
# @DESCRIPTION: |
118 |
-# (EAPI=6) This variable provides a way to override PN for the calculation of S, |
119 |
+# (EAPI=6 and later) This variable provides a way to override PN for the calculation of S, |
120 |
# SRC_URI, and HOMEPAGE. Defaults to PN. |
121 |
|
122 |
# @ECLASS-VARIABLE: DIST_VERSION |
123 |
# @DESCRIPTION: |
124 |
-# (EAPI=6) This variable provides a way to override PV for the calculation of S and SRC_URI. |
125 |
+# (EAPI=6 and later) This variable provides a way to override PV for the calculation of S and SRC_URI. |
126 |
# Use it to provide the non-normalized, upstream version number. Defaults to PV. |
127 |
# Named MODULE_VERSION in EAPI=5. |
128 |
|
129 |
# @ECLASS-VARIABLE: DIST_A_EXT |
130 |
# @DESCRIPTION: |
131 |
-# (EAPI=6) This variable provides a way to override the distfile extension for the calculation of |
132 |
+# (EAPI=6 and later) This variable provides a way to override the distfile extension for the calculation of |
133 |
# SRC_URI. Defaults to tar.gz. Named MODULE_A_EXT in EAPI=5. |
134 |
|
135 |
# @ECLASS-VARIABLE: DIST_A |
136 |
# @DESCRIPTION: |
137 |
-# (EAPI=6) This variable provides a way to override the distfile name for the calculation of |
138 |
+# (EAPI=6 and later) This variable provides a way to override the distfile name for the calculation of |
139 |
# SRC_URI. Defaults to ${DIST_NAME}-${DIST_VERSION}.${DIST_A_EXT} Named MODULE_A in EAPI=5. |
140 |
|
141 |
# @ECLASS-VARIABLE: DIST_AUTHOR |
142 |
# @DEFAULT_UNSET |
143 |
# @DESCRIPTION: |
144 |
-# (EAPI=6) This variable sets the module author name for the calculation of |
145 |
+# (EAPI=6 and later) This variable sets the module author name for the calculation of |
146 |
# SRC_URI. Named MODULE_AUTHOR in EAPI=5. |
147 |
|
148 |
# @ECLASS-VARIABLE: DIST_SECTION |
149 |
# @DEFAULT_UNSET |
150 |
# @DESCRIPTION: |
151 |
-# (EAPI=6) This variable sets the module section for the calculation of |
152 |
+# (EAPI=6 and later) This variable sets the module section for the calculation of |
153 |
# SRC_URI. Only required in rare cases for very special snowflakes. |
154 |
# Named MODULE_SECTION in EAPI=5. |
155 |
|
156 |
# @ECLASS-VARIABLE: DIST_EXAMPLES |
157 |
# @DEFAULT_UNSET |
158 |
# @DESCRIPTION: |
159 |
-# (EAPI=6) This Bash array allows passing a list of example files to be installed |
160 |
+# (EAPI=6 and later) This Bash array allows passing a list of example files to be installed |
161 |
# in /usr/share/doc/${PF}/examples. If set before inherit, automatically adds |
162 |
# a use-flag examples, if not you'll have to add the useflag in your ebuild. |
163 |
# Examples are installed only if the useflag examples exists and is activated. |
164 |
@@ -287,54 +287,54 @@ perl-module_src_configure() { |
165 |
# @FUNCTION: perl-module_src_compile |
166 |
# @DESCRIPTION: |
167 |
# Compile the ebuild sources. |
168 |
# This function is to be called during the ebuild src_compile() phase. |
169 |
perl-module_src_compile() { |
170 |
debug-print-function $FUNCNAME "$@" |
171 |
perl_set_version |
172 |
|
173 |
if [[ $(declare -p mymake 2>&-) != "declare -a mymake="* ]]; then |
174 |
local mymake_local=(${mymake}) |
175 |
else |
176 |
local mymake_local=("${mymake[@]}") |
177 |
fi |
178 |
|
179 |
if [[ -f Build ]] ; then |
180 |
./Build build \ |
181 |
|| die "Compilation failed" |
182 |
elif [[ -f Makefile ]] ; then |
183 |
set -- \ |
184 |
OTHERLDFLAGS="${LDFLAGS}" \ |
185 |
"${mymake_local[@]}" |
186 |
einfo "emake" "$@" |
187 |
emake "$@" \ |
188 |
|| die "Compilation failed" |
189 |
# OPTIMIZE="${CFLAGS}" \ |
190 |
fi |
191 |
} |
192 |
|
193 |
# @ECLASS-VARIABLE: DIST_TEST |
194 |
# @DESCRIPTION: |
195 |
-# (EAPI=6) Variable that controls if tests are run in the test phase |
196 |
+# (EAPI=6 and later) Variable that controls if tests are run in the test phase |
197 |
# at all, and if yes under which conditions. Defaults to "do parallel" |
198 |
# If neither "do" nor "parallel" is recognized, tests are skipped. |
199 |
# (In EAPI=5 the variable is called SRC_TEST, defaults to "skip", and |
200 |
# recognizes fewer options.) |
201 |
# The following space-separated keywords are recognized: |
202 |
# do : run tests |
203 |
# parallel : run tests in parallel |
204 |
# verbose : increase test verbosity |
205 |
# network : do not try to disable network tests |
206 |
|
207 |
# @ECLASS-VARIABLE: DIST_TEST_OVERRIDE |
208 |
# @DEFAULT_UNSET |
209 |
# @DESCRIPTION: |
210 |
-# (EAPI=6) Variable that controls if tests are run in the test phase |
211 |
+# (EAPI=6 and later) Variable that controls if tests are run in the test phase |
212 |
# at all, and if yes under which conditions. It is intended for use in |
213 |
# make.conf or the environment by ebuild authors during testing, and |
214 |
# accepts the same values as DIST_TEST. If set, it overrides DIST_TEST |
215 |
# completely. DO NOT USE THIS IN EBUILDS! |
216 |
|
217 |
# @FUNCTION: perl-module_src-test |
218 |
# @DESCRIPTION: |
219 |
# This code attempts to work out your threadingness and runs tests |
220 |
# according to the settings of DIST_TEST using Test::Harness. |
221 |
-- |
222 |
2.22.0 |