commit:     9c7ffc0c89bf341f50303a72e9de99e1abb7f9aa
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 13 08:03:03 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Aug 13 08:04:44 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c7ffc0c

sys-devel/binutils-config: add an eselect wrapper

 .../binutils-config/binutils-config-4-r4.ebuild    | 29 ++++++++++++++
 sys-devel/binutils-config/files/binutils.eselect   | 45 ++++++++++++++++++++++
 2 files changed, 74 insertions(+)

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 0000000..6ca1125
--- /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 0000000..a89655a
--- /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="toolch...@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
+}

Reply via email to