Gentoo Archives: gentoo-commits

From: "Vladimir Smirnov (civil)" <civil@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/perl/files/eblits: src_prepare-v50180002.eblit
Date: Wed, 30 Apr 2014 14:47:57
Message-Id: 20140430144753.AB07B2004B@flycatcher.gentoo.org
1 civil 14/04/30 14:47:53
2
3 Added: src_prepare-v50180002.eblit
4 Log:
5 Add fixes for gentoo-freebsd prefix and freemint prefix.
6 Should fix 464784 and 507182
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xA832680F)
9
10 Revision Changes Path
11 1.1 dev-lang/perl/files/eblits/src_prepare-v50180002.eblit
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/src_prepare-v50180002.eblit?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/perl/files/eblits/src_prepare-v50180002.eblit?rev=1.1&content-type=text/plain
15
16 Index: src_prepare-v50180002.eblit
17 ===================================================================
18 # Copyright 1999-2014 Gentoo Foundation
19 # Distributed under the terms of the GNU General Public License v2
20 # $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/files/eblits/src_prepare-v50180002.eblit,v 1.1 2014/04/30 14:47:53 civil Exp $
21
22 src_prepare_update_patchlevel_h() {
23 # Copied and modified from debian:
24 # Copyright 2011 Niko Tyni
25 # This program is free software; you can redistribute it and/or modify
26 # it under the same terms as Perl itself.
27 local patchdir="${WORKDIR}/patches"
28 local prefix
29
30 [[ -f ${patchdir}/series ]] || return 0
31
32 while read patch
33 do
34 patchname=$(echo $patch | sed 's/\.diff$//')
35 < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
36
37 # massage the patch headers
38 s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
39 s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
40 s|^Bug-Gentoo: ||; tprepend;
41 s/^\(Subject\|Description\): //; tappend;
42 s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
43
44 # post-process at the end of input
45 $ { x;
46 # include the version number in the patchlevel.h description (if available)
47 s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
48
49 # escape any backslashes and double quotes
50 s|\\|\\\\|g; s|"|\\"|g;
51
52 # add a prefix
53 s|^|\t,"'"$prefix$patchname"' - |;
54 # newlines away
55 s/\n/ /g; s/ */ /g;
56 # add a suffix
57 s/ *$/"/; p
58 };
59 # stop all processing
60 d;
61 # label: append to the hold space
62 :append H; d;
63 # label: prepend to the hold space
64 :prepend x; H; d;
65 '
66 done < "${WORKDIR}"/patches/series > "${S}"/patchlevel-gentoo.h
67 }
68
69 eblit-perl-src_prepare() {
70 local patch
71 EPATCH_OPTS+=" -p1"
72 einfo "Applying patches from ${MY_P}-patches-${PATCH_VER} ..."
73 while read patch ; do
74 EPATCH_SINGLE_MSG=" ${patch} ..."
75 epatch "${WORKDIR}"/patches/${patch}
76 done < "${WORKDIR}"/patches/series
77
78 src_prepare_update_patchlevel_h
79
80 # pod/perltoc.pod fails
81 # lib/ExtUtils/t/Embed.t fails
82 if ! tc-is-static-only ; then
83 ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
84 ln -s ${LIBPERL} libperl$(get_libname ) || die
85 fi
86 }