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