Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/bzip2/files/, app-arch/bzip2/
Date: Mon, 01 Jul 2019 07:44:13
Message-Id: 1561967044.a3f46759232ee0c64311b8790c88966b2a098434.polynomial-c@gentoo
1 commit: a3f46759232ee0c64311b8790c88966b2a098434
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 1 07:43:45 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 1 07:44:04 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3f46759
7
8 app-arch/bzip2: Bump to version 1.0.7
9
10 Package-Manager: Portage-2.3.68, Repoman-2.3.16
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 app-arch/bzip2/Manifest | 1 +
14 app-arch/bzip2/bzip2-1.0.7.ebuild | 115 +++++++++++++++++++++
15 .../files/bzip2-1.0.7-out-of-tree-build.patch | 76 ++++++++++++++
16 app-arch/bzip2/files/bzip2-1.0.7-saneso.patch | 13 +++
17 4 files changed, 205 insertions(+)
18
19 diff --git a/app-arch/bzip2/Manifest b/app-arch/bzip2/Manifest
20 index 4db66c194b2..ace5eb289ae 100644
21 --- a/app-arch/bzip2/Manifest
22 +++ b/app-arch/bzip2/Manifest
23 @@ -1 +1,2 @@
24 DIST bzip2-1.0.6.tar.gz 782025 BLAKE2B b31533af7c71d715e6600874bb0a11b9b3aebbb08af0414a6d88bd5a2ad879a482ad408338159cb6c241815da8f48798d2ea7789ea971431d0be42ee827b0a7e SHA512 00ace5438cfa0c577e5f578d8a808613187eff5217c35164ffe044fbafdfec9e98f4192c02a7d67e01e5a5ccced630583ad1003c37697219b0f147343a3fdd12
25 +DIST bzip2-1.0.7.tar.gz 809680 BLAKE2B da185d9771dd83d59f2c13ea32e9a514ce50c97d69145ca2c4c8f28749fc85c1aec491c5100f4fc6b2183ee397015b7e74a0407dc1d7a360db159a0a3676fd7a SHA512 e0e19b493e6b1f7beeb0eeb0be8a6358c24202173f28acb1e902a768835be9e24f2cb966452fbc90fc3e4e692532ce0c7e86d06aef2d52c0d2a9ac16e12ec8c8
26
27 diff --git a/app-arch/bzip2/bzip2-1.0.7.ebuild b/app-arch/bzip2/bzip2-1.0.7.ebuild
28 new file mode 100644
29 index 00000000000..b0538f6ddf1
30 --- /dev/null
31 +++ b/app-arch/bzip2/bzip2-1.0.7.ebuild
32 @@ -0,0 +1,115 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
37 +# (since we're building shared libs) ...
38 +
39 +EAPI=7
40 +
41 +inherit toolchain-funcs multilib-minimal
42 +
43 +DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
44 +HOMEPAGE="https://sourceware.org/bzip2/"
45 +SRC_URI="https://sourceware.org/pub/${PN}/${P}.tar.gz"
46 +
47 +LICENSE="BZIP2"
48 +SLOT="0/1" # subslot = SONAME
49 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
50 +IUSE="static static-libs"
51 +
52 +PATCHES=(
53 + "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
54 + "${FILESDIR}"/${PN}-1.0.7-saneso.patch
55 + "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
56 + "${FILESDIR}"/${PN}-1.0.6-progress.patch
57 + "${FILESDIR}"/${PN}-1.0.3-no-test.patch
58 + "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365
59 + "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573
60 + "${FILESDIR}"/${PN}-1.0.7-out-of-tree-build.patch
61 +)
62 +
63 +DOCS=( CHANGES README{,.COMPILATION.PROBLEMS,.XML.STUFF} manual.pdf )
64 +HTML_DOCS=( manual.html )
65 +
66 +src_prepare() {
67 + default
68 +
69 + # - Use right man path
70 + # - Generate symlinks instead of hardlinks
71 + # - pass custom variables to control libdir
72 + sed -i \
73 + -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
74 + -e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \
75 + -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
76 + Makefile || die
77 +}
78 +
79 +bemake() {
80 + emake \
81 + VPATH="${S}" \
82 + CC="$(tc-getCC)" \
83 + AR="$(tc-getAR)" \
84 + RANLIB="$(tc-getRANLIB)" \
85 + "$@"
86 +}
87 +
88 +multilib_src_compile() {
89 + bemake -f "${S}"/Makefile-libbz2_so all
90 + # Make sure we link against the shared lib #504648
91 + ln -s libbz2.so.${PV} libbz2.so || die
92 + bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')"
93 +}
94 +
95 +multilib_src_install() {
96 + into /usr
97 +
98 + # Install the shared lib manually. We install:
99 + # .x.x.x - standard shared lib behavior
100 + # .x.x - SONAME some distros use #338321
101 + # .x - SONAME Gentoo uses
102 + dolib.so libbz2.so.${PV}
103 + local v
104 + for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
105 + dosym libbz2.so.${PV} /usr/$(get_libdir)/${v}
106 + done
107 + use static-libs && dolib.a libbz2.a
108 +
109 + if multilib_is_native_abi ; then
110 + gen_usr_ldscript -a bz2
111 +
112 + dobin bzip2recover
113 + into /
114 + dobin bzip2
115 + fi
116 +}
117 +
118 +multilib_src_install_all() {
119 + # `make install` doesn't cope with out-of-tree builds, nor with
120 + # installing just non-binaries, so handle things ourselves.
121 + insinto /usr/include
122 + doins bzlib.h
123 + into /usr
124 + dobin bz{diff,grep,more}
125 + doman *.1
126 +
127 + dosym bzdiff /usr/bin/bzcmp
128 + dosym bzdiff.1 /usr/share/man/man1/bzcmp.1
129 +
130 + dosym bzmore /usr/bin/bzless
131 + dosym bzmore.1 /usr/share/man/man1/bzless.1
132 +
133 + local x
134 + for x in bunzip2 bzcat bzip2recover ; do
135 + dosym bzip2.1 /usr/share/man/man1/${x}.1
136 + done
137 + for x in bz{e,f}grep ; do
138 + dosym bzgrep /usr/bin/${x}
139 + dosym bzgrep.1 /usr/share/man/man1/${x}.1
140 + done
141 +
142 + einstalldocs
143 +
144 + # move "important" bzip2 binaries to /bin and use the shared libbz2.so
145 + dosym bzip2 /bin/bzcat
146 + dosym bzip2 /bin/bunzip2
147 +}
148
149 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
150 new file mode 100644
151 index 00000000000..977d9b3cd30
152 --- /dev/null
153 +++ b/app-arch/bzip2/files/bzip2-1.0.7-out-of-tree-build.patch
154 @@ -0,0 +1,76 @@
155 +--- bzip2-1.0.7/Makefile
156 ++++ bzip2-1.0.7/Makefile
157 +@@ -54,7 +54,6 @@
158 +
159 + check: test
160 + test: bzip2
161 +- @cat words1
162 + ./bzip2 -1 < sample1.ref > sample1.rb2
163 + ./bzip2 -2 < sample2.ref > sample2.rb2
164 + ./bzip2 -3 < sample3.ref > sample3.rb2
165 +@@ -67,7 +66,6 @@
166 + cmp sample1.tst sample1.ref
167 + cmp sample2.tst sample2.ref
168 + cmp sample3.tst sample3.ref
169 +- @cat words3
170 +
171 + install: bzip2 bzip2recover
172 + if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
173 +@@ -113,25 +111,8 @@
174 + sample1.rb2 sample2.rb2 sample3.rb2 \
175 + sample1.tst sample2.tst sample3.tst
176 +
177 +-blocksort.o: blocksort.c
178 +- @cat words0
179 +- $(CC) $(CFLAGS) -c blocksort.c
180 +-huffman.o: huffman.c
181 +- $(CC) $(CFLAGS) -c huffman.c
182 +-crctable.o: crctable.c
183 +- $(CC) $(CFLAGS) -c crctable.c
184 +-randtable.o: randtable.c
185 +- $(CC) $(CFLAGS) -c randtable.c
186 +-compress.o: compress.c
187 +- $(CC) $(CFLAGS) -c compress.c
188 +-decompress.o: decompress.c
189 +- $(CC) $(CFLAGS) -c decompress.c
190 +-bzlib.o: bzlib.c
191 +- $(CC) $(CFLAGS) -c bzlib.c
192 +-bzip2.o: bzip2.c
193 +- $(CC) $(CFLAGS) -c bzip2.c
194 +-bzip2recover.o: bzip2recover.c
195 +- $(CC) $(CFLAGS) -c bzip2recover.c
196 ++%.o: %.c
197 ++ $(CC) $(CFLAGS) -c $<
198 +
199 +
200 + distclean: clean
201 +--- bzip2-1.0.7/Makefile-libbz2_so
202 ++++ bzip2-1.0.7/Makefile-libbz2_so
203 +@@ -36,24 +36,10 @@
204 +
205 + all: $(OBJS)
206 + $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.7 $(OBJS)
207 +- $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.7
208 +- rm -f libbz2.so.1.0
209 +- ln -s libbz2.so.1.0.7 libbz2.so.1.0
210 ++ ln -sf libbz2.so.1.0.7 libbz2.so.1.0
211 +
212 + clean:
213 + rm -f $(OBJS) bzip2.o libbz2.so.1.0.7 libbz2.so.1.0 bzip2-shared
214 +
215 +-blocksort.o: blocksort.c
216 +- $(CC) $(CFLAGS) -c blocksort.c
217 +-huffman.o: huffman.c
218 +- $(CC) $(CFLAGS) -c huffman.c
219 +-crctable.o: crctable.c
220 +- $(CC) $(CFLAGS) -c crctable.c
221 +-randtable.o: randtable.c
222 +- $(CC) $(CFLAGS) -c randtable.c
223 +-compress.o: compress.c
224 +- $(CC) $(CFLAGS) -c compress.c
225 +-decompress.o: decompress.c
226 +- $(CC) $(CFLAGS) -c decompress.c
227 +-bzlib.o: bzlib.c
228 +- $(CC) $(CFLAGS) -c bzlib.c
229 ++%.o: %.c
230 ++ $(CC) $(CFLAGS) -c $<
231
232 diff --git a/app-arch/bzip2/files/bzip2-1.0.7-saneso.patch b/app-arch/bzip2/files/bzip2-1.0.7-saneso.patch
233 new file mode 100644
234 index 00000000000..5ab0cb52d05
235 --- /dev/null
236 +++ b/app-arch/bzip2/files/bzip2-1.0.7-saneso.patch
237 @@ -0,0 +1,13 @@
238 +--- bzip2-1.0.7/Makefile-libbz2_so
239 ++++ bzip2-1.0.7/Makefile-libbz2_so
240 +@@ -35,8 +35,8 @@
241 + bzlib.o
242 +
243 + all: $(OBJS)
244 +- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.7 $(OBJS)
245 +- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.7
246 ++ $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.7 $(OBJS)
247 ++ $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.7
248 + rm -f libbz2.so.1.0
249 + ln -s libbz2.so.1.0.7 libbz2.so.1.0
250 +