1 |
commit: b1eac5dea827f76cb3475cd52ca4a2ffdbc3b00b |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 17 20:07:03 2020 +0000 |
4 |
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 17 20:07:03 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1eac5de |
7 |
|
8 |
sys-devel/binutils-hppa64: Remove old |
9 |
|
10 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
11 |
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org> |
12 |
|
13 |
sys-devel/binutils-hppa64/Manifest | 1 - |
14 |
.../binutils-hppa64/binutils-hppa64-2.34-r1.ebuild | 442 --------------------- |
15 |
2 files changed, 443 deletions(-) |
16 |
|
17 |
diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest |
18 |
index b906ec41388..4b742c149d0 100644 |
19 |
--- a/sys-devel/binutils-hppa64/Manifest |
20 |
+++ b/sys-devel/binutils-hppa64/Manifest |
21 |
@@ -2,7 +2,6 @@ DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449 |
22 |
DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a |
23 |
DIST binutils-2.33.1-patches-1.tar.xz 17944 BLAKE2B 811ad416fe9c059f645856a3123ed32303afe1d0f166a15cb6de0673b5494fdcc4c165da4a68eb7ab73f007618e3a97a5578c4b47de21e57fe501d6a21b6d595 SHA512 63b439637206d21e46d2b79383b38da2b28365a0fdea1f5ac3b665cd05e0b55cd1d7763c05567a5f7ae2c645d2ae639a27e465d535b928d9f8f0e6b94f31e1f7 |
24 |
DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac |
25 |
-DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a SHA512 e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b |
26 |
DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d |
27 |
DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd |
28 |
DIST binutils-2.35-patches-1.tar.xz 12216 BLAKE2B a811449da684e3501a7520a26639e04dda2f2d2fc8610974293eff3e4a1e23c4abeb97f52fe3b796679452bd6e3a5330fef4beb6f64b9ce2a1162076803390a0 SHA512 b8da16a4d97b264da925cc939b54bedbc148eb72a8d60f79d7ed222e9e299dca2a4f1fad4a6d60448d9d196c11331443eca0508dcbb85cb4c2da6c67bfaf4cd2 |
29 |
|
30 |
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r1.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r1.ebuild |
31 |
deleted file mode 100644 |
32 |
index c848f55dace..00000000000 |
33 |
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.34-r1.ebuild |
34 |
+++ /dev/null |
35 |
@@ -1,442 +0,0 @@ |
36 |
-# Copyright 1999-2020 Gentoo Authors |
37 |
-# Distributed under the terms of the GNU General Public License v2 |
38 |
- |
39 |
-EAPI=7 |
40 |
- |
41 |
-export CTARGET=hppa64-${CHOST#*-} |
42 |
- |
43 |
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs |
44 |
- |
45 |
-DESCRIPTION="Tools necessary to build programs" |
46 |
-HOMEPAGE="https://sourceware.org/binutils/" |
47 |
-LICENSE="GPL-3+" |
48 |
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test" |
49 |
-REQUIRED_USE="default-gold? ( gold )" |
50 |
- |
51 |
-# Variables that can be set here: |
52 |
-# PATCH_VER - the patchset version |
53 |
-# Default: empty, no patching |
54 |
-# PATCH_BINUTILS_VER - the binutils version in the patchset name |
55 |
-# - Default: PV |
56 |
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... |
57 |
-# for the patchsets |
58 |
- |
59 |
-PATCH_VER=4 |
60 |
-PATCH_DEV=dilfridge |
61 |
- |
62 |
-case ${PV} in |
63 |
- 9999) |
64 |
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" |
65 |
- inherit git-r3 |
66 |
- S=${WORKDIR}/binutils |
67 |
- EGIT_CHECKOUT_DIR=${S} |
68 |
- SLOT=${PV} |
69 |
- ;; |
70 |
- *.9999) |
71 |
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" |
72 |
- inherit git-r3 |
73 |
- S=${WORKDIR}/binutils |
74 |
- EGIT_CHECKOUT_DIR=${S} |
75 |
- EGIT_BRANCH=$(ver_cut 1-2) |
76 |
- EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch" |
77 |
- SLOT=$(ver_cut 1-2) |
78 |
- ;; |
79 |
- *) |
80 |
- SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz" |
81 |
- SLOT=$(ver_cut 1-2) |
82 |
- KEYWORDS="-* ~hppa" |
83 |
- ;; |
84 |
-esac |
85 |
- |
86 |
-# |
87 |
-# The Gentoo patchset |
88 |
-# |
89 |
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} |
90 |
-PATCH_DEV=${PATCH_DEV:-slyfox} |
91 |
- |
92 |
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} |
93 |
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" |
94 |
- |
95 |
-# |
96 |
-# The cross-compile logic |
97 |
-# |
98 |
-export CTARGET=${CTARGET:-${CHOST}} |
99 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
100 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
101 |
- export CTARGET=${CATEGORY#cross-} |
102 |
- fi |
103 |
-fi |
104 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
105 |
- |
106 |
-# |
107 |
-# The dependencies |
108 |
-# |
109 |
-RDEPEND=" |
110 |
- >=sys-devel/binutils-config-3 |
111 |
- sys-libs/zlib |
112 |
-" |
113 |
-DEPEND="${RDEPEND}" |
114 |
-BDEPEND=" |
115 |
- doc? ( sys-apps/texinfo ) |
116 |
- test? ( dev-util/dejagnu ) |
117 |
- nls? ( sys-devel/gettext ) |
118 |
- sys-devel/flex |
119 |
- virtual/yacc |
120 |
-" |
121 |
- |
122 |
-RESTRICT="!test? ( test )" |
123 |
- |
124 |
-MY_BUILDDIR=${WORKDIR}/build |
125 |
-S=${WORKDIR}/${P/-hppa64/} |
126 |
- |
127 |
-src_unpack() { |
128 |
- case ${PV} in |
129 |
- *9999) |
130 |
- git-r3_src_unpack |
131 |
- ;; |
132 |
- *) |
133 |
- ;; |
134 |
- esac |
135 |
- default |
136 |
- mkdir -p "${MY_BUILDDIR}" |
137 |
-} |
138 |
- |
139 |
-src_prepare() { |
140 |
- if [[ ! -z ${PATCH_VER} ]] ; then |
141 |
- # Use upstream patch to enable development mode |
142 |
- rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die |
143 |
- |
144 |
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" |
145 |
- eapply "${WORKDIR}/patch"/*.patch |
146 |
- fi |
147 |
- |
148 |
- # This check should probably go somewhere else, like pkg_pretend. |
149 |
- if [[ ${CTARGET} == *-uclibc* ]] ; then |
150 |
- if grep -qs 'linux-gnu' "${S}"/ltconfig ; then |
151 |
- die "sorry, but this binutils doesn't yet support uClibc :(" |
152 |
- fi |
153 |
- fi |
154 |
- |
155 |
- # Make sure our explicit libdir paths don't get clobbered. #562460 |
156 |
- sed -i \ |
157 |
- -e 's:@bfdlibdir@:@libdir@:g' \ |
158 |
- -e 's:@bfdincludedir@:@includedir@:g' \ |
159 |
- {bfd,opcodes}/Makefile.in || die |
160 |
- |
161 |
- # Fix locale issues if possible #122216 |
162 |
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then |
163 |
- einfo "Fixing misc issues in configure files" |
164 |
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do |
165 |
- ebegin " Updating ${f/${S}\/}" |
166 |
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \ |
167 |
- || eerror "Please file a bug about this" |
168 |
- eend $? |
169 |
- done |
170 |
- fi |
171 |
- |
172 |
- # Fix conflicts with newer glibc #272594 |
173 |
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then |
174 |
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c |
175 |
- fi |
176 |
- |
177 |
- # Apply things from PATCHES and user dirs |
178 |
- default |
179 |
- |
180 |
- # Run misc portage update scripts |
181 |
- gnuconfig_update |
182 |
- elibtoolize --portage --no-uclibc |
183 |
-} |
184 |
- |
185 |
-toolchain-binutils_bugurl() { |
186 |
- printf "https://bugs.gentoo.org/" |
187 |
-} |
188 |
-toolchain-binutils_pkgversion() { |
189 |
- printf "Gentoo ${PV}" |
190 |
- [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" |
191 |
-} |
192 |
- |
193 |
-src_configure() { |
194 |
- # Setup some paths |
195 |
- LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
196 |
- INCPATH=${LIBPATH}/include |
197 |
- DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
198 |
- if is_cross ; then |
199 |
- TOOLPATH=/usr/${CHOST}/${CTARGET} |
200 |
- else |
201 |
- TOOLPATH=/usr/${CTARGET} |
202 |
- fi |
203 |
- BINPATH=${TOOLPATH}/binutils-bin/${PV} |
204 |
- |
205 |
- # Make sure we filter $LINGUAS so that only ones that |
206 |
- # actually work make it through #42033 |
207 |
- strip-linguas -u */po |
208 |
- |
209 |
- # Keep things sane |
210 |
- strip-flags |
211 |
- |
212 |
- local x |
213 |
- echo |
214 |
- for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do |
215 |
- einfo "$(printf '%10s' ${x}:) ${!x}" |
216 |
- done |
217 |
- echo |
218 |
- |
219 |
- cd "${MY_BUILDDIR}" |
220 |
- local myconf=() |
221 |
- |
222 |
- if use plugins ; then |
223 |
- myconf+=( --enable-plugins ) |
224 |
- fi |
225 |
- # enable gold (installed as ld.gold) and ld's plugin architecture |
226 |
- if use gold ; then |
227 |
- myconf+=( --enable-gold ) |
228 |
- if use default-gold; then |
229 |
- myconf+=( --enable-gold=default ) |
230 |
- fi |
231 |
- fi |
232 |
- |
233 |
- if use nls ; then |
234 |
- myconf+=( --without-included-gettext ) |
235 |
- else |
236 |
- myconf+=( --disable-nls ) |
237 |
- fi |
238 |
- |
239 |
- myconf+=( --with-system-zlib ) |
240 |
- |
241 |
- # For bi-arch systems, enable a 64bit bfd. This matches |
242 |
- # the bi-arch logic in toolchain.eclass. #446946 |
243 |
- # We used to do it for everyone, but it's slow on 32bit arches. #438522 |
244 |
- case $(tc-arch) in |
245 |
- ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; |
246 |
- esac |
247 |
- |
248 |
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) |
249 |
- |
250 |
- [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) |
251 |
- |
252 |
- is_cross && myconf+=( |
253 |
- --with-sysroot="${EPREFIX}"/usr/${CTARGET} |
254 |
- --enable-poison-system-directories |
255 |
- ) |
256 |
- |
257 |
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+ |
258 |
- # on everyone in alpha (for now), we'll just enable it when possible |
259 |
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt ) |
260 |
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt ) |
261 |
- |
262 |
- # mips can't do hash-style=gnu ... |
263 |
- if [[ $(tc-arch) != mips ]] ; then |
264 |
- myconf+=( --enable-default-hash-style=gnu ) |
265 |
- fi |
266 |
- |
267 |
- myconf+=( |
268 |
- --prefix="${EPREFIX}"/usr |
269 |
- --host=${CHOST} |
270 |
- --target=${CTARGET} |
271 |
- --datadir="${EPREFIX}"${DATAPATH} |
272 |
- --datarootdir="${EPREFIX}"${DATAPATH} |
273 |
- --infodir="${EPREFIX}"${DATAPATH}/info |
274 |
- --mandir="${EPREFIX}"${DATAPATH}/man |
275 |
- --bindir="${EPREFIX}"${BINPATH} |
276 |
- --libdir="${EPREFIX}"${LIBPATH} |
277 |
- --libexecdir="${EPREFIX}"${LIBPATH} |
278 |
- --includedir="${EPREFIX}"${INCPATH} |
279 |
- --enable-obsolete |
280 |
- --enable-shared |
281 |
- --enable-threads |
282 |
- # Newer versions (>=2.27) offer a configure flag now. |
283 |
- --enable-relro |
284 |
- # Newer versions (>=2.24) make this an explicit option. #497268 |
285 |
- --enable-install-libiberty |
286 |
- --disable-werror |
287 |
- --with-bugurl="$(toolchain-binutils_bugurl)" |
288 |
- --with-pkgversion="$(toolchain-binutils_pkgversion)" |
289 |
- $(use_enable static-libs static) |
290 |
- ${EXTRA_ECONF} |
291 |
- # Disable modules that are in a combined binutils/gdb tree. #490566 |
292 |
- --disable-{gdb,libdecnumber,readline,sim} |
293 |
- # Strip out broken static link flags. |
294 |
- # https://gcc.gnu.org/PR56750 |
295 |
- --without-stage1-ldflags |
296 |
- # Change SONAME to avoid conflict across |
297 |
- # {native,cross}/binutils, binutils-libs. #666100 |
298 |
- --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) |
299 |
- ) |
300 |
- echo ./configure "${myconf[@]}" |
301 |
- "${S}"/configure "${myconf[@]}" || die |
302 |
- |
303 |
- # Prevent makeinfo from running if doc is unset. |
304 |
- if ! use doc ; then |
305 |
- sed -i \ |
306 |
- -e '/^MAKEINFO/s:=.*:= true:' \ |
307 |
- Makefile || die |
308 |
- fi |
309 |
-} |
310 |
- |
311 |
-src_compile() { |
312 |
- cd "${MY_BUILDDIR}" |
313 |
- # see Note [tooldir hack for ldscripts] |
314 |
- emake tooldir="${EPREFIX}${TOOLPATH}" all |
315 |
- |
316 |
- # only build info pages if the user wants them |
317 |
- if use doc ; then |
318 |
- emake info |
319 |
- fi |
320 |
- |
321 |
- # we nuke the manpages when we're left with junk |
322 |
- # (like when we bootstrap, no perl -> no manpages) |
323 |
- find . -name '*.1' -a -size 0 -delete |
324 |
-} |
325 |
- |
326 |
-src_test() { |
327 |
- cd "${MY_BUILDDIR}" |
328 |
- # bug 637066 |
329 |
- filter-flags -Wall -Wreturn-type |
330 |
- emake -k check |
331 |
-} |
332 |
- |
333 |
-src_install() { |
334 |
- local x d |
335 |
- |
336 |
- cd "${MY_BUILDDIR}" |
337 |
- # see Note [tooldir hack for ldscripts] |
338 |
- emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install |
339 |
- rm -rf "${ED}"/${LIBPATH}/bin |
340 |
- use static-libs || find "${ED}" -name '*.la' -delete |
341 |
- |
342 |
- # Newer versions of binutils get fancy with ${LIBPATH} #171905 |
343 |
- cd "${ED}"/${LIBPATH} |
344 |
- for d in ../* ; do |
345 |
- [[ ${d} == ../${PV} ]] && continue |
346 |
- mv ${d}/* . || die |
347 |
- rmdir ${d} || die |
348 |
- done |
349 |
- |
350 |
- # Now we collect everything intp the proper SLOT-ed dirs |
351 |
- # When something is built to cross-compile, it installs into |
352 |
- # /usr/$CHOST/ by default ... we have to 'fix' that :) |
353 |
- if is_cross ; then |
354 |
- cd "${ED}"/${BINPATH} |
355 |
- for x in * ; do |
356 |
- mv ${x} ${x/${CTARGET}-} |
357 |
- done |
358 |
- |
359 |
- if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then |
360 |
- mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} |
361 |
- mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ |
362 |
- rm -r "${ED}"/usr/${CHOST}/{include,lib} |
363 |
- fi |
364 |
- fi |
365 |
- insinto ${INCPATH} |
366 |
- local libiberty_headers=( |
367 |
- # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. |
368 |
- demangle.h |
369 |
- dyn-string.h |
370 |
- fibheap.h |
371 |
- hashtab.h |
372 |
- libiberty.h |
373 |
- objalloc.h |
374 |
- splay-tree.h |
375 |
- ) |
376 |
- doins "${libiberty_headers[@]/#/${S}/include/}" |
377 |
- if [[ -d ${ED}/${LIBPATH}/lib ]] ; then |
378 |
- mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ |
379 |
- rm -r "${ED}"/${LIBPATH}/lib |
380 |
- fi |
381 |
- |
382 |
- # Generate an env.d entry for this binutils |
383 |
- insinto /etc/env.d/binutils |
384 |
- cat <<-EOF > "${T}"/env.d |
385 |
- TARGET="${CTARGET}" |
386 |
- VER="${PV}" |
387 |
- LIBPATH="${EPREFIX}${LIBPATH}" |
388 |
- EOF |
389 |
- newins "${T}"/env.d ${CTARGET}-${PV} |
390 |
- |
391 |
- # Handle documentation |
392 |
- if ! is_cross ; then |
393 |
- cd "${S}" |
394 |
- dodoc README |
395 |
- docinto bfd |
396 |
- dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO |
397 |
- docinto binutils |
398 |
- dodoc binutils/ChangeLog binutils/NEWS binutils/README |
399 |
- docinto gas |
400 |
- dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* |
401 |
- docinto gprof |
402 |
- dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl |
403 |
- docinto ld |
404 |
- dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO |
405 |
- docinto libiberty |
406 |
- dodoc libiberty/ChangeLog* libiberty/README |
407 |
- docinto opcodes |
408 |
- dodoc opcodes/ChangeLog* |
409 |
- fi |
410 |
- |
411 |
- # Remove shared info pages |
412 |
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} |
413 |
- |
414 |
- # Trim all empty dirs |
415 |
- find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null |
416 |
- |
417 |
- # the hppa64 hack; this should go into 9999 as a PN-conditional |
418 |
- # tweak the default fake list a little bit |
419 |
- cd "${D}"/etc/env.d/binutils |
420 |
- sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${PV} || die |
421 |
-} |
422 |
- |
423 |
-pkg_postinst() { |
424 |
- # Make sure this ${CTARGET} has a binutils version selected |
425 |
- [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 |
426 |
- binutils-config ${CTARGET}-${PV} |
427 |
-} |
428 |
- |
429 |
-pkg_postrm() { |
430 |
- local current_profile=$(binutils-config -c ${CTARGET}) |
431 |
- |
432 |
- # If no other versions exist, then uninstall for this |
433 |
- # target ... otherwise, switch to the newest version |
434 |
- # Note: only do this if this version is unmerged. We |
435 |
- # rerun binutils-config if this is a remerge, as |
436 |
- # we want the mtimes on the symlinks updated (if |
437 |
- # it is the same as the current selected profile) |
438 |
- if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then |
439 |
- local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') |
440 |
- choice=${choice//$'\n'/ } |
441 |
- choice=${choice/* } |
442 |
- if [[ -z ${choice} ]] ; then |
443 |
- binutils-config -u ${CTARGET} |
444 |
- else |
445 |
- binutils-config ${choice} |
446 |
- fi |
447 |
- elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then |
448 |
- binutils-config ${CTARGET}-${PV} |
449 |
- fi |
450 |
-} |
451 |
-# Note [slotting support] |
452 |
-# ----------------------- |
453 |
-# Gentoo's layout for binutils files is non-standard as Gentoo |
454 |
-# supports slotted installation for binutils. Many tools |
455 |
-# still expect binutils to reside in known locations. |
456 |
-# binutils-config package restores symlinks into known locations, |
457 |
-# like: |
458 |
-# /usr/bin/${CTARGET}-<tool> |
459 |
-# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips |
460 |
-# /usr/include/ |
461 |
-# |
462 |
-# Note [tooldir hack for ldscripts] |
463 |
-# --------------------------------- |
464 |
-# Build system does not allow ./configure to tweak every location |
465 |
-# we need for slotting binutils hence all the shuffling in |
466 |
-# src_install(). This note is about SCRIPTDIR define handling. |
467 |
-# |
468 |
-# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value |
469 |
-# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib' |
470 |
-# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time. |
471 |
-# Thus we can't just move files around after compilation finished. |
472 |
-# |
473 |
-# Our goal is the following: |
474 |
-# - at build-time set scriptdir to point to symlinked location: |
475 |
-# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) |
476 |
-# - at install-time set scriptdir to point to slotted location: |
477 |
-# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} |