commit:     1f9d961bfe241cc1e14725c997f0e4853e0d43e0
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 29 01:42:25 2024 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Feb 29 17:56:02 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f9d961b

dev-util/pkgconf: Add IUSE=native-symlinks

Similar to other toolchain packages.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 dev-util/pkgconf/metadata.xml         | 7 +++++++
 dev-util/pkgconf/pkgconf-2.1.1.ebuild | 6 +++++-
 dev-util/pkgconf/pkgconf-9999.ebuild  | 6 +++++-
 profiles/base/package.use.force       | 7 +++++++
 4 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/dev-util/pkgconf/metadata.xml b/dev-util/pkgconf/metadata.xml
index 56ed879da008..0228976b1b04 100644
--- a/dev-util/pkgconf/metadata.xml
+++ b/dev-util/pkgconf/metadata.xml
@@ -11,4 +11,11 @@
                <remote-id type="github">pkgconf/pkgconf</remote-id>
                <remote-id type="cpe">cpe:/a:pkgconf:pkgconf</remote-id>
        </upstream>
+       <use>
+               <flag name="native-symlinks">
+                       Install generic symlinks like pkgconf and pkg-config.
+                       If this flag is disabled, only CHOST-prefixed pkg-config
+                       executables will be available to end users and ebuilds.
+               </flag>
+       </use>
 </pkgmetadata>

diff --git a/dev-util/pkgconf/pkgconf-2.1.1.ebuild 
b/dev-util/pkgconf/pkgconf-2.1.1.ebuild
index 8651a601e51b..435eb9ff3169 100644
--- a/dev-util/pkgconf/pkgconf-2.1.1.ebuild
+++ b/dev-util/pkgconf/pkgconf-2.1.1.ebuild
@@ -18,7 +18,7 @@ HOMEPAGE="https://gitea.treehouse.systems/ariadne/pkgconf";
 
 LICENSE="ISC"
 SLOT="0/4"
-IUSE="test"
+IUSE="+native-symlinks test"
 
 RESTRICT="!test? ( test )"
 
@@ -65,5 +65,9 @@ multilib_src_install() {
 multilib_src_install_all() {
        einstalldocs
 
+       if ! use native-symlinks; then
+               rm "${ED}"/usr/bin/{pkgconf,pkg-config}$(get_exeext) || die
+       fi
+
        find "${ED}" -type f -name '*.la' -delete || die
 }

diff --git a/dev-util/pkgconf/pkgconf-9999.ebuild 
b/dev-util/pkgconf/pkgconf-9999.ebuild
index c4ee052f6bee..51dd19d7b135 100644
--- a/dev-util/pkgconf/pkgconf-9999.ebuild
+++ b/dev-util/pkgconf/pkgconf-9999.ebuild
@@ -18,7 +18,7 @@ HOMEPAGE="https://gitea.treehouse.systems/ariadne/pkgconf";
 
 LICENSE="ISC"
 SLOT="0/4"
-IUSE="test"
+IUSE="+native-symlinks test"
 
 RESTRICT="!test? ( test )"
 
@@ -65,5 +65,9 @@ multilib_src_install() {
 multilib_src_install_all() {
        einstalldocs
 
+       if ! use native-symlinks; then
+               rm "${ED}"/usr/bin/{pkgconf,pkg-config}$(get_exeext) || die
+       fi
+
        find "${ED}" -type f -name '*.la' -delete || die
 }

diff --git a/profiles/base/package.use.force b/profiles/base/package.use.force
index 7430401bf4b8..e268e4fb037c 100644
--- a/profiles/base/package.use.force
+++ b/profiles/base/package.use.force
@@ -1,6 +1,13 @@
 # Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Matt Turner <[email protected]> (2024-02-28)
+# A large number of packages still need /usr/bin/pkg-config
+# including meson.eclass consumers.
+# This is largely a QA smoketesting flag, and as such, should
+# not be enabled by users.
+dev-util/pkgconf native-symlinks
+
 # Ionen Wolkens <[email protected]> (2024-02-17)
 # Currently fails to build with gcc, and either way the current upstream
 # makes it clear that non-clang is not a supported configuration.

Reply via email to