summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-08-13 04:03:03 -0400
committerMike Frysinger <vapier@gentoo.org>2015-08-13 04:04:44 -0400
commit9c7ffc0c89bf341f50303a72e9de99e1abb7f9aa (patch)
tree4dd114a622cdcd87d1c083493177f2f2981a06dc /sys-devel/binutils-config
parentnet-wireless/blueman-9999: remove the codeset patch thas has been merged upst... (diff)
downloadgentoo-9c7ffc0c89bf341f50303a72e9de99e1abb7f9aa.tar.gz
gentoo-9c7ffc0c89bf341f50303a72e9de99e1abb7f9aa.tar.bz2
gentoo-9c7ffc0c89bf341f50303a72e9de99e1abb7f9aa.zip
sys-devel/binutils-config: add an eselect wrapper
Diffstat (limited to 'sys-devel/binutils-config')
-rw-r--r--sys-devel/binutils-config/binutils-config-4-r4.ebuild29
-rw-r--r--sys-devel/binutils-config/files/binutils.eselect45
2 files changed, 74 insertions, 0 deletions
diff --git a/sys-devel/binutils-config/binutils-config-4-r4.ebuild b/sys-devel/binutils-config/binutils-config-4-r4.ebuild
new file mode 100644
index 000000000000..6ca11257a5a9
--- /dev/null
+++ b/sys-devel/binutils-config/binutils-config-4-r4.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Utility to change the binutils version being used"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+# Need a new eselect release w/out the binutils wrapper first.
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+# We also RDEPEND on sys-apps/findutils which is in base @system
+RDEPEND="sys-apps/gentoo-functions
+ !<app-admin/eselect-1.4.4"
+
+S=${WORKDIR}
+
+src_install() {
+ newbin "${FILESDIR}"/${PN}-${PV} ${PN}
+ doman "${FILESDIR}"/${PN}.8
+
+ insinto /usr/share/eselect/modules
+ doins "${FILESDIR}"/binutils.eselect
+}
diff --git a/sys-devel/binutils-config/files/binutils.eselect b/sys-devel/binutils-config/files/binutils.eselect
new file mode 100644
index 000000000000..a89655aba145
--- /dev/null
+++ b/sys-devel/binutils-config/files/binutils.eselect
@@ -0,0 +1,45 @@
+# -*-eselect-*- vim: ft=eselect
+# Copyright 2005-2015 Gentoo Foundation
+# Distributed under the terms of the GNU GPL version 2 or later
+
+DESCRIPTION="Manage installed versions of sys-devel/binutils"
+MAINTAINER="toolchain@gentoo.org"
+
+### list action
+
+describe_list() {
+ echo "List all installed version of binutils"
+}
+
+do_list() {
+ binutils-config -l
+}
+
+### set action
+
+describe_set() {
+ echo "Activate one of the installed binutils"
+}
+
+describe_set_parameters() {
+ echo "<target>"
+}
+
+describe_set_options() {
+ echo "target : Target name or number (from 'list' action)"
+}
+
+do_set() {
+ [[ $# -eq 1 ]] || die -q "Please specify exactly one version to activate!"
+ binutils-config "$1"
+}
+
+### show action
+
+describe_show() {
+ echo "Print the currently active binutils version"
+}
+
+do_show() {
+ binutils-config -c
+}