mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 14:06:58 +02:00
sys-libs/readline: Sync with Gentoo
It's from Gentoo commit d4954f93b743cccea2192b18f9499385ef78f933.
This commit is contained in:
parent
f472244699
commit
c3a8f02933
@ -20,3 +20,9 @@ DIST readline82-006 3031 BLAKE2B 1a78e7344e2983486bea6fd398b4922ca671016a07f1833
|
|||||||
DIST readline82-006.sig 95 BLAKE2B 48a0cf75019d44929eec32bf710438dc58629e41c5074c03e723b7102d23f45c78d726ded242654026e71a16eaf62dde4012ad9642181bade09d69159bc79900 SHA512 3b6da081737670e21a5acaa0be34d4196e576be823ec8f2d2c88b9dd5a7dc53da596731563e35601f0b180a818850d0ad27b120ec0ee48ade9c8487e958626be
|
DIST readline82-006.sig 95 BLAKE2B 48a0cf75019d44929eec32bf710438dc58629e41c5074c03e723b7102d23f45c78d726ded242654026e71a16eaf62dde4012ad9642181bade09d69159bc79900 SHA512 3b6da081737670e21a5acaa0be34d4196e576be823ec8f2d2c88b9dd5a7dc53da596731563e35601f0b180a818850d0ad27b120ec0ee48ade9c8487e958626be
|
||||||
DIST readline82-007 1422 BLAKE2B 5fbdfea7080a67e197305849f25390634c266a8e2363116ec5dcdc20e6cbce5af787ffdb500edb9d8111388eb6560c6749c4004eb362039813abcbe17cc3bd4e SHA512 e96dafe28f20b1092af08422b9be99965e3a973a0c19f7c57669a6a7fbf74ad4cc3490fa2ad50a1845644a65b0a0e001cfc7ad29528b3b36827a1b9a2c9a96e7
|
DIST readline82-007 1422 BLAKE2B 5fbdfea7080a67e197305849f25390634c266a8e2363116ec5dcdc20e6cbce5af787ffdb500edb9d8111388eb6560c6749c4004eb362039813abcbe17cc3bd4e SHA512 e96dafe28f20b1092af08422b9be99965e3a973a0c19f7c57669a6a7fbf74ad4cc3490fa2ad50a1845644a65b0a0e001cfc7ad29528b3b36827a1b9a2c9a96e7
|
||||||
DIST readline82-007.sig 95 BLAKE2B ea73f53d61291193937f28fcbdd09bd0dc46edefdb213db9aef485629d0df7541de4fcb89b0b6c06279c05bacea702a414021a239208515d4ab9050a4aab6984 SHA512 0f60a44eafe181c46331de9154f5d2c56a17e406e424ea8b644ef343e13315f1a363c07c374d5a1d34a4d0bb6048bf991b2c24c488b961ae038652f85161ff2a
|
DIST readline82-007.sig 95 BLAKE2B ea73f53d61291193937f28fcbdd09bd0dc46edefdb213db9aef485629d0df7541de4fcb89b0b6c06279c05bacea702a414021a239208515d4ab9050a4aab6984 SHA512 0f60a44eafe181c46331de9154f5d2c56a17e406e424ea8b644ef343e13315f1a363c07c374d5a1d34a4d0bb6048bf991b2c24c488b961ae038652f85161ff2a
|
||||||
|
DIST readline82-008 1697 BLAKE2B 2752ece47a63ccd3b94b59db36509fff1e3ec60edae079231b57e0352e38953ebf1e16c6b8020ad07259da8a1a56fea283228caa54973be0031afd5e86932b31 SHA512 a92a00a6b6fefc576ef26cf7522525ac99c1a05de510ca8bd5a72a6db40fb4dc5c277931efa1f4a91e7cf72c9da5287bb14bfa8f0668d36bec40e3ccd7cbe418
|
||||||
|
DIST readline82-008.sig 95 BLAKE2B 135071c06eb32d8d87b0f2fb3e4235260f5fae4b23f926501d413fa685d9b98557d506284baae23dd700790aa099367ab90c353542235b96df4e0f8d855497be SHA512 d7a290433efb1302fd37c423a622f6be1c16234c209e306ef319259b79ce05d8e788fa471355e2a0155f642632fe2821eb6a7736214997a5bfde2ed8a154d052
|
||||||
|
DIST readline82-009 2270 BLAKE2B ecfa4f3f445b0c90d4ba1cf4116c9a773a3e5ee737966d9d9be7a7ca98f8baa852cf800e571de59cfb27b6af77e93653824f20ff2c73d4629154d9ec8010e644 SHA512 57c084c6186befac58a3432c483c9f879cd199d6947ad7dd29f0d60e67ae4ddf5ee8d861b0231b41582868dd6556ae2dda95a849caf11cbd3692fcd2f8663452
|
||||||
|
DIST readline82-009.sig 95 BLAKE2B 5484f3df25e550a717915ecf70e8410f747ff6d192a873e5449a4fb664bd3557d21a3cf40c5c9e0097dfaf2cee205243cd1cf6af34200f89e79f9d73626c49c1 SHA512 383cc954f8324588c699968d7cdf9a4f3c0e461917c8a16f5599cd0ffb59ff9539207478195a7d77c1842c11bd912cc17d3b3b56e6a9463db1991fb5c24d5409
|
||||||
|
DIST readline82-010 2653 BLAKE2B 44ebbf93b6449d848b2dda49716b494596d207bef08cdea0d01808b5291d68714e01ef914e97652bb73e81808a91fff829c8035a097db5b3649be1e0735e3eab SHA512 b611b42e31601ea5fcd7de59e6c1cdd3fece7cc8287e0e495ddfc4d5e8f765b3c6567b728fe0a317d6cb00240b772fa4c26f374c8bf361355a9d262bc5133874
|
||||||
|
DIST readline82-010.sig 95 BLAKE2B a5a6ccaace88a79c4e28f3c9d3a9ffad186ab772ada7668653b729190d5a598cbe46c769861a72acd08b5fb36f84537bd2018a98fbd0602565660411810447f7 SHA512 0c781417f0cf63daa8532f54b71c9fda69bb2206ca41f7f75fceb7f44781ec949f932881d82fd55d69038208aed45692e30a1e6013d698c7d13f8c9984e331bc
|
||||||
|
253
sdk_container/src/third_party/portage-stable/sys-libs/readline/readline-8.2_p10.ebuild
vendored
Normal file
253
sdk_container/src/third_party/portage-stable/sys-libs/readline/readline-8.2_p10.ebuild
vendored
Normal file
@ -0,0 +1,253 @@
|
|||||||
|
# Copyright 1999-2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
# There's no standard way of versioning the point releases upstream
|
||||||
|
# make anyway, so while this was added for RC versions, it's fine
|
||||||
|
# in general.
|
||||||
|
QA_PKGCONFIG_VERSION=$(ver_cut 1-2)
|
||||||
|
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
|
||||||
|
inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript verify-sig
|
||||||
|
|
||||||
|
# Official patches
|
||||||
|
# See ftp://ftp.cwru.edu/pub/bash/readline-8.1-patches/
|
||||||
|
PLEVEL="${PV##*_p}"
|
||||||
|
MY_PV="${PV/_p*}"
|
||||||
|
MY_PV="${MY_PV/_/-}"
|
||||||
|
MY_P="${PN}-${MY_PV}"
|
||||||
|
MY_PATCHES=()
|
||||||
|
|
||||||
|
is_release() {
|
||||||
|
case ${PV} in
|
||||||
|
9999|*_alpha*|*_beta*|*_rc*)
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
[[ ${PV} != *_p* ]] && PLEVEL=0
|
||||||
|
|
||||||
|
DESCRIPTION="Another cute console display library"
|
||||||
|
HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git"
|
||||||
|
|
||||||
|
if [[ ${PV} == 9999 ]] ; then
|
||||||
|
EGIT_REPO_URI="https://git.savannah.gnu.org/git/readline.git"
|
||||||
|
EGIT_BRANCH=devel
|
||||||
|
inherit git-r3
|
||||||
|
elif is_release ; then
|
||||||
|
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
|
||||||
|
SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )"
|
||||||
|
|
||||||
|
if [[ ${PLEVEL} -gt 0 ]] ; then
|
||||||
|
# bash-5.1 -> bash51
|
||||||
|
my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2))
|
||||||
|
|
||||||
|
patch_url=
|
||||||
|
my_patch_index=
|
||||||
|
|
||||||
|
upstream_url_base="mirror://gnu/readline"
|
||||||
|
mirror_url_base="ftp://ftp.cwru.edu/pub/readline"
|
||||||
|
|
||||||
|
for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do
|
||||||
|
printf -v mangled_patch_ver ${my_p}-%03d ${my_patch_index}
|
||||||
|
patch_url="${upstream_url_base}/${MY_P}-patches/${mangled_patch_ver}"
|
||||||
|
|
||||||
|
SRC_URI+=" ${patch_url}"
|
||||||
|
SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
|
||||||
|
|
||||||
|
# Add in the mirror URL too.
|
||||||
|
SRC_URI+=" ${patch_url/${upstream_url_base}/${mirror_url_base}}"
|
||||||
|
SRC_URI+=" verify-sig? ( ${patch_url/${upstream_url_base}/${mirror_url_base}} )"
|
||||||
|
|
||||||
|
MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} )
|
||||||
|
done
|
||||||
|
|
||||||
|
unset my_p patch_url my_patch_index upstream_url_base mirror_url_base
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/readline/${MY_P}.tar.gz"
|
||||||
|
SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/readline/${MY_P}.tar.gz.sig )"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! is_release ; then
|
||||||
|
inherit autotools
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="GPL-3+"
|
||||||
|
SLOT="0/8" # subslot matches SONAME major
|
||||||
|
if is_release ; then
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||||
|
fi
|
||||||
|
IUSE="static-libs +unicode utils"
|
||||||
|
|
||||||
|
RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
BDEPEND="virtual/pkgconfig
|
||||||
|
verify-sig? ( sec-keys/openpgp-keys-chetramey )"
|
||||||
|
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${PN}-5.0-no_rpath.patch
|
||||||
|
"${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch # bug #385091
|
||||||
|
"${FILESDIR}"/${PN}-7.0-headers.patch
|
||||||
|
"${FILESDIR}"/${PN}-8.0-headers.patch
|
||||||
|
|
||||||
|
# TODO: rebase
|
||||||
|
#"${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
if [[ ${PV} == 9999 ]] ; then
|
||||||
|
git-r3_src_unpack
|
||||||
|
else
|
||||||
|
# Needed because we don't want the patches being unpacked
|
||||||
|
# (which emits annoying and useless error messages)
|
||||||
|
verify-sig_src_unpack
|
||||||
|
unpack ${MY_P}.tar.gz
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
[[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}"
|
||||||
|
|
||||||
|
default
|
||||||
|
|
||||||
|
is_release || eautoreconf
|
||||||
|
|
||||||
|
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, bug #71420.
|
||||||
|
# Use pkg-config to get the right values, bug #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
|
||||||
|
sed -i \
|
||||||
|
-e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
|
||||||
|
examples/rlfe/configure || die
|
||||||
|
|
||||||
|
# Fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
|
||||||
|
# objformat for years, so we don't want to rely on that.
|
||||||
|
sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
|
||||||
|
|
||||||
|
# For local readline headers
|
||||||
|
ln -s ../.. examples/rlfe/readline || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
# Fix implicit decls with widechar funcs
|
||||||
|
append-cppflags -D_GNU_SOURCE
|
||||||
|
# https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
|
||||||
|
append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
|
||||||
|
|
||||||
|
# Make sure configure picks a better ar than `ar`, bug #484866
|
||||||
|
export ac_cv_prog_AR="$(tc-getAR)"
|
||||||
|
|
||||||
|
# Force the test since we used sed above to force it.
|
||||||
|
export bash_cv_termcap_lib=ncurses
|
||||||
|
|
||||||
|
# Control cross-compiling cases when we know the right answer.
|
||||||
|
# In cases where the C library doesn't support wide characters, readline
|
||||||
|
# itself won't work correctly, so forcing the answer below should be OK.
|
||||||
|
if tc-is-cross-compiler ; then
|
||||||
|
export bash_cv_func_sigsetjmp="present"
|
||||||
|
export bash_cv_func_ctype_nonascii="yes"
|
||||||
|
# bug #503312
|
||||||
|
export bash_cv_wcwidth_broken="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This is for rlfe, but we need to make sure LDFLAGS doesn't change
|
||||||
|
# so we can re-use the config cache file between the two.
|
||||||
|
append-ldflags -L.
|
||||||
|
|
||||||
|
multilib-minimal_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_configure() {
|
||||||
|
local myeconfargs=(
|
||||||
|
--cache-file="${BUILD_DIR}"/config.cache
|
||||||
|
--with-curses
|
||||||
|
$(use_enable static-libs static)
|
||||||
|
)
|
||||||
|
|
||||||
|
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
||||||
|
|
||||||
|
if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
|
||||||
|
# Code is full of AC_TRY_RUN()
|
||||||
|
mkdir -p examples/rlfe || die
|
||||||
|
cd examples/rlfe || die
|
||||||
|
|
||||||
|
ECONF_SOURCE="${S}"/examples/rlfe econf --cache-file="${BUILD_DIR}"/config.cache
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_compile() {
|
||||||
|
emake
|
||||||
|
|
||||||
|
if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
|
||||||
|
# Code is full of AC_TRY_RUN()
|
||||||
|
cd examples/rlfe || die
|
||||||
|
local l
|
||||||
|
for l in readline history ; do
|
||||||
|
ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die
|
||||||
|
ln -s ../../lib${l}.a lib${l}.a || die
|
||||||
|
done
|
||||||
|
emake
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_install() {
|
||||||
|
default
|
||||||
|
|
||||||
|
if multilib_is_native_abi ; then
|
||||||
|
# bug #4411
|
||||||
|
gen_usr_ldscript -a readline history
|
||||||
|
|
||||||
|
if use utils && ! tc-is-cross-compiler; then
|
||||||
|
dobin examples/rlfe/rlfe
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
multilib_src_install_all() {
|
||||||
|
HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs
|
||||||
|
|
||||||
|
dodoc USAGE
|
||||||
|
docinto ps
|
||||||
|
dodoc doc/*.ps
|
||||||
|
}
|
||||||
|
pkg_preinst() {
|
||||||
|
# bug #29865
|
||||||
|
# Reappeared in bug #595324 with paludis so keeping this for now...
|
||||||
|
preserve_old_lib \
|
||||||
|
/$(get_libdir)/lib{history,readline}$(get_libname 4) \
|
||||||
|
/$(get_libdir)/lib{history,readline}$(get_libname 5) \
|
||||||
|
/$(get_libdir)/lib{history,readline}$(get_libname 6) \
|
||||||
|
/$(get_libdir)/lib{history,readline}$(get_libname 7)
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
preserve_old_lib_notify \
|
||||||
|
/$(get_libdir)/lib{history,readline}$(get_libname 4) \
|
||||||
|
/$(get_libdir)/lib{history,readline}$(get_libname 5) \
|
||||||
|
/$(get_libdir)/lib{history,readline}$(get_libname 6) \
|
||||||
|
/$(get_libdir)/lib{history,readline}$(get_libname 7)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user