summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-05-21 23:05:32 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-05-21 23:05:47 +0100
commit8f92925b8d3eceb7e1d66571505ad040089b3921 (patch)
tree195f8eae439f259eba8eaf597246ec072820d1c7 /sys-devel
parentdev-lang/php: stable 7.4.6 for hppa, bug #722980 (diff)
downloadgentoo-8f92925b8d3eceb7e1d66571505ad040089b3921.tar.gz
gentoo-8f92925b8d3eceb7e1d66571505ad040089b3921.tar.bz2
gentoo-8f92925b8d3eceb7e1d66571505ad040089b3921.zip
sys-devel/binutils-config: add live ebuild
To ease live testing of changes like bug #724454 let's have a live ebuild. Should also be a good hint where default repository hides. Add USE=+native-symlinks flag to install 'as', 'ar' and friends. Bug: https://bugs.gentoo.org/724454 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/binutils-config/binutils-config-9999.ebuild46
-rw-r--r--sys-devel/binutils-config/metadata.xml11
2 files changed, 53 insertions, 4 deletions
diff --git a/sys-devel/binutils-config/binutils-config-9999.ebuild b/sys-devel/binutils-config/binutils-config-9999.ebuild
new file mode 100644
index 000000000000..fdc087086271
--- /dev/null
+++ b/sys-devel/binutils-config/binutils-config-9999.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit prefix
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/binutils-config.git"
+ inherit git-r3
+else
+ SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+fi
+
+DESCRIPTION="Utility to change the binutils version being used"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Toolchain"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+native-symlinks"
+
+# We also RDEPEND on sys-apps/findutils which is in base @system
+RDEPEND="sys-apps/gentoo-functions"
+
+src_compile() {
+ emake DESTDIR="${D}" PV="${PV}" USE_NATIVE_LINKS="$(usex native-symlinks)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PV="${PV}" install
+
+ use prefix && eprefixify "${ED}"/usr/bin/${PN}
+}
+
+pkg_preinst() {
+ # Force a refresh when upgrading from an older version that symlinked
+ # in all the libs & includes that binutils-libs handles. #528088
+ if has_version "<${CATEGORY}/${PN}-5" ; then
+ local bc current
+ bc="${ED}/usr/bin/binutils-config"
+ if current=$("${bc}" -c) ; then
+ "${bc}" "${current}"
+ fi
+ fi
+}
diff --git a/sys-devel/binutils-config/metadata.xml b/sys-devel/binutils-config/metadata.xml
index e396f3755977..3c7c5c4c8e9b 100644
--- a/sys-devel/binutils-config/metadata.xml
+++ b/sys-devel/binutils-config/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>toolchain@gentoo.org</email>
- <name>Gentoo Toolchain Project</name>
-</maintainer>
+ <maintainer type="project">
+ <email>toolchain@gentoo.org</email>
+ <name>Gentoo Toolchain Project</name>
+ </maintainer>
+ <use>
+ <flag name="native-symlinks">Install native symlinks like 'as' or 'ar' to /usr/bin. Otherwise keep only ${CHOST}-as and friends.</flag>
+ </use>
</pkgmetadata>