From a06e7cbe3045cb93c3ab4a1440e5811465633db3 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Mon, 1 Nov 2021 11:30:17 +0100 Subject: [PATCH] sys-libs/readline: update to 8.1_p1-r1 Now that ncurses 6.2_p20210619 dropped the USE flag 'unicode', it is not possible to specify the flag in sys-libs/readline. We need to make the flag optional, by specifying '(+)'. See also https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df194650455b53175ed2852547169875002b2292 Simply sync with Gentoo for readline 8.1_p1-r1 that has the fix. --- .../sys-libs/readline/metadata.xml | 2 +- ....1_p1.ebuild => readline-8.1_p1-r1.ebuild} | 29 ++++++++++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) rename sdk_container/src/third_party/portage-stable/sys-libs/readline/{readline-8.1_p1.ebuild => readline-8.1_p1-r1.ebuild} (85%) diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/readline/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-libs/readline/metadata.xml index 6bce63269f..c54508aa76 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/readline/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-libs/readline/metadata.xml @@ -1,5 +1,5 @@ - + base-system@gentoo.org diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/readline/readline-8.1_p1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/readline/readline-8.1_p1-r1.ebuild similarity index 85% rename from sdk_container/src/third_party/portage-stable/sys-libs/readline/readline-8.1_p1.ebuild rename to sdk_container/src/third_party/portage-stable/sys-libs/readline/readline-8.1_p1-r1.ebuild index 5cd7a3bdc2..7ee132fe1f 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/readline/readline-8.1_p1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-libs/readline/readline-8.1_p1-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit flag-o-matic multilib-minimal preserve-libs toolchain-funcs usr-ldscript +inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript # Official patches # See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/ @@ -45,11 +45,9 @@ SLOT="0/8" # subslot matches SONAME major KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="static-libs +unicode utils" -RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,unicode?,${MULTILIB_USEDEP}]" +RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]" DEPEND="${RDEPEND}" -BDEPEND=" - virtual/pkgconfig -" +BDEPEND="virtual/pkgconfig" S="${WORKDIR}/${MY_P}" @@ -72,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 && [[ ! -x "${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