From bf5a838c18bc4dc5a98ac6dff5fa9c9dd3d68283 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 1 Mar 2022 14:30:51 +0100 Subject: [PATCH] eclass/perl-functions: Sync with gentoo It's from gentoo commit dcb3a8f170cae1fa08fc8ecb903b805d11ab6e9b. --- .../eclass/perl-functions.eclass | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/perl-functions.eclass b/sdk_container/src/third_party/portage-stable/eclass/perl-functions.eclass index e6168a0753..4adba92148 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/perl-functions.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/perl-functions.eclass @@ -8,7 +8,7 @@ # Seemant Kulleen # Andreas K. Huettel # Kent Fredric -# @SUPPORTED_EAPIS: 5 6 7 +# @SUPPORTED_EAPIS: 5 6 7 8 # @BLURB: helper functions eclass for perl modules # @DESCRIPTION: # The perl-functions eclass is designed to allow easier installation of perl @@ -19,7 +19,7 @@ [[ ${CATEGORY} == "perl-core" ]] && inherit alternatives case "${EAPI:-0}" in - 5|6|7) + 5|6|7|8) ;; *) die "EAPI=${EAPI} is not supported by perl-functions.eclass" @@ -127,6 +127,17 @@ perl_delete_emptybsdir() { fi } +# @FUNCTION: perl_fix_permissions +# @DESCRIPTION: +# Make all of ${D} user-writable, since EU::MM does silly things with +# the w bit. See bug 554346. +perl_fix_permissions() { + debug-print-function $FUNCNAME "$@" + perl_set_version + einfo Fixing installed file permissions + fperms -R u+w / +} + # @FUNCTION: perl_fix_packlist # @DESCRIPTION: # Look through ${D} for .packlist text files containing the temporary installation @@ -586,3 +597,31 @@ perl_domodule() { insinto "/${target#/}" doins "${doins_opts[@]}" "${files[@]}" } + +# @FUNCTION: perl_get_wikiurl +# @DESCRIPTION: +# Convenience helper for returning the Gentoo Wiki maintenance page URL of a +# package. Optionally a suffix can be passed for an in-page anchor. +# +# Example: +# @CODE +# my_url="$(perl_get_wikiurl Testing)" +# @CODE + +perl_get_wikiurl() { + debug-print-function $FUNCNAME "$@" + + if [[ -z "${1}" ]]; then + echo "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}" + else + echo "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}#${1}" + fi +} + +perl_get_wikiurl_features() { + perl_get_wikiurl Optional_Features +} + +perl_get_wikiurl_tests() { + perl_get_wikiurl Testing +}