Gentoo Archives: gentoo-dev

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