1 |
commit: 9e0c9cfea7698608fc671bd231a2636b85bf64f8 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 31 14:38:11 2022 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 31 14:38:11 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=9e0c9cfe |
7 |
|
8 |
app-arch/bzip2: sync with gx86 |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
app-arch/bzip2/bzip2-1.0.8-r1.ebuild | 142 --------------------- |
13 |
...bzip2-1.0.8-r3.ebuild => bzip2-1.0.8-r4.ebuild} | 31 +++-- |
14 |
2 files changed, 20 insertions(+), 153 deletions(-) |
15 |
|
16 |
diff --git a/app-arch/bzip2/bzip2-1.0.8-r1.ebuild b/app-arch/bzip2/bzip2-1.0.8-r1.ebuild |
17 |
deleted file mode 100644 |
18 |
index 2ba7042d39..0000000000 |
19 |
--- a/app-arch/bzip2/bzip2-1.0.8-r1.ebuild |
20 |
+++ /dev/null |
21 |
@@ -1,142 +0,0 @@ |
22 |
-# Copyright 1999-2021 Gentoo Authors |
23 |
-# Distributed under the terms of the GNU General Public License v2 |
24 |
- |
25 |
-# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly |
26 |
-# (since we're building shared libs) ... |
27 |
- |
28 |
-EAPI=7 |
29 |
- |
30 |
-inherit toolchain-funcs multilib-minimal usr-ldscript prefix |
31 |
- |
32 |
-DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux" |
33 |
-HOMEPAGE="https://sourceware.org/bzip2/" |
34 |
-SRC_URI="https://sourceware.org/pub/${PN}/${P}.tar.gz" |
35 |
- |
36 |
-LICENSE="BZIP2" |
37 |
-SLOT="0/1" # subslot = SONAME |
38 |
-KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" |
39 |
-IUSE="static static-libs" |
40 |
- |
41 |
-PATCHES=( |
42 |
- "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch |
43 |
- "${FILESDIR}"/${PN}-1.0.8-saneso.patch |
44 |
- "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986 |
45 |
- "${FILESDIR}"/${PN}-1.0.6-progress.patch |
46 |
- "${FILESDIR}"/${PN}-1.0.3-no-test.patch |
47 |
- "${FILESDIR}"/${PN}-1.0.8-mingw.patch #393573 |
48 |
- "${FILESDIR}"/${PN}-1.0.8-out-of-tree-build.patch |
49 |
-) |
50 |
- |
51 |
-DOCS=( CHANGES README{,.COMPILATION.PROBLEMS,.XML.STUFF} manual.pdf ) |
52 |
-HTML_DOCS=( manual.html ) |
53 |
- |
54 |
-src_prepare() { |
55 |
- default |
56 |
- |
57 |
- # - Use right man path |
58 |
- # - Generate symlinks instead of hardlinks |
59 |
- # - pass custom variables to control libdir |
60 |
- sed -i \ |
61 |
- -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \ |
62 |
- -e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \ |
63 |
- -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \ |
64 |
- Makefile || die |
65 |
- |
66 |
- hprefixify -w "/^PATH=/" bz{diff,grep,more} |
67 |
- # this a makefile for Darwin, which already "includes" saneso |
68 |
- cp "${FILESDIR}"/${P}-Makefile-libbz2_dylib Makefile-libbz2_dylib || die |
69 |
- |
70 |
- if [[ ${CHOST} == *-cygwin* ]] ; then |
71 |
- sed -i -e "s/-o libbz2\.so\.${PV}/-Wl,--out-implib=libbz2$(get_libname ${PV})/" \ |
72 |
- -e "s/-Wl,-soname -Wl,libbz2\.so\.1/-o cygbz2-${PV%%.*}.dll/" \ |
73 |
- -e "s/libbz2\.so/libbz2$(get_libname)/g" \ |
74 |
- Makefile-libbz2_so |
75 |
- fi |
76 |
-} |
77 |
- |
78 |
-bemake() { |
79 |
- emake \ |
80 |
- VPATH="${S}" \ |
81 |
- CC="$(tc-getCC)" \ |
82 |
- AR="$(tc-getAR)" \ |
83 |
- RANLIB="$(tc-getRANLIB)" \ |
84 |
- "$@" |
85 |
-} |
86 |
- |
87 |
-multilib_src_compile() { |
88 |
- local checkopts= |
89 |
- case "${CHOST}" in |
90 |
- *-darwin*) |
91 |
- bemake PREFIX="${EPREFIX}"/usr -f "${S}"/Makefile-libbz2_dylib all |
92 |
- ;; |
93 |
- *) |
94 |
- bemake -f "${S}"/Makefile-libbz2_so all |
95 |
- ;; |
96 |
- esac |
97 |
- # Make sure we link against the shared lib #504648 |
98 |
- ln -sf libbz2$(get_libname ${PV}) libbz2$(get_libname) || die |
99 |
- bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')" |
100 |
-} |
101 |
- |
102 |
-multilib_src_install() { |
103 |
- into /usr |
104 |
- |
105 |
- # Install the shared lib manually. We install: |
106 |
- # .x.x.x - standard shared lib behavior |
107 |
- # .x.x - SONAME some distros use #338321 |
108 |
- # .x - SONAME Gentoo uses |
109 |
- dolib.so libbz2$(get_libname ${PV}) |
110 |
- [[ ${CHOST} == *-cygwin* ]] && dobin cygbz2-${PV%%.*}.dll |
111 |
- local v |
112 |
- for v in libbz2$(get_libname) libbz2$(get_libname ${PV%%.*}) libbz2$(get_libname ${PV%.*}) ; do |
113 |
- dosym libbz2$(get_libname ${PV}) /usr/$(get_libdir)/${v} |
114 |
- done |
115 |
- |
116 |
- # Install libbz2.so.1.0 due to accidental soname change in 1.0.7. |
117 |
- # Reference: 98da0ad82192d21ad74ae52366ea8466e2acea24. |
118 |
- # OK to remove one year after 2020-04-11. |
119 |
- if [[ ! -L "${ED}/usr/$(get_libdir)/libbz2$(get_libname 1.0)" ]]; then |
120 |
- dosym libbz2.so.${PV} "/usr/$(get_libdir)/libbz2$(get_libname 1.0)" |
121 |
- fi |
122 |
- |
123 |
- use static-libs && dolib.a libbz2.a |
124 |
- |
125 |
- if multilib_is_native_abi ; then |
126 |
- gen_usr_ldscript -a bz2 |
127 |
- |
128 |
- dobin bzip2recover |
129 |
- into / |
130 |
- dobin bzip2 |
131 |
- fi |
132 |
-} |
133 |
- |
134 |
-multilib_src_install_all() { |
135 |
- # `make install` doesn't cope with out-of-tree builds, nor with |
136 |
- # installing just non-binaries, so handle things ourselves. |
137 |
- insinto /usr/include |
138 |
- doins bzlib.h |
139 |
- into /usr |
140 |
- dobin bz{diff,grep,more} |
141 |
- doman *.1 |
142 |
- |
143 |
- dosym bzdiff /usr/bin/bzcmp |
144 |
- dosym bzdiff.1 /usr/share/man/man1/bzcmp.1 |
145 |
- |
146 |
- dosym bzmore /usr/bin/bzless |
147 |
- dosym bzmore.1 /usr/share/man/man1/bzless.1 |
148 |
- |
149 |
- local x |
150 |
- for x in bunzip2 bzcat bzip2recover ; do |
151 |
- dosym bzip2.1 /usr/share/man/man1/${x}.1 |
152 |
- done |
153 |
- for x in bz{e,f}grep ; do |
154 |
- dosym bzgrep /usr/bin/${x} |
155 |
- dosym bzgrep.1 /usr/share/man/man1/${x}.1 |
156 |
- done |
157 |
- |
158 |
- einstalldocs |
159 |
- |
160 |
- # move "important" bzip2 binaries to /bin and use the shared libbz2.so |
161 |
- dosym bzip2 /bin/bzcat |
162 |
- dosym bzip2 /bin/bunzip2 |
163 |
-} |
164 |
|
165 |
diff --git a/app-arch/bzip2/bzip2-1.0.8-r3.ebuild b/app-arch/bzip2/bzip2-1.0.8-r4.ebuild |
166 |
similarity index 87% |
167 |
rename from app-arch/bzip2/bzip2-1.0.8-r3.ebuild |
168 |
rename to app-arch/bzip2/bzip2-1.0.8-r4.ebuild |
169 |
index 1c2b65d3b8..6608999730 100644 |
170 |
--- a/app-arch/bzip2/bzip2-1.0.8-r3.ebuild |
171 |
+++ b/app-arch/bzip2/bzip2-1.0.8-r4.ebuild |
172 |
@@ -19,9 +19,12 @@ SLOT="0/1" # subslot = SONAME |
173 |
KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" |
174 |
IUSE="static static-libs" |
175 |
|
176 |
-BDEPEND="verify-sig? ( sec-keys/openpgp-keys-bzip2 )" |
177 |
-RDEPEND="!app-arch/lbzip2[symlink(-)] |
178 |
- !app-arch/pbzip2[symlink(-)]" |
179 |
+BDEPEND=" |
180 |
+ verify-sig? ( sec-keys/openpgp-keys-bzip2 ) |
181 |
+" |
182 |
+PDEPEND=" |
183 |
+ app-alternatives/bzip2 |
184 |
+" |
185 |
|
186 |
PATCHES=( |
187 |
"${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch |
188 |
@@ -101,7 +104,7 @@ multilib_src_install() { |
189 |
|
190 |
dobin bzip2recover |
191 |
into / |
192 |
- dobin bzip2 |
193 |
+ newbin bzip2 bzip2-reference |
194 |
fi |
195 |
} |
196 |
|
197 |
@@ -112,7 +115,8 @@ multilib_src_install_all() { |
198 |
doins bzlib.h |
199 |
into /usr |
200 |
dobin bz{diff,grep,more} |
201 |
- doman *.1 |
202 |
+ doman bz{diff,grep,more}.1 |
203 |
+ newman bzip2.1 bzip2-reference.1 |
204 |
|
205 |
dosym bzdiff /usr/bin/bzcmp |
206 |
dosym bzdiff.1 /usr/share/man/man1/bzcmp.1 |
207 |
@@ -120,18 +124,23 @@ multilib_src_install_all() { |
208 |
dosym bzmore /usr/bin/bzless |
209 |
dosym bzmore.1 /usr/share/man/man1/bzless.1 |
210 |
|
211 |
+ dosym bzip2-reference.1 /usr/share/man/man1/bzip2recover.1 |
212 |
local x |
213 |
- for x in bunzip2 bzcat bzip2recover ; do |
214 |
- dosym bzip2.1 /usr/share/man/man1/${x}.1 |
215 |
- done |
216 |
for x in bz{e,f}grep ; do |
217 |
dosym bzgrep /usr/bin/${x} |
218 |
dosym bzgrep.1 /usr/share/man/man1/${x}.1 |
219 |
done |
220 |
|
221 |
einstalldocs |
222 |
+} |
223 |
|
224 |
- # move "important" bzip2 binaries to /bin and use the shared libbz2.so |
225 |
- dosym bzip2 /bin/bzcat |
226 |
- dosym bzip2 /bin/bunzip2 |
227 |
+pkg_postinst() { |
228 |
+ # ensure to preserve the symlinks before app-alternatives/bzip2 |
229 |
+ # is installed |
230 |
+ local x |
231 |
+ for x in bzip2 bunzip2 bzcat; do |
232 |
+ if [[ ! -h ${EROOT}/bin/${x} ]]; then |
233 |
+ ln -s bzip2-reference "${EROOT}/bin/${x}" || die |
234 |
+ fi |
235 |
+ done |
236 |
} |