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