1 |
commit: 18402f2ef1d009c5141c7dd628ab1cc7edea2d91 |
2 |
Author: Stephan Hartmann <stha09 <AT> googlemail <DOT> com> |
3 |
AuthorDate: Tue Feb 18 15:31:45 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 10 19:35:44 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18402f2e |
7 |
|
8 |
sys-apps/heirloom-tools: fix building with glibc 2.30 |
9 |
|
10 |
While at it, fix patching with fuzz. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/692770 |
13 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
14 |
Signed-off-by: Stephan Hartmann <stha09 <AT> googlemail.com> |
15 |
Closes: https://github.com/gentoo/gentoo/pull/14693 |
16 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
17 |
|
18 |
.../files/heirloom-tools-070715-glibc-2.30.patch | 13 ++++ |
19 |
.../files/heirloom-tools-070715-major.patch | 70 +++++++++++++++++++++- |
20 |
.../heirloom-tools/heirloom-tools-070715-r1.ebuild | 8 +-- |
21 |
3 files changed, 82 insertions(+), 9 deletions(-) |
22 |
|
23 |
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.30.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.30.patch |
24 |
new file mode 100644 |
25 |
index 00000000000..19b90cea6d2 |
26 |
--- /dev/null |
27 |
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.30.patch |
28 |
@@ -0,0 +1,13 @@ |
29 |
+diff --git a/shl/shl.c b/shl/shl.c |
30 |
+index 6f5c2df..30d296c 100644 |
31 |
+--- a/shl/shl.c |
32 |
++++ b/shl/shl.c |
33 |
+@@ -86,7 +86,7 @@ extern int sysv3; |
34 |
+ #include <libgen.h> |
35 |
+ #include <limits.h> |
36 |
+ #include <stdarg.h> |
37 |
+-#if !defined (__dietlibc__) && !defined (__UCLIBC__) |
38 |
++#if !defined (__dietlibc__) && !defined (__UCLIBC__) && !defined(__linux__) |
39 |
+ #include <stropts.h> |
40 |
+ #endif |
41 |
+ #include <poll.h> |
42 |
|
43 |
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch |
44 |
index 82d32315d81..81e6755e7e3 100644 |
45 |
--- a/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch |
46 |
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch |
47 |
@@ -1,6 +1,8 @@ |
48 |
+diff --git a/cpio/cpio.c b/cpio/cpio.c |
49 |
+index 89c5cbc..210287b 100644 |
50 |
--- a/cpio/cpio.c |
51 |
+++ b/cpio/cpio.c |
52 |
-@@ -91,9 +91,9 @@ |
53 |
+@@ -91,11 +91,12 @@ |
54 |
#include <sfile.h> |
55 |
#include <atoll.h> |
56 |
|
57 |
@@ -10,11 +12,45 @@ |
58 |
-#endif /* _AIX */ |
59 |
+#endif /* _AIX || __GLIBC__ */ |
60 |
|
61 |
- #ifndef major |
62 |
+-#ifndef major |
63 |
++#include <sys/sysmacros.h> |
64 |
++#if 0 |
65 |
#include <sys/mkdev.h> |
66 |
+ #endif /* !major */ |
67 |
+ |
68 |
+diff --git a/file/file.c b/file/file.c |
69 |
+index 6609734..d90af86 100644 |
70 |
+--- a/file/file.c |
71 |
++++ b/file/file.c |
72 |
+@@ -66,7 +66,8 @@ static const char sccsid[] USED = "@(#)file.sl 1.33 (gritter) 4/14/06"; |
73 |
+ #include <fcntl.h> |
74 |
+ #include <libgen.h> |
75 |
+ #include <inttypes.h> |
76 |
+-#ifndef major |
77 |
++#include <sys/sysmacros.h> |
78 |
++#if 0 |
79 |
+ #include <sys/mkdev.h> |
80 |
+ #endif |
81 |
+ #include "iblok.h" |
82 |
+diff --git a/find/find.c b/find/find.c |
83 |
+index fac70f0..28e1b7f 100644 |
84 |
+--- a/find/find.c |
85 |
++++ b/find/find.c |
86 |
+@@ -83,7 +83,8 @@ static const char sccsid[] USED = "@(#)find.sl 1.45 (gritter) 5/8/06"; |
87 |
+ #ifdef _AIX |
88 |
+ #include <sys/sysmacros.h> |
89 |
+ #endif |
90 |
+-#ifndef major |
91 |
++#include <sys/sysmacros.h> |
92 |
++#if 0 |
93 |
+ #include <sys/mkdev.h> |
94 |
+ #endif |
95 |
+ #if __NetBSD_Version__>= 300000000 |
96 |
+diff --git a/ls/ls.c b/ls/ls.c |
97 |
+index e4480d0..17186ba 100644 |
98 |
--- a/ls/ls.c |
99 |
+++ b/ls/ls.c |
100 |
-@@ -119,7 +119,7 @@ |
101 |
+@@ -119,7 +119,7 @@ static char ifmt_c[] = "-pc-d-b--nl-SD--"; |
102 |
#include <termcap.h> |
103 |
#endif /* USE_TERMCAP */ |
104 |
|
105 |
@@ -23,3 +59,31 @@ |
106 |
#include <sys/sysmacros.h> |
107 |
#endif |
108 |
|
109 |
+diff --git a/mknod/mknod.c b/mknod/mknod.c |
110 |
+index b772b88..f465883 100644 |
111 |
+--- a/mknod/mknod.c |
112 |
++++ b/mknod/mknod.c |
113 |
+@@ -45,7 +45,8 @@ static const char sccsid[] USED = "@(#)mknod.sl 1.8 (gritter) 5/29/05"; |
114 |
+ #include <string.h> |
115 |
+ #include <limits.h> |
116 |
+ #include <unistd.h> |
117 |
+-#ifndef major |
118 |
++#include <sys/sysmacros.h> |
119 |
++#if 0 |
120 |
+ #include <sys/mkdev.h> |
121 |
+ #endif /* !major */ |
122 |
+ |
123 |
+diff --git a/tar/tar.c b/tar/tar.c |
124 |
+index 2d3dada..a8f1ccb 100644 |
125 |
+--- a/tar/tar.c |
126 |
++++ b/tar/tar.c |
127 |
+@@ -98,7 +98,8 @@ static const char sccsid[] USED = "@(#)tar.sl 1.177 (gritter) 4/14/07"; |
128 |
+ #include <sys/sysmacros.h> |
129 |
+ #endif |
130 |
+ |
131 |
+-#ifndef major |
132 |
++#include <sys/sysmacros.h> |
133 |
++#if 0 |
134 |
+ #include <sys/mkdev.h> |
135 |
+ #endif /* !major */ |
136 |
+ |
137 |
|
138 |
diff --git a/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild b/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild |
139 |
index 9d55edab0b4..80d2232221a 100644 |
140 |
--- a/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild |
141 |
+++ b/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild |
142 |
@@ -1,4 +1,4 @@ |
143 |
-# Copyright 1999-2018 Gentoo Foundation |
144 |
+# Copyright 1999-2020 Gentoo Authors |
145 |
# Distributed under the terms of the GNU General Public License v2 |
146 |
|
147 |
EAPI=6 |
148 |
@@ -23,16 +23,12 @@ DEPEND=" |
149 |
S="${WORKDIR}/heirloom-${PV}" |
150 |
PATCHES=( |
151 |
"${FILESDIR}"/${P}-major.patch |
152 |
+ "${FILESDIR}"/${P}-glibc-2.30.patch |
153 |
) |
154 |
|
155 |
# slightly broken |
156 |
RESTRICT="test" |
157 |
|
158 |
-src_prepare() { |
159 |
- find . -name '*.c' -exec sed -i -e 's|#ifndef[[:space:]]*major|#include <sys/sysmacros.h>\n#if 0|g' {} + || die |
160 |
- |
161 |
- default |
162 |
-} |
163 |
src_compile() { |
164 |
append-cppflags -D_GNU_SOURCE |
165 |
emake -j1 \ |