diff options
author | Sam James <sam@gentoo.org> | 2021-10-14 09:38:36 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-10-14 09:39:18 +0100 |
commit | 8a5fe775294ede43387a38ef04a707cd1e2f9801 (patch) | |
tree | 84bdad49f2318cef14b83f636d665629c509e410 /sys-libs | |
parent | sci-libs/szip: drop 2.1-r2 (diff) | |
download | gentoo-8a5fe775294ede43387a38ef04a707cd1e2f9801.tar.gz gentoo-8a5fe775294ede43387a38ef04a707cd1e2f9801.tar.bz2 gentoo-8a5fe775294ede43387a38ef04a707cd1e2f9801.zip |
sys-libs/readline: avoid underlinking libreadline in prefix bootstrap
There's no guarantee we have pkg-config around super early
on in the process and we need readline for bash.
Closes: https://bugs.gentoo.org/818103
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/readline/readline-8.1_p1-r1.ebuild | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sys-libs/readline/readline-8.1_p1-r1.ebuild b/sys-libs/readline/readline-8.1_p1-r1.ebuild index 89f31e17eb10..d63522446751 100644 --- a/sys-libs/readline/readline-8.1_p1-r1.ebuild +++ b/sys-libs/readline/readline-8.1_p1-r1.ebuild @@ -70,9 +70,24 @@ src_prepare() { [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) default - # Force ncurses linking. #71420 - # Use pkg-config to get the right values. #457558 - local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs) + if use prefix && [[ ! -e "${BROOT}"/usr/bin/pkg-config ]] ; 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. + local ncurses_libs + local ncurses_libs_suffix=$(usex unicode w '') + + ncurses_libs="-lncurses${ncurses_libs_suffix}" + + if has_version "sys-libs/ncurses[tinfo(+)]" ; then + ncurses_libs+=" -ltinfo${ncurses_libs_suffix}" + fi + else + # Force ncurses linking. #71420 + # Use pkg-config to get the right values. #457558 + local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs) + fi + sed -i \ -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \ support/shobj-conf || die |