1 |
commit: ff5c04761b1534110b752bddfe904114cd42f430 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 12 15:14:13 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 12 15:14:13 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff5c0476 |
7 |
|
8 |
sys-devel/patch: Rev bump to fix test suite |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
.../patch/files/patch-2.7.6-fix-test-suite.patch | 120 +++++++++++++++++++++ |
13 |
.../{patch-2.7.6.ebuild => patch-2.7.6-r1.ebuild} | 2 + |
14 |
2 files changed, 122 insertions(+) |
15 |
|
16 |
diff --git a/sys-devel/patch/files/patch-2.7.6-fix-test-suite.patch b/sys-devel/patch/files/patch-2.7.6-fix-test-suite.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..3aff5c0f77b |
19 |
--- /dev/null |
20 |
+++ b/sys-devel/patch/files/patch-2.7.6-fix-test-suite.patch |
21 |
@@ -0,0 +1,120 @@ |
22 |
+http://git.savannah.gnu.org/cgit/patch.git/commit/?id=f6bc5b14bd193859851d15a049bafb1007acd288 |
23 |
+http://git.savannah.gnu.org/cgit/patch.git/commit/?id=074e2395f81d0ecaa66b71a6c228c70b49db72e5 |
24 |
+ |
25 |
+--- a/tests/crlf-handling |
26 |
++++ b/tests/crlf-handling |
27 |
+@@ -14,7 +14,7 @@ use_local_patch |
28 |
+ use_tmpdir |
29 |
+ |
30 |
+ lf2crlf() { |
31 |
+- while read l; do echo -e "$l\r"; done |
32 |
++ while read l; do printf "%s\r\n" "$l"; done |
33 |
+ } |
34 |
+ |
35 |
+ echo 1 > a |
36 |
+--- a/tests/git-cleanup |
37 |
++++ b/tests/git-cleanup |
38 |
+@@ -36,8 +36,8 @@ BAD PATCH |
39 |
+ EOF |
40 |
+ |
41 |
+ echo 1 > f |
42 |
+-echo -n '' > g |
43 |
+-echo -n '' > h |
44 |
++printf '' > g |
45 |
++printf '' > h |
46 |
+ |
47 |
+ check 'patch -f -i 1.diff || echo status: $?' <<EOF |
48 |
+ patching file f |
49 |
+--- a/tests/merge |
50 |
++++ b/tests/merge |
51 |
+@@ -30,30 +30,28 @@ x2() { |
52 |
+ while test $# -gt 0 && test "$1" != -- ; do |
53 |
+ echo "$1" |
54 |
+ shift |
55 |
+- done > a.sed |
56 |
+- echo "$body" | sed -f a.sed > b |
57 |
++ done > b.sed |
58 |
++ echo "$body" | sed -f b.sed > b |
59 |
+ shift |
60 |
+ while test $# -gt 0 ; do |
61 |
+ echo "$1" |
62 |
+ shift |
63 |
+- done > b.sed |
64 |
+- echo "$body" | sed -f b.sed > c |
65 |
+- rm -f a.sed b.sed |
66 |
++ done > c.sed |
67 |
++ echo "$body" | sed -f c.sed > c |
68 |
++ rm -f b.sed c.sed |
69 |
+ output=`diff -u a b | patch $ARGS -f c` |
70 |
+ status=$? |
71 |
+ echo "$output" | sed -e '/^$/d' -e '/^patching file c$/d' |
72 |
+ cat c |
73 |
+- test $status == 0 || echo "Status: $status" |
74 |
++ test $status = 0 || echo "Status: $status" |
75 |
+ } |
76 |
+ |
77 |
+ x() { |
78 |
+- ARGS="$ARGS --merge" x2 "$@" |
79 |
++ ARGS="--merge" x2 "$@" |
80 |
+ echo |
81 |
+- ARGS="$ARGS --merge=diff3" x2 "$@" |
82 |
++ ARGS="--merge=diff3" x2 "$@" |
83 |
+ } |
84 |
+ |
85 |
+-unset ARGS |
86 |
+- |
87 |
+ # ============================================================== |
88 |
+ |
89 |
+ check 'x 3' <<EOF |
90 |
+--- a/tests/test-lib.sh |
91 |
++++ b/tests/test-lib.sh |
92 |
+@@ -41,7 +41,7 @@ use_local_patch() { |
93 |
+ |
94 |
+ eval 'patch() { |
95 |
+ if test -n "$GDB" ; then |
96 |
+- echo -e "\n" >&3 |
97 |
++ printf "\n\n" >&3 |
98 |
+ gdbserver localhost:53153 $PATCH "$@" 2>&3 |
99 |
+ else |
100 |
+ $PATCH "$@" |
101 |
+@@ -113,22 +113,15 @@ cleanup() { |
102 |
+ exit $status |
103 |
+ } |
104 |
+ |
105 |
+-if test -z "`echo -n`"; then |
106 |
+- if eval 'test -n "${BASH_LINENO[0]}" 2>/dev/null'; then |
107 |
+- eval ' |
108 |
+- _start_test() { |
109 |
+- echo -n "[${BASH_LINENO[2]}] $* -- " |
110 |
+- }' |
111 |
+- else |
112 |
+- eval ' |
113 |
+- _start_test() { |
114 |
+- echo -n "* $* -- " |
115 |
+- }' |
116 |
+- fi |
117 |
++if eval 'test -n "${BASH_LINENO[0]}" 2>/dev/null'; then |
118 |
++ eval ' |
119 |
++ _start_test() { |
120 |
++ printf "[${BASH_LINENO[2]}] %s -- " "$*" |
121 |
++ }' |
122 |
+ else |
123 |
+ eval ' |
124 |
+ _start_test() { |
125 |
+- echo "* $*" |
126 |
++ printf "* %s -- " "$*" |
127 |
+ }' |
128 |
+ fi |
129 |
+ |
130 |
+--- a/tests/merge |
131 |
++++ b/tests/merge |
132 |
+@@ -32,7 +32,7 @@ x2() { |
133 |
+ shift |
134 |
+ done > b.sed |
135 |
+ echo "$body" | sed -f b.sed > b |
136 |
+- shift |
137 |
++ test $# -eq 0 || shift |
138 |
+ while test $# -gt 0 ; do |
139 |
+ echo "$1" |
140 |
+ shift |
141 |
+-- |
142 |
|
143 |
diff --git a/sys-devel/patch/patch-2.7.6.ebuild b/sys-devel/patch/patch-2.7.6-r1.ebuild |
144 |
similarity index 94% |
145 |
rename from sys-devel/patch/patch-2.7.6.ebuild |
146 |
rename to sys-devel/patch/patch-2.7.6-r1.ebuild |
147 |
index b16c1511b88..388826a546a 100644 |
148 |
--- a/sys-devel/patch/patch-2.7.6.ebuild |
149 |
+++ b/sys-devel/patch/patch-2.7.6-r1.ebuild |
150 |
@@ -18,6 +18,8 @@ RDEPEND="xattr? ( sys-apps/attr )" |
151 |
DEPEND="${RDEPEND} |
152 |
test? ( sys-apps/ed )" |
153 |
|
154 |
+PATCHES=( "${FILESDIR}"/${P}-fix-test-suite.patch ) |
155 |
+ |
156 |
src_configure() { |
157 |
use static && append-ldflags -static |