1 |
commit: bb520d8bd77ae80115fab881dfb7c62b7cd80b80 |
2 |
Author: Marty E. Plummer <hanetzer <AT> startmail <DOT> com> |
3 |
AuthorDate: Sat Apr 7 03:52:12 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 9 13:24:06 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb520d8b |
7 |
|
8 |
app-arch/bzip2: EAPI update and patch cleanup. |
9 |
|
10 |
Think of this as a precursor to switching bzip2 to an autotools build. |
11 |
EAPI has been bumped from 5 to 6, and the patches have been reformatted |
12 |
to apply with eapply in in addition to epatch (which apparently tries |
13 |
every -pN option with patch until it hits one that works), so the new |
14 |
revbump can be tested and stabilized while the old version is still |
15 |
available without change. |
16 |
|
17 |
Also changed dodoc/dohtml to DOCS=()/HTML_DOCS=() einstalldocs. |
18 |
|
19 |
Package-Manager: Portage-2.3.28, Repoman-2.3.9 |
20 |
Closes: https://github.com/gentoo/gentoo/pull/7848 |
21 |
|
22 |
app-arch/bzip2/bzip2-1.0.6-r9.ebuild | 116 +++++++++++++++++++++ |
23 |
app-arch/bzip2/files/bzip2-1.0.3-no-test.patch | 4 +- |
24 |
app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch | 4 +- |
25 |
.../bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch | 8 +- |
26 |
app-arch/bzip2/files/bzip2-1.0.4-man-links.patch | 4 +- |
27 |
.../bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch | 4 +- |
28 |
app-arch/bzip2/files/bzip2-1.0.6-progress.patch | 8 +- |
29 |
app-arch/bzip2/files/bzip2-1.0.6-saneso.patch | 4 +- |
30 |
8 files changed, 134 insertions(+), 18 deletions(-) |
31 |
|
32 |
diff --git a/app-arch/bzip2/bzip2-1.0.6-r9.ebuild b/app-arch/bzip2/bzip2-1.0.6-r9.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..35cf13b6d7b |
35 |
--- /dev/null |
36 |
+++ b/app-arch/bzip2/bzip2-1.0.6-r9.ebuild |
37 |
@@ -0,0 +1,116 @@ |
38 |
+# Copyright 1999-2018 Gentoo Foundation |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly |
42 |
+# (since we're building shared libs) ... |
43 |
+ |
44 |
+EAPI=6 |
45 |
+ |
46 |
+inherit toolchain-funcs multilib-minimal |
47 |
+ |
48 |
+DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux" |
49 |
+HOMEPAGE="http://www.bzip.org/" |
50 |
+SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz" |
51 |
+ |
52 |
+LICENSE="BZIP2" |
53 |
+SLOT="0/1" # subslot = SONAME |
54 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
55 |
+IUSE="static static-libs" |
56 |
+ |
57 |
+PATCHES=( |
58 |
+ "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch |
59 |
+ "${FILESDIR}"/${PN}-1.0.6-saneso.patch |
60 |
+ "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986 |
61 |
+ "${FILESDIR}"/${PN}-1.0.6-progress.patch |
62 |
+ "${FILESDIR}"/${PN}-1.0.3-no-test.patch |
63 |
+ "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365 |
64 |
+ "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573 |
65 |
+ "${FILESDIR}"/${PN}-1.0.6-out-of-tree-build.patch |
66 |
+ "${FILESDIR}"/${PN}-1.0.6-CVE-2016-3189.patch #620466 |
67 |
+) |
68 |
+ |
69 |
+DOCS=( CHANGES README{,.COMPILATION.PROBLEMS,.XML.STUFF} manual.pdf ) |
70 |
+HTML_DOCS=( manual.html ) |
71 |
+ |
72 |
+src_prepare() { |
73 |
+ default |
74 |
+ |
75 |
+ # - Use right man path |
76 |
+ # - Generate symlinks instead of hardlinks |
77 |
+ # - pass custom variables to control libdir |
78 |
+ sed -i \ |
79 |
+ -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \ |
80 |
+ -e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \ |
81 |
+ -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \ |
82 |
+ Makefile || die |
83 |
+} |
84 |
+ |
85 |
+bemake() { |
86 |
+ emake \ |
87 |
+ VPATH="${S}" \ |
88 |
+ CC="$(tc-getCC)" \ |
89 |
+ AR="$(tc-getAR)" \ |
90 |
+ RANLIB="$(tc-getRANLIB)" \ |
91 |
+ "$@" |
92 |
+} |
93 |
+ |
94 |
+multilib_src_compile() { |
95 |
+ bemake -f "${S}"/Makefile-libbz2_so all |
96 |
+ # Make sure we link against the shared lib #504648 |
97 |
+ ln -s libbz2.so.${PV} libbz2.so || die |
98 |
+ bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')" |
99 |
+} |
100 |
+ |
101 |
+multilib_src_install() { |
102 |
+ into /usr |
103 |
+ |
104 |
+ # Install the shared lib manually. We install: |
105 |
+ # .x.x.x - standard shared lib behavior |
106 |
+ # .x.x - SONAME some distros use #338321 |
107 |
+ # .x - SONAME Gentoo uses |
108 |
+ dolib.so libbz2.so.${PV} |
109 |
+ local v |
110 |
+ for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do |
111 |
+ dosym libbz2.so.${PV} /usr/$(get_libdir)/${v} |
112 |
+ done |
113 |
+ use static-libs && dolib.a libbz2.a |
114 |
+ |
115 |
+ if multilib_is_native_abi ; then |
116 |
+ gen_usr_ldscript -a bz2 |
117 |
+ |
118 |
+ dobin bzip2recover |
119 |
+ into / |
120 |
+ dobin bzip2 |
121 |
+ fi |
122 |
+} |
123 |
+ |
124 |
+multilib_src_install_all() { |
125 |
+ # `make install` doesn't cope with out-of-tree builds, nor with |
126 |
+ # installing just non-binaries, so handle things ourselves. |
127 |
+ insinto /usr/include |
128 |
+ doins bzlib.h |
129 |
+ into /usr |
130 |
+ dobin bz{diff,grep,more} |
131 |
+ doman *.1 |
132 |
+ |
133 |
+ dosym bzdiff /usr/bin/bzcmp |
134 |
+ dosym bzdiff.1 /usr/share/man/man1/bzcmp.1 |
135 |
+ |
136 |
+ dosym bzmore /usr/bin/bzless |
137 |
+ dosym bzmore.1 /usr/share/man/man1/bzless.1 |
138 |
+ |
139 |
+ local x |
140 |
+ for x in bunzip2 bzcat bzip2recover ; do |
141 |
+ dosym bzip2.1 /usr/share/man/man1/${x}.1 |
142 |
+ done |
143 |
+ for x in bz{e,f}grep ; do |
144 |
+ dosym bzgrep /usr/bin/${x} |
145 |
+ dosym bzgrep.1 /usr/share/man/man1/${x}.1 |
146 |
+ done |
147 |
+ |
148 |
+ einstalldocs |
149 |
+ |
150 |
+ # move "important" bzip2 binaries to /bin and use the shared libbz2.so |
151 |
+ dosym bzip2 /bin/bzcat |
152 |
+ dosym bzip2 /bin/bunzip2 |
153 |
+} |
154 |
|
155 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch b/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch |
156 |
index 672c89dfbd2..9e554f79515 100644 |
157 |
--- a/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch |
158 |
+++ b/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch |
159 |
@@ -1,5 +1,5 @@ |
160 |
---- Makefile |
161 |
-+++ Makefile |
162 |
+--- a/Makefile |
163 |
++++ b/Makefile |
164 |
@@ -23,5 +23,5 @@ |
165 |
bzlib.o |
166 |
|
167 |
|
168 |
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 |
169 |
index b31cc061db6..74f8df000b1 100644 |
170 |
--- a/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch |
171 |
+++ b/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch |
172 |
@@ -3,8 +3,8 @@ with calls to sed so POSIX shells work |
173 |
|
174 |
http://bugs.gentoo.org/193365 |
175 |
|
176 |
---- bzgrep |
177 |
-+++ bzgrep |
178 |
+--- a/bzgrep |
179 |
++++ b/bzgrep |
180 |
@@ -63,10 +63,9 @@ |
181 |
bzip2 -cdfq "$i" | $grep $opt "$pat" |
182 |
r=$? |
183 |
|
184 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch b/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch |
185 |
index 5a95ed68b2d..04bd0d9abda 100644 |
186 |
--- a/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch |
187 |
+++ b/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch |
188 |
@@ -1,5 +1,5 @@ |
189 |
---- Makefile |
190 |
-+++ Makefile |
191 |
+--- a/Makefile |
192 |
++++ b/Makefile |
193 |
@@ -18,10 +18,9 @@ |
194 |
CC=gcc |
195 |
AR=ar |
196 |
@@ -12,8 +12,8 @@ |
197 |
|
198 |
# Where you want it installed when you do 'make install' |
199 |
PREFIX=/usr/local |
200 |
---- Makefile-libbz2_so |
201 |
-+++ Makefile-libbz2_so |
202 |
+--- a/Makefile-libbz2_so |
203 |
++++ b/Makefile-libbz2_so |
204 |
@@ -24,7 +24,7 @@ |
205 |
SHELL=/bin/sh |
206 |
CC=gcc |
207 |
|
208 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch b/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch |
209 |
index 308f5f9b3e8..deaa981adcc 100644 |
210 |
--- a/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch |
211 |
+++ b/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch |
212 |
@@ -1,7 +1,7 @@ |
213 |
http://bugs.gentoo.org/172986 |
214 |
|
215 |
---- bzip2-1.0.4/Makefile |
216 |
-+++ bzip2-1.0.4/Makefile |
217 |
+--- a/Makefile |
218 |
++++ b/Makefile |
219 |
@@ -85,4 +85,7 @@ |
220 |
cp -f bzip2.1 $(PREFIX)/share/man/man1 |
221 |
chmod a+r $(PREFIX)/share/man/man1/bzip2.1 |
222 |
|
223 |
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 |
224 |
index 1d0c3a6dd34..b031c808fef 100644 |
225 |
--- a/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch |
226 |
+++ b/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch |
227 |
@@ -6,8 +6,8 @@ Signed-off-by: Armin Kuster <akuster@××××××.com> |
228 |
|
229 |
Index: bzip2-1.0.6/bzip2recover.c |
230 |
=================================================================== |
231 |
---- bzip2-1.0.6.orig/bzip2recover.c |
232 |
-+++ bzip2-1.0.6/bzip2recover.c |
233 |
+--- a/bzip2recover.c |
234 |
++++ b/bzip2recover.c |
235 |
@@ -457,6 +457,7 @@ Int32 main ( Int32 argc, Char** argv ) |
236 |
bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 ); |
237 |
bsPutUInt32 ( bsWr, blockCRC ); |
238 |
|
239 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-progress.patch b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch |
240 |
index 7691d63e27c..8369597714b 100644 |
241 |
--- a/app-arch/bzip2/files/bzip2-1.0.6-progress.patch |
242 |
+++ b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch |
243 |
@@ -2,8 +2,8 @@ Ripped from Mandrake |
244 |
|
245 |
http://bugs.gentoo.org/82192 |
246 |
|
247 |
---- bzip2-1.0.6/bzip2.1 |
248 |
-+++ bzip2-1.0.6/bzip2.1 |
249 |
+--- a/bzip2.1 |
250 |
++++ b/bzip2.1 |
251 |
@@ -235,6 +235,10 @@ |
252 |
Suppress non-essential warning messages. Messages pertaining to |
253 |
I/O errors and other critical events will not be suppressed. |
254 |
@@ -15,8 +15,8 @@ http://bugs.gentoo.org/82192 |
255 |
.B \-v --verbose |
256 |
Verbose mode -- show the compression ratio for each file processed. |
257 |
Further \-v's increase the verbosity level, spewing out lots of |
258 |
---- bzip2-1.0.6/bzip2.c |
259 |
-+++ bzip2-1.0.6/bzip2.c |
260 |
+--- a/bzip2.c |
261 |
++++ b/bzip2.c |
262 |
@@ -145,6 +145,7 @@ |
263 |
#include <signal.h> |
264 |
#include <math.h> |
265 |
|
266 |
diff --git a/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch b/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch |
267 |
index 9c4ddf05307..52ea791ce34 100644 |
268 |
--- a/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch |
269 |
+++ b/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch |
270 |
@@ -1,5 +1,5 @@ |
271 |
---- Makefile-libbz2_so |
272 |
-+++ Makefile-libbz2_so |
273 |
+--- a/Makefile-libbz2_so |
274 |
++++ b/Makefile-libbz2_so |
275 |
@@ -35,8 +35,8 @@ |
276 |
bzlib.o |