From: Andreas K. Hüttel <dilfri...@gentoo.org> Signed-off-by: Andreas K. Hüttel <dilfri...@gentoo.org> --- eclass/perl-functions.eclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass index e7775f31b8e..e6168a07534 100644 --- a/eclass/perl-functions.eclass +++ b/eclass/perl-functions.eclass @@ -1,26 +1,26 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: perl-functions.eclass # @MAINTAINER: # p...@gentoo.org # @AUTHOR: # Seemant Kulleen <seem...@gentoo.org> # Andreas K. Huettel <dilfri...@gentoo.org> # Kent Fredric <ken...@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 +# @SUPPORTED_EAPIS: 5 6 7 # @BLURB: helper functions eclass for perl modules # @DESCRIPTION: # The perl-functions eclass is designed to allow easier installation of perl # modules, and their incorporation into the Gentoo Linux system. # It provides helper functions, no phases or variable manipulation in # global scope. [[ ${CATEGORY} == "perl-core" ]] && inherit alternatives case "${EAPI:-0}" in - 5|6) + 5|6|7) ;; *) die "EAPI=${EAPI} is not supported by perl-functions.eclass" ;; @@ -130,70 +130,70 @@ perl_delete_emptybsdir() { # @FUNCTION: perl_fix_packlist # @DESCRIPTION: # Look through ${D} for .packlist text files containing the temporary installation # folder (i.e. ${D}). If the pattern is found, silently replace it with `/'. # Remove duplicate entries; then validate all entries in the packlist against ${D} # and prune entries that do not correspond to installed files. perl_fix_packlist() { debug-print-function $FUNCNAME "$@" local packlist_temp="${T}/.gentoo_packlist_temp" find "${D}" -type f -name '.packlist' -print0 | while read -rd '' f ; do if file "${f}" | grep -q -i " text" ; then einfo "Fixing packlist file /${f#${D}}" # remove the temporary build dir path - sed -i -e "s:${D}:/:g" "${f}" + sed -i -e "s:${D%/}/:/:g" "${f}" # remove duplicate entries sort -u "${f}" > "${packlist_temp}" mv "${packlist_temp}" "${f}" # remove files that dont exist cat "${f}" | while read -r entry; do if [ ! -e "${D}/${entry}" ]; then einfo "Pruning surplus packlist entry ${entry}" grep -v -x -F "${entry}" "${f}" > "${packlist_temp}" mv "${packlist_temp}" "${f}" fi done fi done } # @FUNCTION: perl_remove_temppath # @DESCRIPTION: # Look through ${D} for text files containing the temporary installation # folder (i.e. ${D}). If the pattern is found, replace it with `/' and warn. perl_remove_temppath() { debug-print-function $FUNCNAME "$@" find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do if file "${f}" | grep -q -i " text" ; then grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${f}" - sed -i -e "s:${D}:/:g" "${f}" + sed -i -e "s:${D%/}/:/:g" "${f}" fi done } # @FUNCTION: perl_rm_files # @USAGE: <list of files> # @DESCRIPTION: # Remove certain files from a Perl release and remove them from the MANIFEST # while we're there. # # Most useful in src_prepare for nuking bad tests, and is highly recommended # for any tests like 'pod.t', 'pod-coverage.t' or 'kwalitee.t', as what they # test is completely irrelevant to end users, and frequently fail simply # because the authors of Test::Pod... changed their recommendations, and thus # failures are only useful feedback to Authors, not users. # # Removing from MANIFEST also avoids needless log messages warning # users about files "missing from their kit". # # Example: # @CODE # src_test() { # perl_rm_files t/pod{,-coverage}.t # perl-module_src_test # } # @CODE -- 2.22.0