Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-config/
Date: Thu, 21 May 2020 22:06:49
Message-Id: 1590098747.8f92925b8d3eceb7e1d66571505ad040089b3921.slyfox@gentoo
1 commit: 8f92925b8d3eceb7e1d66571505ad040089b3921
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 21 22:05:32 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Thu May 21 22:05:47 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f92925b
7
8 sys-devel/binutils-config: add live ebuild
9
10 To ease live testing of changes like bug #724454
11 let's have a live ebuild. Should also be a good hint
12 where default repository hides.
13
14 Add USE=+native-symlinks flag to install 'as', 'ar' and friends.
15
16 Bug: https://bugs.gentoo.org/724454
17 Package-Manager: Portage-2.3.99, Repoman-2.3.22
18 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
19
20 .../binutils-config/binutils-config-9999.ebuild | 46 ++++++++++++++++++++++
21 sys-devel/binutils-config/metadata.xml | 11 ++++--
22 2 files changed, 53 insertions(+), 4 deletions(-)
23
24 diff --git a/sys-devel/binutils-config/binutils-config-9999.ebuild b/sys-devel/binutils-config/binutils-config-9999.ebuild
25 new file mode 100644
26 index 00000000000..fdc08708627
27 --- /dev/null
28 +++ b/sys-devel/binutils-config/binutils-config-9999.ebuild
29 @@ -0,0 +1,46 @@
30 +# Copyright 1999-2020 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +inherit prefix
36 +
37 +if [[ ${PV} == 9999 ]]; then
38 + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/binutils-config.git"
39 + inherit git-r3
40 +else
41 + SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz"
42 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
43 +fi
44 +
45 +DESCRIPTION="Utility to change the binutils version being used"
46 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Toolchain"
47 +
48 +LICENSE="GPL-2"
49 +SLOT="0"
50 +IUSE="+native-symlinks"
51 +
52 +# We also RDEPEND on sys-apps/findutils which is in base @system
53 +RDEPEND="sys-apps/gentoo-functions"
54 +
55 +src_compile() {
56 + emake DESTDIR="${D}" PV="${PV}" USE_NATIVE_LINKS="$(usex native-symlinks)"
57 +}
58 +
59 +src_install() {
60 + emake DESTDIR="${D}" PV="${PV}" install
61 +
62 + use prefix && eprefixify "${ED}"/usr/bin/${PN}
63 +}
64 +
65 +pkg_preinst() {
66 + # Force a refresh when upgrading from an older version that symlinked
67 + # in all the libs & includes that binutils-libs handles. #528088
68 + if has_version "<${CATEGORY}/${PN}-5" ; then
69 + local bc current
70 + bc="${ED}/usr/bin/binutils-config"
71 + if current=$("${bc}" -c) ; then
72 + "${bc}" "${current}"
73 + fi
74 + fi
75 +}
76
77 diff --git a/sys-devel/binutils-config/metadata.xml b/sys-devel/binutils-config/metadata.xml
78 index e396f375597..3c7c5c4c8e9 100644
79 --- a/sys-devel/binutils-config/metadata.xml
80 +++ b/sys-devel/binutils-config/metadata.xml
81 @@ -1,8 +1,11 @@
82 <?xml version="1.0" encoding="UTF-8"?>
83 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
84 <pkgmetadata>
85 -<maintainer type="project">
86 - <email>toolchain@g.o</email>
87 - <name>Gentoo Toolchain Project</name>
88 -</maintainer>
89 + <maintainer type="project">
90 + <email>toolchain@g.o</email>
91 + <name>Gentoo Toolchain Project</name>
92 + </maintainer>
93 + <use>
94 + <flag name="native-symlinks">Install native symlinks like 'as' or 'ar' to /usr/bin. Otherwise keep only ${CHOST}-as and friends.</flag>
95 + </use>
96 </pkgmetadata>