From 6bc7f7261732b7574a016f41b60f2087e4cf4977 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Tue, 8 Sep 2026 21:54:17 +0200 Subject: [PATCH] sys-libs/readline: avoid reliance on obscure "STAGE" variable For Prefix bootstrap, pkg-config may be missing, which apparently at some point we detected by the presence of the STAGE variable, which was used internally by bootstrap-prefix.sh. This got recently replaced by BOOTSTRAP_STAGE instead, but avoid checking that, and just see if pkg-config is around instead. Signed-off-by: Fabian Groffen --- sys-libs/readline/readline-8.2_p13-r1.ebuild | 2 +- sys-libs/readline/readline-8.3_p3.ebuild | 2 +- sys-libs/readline/readline-8.4_alpha_pre20251007.ebuild | 2 +- sys-libs/readline/readline-9999.ebuild | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys-libs/readline/readline-8.2_p13-r1.ebuild b/sys-libs/readline/readline-8.2_p13-r1.ebuild index 29f55a7d24fbb..760a2f6b73007 100644 --- a/sys-libs/readline/readline-8.2_p13-r1.ebuild +++ b/sys-libs/readline/readline-8.2_p13-r1.ebuild @@ -126,7 +126,7 @@ src_prepare() { is_release || eautoreconf - if use prefix && [[ -n ${STAGE} ]] ; then + if use prefix && ! type -P $(tc-getPKG_CONFIG) > /dev/null ; then # If we're bootstrapping, make a guess. We don't have pkg-config # around yet. bug #818103. # Incorrectly populating this leads to underlinked libreadline. diff --git a/sys-libs/readline/readline-8.3_p3.ebuild b/sys-libs/readline/readline-8.3_p3.ebuild index 3fddcda052544..c8f52140a0004 100644 --- a/sys-libs/readline/readline-8.3_p3.ebuild +++ b/sys-libs/readline/readline-8.3_p3.ebuild @@ -126,7 +126,7 @@ src_prepare() { #(( PLEVEL < 0 )) && eautoreconf - if use prefix && [[ -n ${STAGE} ]] ; then + if use prefix && ! type -P $(tc-getPKG_CONFIG) > /dev/null ; then # If we're bootstrapping, make a guess. We don't have pkg-config # around yet. bug #818103. # Incorrectly populating this leads to underlinked libreadline. diff --git a/sys-libs/readline/readline-8.4_alpha_pre20251007.ebuild b/sys-libs/readline/readline-8.4_alpha_pre20251007.ebuild index b6cfe4de3649e..2450df74c0741 100644 --- a/sys-libs/readline/readline-8.4_alpha_pre20251007.ebuild +++ b/sys-libs/readline/readline-8.4_alpha_pre20251007.ebuild @@ -126,7 +126,7 @@ src_prepare() { #(( PLEVEL < 0 )) && eautoreconf - if use prefix && [[ -n ${STAGE} ]] ; then + if use prefix && ! type -P $(tc-getPKG_CONFIG) > /dev/null ; then # If we're bootstrapping, make a guess. We don't have pkg-config # around yet. bug #818103. # Incorrectly populating this leads to underlinked libreadline. diff --git a/sys-libs/readline/readline-9999.ebuild b/sys-libs/readline/readline-9999.ebuild index 236229ef6d735..24a840f7f08a9 100644 --- a/sys-libs/readline/readline-9999.ebuild +++ b/sys-libs/readline/readline-9999.ebuild @@ -126,7 +126,7 @@ src_prepare() { #(( PLEVEL < 0 )) && eautoreconf - if use prefix && [[ -n ${STAGE} ]] ; then + if use prefix && ! type -P $(tc-getPKG_CONFIG) > /dev/null ; then # If we're bootstrapping, make a guess. We don't have pkg-config # around yet. bug #818103. # Incorrectly populating this leads to underlinked libreadline.