Gentoo Archives: gentoo-commits

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