Gentoo Archives: gentoo-dev

From: dilfridge@g.o
To: gentoo-dev@l.g.o
Cc: "Andreas K. Hüttel" <dilfridge@g.o>
Subject: [gentoo-dev] [PATCH 2/3] perl-functions.eclass: Add new helpers for EAPI=8 ...
Date: Sat, 19 Jun 2021 11:03:28
Message-Id: 20210619110152.54307-2-dilfridge@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/3] readme.gentoo-r1.eclass: works just fine with EAPI=8 by dilfridge@gentoo.org
1 From: Andreas K. Hüttel <dilfridge@g.o>
2
3 ... and fix an existing one.
4
5 fperms works on ${D} by default, so we can give it / to operate on.
6
7 Bug: https://bugs.gentoo.org/554346
8 Bug: https://bugs.gentoo.org/733020
9 Signed-off-by: Andreas K. Hüttel <dilfridge@g.o>
10 ---
11 eclass/perl-functions.eclass | 35 ++++++++++++++++++++++++++++++++---
12 1 file changed, 32 insertions(+), 3 deletions(-)
13
14 diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
15 index 8633f384f1bf..d0a082797265 100644
16 --- a/eclass/perl-functions.eclass
17 +++ b/eclass/perl-functions.eclass
18 @@ -8,7 +8,7 @@
19 # Seemant Kulleen <seemant@g.o>
20 # Andreas K. Huettel <dilfridge@g.o>
21 # Kent Fredric <kentnl@g.o>
22 -# @SUPPORTED_EAPIS: 5 6 7
23 +# @SUPPORTED_EAPIS: 5 6 7 8
24 # @BLURB: helper functions eclass for perl modules
25 # @DESCRIPTION:
26 # The perl-functions eclass is designed to allow easier installation of perl
27 @@ -19,7 +19,7 @@
28 [[ ${CATEGORY} == "perl-core" ]] && inherit alternatives
29
30 case "${EAPI:-0}" in
31 - 5|6|7)
32 + 5|6|7|8)
33 ;;
34 *)
35 die "EAPI=${EAPI} is not supported by perl-functions.eclass"
36 @@ -134,7 +134,8 @@ perl_delete_emptybsdir() {
37 perl_fix_permissions() {
38 debug-print-function $FUNCNAME "$@"
39 perl_set_version
40 - fperms -R u+w "${D}"
41 + einfo Fixing installed file permissions
42 + fperms -R u+w /
43 }
44
45 # @FUNCTION: perl_fix_packlist
46 @@ -596,3 +597,31 @@ perl_domodule() {
47 insinto "/${target#/}"
48 doins "${doins_opts[@]}" "${files[@]}"
49 }
50 +
51 +# @FUNCTION: perl_get_wikiurl
52 +# @DESCRIPTION:
53 +# Convenience helper for returning the Gentoo Wiki maintenance page URL of a
54 +# package. Optionally a suffix can be passed for an in-page anchor.
55 +#
56 +# Example:
57 +# @CODE
58 +# my_url="$(perl_get_wikiurl Testing)"
59 +# @CODE
60 +
61 +perl_get_wikiurl() {
62 + debug-print-function $FUNCNAME "$@"
63 +
64 + if [[ "" == ${1} ]]; then
65 + echo "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}"
66 + else
67 + echo "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}#${1}"
68 + fi
69 +}
70 +
71 +perl_get_wikiurl_features() {
72 + perl_get_wikiurl Optional_Features
73 +}
74 +
75 +perl_get_wikiurl_tests() {
76 + perl_get_wikiurl Testing
77 +}
78 --
79 2.31.1

Replies