1 |
commit: 24682fa7ca762c19de50999d2f93f9969c5b2e5a |
2 |
Author: Gwendal Grignou <gwendal <AT> chromium <DOT> org> |
3 |
AuthorDate: Fri Jun 3 23:42:08 2016 +0000 |
4 |
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 3 23:50:38 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24682fa7 |
7 |
|
8 |
dev-lang/perl: Add patchlevel-gentoo to perl MANIFEST |
9 |
|
10 |
To allow miniperl compilation, patchlevel-gentoo.h must be in the MANIFEST. |
11 |
Configure uses this file to create the /host symlinks. |
12 |
|
13 |
Signed-off-by: Gwendal Grignou <gwendal <AT> chromium.org> |
14 |
|
15 |
Comment from Gentoo perl team: Being nice here and adding this commit which |
16 |
ended up without any further reasons or docs in our mailbox. I can't see how it |
17 |
could hurt. I can't really see any problem that it's supposed to fix |
18 |
either. Hey chromium team, more words please next time! |
19 |
|
20 |
.../perl/files/eblits/src_prepare-v50240002.eblit | 74 ++++++++++++++++++++++ |
21 |
dev-lang/perl/perl-5.24.0-r1.ebuild | 2 +- |
22 |
2 files changed, 75 insertions(+), 1 deletion(-) |
23 |
|
24 |
diff --git a/dev-lang/perl/files/eblits/src_prepare-v50240002.eblit b/dev-lang/perl/files/eblits/src_prepare-v50240002.eblit |
25 |
new file mode 100644 |
26 |
index 0000000..b30b1a5 |
27 |
--- /dev/null |
28 |
+++ b/dev-lang/perl/files/eblits/src_prepare-v50240002.eblit |
29 |
@@ -0,0 +1,74 @@ |
30 |
+# Copyright 1999-2016 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+# $Id$ |
33 |
+ |
34 |
+src_prepare_update_patchlevel_h() { |
35 |
+ # Copied and modified from debian: |
36 |
+ # Copyright 2011 Niko Tyni |
37 |
+ # This program is free software; you can redistribute it and/or modify |
38 |
+ # it under the same terms as Perl itself. |
39 |
+ local patchdir="${WORKDIR}/patches" |
40 |
+ local prefix |
41 |
+ local patchoutput="patchlevel-gentoo.h" |
42 |
+ |
43 |
+ [[ -f ${patchdir}/series ]] || return 0 |
44 |
+ |
45 |
+while read patch |
46 |
+do |
47 |
+ patchname=$(echo $patch | sed 's/\.diff$//') |
48 |
+ < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e ' |
49 |
+ |
50 |
+ # massage the patch headers |
51 |
+ s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend; |
52 |
+ s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend; |
53 |
+ s|^Bug-Gentoo: ||; tprepend; |
54 |
+ s/^\(Subject\|Description\): //; tappend; |
55 |
+ s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend; |
56 |
+ |
57 |
+ # post-process at the end of input |
58 |
+ $ { x; |
59 |
+ # include the version number in the patchlevel.h description (if available) |
60 |
+ s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/; |
61 |
+ |
62 |
+ # escape any backslashes and double quotes |
63 |
+ s|\\|\\\\|g; s|"|\\"|g; |
64 |
+ |
65 |
+ # add a prefix |
66 |
+ s|^|\t,"'"$prefix$patchname"' - |; |
67 |
+ # newlines away |
68 |
+ s/\n/ /g; s/ */ /g; |
69 |
+ # add a suffix |
70 |
+ s/ *$/"/; p |
71 |
+ }; |
72 |
+ # stop all processing |
73 |
+ d; |
74 |
+ # label: append to the hold space |
75 |
+ :append H; d; |
76 |
+ # label: prepend to the hold space |
77 |
+ :prepend x; H; d; |
78 |
+ ' |
79 |
+done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}" |
80 |
+echo "${patchoutput}" >> "${S}/MANIFEST" |
81 |
+} |
82 |
+ |
83 |
+eblit-perl-src_prepare() { |
84 |
+ local patch |
85 |
+ EPATCH_OPTS+=" -p1" |
86 |
+ einfo "Applying patches from ${MY_P}-${PATCH_VER} ..." |
87 |
+ while read patch ; do |
88 |
+ EPATCH_SINGLE_MSG=" ${patch} ..." |
89 |
+ epatch "${WORKDIR}"/patches/${patch} |
90 |
+ done < "${WORKDIR}"/patches/series |
91 |
+ |
92 |
+ src_prepare_update_patchlevel_h |
93 |
+ |
94 |
+ # pod/perltoc.pod fails |
95 |
+ # lib/ExtUtils/t/Embed.t fails |
96 |
+ if ! tc-is-static-only ; then |
97 |
+ ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die |
98 |
+ ln -s ${LIBPERL} libperl$(get_libname ) || die |
99 |
+ fi |
100 |
+ |
101 |
+ default |
102 |
+} |
103 |
+ |
104 |
|
105 |
diff --git a/dev-lang/perl/perl-5.24.0-r1.ebuild b/dev-lang/perl/perl-5.24.0-r1.ebuild |
106 |
index 1f34989..d63e0dc 100644 |
107 |
--- a/dev-lang/perl/perl-5.24.0-r1.ebuild |
108 |
+++ b/dev-lang/perl/perl-5.24.0-r1.ebuild |
109 |
@@ -102,7 +102,7 @@ eblit-run() { |
110 |
eblit-run-maybe eblit-$1-post |
111 |
} |
112 |
|
113 |
-src_prepare() { eblit-run src_prepare v50240001 ; } |
114 |
+src_prepare() { eblit-run src_prepare v50240002 ; } |
115 |
|
116 |
src_configure() { eblit-run src_configure v50240002 ; } |