sys-devel/gcc-config: add USE=+native-symlinks flag
authorSergei Trofimovich <slyfox@gentoo.org>
Fri, 22 May 2020 09:47:00 +0000 (10:47 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Fri, 22 May 2020 09:47:00 +0000 (10:47 +0100)
This flag guards presence of 'cc', 'gcc' and friends.

Bug: https://bugs.gentoo.org/724454
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
sys-devel/gcc-config/gcc-config-9999.ebuild
sys-devel/gcc-config/metadata.xml

index c27a2a1f2a82fb815b0305992625ed33f6ec4622..b599996f2b3151c39fad9e94a82616a736e9e689 100644 (file)
@@ -18,14 +18,15 @@ DESCRIPTION="Utility to manage compilers"
 HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/"
 LICENSE="GPL-2"
 SLOT="0"
-IUSE=""
+IUSE="+native-symlinks"
 
 RDEPEND=">=sys-apps/gentoo-functions-0.10"
 
 src_compile() {
        emake CC="$(tc-getCC)" \
                PV="${PV}" \
-               SUBLIBDIR="$(get_libdir)"
+               SUBLIBDIR="$(get_libdir)" \
+               USE_NATIVE_LINKS="$(usex native-symlinks)"
 }
 
 src_install() {
index e396f37559777302603f6c6ba6e0275d3a5c847b..33e9604b04144e7b97b2e9cfc8313318ecee8fad 100644 (file)
@@ -1,8 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer type="project">
-       <email>toolchain@gentoo.org</email>
-       <name>Gentoo Toolchain Project</name>
-</maintainer>
+       <maintainer type="project">
+               <email>toolchain@gentoo.org</email>
+               <name>Gentoo Toolchain Project</name>
+       </maintainer>
+       <use>
+               <flag name="native-symlinks">Install native symlinks like 'gcc' or 'g++' to /usr/bin. Otherwise keep only ${CTARGET}-gcc and friends.</flag>
+       </use>
 </pkgmetadata>