From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B78321395EA for ; Wed, 5 Aug 2015 08:12:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5E4961405A; Wed, 5 Aug 2015 08:12:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0EAB41405A for ; Wed, 5 Aug 2015 08:12:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1EE50340967 for ; Wed, 5 Aug 2015 08:12:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DE3DF10F for ; Wed, 5 Aug 2015 08:12:23 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1438761894.db595876a93d194b2ac98c9e1804d0772edb1635.vapier@gentoo> Subject: [gentoo-commits] proj/gcc-config:master commit in: / X-VCS-Repository: proj/gcc-config X-VCS-Files: Makefile gcc.eselect X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: db595876a93d194b2ac98c9e1804d0772edb1635 X-VCS-Branch: master Date: Wed, 5 Aug 2015 08:12:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ebec125f-64f1-4f59-a54c-40dc0d12246e X-Archives-Hash: c1a8dba881e186372f9ce5bb27762d4d commit: db595876a93d194b2ac98c9e1804d0772edb1635 Author: Mike Frysinger gentoo org> AuthorDate: Wed Aug 5 08:04:54 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Wed Aug 5 08:04:54 2015 +0000 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=db595876 gcc.eselect: add an eselect module This wraps gcc-config so that people can use the standard eselect interface to manage gcc profiles. URL: https://bugs.gentoo.org/507870 Reported-by: Ulrich Müller gentoo.org> Signed-off-by: Mike Frysinger gentoo.org> Makefile | 5 ++++- gcc.eselect | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index db14af9..e20f9f8 100644 --- a/Makefile +++ b/Makefile @@ -10,12 +10,14 @@ P = $(PN)-$(PV) PREFIX = $(EPREFIX)/usr BINDIR = $(PREFIX)/bin +ESELECTDIR = $(PREFIX)/share/eselect/modules SUBLIBDIR = lib LIBDIR = $(PREFIX)/$(SUBLIBDIR) LIBEXECDIR = $(LIBDIR)/misc MKDIR_P = mkdir -p -m 755 INSTALL_EXE = install -m 755 +INSTALL_DATA = install -m 644 all: .gcc-config wrapper @@ -32,9 +34,10 @@ clean: chmod a+rx $@ install: all - $(MKDIR_P) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBEXECDIR) + $(MKDIR_P) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBEXECDIR) $(DESTDIR)$(ESELECTDIR) $(INSTALL_EXE) wrapper $(DESTDIR)$(LIBEXECDIR)/$(PN) $(INSTALL_EXE) .gcc-config $(DESTDIR)$(BINDIR)/gcc-config + $(INSTALL_DATA) gcc.eselect $(DESTDIR)$(ESELECTDIR) test check: .gcc-config cd tests && ./run_tests diff --git a/gcc.eselect b/gcc.eselect new file mode 100644 index 0000000..02606dc --- /dev/null +++ b/gcc.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/gcc" +MAINTAINER="toolchain@gentoo.org" + +### list action + +describe_list() { + echo "List all installed version of gcc" +} + +do_list() { + gcc-config -l +} + +### set action + +describe_set() { + echo "Activate one of the installed gcc" +} + +describe_set_parameters() { + echo "" +} + +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!" + gcc-config "$1" +} + +### show action + +describe_show() { + echo "Print the currently active gcc version" +} + +do_show() { + gcc-config -c +}