Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/readline/
Date: Sat, 10 Sep 2022 00:29:52
Message-Id: 1662769360.c3d9217a84f18268b52928c876297503acb16fc0.sam@gentoo
1 commit: c3d9217a84f18268b52928c876297503acb16fc0
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 10 00:18:27 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 10 00:22:40 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3d9217a
7
8 sys-libs/readline: add 8.2_rc4
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-libs/readline/Manifest | 2 +
13 sys-libs/readline/readline-8.2_rc4.ebuild | 246 ++++++++++++++++++++++++++++++
14 2 files changed, 248 insertions(+)
15
16 diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest
17 index 1619a4abf216..d6c13fa4f2c7 100644
18 --- a/sys-libs/readline/Manifest
19 +++ b/sys-libs/readline/Manifest
20 @@ -2,6 +2,8 @@ DIST readline-8.1.tar.gz 2993288 BLAKE2B f0feca1ea3517b2b613adacac8c997cce0e86aa
21 DIST readline-8.1.tar.gz.sig 95 BLAKE2B 8a297ef2ebf815ac53f02d6395aa2ff9f24234aef6b9793bfcd5a610cd3a5024182ad8ec8beb75eadd5cf876c57cd56d4226075578a86e0e2421d2e9b1677aa5 SHA512 42a6052d5882f16e5b6f8cd16433d793a9cbb43cf1886b2d858dc65ce067a4c39c8dda7331e52f76426c43de02c358f9ffdaf5c8fd7b089479008c1e5aa19112
22 DIST readline-8.2-rc3.tar.gz 3043957 BLAKE2B 49d68306f84add2f4e07a151c417aae9829761d0c94aaab5c2ec4dde49bcfdbd8c43907a5f5a00366850309c30a725f2628641e7105257108569efbc70420588 SHA512 136a04e070457b7152325951cd9e414d5598bcc28e41d31f6651d21b584a08282bab7c0e07edf786ef6855a6cdc346ab55ee670d06de7fdda7847a1c9b551e03
23 DIST readline-8.2-rc3.tar.gz.sig 95 BLAKE2B 4af655b0a4d3faf5f9be011459f56737f48204d7d6757cd8571f5a3cfd7bc1e820def8fb7227b5431d19660a48713e5a04c95d8f5ea43439483f3ce858cb1d77 SHA512 06aec40b24f67eff72dc53b902b6f1c5df926a56b4d67df530b6243200d261747d3d2112b16ff83f921376437cfd941b8ddbe157babf9302ce60ff54a022e65d
24 +DIST readline-8.2-rc4.tar.gz 3044180 BLAKE2B 5338abf9ab2548f81d90017edef206cc887a5ec67e528c56ebdd2cd9b2032a2e039b1f563dbd074c0df9b071fde1dbd0d0b5e5f35ccd3eb138d9ed9b276dac03 SHA512 29df7bfd81ca7899bf515428f1e7aac2df50bafa701c9c1bfdbf2c6934b4fa712de0e8d1ddb55f398db412e03ab8a4b17a5a270acaab2f1087026998ca97c190
25 +DIST readline-8.2-rc4.tar.gz.sig 95 BLAKE2B d077365719b6cc44d2b9030697e64dce445b3583f812e981d86bb3bf0baf0d5e207a52191d16916533ed022be84f06c2b3b36bc3aa91389e7a3205ef596c4e1b SHA512 f1b8eeb0957a8bf64e7a1fbaa50267d5e37bdc88cb22e56b6f89a23d3871d6e5eb5f17888a8e0bb7bccf850f95b07bf06708617945fd24a98b213ce7de5b2a72
26 DIST readline81-001 2454 BLAKE2B 7ec4e5c39a224a70643b44b88bcfef5198e199c76f2a34f0b0ce24f1747dd46be49ddf93871c474cda64322b4358127fec4c2401d19422f84934546bbe1f3bf2 SHA512 cfbef10bdeb562a302ccf214878d02ebadf799343b3d2d7996a282f81bcfde83997ba6dcc9a8477af4dd7c73bca74105ca00a81e42ed13321672bd2930550e54
27 DIST readline81-001.sig 95 BLAKE2B 7d523d0fc21772cb03aa4b5d66ea58c1a99a6c0e4a8625e89cad015cbff63cd68e08207ca5150819225300ac864806032888104bbbea64ca38ebf89e28c24b7e SHA512 7fa3747e388aecb26f2d4f8346b89b367710ea99a14618c625066b820901dc467bd156ec37340fde1f86f0fe0d6b33044c1ed5768cf8ed1a25386d32dc6419a6
28 DIST readline81-002 1242 BLAKE2B 4ef0404561bd8fc5559e8e5f675ae3f12c467178a8954f54f3204c2d09b88ccec960e807c7af0ec3514b489b676e3be51f98351e377fb18e3d7a14d33d4da69d SHA512 e47c029b82cf3a4d44e85c4348f7e059c56726694c190d84186822e1c893e1c006e7ec75f33c36791112f81abd792a2e2fdae9a65cd128f3c89ff4ffd9a9a1ff
29
30 diff --git a/sys-libs/readline/readline-8.2_rc4.ebuild b/sys-libs/readline/readline-8.2_rc4.ebuild
31 new file mode 100644
32 index 000000000000..4bc9fb0d90a8
33 --- /dev/null
34 +++ b/sys-libs/readline/readline-8.2_rc4.ebuild
35 @@ -0,0 +1,246 @@
36 +# Copyright 1999-2022 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +
41 +# There's no standard way of versioning the point releases upstream
42 +# make anyway, so while this was added for RC versions, it's fine
43 +# in general.
44 +QA_PKGCONFIG_VERSION=$(ver_cut 1-2)
45 +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/chetramey.asc
46 +inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs usr-ldscript verify-sig
47 +
48 +# Official patches
49 +# See ftp://ftp.cwru.edu/pub/bash/readline-8.1-patches/
50 +PLEVEL="${PV##*_p}"
51 +MY_PV="${PV/_p*}"
52 +MY_PV="${MY_PV/_/-}"
53 +MY_P="${PN}-${MY_PV}"
54 +MY_PATCHES=()
55 +
56 +is_release() {
57 + case ${PV} in
58 + 9999|*_alpha*|*_beta*|*_rc*)
59 + return 1
60 + ;;
61 + *)
62 + return 0
63 + ;;
64 + esac
65 +}
66 +
67 +[[ ${PV} != *_p* ]] && PLEVEL=0
68 +
69 +DESCRIPTION="Another cute console display library"
70 +HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git"
71 +
72 +if [[ ${PV} == 9999 ]] ; then
73 + EGIT_REPO_URI="https://git.savannah.gnu.org/git/readline.git"
74 + EGIT_BRANCH=devel
75 + inherit git-r3
76 +elif is_release ; then
77 + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz"
78 + SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )"
79 +
80 + if [[ ${PLEVEL} -gt 0 ]] ; then
81 + # bash-5.1 -> bash51
82 + my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2))
83 +
84 + patch_url=
85 + my_patch_index=
86 +
87 + for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do
88 + for url in mirror://gnu/${pn} ftp://ftp.cwru.edu/pub/bash ; do
89 + patch_url=$(printf "${url}/${PN}-$(ver_cut 1-2)-patches/${my_p}-%03d" ${my_patch_index})
90 + SRC_URI+=" ${patch_url}"
91 + SRC_URI+=" verify-sig? ( ${patch_url}.sig )"
92 + done
93 +
94 + MY_PATCHES+=( "${DISTDIR}"/$(printf ${my_p}-%03d ${my_patch_index}) )
95 + done
96 +
97 + unset my_pn patch_url my_patch_index
98 + fi
99 +else
100 + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
101 + SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz.sig )"
102 +fi
103 +
104 +if ! is_release ; then
105 + inherit autotools
106 +fi
107 +
108 +LICENSE="GPL-3"
109 +SLOT="0/8" # subslot matches SONAME major
110 +if is_release ; then
111 + 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"
112 +fi
113 +IUSE="static-libs +unicode utils"
114 +
115 +RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]"
116 +DEPEND="${RDEPEND}"
117 +BDEPEND="virtual/pkgconfig
118 + verify-sig? ( sec-keys/openpgp-keys-chetramey )"
119 +
120 +S="${WORKDIR}/${MY_P}"
121 +
122 +PATCHES=(
123 + "${FILESDIR}"/${PN}-5.0-no_rpath.patch
124 + "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch # bug #385091
125 + "${FILESDIR}"/${PN}-7.0-headers.patch
126 + "${FILESDIR}"/${PN}-8.0-headers.patch
127 +
128 + # TODO: rebase
129 + #"${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch
130 +)
131 +
132 +src_unpack() {
133 + if [[ ${PV} == 9999 ]] ; then
134 + git-r3_src_unpack
135 + else
136 + # Needed because we don't want the patches being unpacked
137 + # (which emits annoying and useless error messages)
138 + verify-sig_src_unpack
139 + unpack ${MY_P}.tar.gz
140 + fi
141 +}
142 +
143 +src_prepare() {
144 + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}"
145 +
146 + default
147 +
148 + is_release || eautoreconf
149 +
150 + if use prefix && [[ ! -x "${BROOT}"/usr/bin/pkg-config ]] ; then
151 + # If we're bootstrapping, make a guess. We don't have pkg-config
152 + # around yet. bug #818103.
153 + # Incorrectly populating this leads to underlinked libreadline.
154 + local ncurses_libs
155 + local ncurses_libs_suffix=$(usex unicode w '')
156 +
157 + ncurses_libs="-lncurses${ncurses_libs_suffix}"
158 +
159 + if has_version "sys-libs/ncurses[tinfo(+)]" ; then
160 + ncurses_libs+=" -ltinfo${ncurses_libs_suffix}"
161 + fi
162 + else
163 + # Force ncurses linking, bug #71420.
164 + # Use pkg-config to get the right values, bug #457558.
165 + local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs)
166 + fi
167 +
168 + sed -i \
169 + -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \
170 + support/shobj-conf || die
171 + sed -i \
172 + -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
173 + examples/rlfe/configure || die
174 +
175 + # Fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
176 + # objformat for years, so we don't want to rely on that.
177 + sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
178 +
179 + # For local readline headers
180 + ln -s ../.. examples/rlfe/readline || die
181 +}
182 +
183 +src_configure() {
184 + # Fix implicit decls with widechar funcs
185 + append-cppflags -D_GNU_SOURCE
186 + # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
187 + append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
188 +
189 + # Make sure configure picks a better ar than `ar`, bug #484866
190 + export ac_cv_prog_AR="$(tc-getAR)"
191 +
192 + # Force the test since we used sed above to force it.
193 + export bash_cv_termcap_lib=ncurses
194 +
195 + # Control cross-compiling cases when we know the right answer.
196 + # In cases where the C library doesn't support wide characters, readline
197 + # itself won't work correctly, so forcing the answer below should be OK.
198 + if tc-is-cross-compiler ; then
199 + use kernel_Winnt || export bash_cv_func_sigsetjmp="present"
200 + export bash_cv_func_ctype_nonascii="yes"
201 + # bug #503312
202 + export bash_cv_wcwidth_broken="no"
203 + fi
204 +
205 + # This is for rlfe, but we need to make sure LDFLAGS doesn't change
206 + # so we can re-use the config cache file between the two.
207 + append-ldflags -L.
208 +
209 + multilib-minimal_src_configure
210 +}
211 +
212 +multilib_src_configure() {
213 + local myeconfargs=(
214 + --cache-file="${BUILD_DIR}"/config.cache
215 + --with-curses
216 + $(use_enable static-libs static)
217 + )
218 +
219 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
220 +
221 + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
222 + # Code is full of AC_TRY_RUN()
223 + mkdir -p examples/rlfe || die
224 + cd examples/rlfe || die
225 +
226 + ECONF_SOURCE="${S}"/examples/rlfe econf --cache-file="${BUILD_DIR}"/config.cache
227 + fi
228 +}
229 +
230 +multilib_src_compile() {
231 + emake
232 +
233 + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
234 + # Code is full of AC_TRY_RUN()
235 + cd examples/rlfe || die
236 + local l
237 + for l in readline history ; do
238 + ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die
239 + ln -s ../../lib${l}.a lib${l}.a || die
240 + done
241 + emake
242 + fi
243 +}
244 +
245 +multilib_src_install() {
246 + default
247 +
248 + if multilib_is_native_abi ; then
249 + # bug #4411
250 + gen_usr_ldscript -a readline history
251 +
252 + if use utils && ! tc-is-cross-compiler; then
253 + dobin examples/rlfe/rlfe
254 + fi
255 + fi
256 +}
257 +
258 +multilib_src_install_all() {
259 + HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs
260 +
261 + dodoc USAGE
262 + docinto ps
263 + dodoc doc/*.ps
264 +}
265 +pkg_preinst() {
266 + # bug #29865
267 + # Reappeared in bug #595324 with paludis so keeping this for now...
268 + preserve_old_lib \
269 + /$(get_libdir)/lib{history,readline}$(get_libname 4) \
270 + /$(get_libdir)/lib{history,readline}$(get_libname 5) \
271 + /$(get_libdir)/lib{history,readline}$(get_libname 6) \
272 + /$(get_libdir)/lib{history,readline}$(get_libname 7)
273 +}
274 +
275 +pkg_postinst() {
276 + preserve_old_lib_notify \
277 + /$(get_libdir)/lib{history,readline}$(get_libname 4) \
278 + /$(get_libdir)/lib{history,readline}$(get_libname 5) \
279 + /$(get_libdir)/lib{history,readline}$(get_libname 6) \
280 + /$(get_libdir)/lib{history,readline}$(get_libname 7)
281 +}