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