1 |
commit: 8e5c9b1561465e616b0e48200de7d6345d793b1c |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 29 18:38:34 2016 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 29 18:54:00 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e5c9b15 |
7 |
|
8 |
sys-apps/toybox: misc build fixes from upstream |
9 |
|
10 |
sys-apps/toybox/files/toybox-0.7.0-includes.patch | 24 +++++++++++++ |
11 |
.../toybox/files/toybox-0.7.0-parallel-build.patch | 40 ++++++++++++++++++++++ |
12 |
sys-apps/toybox/files/toybox-0.7.0-sysmacros.patch | 28 +++++++++++++++ |
13 |
sys-apps/toybox/toybox-0.7.0.ebuild | 3 ++ |
14 |
4 files changed, 95 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/toybox/files/toybox-0.7.0-includes.patch b/sys-apps/toybox/files/toybox-0.7.0-includes.patch |
17 |
new file mode 100644 |
18 |
index 0000000..9a10e96 |
19 |
--- /dev/null |
20 |
+++ b/sys-apps/toybox/files/toybox-0.7.0-includes.patch |
21 |
@@ -0,0 +1,24 @@ |
22 |
+From 5e1c429eec977cd365f490137ca9dede0caef662 Mon Sep 17 00:00:00 2001 |
23 |
+From: Rob Landley <rob@×××××××.net> |
24 |
+Date: Fri, 5 Feb 2016 15:13:24 -0600 |
25 |
+Subject: [PATCH] Debian unstable is even more pedantic than previous debian. |
26 |
+ |
27 |
+--- |
28 |
+ scripts/mktags.c | 1 + |
29 |
+ 1 file changed, 1 insertion(+) |
30 |
+ |
31 |
+diff --git a/scripts/mktags.c b/scripts/mktags.c |
32 |
+index 3604260..9c23cf1 100644 |
33 |
+--- a/scripts/mktags.c |
34 |
++++ b/scripts/mktags.c |
35 |
+@@ -3,6 +3,7 @@ |
36 |
+ #include <stdio.h> |
37 |
+ #include <stdlib.h> |
38 |
+ #include <string.h> |
39 |
++#include <ctype.h> |
40 |
+ |
41 |
+ int main(int argc, char *argv[]) |
42 |
+ { |
43 |
+-- |
44 |
+2.6.2 |
45 |
+ |
46 |
|
47 |
diff --git a/sys-apps/toybox/files/toybox-0.7.0-parallel-build.patch b/sys-apps/toybox/files/toybox-0.7.0-parallel-build.patch |
48 |
new file mode 100644 |
49 |
index 0000000..ed0797c |
50 |
--- /dev/null |
51 |
+++ b/sys-apps/toybox/files/toybox-0.7.0-parallel-build.patch |
52 |
@@ -0,0 +1,40 @@ |
53 |
+fix from upstream for flaky parallel builds |
54 |
+ |
55 |
+From e17fbf19c4b48d763041761052e98c2b4ee95487 Mon Sep 17 00:00:00 2001 |
56 |
+From: Rob Landley <rob@×××××××.net> |
57 |
+Date: Fri, 26 Feb 2016 00:22:15 -0600 |
58 |
+Subject: [PATCH] Switch to $! for make.sh process enumeration. |
59 |
+ |
60 |
+--- |
61 |
+ scripts/make.sh | 8 ++++---- |
62 |
+ 1 file changed, 4 insertions(+), 4 deletions(-) |
63 |
+ |
64 |
+diff --git a/scripts/make.sh b/scripts/make.sh |
65 |
+index 84dda34..c73a03d 100755 |
66 |
+--- a/scripts/make.sh |
67 |
++++ b/scripts/make.sh |
68 |
+@@ -264,17 +264,17 @@ do |
69 |
+ LFILES="$LFILES $OUT" |
70 |
+ [ "$OUT" -nt "$i" ] && continue |
71 |
+ do_loudly $BUILD -c $i -o $OUT & |
72 |
++ PENDING="$PENDING $!" |
73 |
+ |
74 |
+ # ratelimit to $CPUS many parallel jobs, detecting errors |
75 |
+ |
76 |
+ while true |
77 |
+ do |
78 |
+- PENDING="$(echo $PENDING $(jobs -rp) | tr ' ' '\n' | sort -u)" |
79 |
+- [ $(echo -n "$PENDING" | wc -l) -lt "$CPUS" ] && break; |
80 |
++ [ $(echo "$PENDING" | wc -w) -lt "$CPUS" ] && break; |
81 |
+ |
82 |
+- wait $(echo "$PENDING" | head -n 1) |
83 |
++ wait $(echo "$PENDING" | awk '{print $1}') |
84 |
+ DONE=$(($DONE+$?)) |
85 |
+- PENDING="$(echo "$PENDING" | tail -n +2)" |
86 |
++ PENDING="$(echo "$PENDING" | sed 's/^ *[0-9]*//')" |
87 |
+ done |
88 |
+ [ $DONE -ne 0 ] && break |
89 |
+ done |
90 |
+-- |
91 |
+2.6.2 |
92 |
+ |
93 |
|
94 |
diff --git a/sys-apps/toybox/files/toybox-0.7.0-sysmacros.patch b/sys-apps/toybox/files/toybox-0.7.0-sysmacros.patch |
95 |
new file mode 100644 |
96 |
index 0000000..245ad23 |
97 |
--- /dev/null |
98 |
+++ b/sys-apps/toybox/files/toybox-0.7.0-sysmacros.patch |
99 |
@@ -0,0 +1,28 @@ |
100 |
+From 99e5c17b5fe5a93066e81cc6fcc7ebf386cb6183 Mon Sep 17 00:00:00 2001 |
101 |
+From: Mike Frysinger <vapier@g.o> |
102 |
+Date: Mon, 29 Feb 2016 13:35:05 -0500 |
103 |
+Subject: [PATCH] include sys/sysmacros.h |
104 |
+ |
105 |
+The major/minor macros are defined in sys/sysmacros.h. This has |
106 |
+historically been pulled in implicitly by sys/types.h, but C libs |
107 |
+are moving away from that as they aren't in POSIX. Use the header |
108 |
+directly as defined by BSD systems. |
109 |
+--- |
110 |
+ toys.h | 1 + |
111 |
+ 1 file changed, 1 insertion(+) |
112 |
+ |
113 |
+diff --git a/toys.h b/toys.h |
114 |
+index 8a29730..5e640a1 100644 |
115 |
+--- a/toys.h |
116 |
++++ b/toys.h |
117 |
+@@ -34,6 +34,7 @@ |
118 |
+ #include <sys/resource.h> |
119 |
+ #include <sys/stat.h> |
120 |
+ #include <sys/statvfs.h> |
121 |
++#include <sys/sysmacros.h> |
122 |
+ #include <sys/time.h> |
123 |
+ #include <sys/times.h> |
124 |
+ #include <sys/utsname.h> |
125 |
+-- |
126 |
+2.6.2 |
127 |
+ |
128 |
|
129 |
diff --git a/sys-apps/toybox/toybox-0.7.0.ebuild b/sys-apps/toybox/toybox-0.7.0.ebuild |
130 |
index 71beeaa..92688c3 100644 |
131 |
--- a/sys-apps/toybox/toybox-0.7.0.ebuild |
132 |
+++ b/sys-apps/toybox/toybox-0.7.0.ebuild |
133 |
@@ -26,6 +26,9 @@ SLOT="0" |
134 |
IUSE="" |
135 |
|
136 |
src_prepare() { |
137 |
+ epatch "${FILESDIR}"/${P}-parallel-build.patch |
138 |
+ epatch "${FILESDIR}"/${P}-includes.patch |
139 |
+ epatch "${FILESDIR}"/${P}-sysmacros.patch |
140 |
epatch_user |
141 |
restore_config .config |
142 |
} |