sys-devel/gcc-config: bump up to 2.0
authorSergei Trofimovich <slyfox@gentoo.org>
Fri, 24 Aug 2018 18:42:23 +0000 (19:42 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Fri, 24 Aug 2018 18:42:37 +0000 (19:42 +0100)
Things of note:
- gcc-config runs env-update on prefix as well
- gcc wrapper gone away and gcc-config now just symlinks gcc binary
- LTO plugin is symlinked into binutils

Closes: https://bugs.gentoo.org/640958
Package-Manager: Portage-2.3.48, Repoman-2.3.10

sys-devel/gcc-config/Manifest
sys-devel/gcc-config/gcc-config-2.0.ebuild [new file with mode: 0644]

index e135963215e9d75f5608f9447eb25823bdbd1177..690dbe03214786a6364347c872a5476d5bf9c16a 100644 (file)
@@ -1,3 +1,4 @@
 DIST gcc-config-1.8.tar.xz 15020 BLAKE2B 97debbef946b0c14b4ecc0bc5b2217566b43f21318970b235b2919bd1e1ea41aff66aebb0ed73db2382f8312268327eb6844139bdeae7aba75771c699a5043df SHA512 3b84af2d961a0527834759e047330dbab7bac0ff3d6aae103f14fca2d44bd612bd4a1005649e8b4198036231ed8a8319fb13326b4d2c40474826cf53f7bc0826
 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
+DIST gcc-config-2.0.tar.xz 15344 BLAKE2B 323b1e791b831ee610a375fc03532ab89e31b1f74586742c1d37dcea9c7853cf4ebfef875fc2bfa273cfc1555a33b9f04a1e58c850133cddee765dd769bdb189 SHA512 67c8cfc7e031d4a88191c04495c97f46e90e2d3fce4cd1afc29f142fad9414218768d3c6de4bd8bb7d9baa39a20b17bb28a503b0d05d6db2003b767546317a30
diff --git a/sys-devel/gcc-config/gcc-config-2.0.ebuild b/sys-devel/gcc-config/gcc-config-2.0.ebuild
new file mode 100644 (file)
index 0000000..bc4ed33
--- /dev/null
@@ -0,0 +1,54 @@
+# 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/~slyfox/distfiles/${P}.tar.xz"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+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"
+
+src_compile() {
+       emake CC="$(tc-getCC)" \
+               PV="${PV}" \
+               SUBLIBDIR="$(get_libdir)"
+}
+
+src_install() {
+       emake \
+               DESTDIR="${D}" \
+               PV="${PV}" \
+               SUBLIBDIR="$(get_libdir)" \
+               install
+}
+
+pkg_postinst() {
+       # Scrub eselect-compiler remains
+       rm -f "${ROOT}"/etc/env.d/05compiler &
+
+       # We not longer use the /usr/include/g++-v3 hacks, as
+       # it is not needed ...
+       rm -f "${ROOT}"/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
+}