commit: cc730b95068dab4c1719d62299e905a57221876d Author: Adrian Ratiu <adrian.ratiu <AT> collabora <DOT> com> AuthorDate: Tue Feb 25 13:45:45 2025 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Thu Feb 27 17:09:37 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc730b95
sys-libs/libxcrypt: avoid using pkg-config for headers-only When setting USE=headers-only, nothing gets built, and just some static files get installed: the two (x)crypt.h headers alongside the /usr/share/doc files. The usefulness of this is mostly for early compiler bootstrapping, to break circular deps like: compiler-rt -> libxcrypt -> complier-rt There is no need to have a working pkg-config, the env var PKG_CONFIG is empty, there might not even be any setup for cross-*/pkgconf and the configure step will likely end up calling the host pkg-config (which will fail my profile sanity checks). So we set to a known no-op value just for USE=headers-only leaving all the non-headers builds to pick the correct variant as before. Closes: https://bugs.gentoo.org/950273 Signed-off-by: Adrian Ratiu <adrian.ratiu <AT> collabora.com> Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild | 6 ++++-- sys-libs/libxcrypt/libxcrypt-4.4.38.ebuild | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild index 31934e95cd77..ee2c2f74d184 100644 --- a/sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild +++ b/sys-libs/libxcrypt/libxcrypt-4.4.36-r3.ebuild @@ -138,9 +138,11 @@ src_configure() { fi if use headers-only; then - # Nothing is compiled here which would affect the headers for the target. - # So forcing CC is sane. + # Nothing is compiled which would affect the headers, so we set + # CC and PKG_CONFIG to ensure configure passes without defaulting + # to the unprefixed host variants e.g. "pkg-config" local -x CC="$(tc-getBUILD_CC)" + local -x PKG_CONFIG="false" fi # Avoid possible "illegal instruction" errors with gold diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.38.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.38.ebuild index 566750ba0d8d..42cb9b1e2412 100644 --- a/sys-libs/libxcrypt/libxcrypt-4.4.38.ebuild +++ b/sys-libs/libxcrypt/libxcrypt-4.4.38.ebuild @@ -138,9 +138,11 @@ src_configure() { fi if use headers-only; then - # Nothing is compiled here which would affect the headers for the target. - # So forcing CC is sane. + # Nothing is compiled which would affect the headers, so we set + # CC and PKG_CONFIG to ensure configure passes without defaulting + # to the unprefixed host variants e.g. "pkg-config" local -x CC="$(tc-getBUILD_CC)" + local -x PKG_CONFIG="false" fi # Doesn't work with LTO: bug #852917.
