1 |
From: Andreas K. Hüttel <dilfridge@g.o> |
2 |
|
3 |
Signed-off-by: Andreas K. Hüttel <dilfridge@g.o> |
4 |
--- |
5 |
eclass/perl-functions.eclass | 10 +++++----- |
6 |
1 file changed, 5 insertions(+), 5 deletions(-) |
7 |
|
8 |
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass |
9 |
index e7775f31b8e..e6168a07534 100644 |
10 |
--- a/eclass/perl-functions.eclass |
11 |
+++ b/eclass/perl-functions.eclass |
12 |
@@ -1,26 +1,26 @@ |
13 |
-# Copyright 1999-2015 Gentoo Foundation |
14 |
+# Copyright 1999-2019 Gentoo Authors |
15 |
# Distributed under the terms of the GNU General Public License v2 |
16 |
|
17 |
# @ECLASS: perl-functions.eclass |
18 |
# @MAINTAINER: |
19 |
# perl@g.o |
20 |
# @AUTHOR: |
21 |
# Seemant Kulleen <seemant@g.o> |
22 |
# Andreas K. Huettel <dilfridge@g.o> |
23 |
# Kent Fredric <kentnl@g.o> |
24 |
-# @SUPPORTED_EAPIS: 5 6 |
25 |
+# @SUPPORTED_EAPIS: 5 6 7 |
26 |
# @BLURB: helper functions eclass for perl modules |
27 |
# @DESCRIPTION: |
28 |
# The perl-functions eclass is designed to allow easier installation of perl |
29 |
# modules, and their incorporation into the Gentoo Linux system. |
30 |
# It provides helper functions, no phases or variable manipulation in |
31 |
# global scope. |
32 |
|
33 |
[[ ${CATEGORY} == "perl-core" ]] && inherit alternatives |
34 |
|
35 |
case "${EAPI:-0}" in |
36 |
- 5|6) |
37 |
+ 5|6|7) |
38 |
;; |
39 |
*) |
40 |
die "EAPI=${EAPI} is not supported by perl-functions.eclass" |
41 |
;; |
42 |
@@ -130,70 +130,70 @@ perl_delete_emptybsdir() { |
43 |
# @FUNCTION: perl_fix_packlist |
44 |
# @DESCRIPTION: |
45 |
# Look through ${D} for .packlist text files containing the temporary installation |
46 |
# folder (i.e. ${D}). If the pattern is found, silently replace it with `/'. |
47 |
# Remove duplicate entries; then validate all entries in the packlist against ${D} |
48 |
# and prune entries that do not correspond to installed files. |
49 |
perl_fix_packlist() { |
50 |
debug-print-function $FUNCNAME "$@" |
51 |
|
52 |
local packlist_temp="${T}/.gentoo_packlist_temp" |
53 |
find "${D}" -type f -name '.packlist' -print0 | while read -rd '' f ; do |
54 |
if file "${f}" | grep -q -i " text" ; then |
55 |
einfo "Fixing packlist file /${f#${D}}" |
56 |
|
57 |
# remove the temporary build dir path |
58 |
- sed -i -e "s:${D}:/:g" "${f}" |
59 |
+ sed -i -e "s:${D%/}/:/:g" "${f}" |
60 |
|
61 |
# remove duplicate entries |
62 |
sort -u "${f}" > "${packlist_temp}" |
63 |
mv "${packlist_temp}" "${f}" |
64 |
|
65 |
# remove files that dont exist |
66 |
cat "${f}" | while read -r entry; do |
67 |
if [ ! -e "${D}/${entry}" ]; then |
68 |
einfo "Pruning surplus packlist entry ${entry}" |
69 |
grep -v -x -F "${entry}" "${f}" > "${packlist_temp}" |
70 |
mv "${packlist_temp}" "${f}" |
71 |
fi |
72 |
done |
73 |
fi |
74 |
done |
75 |
} |
76 |
|
77 |
# @FUNCTION: perl_remove_temppath |
78 |
# @DESCRIPTION: |
79 |
# Look through ${D} for text files containing the temporary installation |
80 |
# folder (i.e. ${D}). If the pattern is found, replace it with `/' and warn. |
81 |
perl_remove_temppath() { |
82 |
debug-print-function $FUNCNAME "$@" |
83 |
|
84 |
find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do |
85 |
if file "${f}" | grep -q -i " text" ; then |
86 |
grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${f}" |
87 |
- sed -i -e "s:${D}:/:g" "${f}" |
88 |
+ sed -i -e "s:${D%/}/:/:g" "${f}" |
89 |
fi |
90 |
done |
91 |
} |
92 |
|
93 |
# @FUNCTION: perl_rm_files |
94 |
# @USAGE: <list of files> |
95 |
# @DESCRIPTION: |
96 |
# Remove certain files from a Perl release and remove them from the MANIFEST |
97 |
# while we're there. |
98 |
# |
99 |
# Most useful in src_prepare for nuking bad tests, and is highly recommended |
100 |
# for any tests like 'pod.t', 'pod-coverage.t' or 'kwalitee.t', as what they |
101 |
# test is completely irrelevant to end users, and frequently fail simply |
102 |
# because the authors of Test::Pod... changed their recommendations, and thus |
103 |
# failures are only useful feedback to Authors, not users. |
104 |
# |
105 |
# Removing from MANIFEST also avoids needless log messages warning |
106 |
# users about files "missing from their kit". |
107 |
# |
108 |
# Example: |
109 |
# @CODE |
110 |
# src_test() { |
111 |
# perl_rm_files t/pod{,-coverage}.t |
112 |
# perl-module_src_test |
113 |
# } |
114 |
# @CODE |
115 |
-- |
116 |
2.22.0 |