mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user