Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/bzip2/, app-arch/bzip2/files/
Date: Fri, 30 Apr 2021 19:38:37
Message-Id: 1619811450.00ea4635e5ed3267b79f544035f9cbff55550ce2.asturm@gentoo
1 commit: 00ea4635e5ed3267b79f544035f9cbff55550ce2
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 18 17:59:18 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 30 19:37:30 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00ea4635
7
8 app-arch/bzip2: Drop 1.0.6-r11 and 1.0.7-r1
9
10 Bug: https://bugs.gentoo.org/768546
11 Package-Manager: Portage-3.0.18, Repoman-3.0.3
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 app-arch/bzip2/Manifest | 2 -
15 app-arch/bzip2/bzip2-1.0.6-r11.ebuild | 118 ---------------------
16 app-arch/bzip2/bzip2-1.0.7-r1.ebuild | 115 --------------------
17 app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch | 21 ----
18 .../bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch | 18 ----
19 app-arch/bzip2/files/bzip2-1.0.6-mingw.patch | 27 -----
20 .../bzip2-1.0.6-nselectors-upper-bound-check.patch | 30 ------
21 .../files/bzip2-1.0.6-out-of-tree-build.patch | 79 --------------
22 app-arch/bzip2/files/bzip2-1.0.6-saneso.patch | 13 ---
23 app-arch/bzip2/files/bzip2-1.0.6-ubsan-error.patch | 24 -----
24 .../files/bzip2-1.0.7-out-of-tree-build.patch | 76 -------------
25 app-arch/bzip2/files/bzip2-1.0.7-saneso.patch | 13 ---
26 12 files changed, 536 deletions(-)
27
28 diff --git a/app-arch/bzip2/Manifest b/app-arch/bzip2/Manifest
29 index 697d1445ac9..a4b18f5d5bf 100644
30 --- a/app-arch/bzip2/Manifest
31 +++ b/app-arch/bzip2/Manifest
32 @@ -1,3 +1 @@
33 -DIST bzip2-1.0.6.tar.gz 782025 BLAKE2B b31533af7c71d715e6600874bb0a11b9b3aebbb08af0414a6d88bd5a2ad879a482ad408338159cb6c241815da8f48798d2ea7789ea971431d0be42ee827b0a7e SHA512 00ace5438cfa0c577e5f578d8a808613187eff5217c35164ffe044fbafdfec9e98f4192c02a7d67e01e5a5ccced630583ad1003c37697219b0f147343a3fdd12
34 -DIST bzip2-1.0.7.tar.gz 809680 BLAKE2B da185d9771dd83d59f2c13ea32e9a514ce50c97d69145ca2c4c8f28749fc85c1aec491c5100f4fc6b2183ee397015b7e74a0407dc1d7a360db159a0a3676fd7a SHA512 e0e19b493e6b1f7beeb0eeb0be8a6358c24202173f28acb1e902a768835be9e24f2cb966452fbc90fc3e4e692532ce0c7e86d06aef2d52c0d2a9ac16e12ec8c8
35 DIST bzip2-1.0.8.tar.gz 810029 BLAKE2B 22ab3acd84f4db8c3d6f59340c252faedfd4447cea00dafbd652e65b6cf8a20adf6835c22e58563004cfafdb15348c924996230b4b23cae42da5e25eeac4bdad SHA512 083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3
36
37 diff --git a/app-arch/bzip2/bzip2-1.0.6-r11.ebuild b/app-arch/bzip2/bzip2-1.0.6-r11.ebuild
38 deleted file mode 100644
39 index 1484da57cb9..00000000000
40 --- a/app-arch/bzip2/bzip2-1.0.6-r11.ebuild
41 +++ /dev/null
42 @@ -1,118 +0,0 @@
43 -# Copyright 1999-2021 Gentoo Authors
44 -# Distributed under the terms of the GNU General Public License v2
45 -
46 -# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
47 -# (since we're building shared libs) ...
48 -
49 -EAPI=6
50 -
51 -inherit toolchain-funcs multilib-minimal usr-ldscript
52 -
53 -DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
54 -HOMEPAGE="https://sourceware.org/bzip2/"
55 -SRC_URI="mirror://gentoo/${P}.tar.gz"
56 -
57 -LICENSE="BZIP2"
58 -SLOT="0/1" # subslot = SONAME
59 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
60 -IUSE="static static-libs"
61 -
62 -PATCHES=(
63 - "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
64 - "${FILESDIR}"/${PN}-1.0.6-saneso.patch
65 - "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
66 - "${FILESDIR}"/${PN}-1.0.6-progress.patch
67 - "${FILESDIR}"/${PN}-1.0.3-no-test.patch
68 - "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
69 - "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573
70 - "${FILESDIR}"/${PN}-1.0.6-out-of-tree-build.patch
71 - "${FILESDIR}"/${PN}-1.0.6-CVE-2016-3189.patch #620466
72 - "${FILESDIR}"/${PN}-1.0.6-ubsan-error.patch
73 - "${FILESDIR}"/${PN}-1.0.6-nselectors-upper-bound-check.patch
74 -)
75 -
76 -DOCS=( CHANGES README{,.COMPILATION.PROBLEMS,.XML.STUFF} manual.pdf )
77 -HTML_DOCS=( manual.html )
78 -
79 -src_prepare() {
80 - default
81 -
82 - # - Use right man path
83 - # - Generate symlinks instead of hardlinks
84 - # - pass custom variables to control libdir
85 - sed -i \
86 - -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
87 - -e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \
88 - -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
89 - Makefile || die
90 -}
91 -
92 -bemake() {
93 - emake \
94 - VPATH="${S}" \
95 - CC="$(tc-getCC)" \
96 - AR="$(tc-getAR)" \
97 - RANLIB="$(tc-getRANLIB)" \
98 - "$@"
99 -}
100 -
101 -multilib_src_compile() {
102 - bemake -f "${S}"/Makefile-libbz2_so all
103 - # Make sure we link against the shared lib #504648
104 - ln -s libbz2.so.${PV} libbz2.so || die
105 - bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')"
106 -}
107 -
108 -multilib_src_install() {
109 - into /usr
110 -
111 - # Install the shared lib manually. We install:
112 - # .x.x.x - standard shared lib behavior
113 - # .x.x - SONAME some distros use #338321
114 - # .x - SONAME Gentoo uses
115 - dolib.so libbz2.so.${PV}
116 - local v
117 - for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
118 - dosym libbz2.so.${PV} /usr/$(get_libdir)/${v}
119 - done
120 - use static-libs && dolib.a libbz2.a
121 -
122 - if multilib_is_native_abi ; then
123 - gen_usr_ldscript -a bz2
124 -
125 - dobin bzip2recover
126 - into /
127 - dobin bzip2
128 - fi
129 -}
130 -
131 -multilib_src_install_all() {
132 - # `make install` doesn't cope with out-of-tree builds, nor with
133 - # installing just non-binaries, so handle things ourselves.
134 - insinto /usr/include
135 - doins bzlib.h
136 - into /usr
137 - dobin bz{diff,grep,more}
138 - doman *.1
139 -
140 - dosym bzdiff /usr/bin/bzcmp
141 - dosym bzdiff.1 /usr/share/man/man1/bzcmp.1
142 -
143 - dosym bzmore /usr/bin/bzless
144 - dosym bzmore.1 /usr/share/man/man1/bzless.1
145 -
146 - local x
147 - for x in bunzip2 bzcat bzip2recover ; do
148 - dosym bzip2.1 /usr/share/man/man1/${x}.1
149 - done
150 - for x in bz{e,f}grep ; do
151 - dosym bzgrep /usr/bin/${x}
152 - dosym bzgrep.1 /usr/share/man/man1/${x}.1
153 - done
154 -
155 - einstalldocs
156 -
157 - # move "important" bzip2 binaries to /bin and use the shared libbz2.so
158 - dosym bzip2 /bin/bzcat
159 - dosym bzip2 /bin/bunzip2
160 -}
161
162 diff --git a/app-arch/bzip2/bzip2-1.0.7-r1.ebuild b/app-arch/bzip2/bzip2-1.0.7-r1.ebuild
163 deleted file mode 100644
164 index 37ab7244dad..00000000000
165 --- a/app-arch/bzip2/bzip2-1.0.7-r1.ebuild
166 +++ /dev/null
167 @@ -1,115 +0,0 @@
168 -# Copyright 1999-2020 Gentoo Authors
169 -# Distributed under the terms of the GNU General Public License v2
170 -
171 -# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
172 -# (since we're building shared libs) ...
173 -
174 -EAPI=7
175 -
176 -inherit toolchain-funcs multilib-minimal usr-ldscript
177 -
178 -DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
179 -HOMEPAGE="https://sourceware.org/bzip2/"
180 -SRC_URI="https://sourceware.org/pub/${PN}/${P}.tar.gz"
181 -
182 -LICENSE="BZIP2"
183 -SLOT="0/1" # subslot = SONAME
184 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
185 -IUSE="static static-libs"
186 -
187 -PATCHES=(
188 - "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
189 - "${FILESDIR}"/${PN}-1.0.7-saneso.patch
190 - "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
191 - "${FILESDIR}"/${PN}-1.0.6-progress.patch
192 - "${FILESDIR}"/${PN}-1.0.3-no-test.patch
193 - "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
194 - "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573
195 - "${FILESDIR}"/${PN}-1.0.7-out-of-tree-build.patch
196 -)
197 -
198 -DOCS=( CHANGES README{,.COMPILATION.PROBLEMS,.XML.STUFF} manual.pdf )
199 -HTML_DOCS=( manual.html )
200 -
201 -src_prepare() {
202 - default
203 -
204 - # - Use right man path
205 - # - Generate symlinks instead of hardlinks
206 - # - pass custom variables to control libdir
207 - sed -i \
208 - -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
209 - -e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \
210 - -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
211 - Makefile || die
212 -}
213 -
214 -bemake() {
215 - emake \
216 - VPATH="${S}" \
217 - CC="$(tc-getCC)" \
218 - AR="$(tc-getAR)" \
219 - RANLIB="$(tc-getRANLIB)" \
220 - "$@"
221 -}
222 -
223 -multilib_src_compile() {
224 - bemake -f "${S}"/Makefile-libbz2_so all
225 - # Make sure we link against the shared lib #504648
226 - ln -s libbz2.so.${PV} libbz2.so || die
227 - bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')"
228 -}
229 -
230 -multilib_src_install() {
231 - into /usr
232 -
233 - # Install the shared lib manually. We install:
234 - # .x.x.x - standard shared lib behavior
235 - # .x.x - SONAME some distros use #338321
236 - # .x - SONAME Gentoo uses
237 - dolib.so libbz2.so.${PV}
238 - local v
239 - for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
240 - dosym libbz2.so.${PV} /usr/$(get_libdir)/${v}
241 - done
242 - use static-libs && dolib.a libbz2.a
243 -
244 - if multilib_is_native_abi ; then
245 - gen_usr_ldscript -a bz2
246 -
247 - dobin bzip2recover
248 - into /
249 - dobin bzip2
250 - fi
251 -}
252 -
253 -multilib_src_install_all() {
254 - # `make install` doesn't cope with out-of-tree builds, nor with
255 - # installing just non-binaries, so handle things ourselves.
256 - insinto /usr/include
257 - doins bzlib.h
258 - into /usr
259 - dobin bz{diff,grep,more}
260 - doman *.1
261 -
262 - dosym bzdiff /usr/bin/bzcmp
263 - dosym bzdiff.1 /usr/share/man/man1/bzcmp.1
264 -
265 - dosym bzmore /usr/bin/bzless
266 - dosym bzmore.1 /usr/share/man/man1/bzless.1
267 -
268 - local x
269 - for x in bunzip2 bzcat bzip2recover ; do
270 - dosym bzip2.1 /usr/share/man/man1/${x}.1
271 - done
272 - for x in bz{e,f}grep ; do
273 - dosym bzgrep /usr/bin/${x}
274 - dosym bzgrep.1 /usr/share/man/man1/${x}.1
275 - done
276 -
277 - einstalldocs
278 -
279 - # move "important" bzip2 binaries to /bin and use the shared libbz2.so
280 - dosym bzip2 /bin/bzcat
281 - dosym bzip2 /bin/bunzip2
282 -}
283
284 diff --git a/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch b/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch
285 deleted file mode 100644
286 index 74f8df000b1..00000000000
287 --- a/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch
288 +++ /dev/null
289 @@ -1,21 +0,0 @@
290 -bzgrep uses !/bin/sh but then uses the bashism ${var//} so replace those
291 -with calls to sed so POSIX shells work
292 -
293 -http://bugs.gentoo.org/193365
294 -
295 ---- a/bzgrep
296 -+++ b/bzgrep
297 -@@ -63,10 +63,9 @@
298 - bzip2 -cdfq "$i" | $grep $opt "$pat"
299 - r=$?
300 - else
301 -- j=${i//\\/\\\\}
302 -- j=${j//|/\\|}
303 -- j=${j//&/\\&}
304 -- j=`printf "%s" "$j" | tr '\n' ' '`
305 -+ # the backslashes here are doubled up as we have to escape each one for the
306 -+ # shell and then escape each one for the sed expression
307 -+ j=`printf "%s" "${i}" | sed -e 's:\\\\:\\\\\\\\:g' -e 's:[|]:\\\\|:g' -e 's:[&]:\\\\&:g' | tr '\n' ' '`
308 - bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
309 - r=$?
310 - fi
311
312 diff --git a/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch b/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch
313 deleted file mode 100644
314 index b031c808fef..00000000000
315 --- a/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch
316 +++ /dev/null
317 @@ -1,18 +0,0 @@
318 -Upstream-Status: Backport
319 -https://bugzilla.suse.com/attachment.cgi?id=681334
320 -
321 -CVE: CVE-2016-3189
322 -Signed-off-by: Armin Kuster <akuster@××××××.com>
323 -
324 -Index: bzip2-1.0.6/bzip2recover.c
325 -===================================================================
326 ---- a/bzip2recover.c
327 -+++ b/bzip2recover.c
328 -@@ -457,6 +457,7 @@ Int32 main ( Int32 argc, Char** argv )
329 - bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
330 - bsPutUInt32 ( bsWr, blockCRC );
331 - bsClose ( bsWr );
332 -+ outFile = NULL;
333 - }
334 - if (wrBlock >= rbCtr) break;
335 - wrBlock++;
336
337 diff --git a/app-arch/bzip2/files/bzip2-1.0.6-mingw.patch b/app-arch/bzip2/files/bzip2-1.0.6-mingw.patch
338 deleted file mode 100644
339 index 51469ca4c96..00000000000
340 --- a/app-arch/bzip2/files/bzip2-1.0.6-mingw.patch
341 +++ /dev/null
342 @@ -1,27 +0,0 @@
343 -make it build for mingw targets
344 -
345 -https://bugs.gentoo.org/393573
346 -
347 ---- a/bzip2.c
348 -+++ b/bzip2.c
349 -@@ -129,7 +129,7 @@
350 - #if BZ_LCCWIN32
351 - # include <io.h>
352 - # include <fcntl.h>
353 --# include <sys\stat.h>
354 -+# include <sys/stat.h>
355 -
356 - # define NORETURN /**/
357 - # define PATH_SEP '\\'
358 ---- a/bzlib.h
359 -+++ b/bzlib.h
360 -@@ -81,6 +81,9 @@ typedef
361 - /* windows.h define small to char */
362 - # undef small
363 - # endif
364 -+# ifndef WINAPI
365 -+# define WINAPI
366 -+# endif
367 - # ifdef BZ_EXPORT
368 - # define BZ_API(func) WINAPI func
369 - # define BZ_EXTERN extern
370
371 diff --git a/app-arch/bzip2/files/bzip2-1.0.6-nselectors-upper-bound-check.patch b/app-arch/bzip2/files/bzip2-1.0.6-nselectors-upper-bound-check.patch
372 deleted file mode 100644
373 index a7731f7de8f..00000000000
374 --- a/app-arch/bzip2/files/bzip2-1.0.6-nselectors-upper-bound-check.patch
375 +++ /dev/null
376 @@ -1,30 +0,0 @@
377 -From 13ca8fee0c897121ae79ae644a212418398dfea7 Mon Sep 17 00:00:00 2001
378 -From: Amin Hassani <ahassani@××××××××.org>
379 -Date: Fri, 8 Mar 2019 09:58:20 -0800
380 -Subject: [PATCH] Check for upper bounds of nselectors.
381 -
382 -Currently there is no check for the upper bounds of the
383 -nselectors. Hence, a corrupt input can cause a segfault.
384 -
385 -This issue was discovered by one of our fuzzers. The actual error was:
386 -
387 -../bzip2-1.0.6/decompress.c:299:10: runtime error: index 18002 out of bounds for type 'UChar [18002]'
388 ----
389 - decompress.c | 1 +
390 - 1 file changed, 1 insertion(+)
391 -
392 -diff --git a/decompress.c b/decompress.c
393 -index 311f566..391552d 100644
394 ---- a/decompress.c
395 -+++ b/decompress.c
396 -@@ -288,6 +288,7 @@ Int32 BZ2_decompress ( DState* s )
397 - if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR);
398 - GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
399 - if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
400 -+ if (nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR);
401 - for (i = 0; i < nSelectors; i++) {
402 - j = 0;
403 - while (True) {
404 ---
405 -2.21.0.360.g471c308f928-goog
406 -
407
408 diff --git a/app-arch/bzip2/files/bzip2-1.0.6-out-of-tree-build.patch b/app-arch/bzip2/files/bzip2-1.0.6-out-of-tree-build.patch
409 deleted file mode 100644
410 index 806339ebb6b..00000000000
411 --- a/app-arch/bzip2/files/bzip2-1.0.6-out-of-tree-build.patch
412 +++ /dev/null
413 @@ -1,79 +0,0 @@
414 ---- a/Makefile
415 -+++ b/Makefile
416 -@@ -53,7 +53,6 @@ libbz2.a: $(OBJS)
417 -
418 - check: test
419 - test: bzip2
420 -- @cat words1
421 - ./bzip2 -1 < sample1.ref > sample1.rb2
422 - ./bzip2 -2 < sample2.ref > sample2.rb2
423 - ./bzip2 -3 < sample3.ref > sample3.rb2
424 -@@ -66,7 +65,6 @@ test: bzip2
425 - cmp sample1.tst sample1.ref
426 - cmp sample2.tst sample2.ref
427 - cmp sample3.tst sample3.ref
428 -- @cat words3
429 -
430 - install: bzip2 bzip2recover
431 - if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
432 -@@ -115,25 +113,8 @@ clean:
433 - sample1.rb2 sample2.rb2 sample3.rb2 \
434 - sample1.tst sample2.tst sample3.tst
435 -
436 --blocksort.o: blocksort.c
437 -- @cat words0
438 -- $(CC) $(CFLAGS) -c blocksort.c
439 --huffman.o: huffman.c
440 -- $(CC) $(CFLAGS) -c huffman.c
441 --crctable.o: crctable.c
442 -- $(CC) $(CFLAGS) -c crctable.c
443 --randtable.o: randtable.c
444 -- $(CC) $(CFLAGS) -c randtable.c
445 --compress.o: compress.c
446 -- $(CC) $(CFLAGS) -c compress.c
447 --decompress.o: decompress.c
448 -- $(CC) $(CFLAGS) -c decompress.c
449 --bzlib.o: bzlib.c
450 -- $(CC) $(CFLAGS) -c bzlib.c
451 --bzip2.o: bzip2.c
452 -- $(CC) $(CFLAGS) -c bzip2.c
453 --bzip2recover.o: bzip2recover.c
454 -- $(CC) $(CFLAGS) -c bzip2recover.c
455 -+%.o: %.c
456 -+ $(CC) $(CFLAGS) -c $<
457 -
458 -
459 - distclean: clean
460 ---- a/Makefile-libbz2_so
461 -+++ b/Makefile-libbz2_so
462 -@@ -36,9 +36,7 @@ OBJS= blocksort.o \
463 -
464 - all: $(OBJS)
465 - $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS)
466 -- $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
467 -- rm -f libbz2.so.1.0
468 -- ln -s libbz2.so.1.0.6 libbz2.so.1.0
469 -+ ln -sf libbz2.so.1.0.6 libbz2.so.1.0
470 -
471 - clean:
472 - rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared
473 -@@ -43,17 +43,5 @@ all: $(OBJS)
474 - clean:
475 - rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared
476 -
477 --blocksort.o: blocksort.c
478 -- $(CC) $(CFLAGS) -c blocksort.c
479 --huffman.o: huffman.c
480 -- $(CC) $(CFLAGS) -c huffman.c
481 --crctable.o: crctable.c
482 -- $(CC) $(CFLAGS) -c crctable.c
483 --randtable.o: randtable.c
484 -- $(CC) $(CFLAGS) -c randtable.c
485 --compress.o: compress.c
486 -- $(CC) $(CFLAGS) -c compress.c
487 --decompress.o: decompress.c
488 -- $(CC) $(CFLAGS) -c decompress.c
489 --bzlib.o: bzlib.c
490 -- $(CC) $(CFLAGS) -c bzlib.c
491 -+%.o: %.c
492 -+ $(CC) $(CFLAGS) -c $<
493
494 diff --git a/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch b/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch
495 deleted file mode 100644
496 index 52ea791ce34..00000000000
497 --- a/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch
498 +++ /dev/null
499 @@ -1,13 +0,0 @@
500 ---- a/Makefile-libbz2_so
501 -+++ b/Makefile-libbz2_so
502 -@@ -35,8 +35,8 @@
503 - bzlib.o
504 -
505 - all: $(OBJS)
506 -- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
507 -- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
508 -+ $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS)
509 -+ $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
510 - rm -f libbz2.so.1.0
511 - ln -s libbz2.so.1.0.6 libbz2.so.1.0
512 -
513
514 diff --git a/app-arch/bzip2/files/bzip2-1.0.6-ubsan-error.patch b/app-arch/bzip2/files/bzip2-1.0.6-ubsan-error.patch
515 deleted file mode 100644
516 index 84b811177ed..00000000000
517 --- a/app-arch/bzip2/files/bzip2-1.0.6-ubsan-error.patch
518 +++ /dev/null
519 @@ -1,24 +0,0 @@
520 -Author: Manoj Gupta <manojgupta@××××××.com>
521 -
522 -Use unsigned 1 for shifting instead of signed 1.
523 -
524 -This fixed an issue with shift caught by undefined behavior
525 -sanitizer in clang.
526 -bzip2-1.0.6/blocksort.c:255:7
527 -runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
528 -
529 ---- a/blocksort.c
530 -+++ b/blocksort.c
531 -@@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap,
532 - bhtab [ 0 .. 2+(nblock/32) ] destroyed
533 - */
534 -
535 --#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31))
536 --#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31))
537 --#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31)))
538 -+#define SET_BH(zz) bhtab[(zz) >> 5] |= (1u << ((zz) & 31))
539 -+#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1u << ((zz) & 31))
540 -+#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1u << ((zz) & 31)))
541 - #define WORD_BH(zz) bhtab[(zz) >> 5]
542 - #define UNALIGNED_BH(zz) ((zz) & 0x01f)
543 -
544
545 diff --git a/app-arch/bzip2/files/bzip2-1.0.7-out-of-tree-build.patch b/app-arch/bzip2/files/bzip2-1.0.7-out-of-tree-build.patch
546 deleted file mode 100644
547 index 64cca58eac3..00000000000
548 --- a/app-arch/bzip2/files/bzip2-1.0.7-out-of-tree-build.patch
549 +++ /dev/null
550 @@ -1,76 +0,0 @@
551 ---- bzip2-1.0.7/Makefile
552 -+++ bzip2-1.0.7/Makefile
553 -@@ -54,7 +54,6 @@
554 -
555 - check: test
556 - test: bzip2
557 -- @cat words1
558 - ./bzip2 -1 < sample1.ref > sample1.rb2
559 - ./bzip2 -2 < sample2.ref > sample2.rb2
560 - ./bzip2 -3 < sample3.ref > sample3.rb2
561 -@@ -67,7 +66,6 @@
562 - cmp sample1.tst sample1.ref
563 - cmp sample2.tst sample2.ref
564 - cmp sample3.tst sample3.ref
565 -- @cat words3
566 -
567 - install: bzip2 bzip2recover
568 - if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
569 -@@ -113,25 +111,8 @@
570 - sample1.rb2 sample2.rb2 sample3.rb2 \
571 - sample1.tst sample2.tst sample3.tst
572 -
573 --blocksort.o: blocksort.c
574 -- @cat words0
575 -- $(CC) $(CFLAGS) -c blocksort.c
576 --huffman.o: huffman.c
577 -- $(CC) $(CFLAGS) -c huffman.c
578 --crctable.o: crctable.c
579 -- $(CC) $(CFLAGS) -c crctable.c
580 --randtable.o: randtable.c
581 -- $(CC) $(CFLAGS) -c randtable.c
582 --compress.o: compress.c
583 -- $(CC) $(CFLAGS) -c compress.c
584 --decompress.o: decompress.c
585 -- $(CC) $(CFLAGS) -c decompress.c
586 --bzlib.o: bzlib.c
587 -- $(CC) $(CFLAGS) -c bzlib.c
588 --bzip2.o: bzip2.c
589 -- $(CC) $(CFLAGS) -c bzip2.c
590 --bzip2recover.o: bzip2recover.c
591 -- $(CC) $(CFLAGS) -c bzip2recover.c
592 -+%.o: %.c
593 -+ $(CC) $(CFLAGS) -c $<
594 -
595 -
596 - distclean: clean
597 ---- bzip2-1.0.7/Makefile-libbz2_so
598 -+++ bzip2-1.0.7/Makefile-libbz2_so
599 -@@ -36,24 +36,10 @@
600 -
601 - all: $(OBJS)
602 - $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.7 $(OBJS)
603 -- $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.7
604 -- rm -f libbz2.so.1.0
605 -- ln -s libbz2.so.1.0.7 libbz2.so.1.0
606 -+ ln -sf libbz2.so.1.0.7 libbz2.so.1.0
607 -
608 - clean:
609 - rm -f $(OBJS) bzip2.o libbz2.so.1.0.7 libbz2.so.1.0 bzip2-shared
610 -
611 --blocksort.o: blocksort.c
612 -- $(CC) $(CFLAGS) -c blocksort.c
613 --huffman.o: huffman.c
614 -- $(CC) $(CFLAGS) -c huffman.c
615 --crctable.o: crctable.c
616 -- $(CC) $(CFLAGS) -c crctable.c
617 --randtable.o: randtable.c
618 -- $(CC) $(CFLAGS) -c randtable.c
619 --compress.o: compress.c
620 -- $(CC) $(CFLAGS) -c compress.c
621 --decompress.o: decompress.c
622 -- $(CC) $(CFLAGS) -c decompress.c
623 --bzlib.o: bzlib.c
624 -- $(CC) $(CFLAGS) -c bzlib.c
625 -+%.o: %.c
626 -+ $(CC) $(CFLAGS) -c $<
627
628 diff --git a/app-arch/bzip2/files/bzip2-1.0.7-saneso.patch b/app-arch/bzip2/files/bzip2-1.0.7-saneso.patch
629 deleted file mode 100644
630 index d63226684f6..00000000000
631 --- a/app-arch/bzip2/files/bzip2-1.0.7-saneso.patch
632 +++ /dev/null
633 @@ -1,13 +0,0 @@
634 ---- bzip2-1.0.7/Makefile-libbz2_so
635 -+++ bzip2-1.0.7/Makefile-libbz2_so
636 -@@ -35,8 +35,8 @@
637 - bzlib.o
638 -
639 - all: $(OBJS)
640 -- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.7 $(OBJS)
641 -- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.7
642 -+ $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.7 $(OBJS)
643 -+ $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.7
644 - rm -f libbz2.so.1.0
645 - ln -s libbz2.so.1.0.7 libbz2.so.1.0
646 -