Gentoo Archives: gentoo-dev

From: David Seifert <soap@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH 1/2] perl-module.eclass: remove EAPI 6
Date: Thu, 14 Jul 2022 22:20:25
Message-Id: 20220714222011.7155-1-soap@gentoo.org
1 Signed-off-by: David Seifert <soap@g.o>
2 ---
3 eclass/perl-module.eclass | 105 ++++++++++----------------------------
4 1 file changed, 28 insertions(+), 77 deletions(-)
5
6 diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
7 index d1f9dc6ffcc..be484fb2539 100644
8 --- a/eclass/perl-module.eclass
9 +++ b/eclass/perl-module.eclass
10 @@ -7,7 +7,7 @@
11 # @AUTHOR:
12 # Seemant Kulleen <seemant@g.o>
13 # Andreas K. Hüttel <dilfridge@g.o>
14 -# @SUPPORTED_EAPIS: 6 7 8
15 +# @SUPPORTED_EAPIS: 7 8
16 # @PROVIDES: perl-functions
17 # @BLURB: eclass for installing Perl module distributions
18 # @DESCRIPTION:
19 @@ -20,7 +20,7 @@
20 # instead.
21
22 case ${EAPI} in
23 - 6|7)
24 + 7)
25 inherit multiprocessing perl-functions
26 PERL_EXPF="src_prepare src_configure src_compile src_test src_install"
27 ;;
28 @@ -39,39 +39,12 @@ esac
29 # This variable controls whether a runtime and build time dependency on
30 # dev-lang/perl is automatically added by the eclass. It defaults to yes.
31 # Set to no to disable, set to noslotop to add a perl dependency without
32 -# slot operator (EAPI=6). All packages installing into the vendor_perl
33 +# slot operator. All packages installing into the vendor_perl
34 # path must use yes here. (EAPI=8 and later) Also adds a test useflag,
35 # a use-conditional build time dependency on virtual/perl-Test-Simple, and
36 # the required RESTRICT setting.
37
38 case ${EAPI} in
39 - 6)
40 - [[ ${CATEGORY} == perl-core ]] && \
41 - PERL_EXPF+=" pkg_postinst pkg_postrm"
42 -
43 - case "${GENTOO_DEPEND_ON_PERL:-yes}" in
44 - yes)
45 - DEPEND="dev-lang/perl"
46 - RDEPEND="dev-lang/perl:="
47 - ;;
48 - noslotop)
49 - DEPEND="dev-lang/perl"
50 - RDEPEND="dev-lang/perl"
51 - ;;
52 - esac
53 -
54 - if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then
55 - eerror "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later. If you don't want a slot operator"
56 - die "set GENTOO_DEPEND_ON_PERL=noslotop instead."
57 - fi
58 -
59 - if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then
60 - eerror "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later. Use perl-module.eclass if you need"
61 - die "phase functions, perl-functions.eclass if not."
62 - fi
63 -
64 - EXPORT_FUNCTIONS ${PERL_EXPF}
65 - ;;
66 7)
67 [[ ${CATEGORY} == perl-core ]] && \
68 PERL_EXPF+=" pkg_postinst pkg_postrm"
69 @@ -90,11 +63,11 @@ case ${EAPI} in
70 esac
71
72 if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then
73 - die "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later."
74 + die "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned."
75 fi
76
77 if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then
78 - die "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later."
79 + die "PERL_EXPORT_PHASE_FUNCTIONS is banned."
80 fi
81
82 EXPORT_FUNCTIONS ${PERL_EXPF}
83 @@ -120,11 +93,11 @@ case ${EAPI} in
84 esac
85
86 if [[ "${GENTOO_DEPEND_ON_PERL_SUBSLOT:-yes}" != "yes" ]]; then
87 - die "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned in EAPI=6 and later."
88 + die "GENTOO_DEPEND_ON_PERL_SUBSLOT=no is banned."
89 fi
90
91 if [[ "${PERL_EXPORT_PHASE_FUNCTIONS}" ]]; then
92 - die "PERL_EXPORT_PHASE_FUNCTIONS is banned in EAPI=6 and later."
93 + die "PERL_EXPORT_PHASE_FUNCTIONS is banned."
94 fi
95
96 EXPORT_FUNCTIONS ${PERL_EXPF}
97 @@ -251,38 +224,20 @@ perl-module_src_configure() {
98 fi
99
100 if [[ ( ${PREFER_BUILDPL} == yes || ! -f Makefile.PL ) && -f Build.PL ]] ; then
101 - case ${EAPI} in
102 - 6)
103 - if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then
104 - einfo "Using Module::Build::Tiny"
105 - if [[ ${DEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then
106 - eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it."
107 - die " Add dev-perl/Module-Build-Tiny to DEPEND!"
108 - fi
109 - else
110 - einfo "Using Module::Build"
111 - if [[ ${DEPEND} != *virtual/perl-Module-Build* && ${DEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then
112 - eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it."
113 - die " Add dev-perl/Module-Build to DEPEND!"
114 - fi
115 - fi
116 - ;;
117 - *)
118 - if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then
119 - einfo "Using Module::Build::Tiny"
120 - if [[ ${BDEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then
121 - eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it."
122 - eerror " Add dev-perl/Module-Build-Tiny to BDEPEND!"
123 - fi
124 - else
125 - einfo "Using Module::Build"
126 - if [[ ${BDEPEND} != *virtual/perl-Module-Build* && ${BDEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then
127 - eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it."
128 - eerror " Add dev-perl/Module-Build to BDEPEND!"
129 - fi
130 - fi
131 - ;;
132 - esac
133 + if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL ; then
134 + einfo "Using Module::Build::Tiny"
135 + if [[ ${BDEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then
136 + eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it."
137 + eerror " Add dev-perl/Module-Build-Tiny to BDEPEND!"
138 + fi
139 + else
140 + einfo "Using Module::Build"
141 + if [[ ${BDEPEND} != *virtual/perl-Module-Build* && ${BDEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]] ; then
142 + eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it."
143 + eerror " Add dev-perl/Module-Build to BDEPEND!"
144 + fi
145 + fi
146 +
147 set -- \
148 --installdirs=vendor \
149 --libdoc= \
150 @@ -319,7 +274,7 @@ perl-module_src_compile() {
151 perl_set_version
152
153 case ${EAPI} in
154 - 6|7)
155 + 7)
156 if [[ $(declare -p mymake 2>&-) != "declare -a mymake="* ]]; then
157 local mymake_local=(${mymake})
158 else
159 @@ -338,10 +293,7 @@ perl-module_src_compile() {
160 set -- \
161 OTHERLDFLAGS="${LDFLAGS}" \
162 "${mymake_local[@]}"
163 - einfo "emake" "$@"
164 - emake "$@" \
165 - || die "Compilation failed"
166 -# OPTIMIZE="${CFLAGS}" \
167 + emake "$@"
168 fi
169 }
170
171 @@ -401,7 +353,7 @@ perl-module_src_test() {
172 fi
173
174 case ${EAPI} in
175 - 6|7)
176 + 7)
177 ;;
178 *)
179 if has 'tests' ${DIST_WIKI} ; then
180 @@ -416,7 +368,7 @@ perl-module_src_test() {
181 if [[ -f Build ]] ; then
182 ./Build test verbose=${my_test_verbose} || die "test failed"
183 elif [[ -f Makefile ]] ; then
184 - emake test TEST_VERBOSE=${my_test_verbose} || die "test failed"
185 + emake test TEST_VERBOSE=${my_test_verbose}
186 fi
187 }
188
189 @@ -447,12 +399,11 @@ perl-module_src_install() {
190 else
191 local myinst_local=("${myinst[@]}")
192 fi
193 - emake "${myinst_local[@]}" ${mytargets} \
194 - || die "emake ${myinst_local[@]} ${mytargets} failed"
195 + emake "${myinst_local[@]}" ${mytargets}
196 fi
197
198 case ${EAPI} in
199 - 6|7)
200 + 7)
201 ;;
202 *)
203 perl_fix_permissions
204 @@ -476,7 +427,7 @@ perl-module_src_install() {
205 perl_link_duallife_scripts
206
207 case ${EAPI} in
208 - 6|7)
209 + 7)
210 ;;
211 *)
212 if has 'features' ${DIST_WIKI} ; then
213 --
214 2.35.1

Replies

Subject Author
[gentoo-dev] [PATCH 2/2] perl-functions.eclass: remove EAPI 6 David Seifert <soap@g.o>