commit:     7c116df5b34e6e8f1ae9c2121b1f01d02bb978ff
Author:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 19 10:44:30 2018 +0000
Commit:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Fri Jan 19 10:44:30 2018 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=7c116df5

sys-devel/gcc-config: sync, use /usr/bin/env bash

For prefix-chaining there eventually is no EPREFIX/bin/bash, so we need
to /usr/bin/env bash instead.

Package-Manager: Portage-2.3.18-prefix, Repoman-2.3.6

 sys-devel/gcc-config/Manifest                      |  1 +
 .../files/gcc-config-1.9-usrbinenv-bash.patch      | 18 +++++++
 sys-devel/gcc-config/gcc-config-1.9.1.ebuild       | 62 ++++++++++++++++++++++
 3 files changed, 81 insertions(+)

diff --git a/sys-devel/gcc-config/Manifest b/sys-devel/gcc-config/Manifest
index ccd59688f9..3a3f29ce03 100644
--- a/sys-devel/gcc-config/Manifest
+++ b/sys-devel/gcc-config/Manifest
@@ -1 +1,2 @@
 DIST gcc-config-1.9.0.tar.xz 17468 BLAKE2B 
3e0b6faff3ac582fc0fed921958ff849ba8b1be5b0c25609790cd56400c05371e47ecd955b7bc79362179a559def94463a3667858a70d6edd283d2c064ff0734
 SHA512 
658c8ce26fdddd6f3e519310001cdf0f8fb01226df2d575fec81b39c083613ef0675024b79b285fab89a930c4ada7a1aef04433eb21947b4e9c0a9cb12f8fabc
+DIST gcc-config-1.9.1.tar.xz 17628 BLAKE2B 
8fce87038d9aed625d833327a7e335c311aeb04d44a07a7738def235333a9428664314ddd4da3a1d59d030136734377a838f25ff411b249aba25ea22a88460ee
 SHA512 
6c518c266698277a1ad00a1624fc1ada15ed7096d05a520700c60a27180885169bd2051fb6869e6a958503c8eebc1cd6c211098501c5fe258ee11d96c6a0b069

diff --git a/sys-devel/gcc-config/files/gcc-config-1.9-usrbinenv-bash.patch 
b/sys-devel/gcc-config/files/gcc-config-1.9-usrbinenv-bash.patch
new file mode 100644
index 0000000000..5df08b42f6
--- /dev/null
+++ b/sys-devel/gcc-config/files/gcc-config-1.9-usrbinenv-bash.patch
@@ -0,0 +1,18 @@
+--- gcc-config-1.9.0/gcc-config
++++ gcc-config-1.9.0/gcc-config
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ # Copyright 1999-2012 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+ 
+--- gcc-config-1.9.1/Makefile
++++ gcc-config-1.9.1/Makefile
+@@ -26,7 +26,6 @@
+ 
+ .gcc-config: gcc-config
+       sed \
+-              -e '1s:/:$(EPREFIX)/:' \
+               -e 's:@GENTOO_EPREFIX@:$(EPREFIX):g' \
+               -e 's:@GENTOO_LIBDIR@:$(SUBLIBDIR):g' \
+               -e 's:@PV@:$(PV):g' \

diff --git a/sys-devel/gcc-config/gcc-config-1.9.1.ebuild 
b/sys-devel/gcc-config/gcc-config-1.9.1.ebuild
new file mode 100644
index 0000000000..3605471f2d
--- /dev/null
+++ b/sys-devel/gcc-config/gcc-config-1.9.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+       EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git";
+       inherit git-r3
+else
+       SRC_URI="mirror://gentoo/${P}.tar.xz
+               https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.xz";
+       KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris 
~x86-solaris ~x86-winnt"
+fi
+
+DESCRIPTION="Utility to manage compilers"
+HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/";
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+RDEPEND=">=sys-apps/gentoo-functions-0.10"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.8-copy-gcc-libs-darwin.patch
+       "${FILESDIR}"/${PN}-1.9-cygwin.patch
+       "${FILESDIR}"/${PN}-1.9-usrbinenv-bash.patch
+)
+
+src_compile() {
+       emake CC="$(tc-getCC)" \
+               EPREFIX="${EPREFIX}" \
+               PV="${PV}" \
+               SUBLIBDIR="$(get_libdir)"
+}
+
+src_install() {
+       emake \
+               EPREFIX="${EPREFIX}" \
+               DESTDIR="${D}" \
+               PV="${PV}" \
+               SUBLIBDIR="$(get_libdir)" \
+               install
+}
+
+pkg_postinst() {
+       # Scrub eselect-compiler remains
+       rm -f "${EROOT}"/etc/env.d/05compiler &
+
+       # We not longer use the /usr/include/g++-v3 hacks, as
+       # it is not needed ...
+       rm -f "${EROOT}"/usr/include/g++{,-v3} &
+
+       # Do we have a valid multi ver setup ?
+       local x
+       for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 
}') ; do
+               gcc-config ${x}
+       done
+
+       wait
+}

Reply via email to