Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/readline/files/, sys-libs/readline/
Date: Mon, 07 Jan 2019 23:08:11
Message-Id: 1546902479.a2183713c540b7052f2bbf926be567adc7254ae3.polynomial-c@gentoo
1 commit: a2183713c540b7052f2bbf926be567adc7254ae3
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 7 23:05:48 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 7 23:07:59 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2183713
7
8 sys-libs/readline: Bump to version 8.0 (without KEYWORDS)
9
10 Package-Manager: Portage-2.3.54, Repoman-2.3.12
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-libs/readline/Manifest | 1 +
14 sys-libs/readline/files/readline-8.0-headers.patch | 17 ++
15 sys-libs/readline/readline-8.0.ebuild | 173 +++++++++++++++++++++
16 3 files changed, 191 insertions(+)
17
18 diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest
19 index 8a1588192c8..268cc05765b 100644
20 --- a/sys-libs/readline/Manifest
21 +++ b/sys-libs/readline/Manifest
22 @@ -2,6 +2,7 @@ DIST readline-4.3.tar.gz 961662 BLAKE2B a7267200b79c8010d08f8aaa4e0ed357eaddb970
23 DIST readline-5.2.tar.gz 2037705 BLAKE2B df1012925f7cac8aa5d513097de97fa55c801993fbcf651e64468c0255cb27f7a2357613f8ab67791ab7799def57bde34376d3c41e65285689318f4b9cbedf84 SHA512 74318b32c56e888716bda2507228ecc374a24e85b2faeec4778227a9f04eb19de1fc8468c78746954c84f9e616a06dd0f8a4332ba4b438fefb7e222699baa379
24 DIST readline-6.3.tar.gz 2468560 BLAKE2B 24488ec141734c050ba985a93423692396f105619bae3ce5b109bc68a4f43862bcf3a6fb8d82fec1145d665cdb408765e179379bb35f008d09c441fa2e5739df SHA512 f70efaf46d570b85c7637172b0ee2eb9a4aa73ba38a62bb45075e665929d9701b96fba0aea6c767fd9a2a0d39dfe8e70ab06da08f8524aee76a7c502f370a401
25 DIST readline-7.0.tar.gz 2910016 BLAKE2B 679b8aa7ce003017b729e6d8d4cb69d0f991578441a3e69005090079e61f6aa48b7ad4d0b1f34b6041528cf33254a1bf3ddb05b60db53a06e443d7922d49d0d4 SHA512 18243189d39bf0d4c8a76cddcce75243c1bae8824c686e9b6ba352667607e5b10c5feb79372a1093c1c388d821841670702e940df12eae94bcebdeed90047870
26 +DIST readline-8.0.tar.gz 2975937 BLAKE2B 95e08b28cc46582f036379413810ca40c97d4d3bc59a9e03e04e57d531573abfbe955f6f1cb86e39c208bf6c3f4c618cff70a87bec596d0b9120909d6c5a2f69 SHA512 41759d27bc3a258fefd7f4ff3277fa6ab9c21abb7b160e1a75aa8eba547bd90b288514e76264bd94fb0172da8a4faa54aab2c07b68a0356918ecf7f1969e866f
27 DIST readline43-001 1126 BLAKE2B 42e7637b71936b59334dae72589b8b44256af7d3c79bec28490e13fa1fea954ce42afc1f51bb1d592da14c403d0c64565fa8823874d305ad385962b462536b5f SHA512 1bfcaf9fd36d154230682ef66a9561281822f09629f9923acfbacbaafd650974b4d94267e1bf74ab4a66f0e2da95e64894c78373c82bee593bd9afbae4af58bc
28 DIST readline43-002 738 BLAKE2B b4aca8deb8e32c94228c41e6a1e9dd2865e01662b6a8e28307e64b260f4a614d17949cab68aea0c4d2c9ca32a888f11a753cf6849a0a95fc5e9b315ea7e20a1d SHA512 546a7bfab27dd0b77f8b0683b82358a295d47e4e249e01d2e49612a2f113c18580c8276b17451e1edab61a26ddcff0267457a804120d5e0052dfe8e88632ddd2
29 DIST readline43-003 2202 BLAKE2B 435bf8c01a2c8419e97550c421945e11ad0d6f3326181c2e9e9c66d8baf12b4dc30894bad590532f917bbf30568e93439b49054c7b023179d5dd95aa309a8f8d SHA512 fbabbe5a11c2a17dd0cb47adfb40940c860069f0e99b1478546b0351471663094d032c8049e1a2ca060f4b51835bb6a824276e1864a627711e0805268386cb8e
30
31 diff --git a/sys-libs/readline/files/readline-8.0-headers.patch b/sys-libs/readline/files/readline-8.0-headers.patch
32 new file mode 100644
33 index 00000000000..f19a3b136eb
34 --- /dev/null
35 +++ b/sys-libs/readline/files/readline-8.0-headers.patch
36 @@ -0,0 +1,17 @@
37 +Required by bash-5.0 or else compilation fails:
38 +
39 + bashline.c:69:10: fatal error: readline/rlmbutil.h: No such file or directory
40 + #include <readline/rlmbutil.h>
41 + ^~~~~~~~~~~~~~~~~~~~~
42 +
43 +--- readline-8.0/Makefile.in
44 ++++ readline-8.0/Makefile.in
45 +@@ -153,7 +153,7 @@
46 + CREATED_TAGS = TAGS tags
47 +
48 + INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
49 +- rlstdc.h rlconf.h rltypedefs.h
50 ++ rlstdc.h rlconf.h rltypedefs.h rlmbutil.h
51 +
52 + OTHER_DOCS = $(srcdir)/CHANGES $(srcdir)/INSTALL $(srcdir)/README
53 + OTHER_INSTALLED_DOCS = CHANGES INSTALL README
54
55 diff --git a/sys-libs/readline/readline-8.0.ebuild b/sys-libs/readline/readline-8.0.ebuild
56 new file mode 100644
57 index 00000000000..8632bb9f9b2
58 --- /dev/null
59 +++ b/sys-libs/readline/readline-8.0.ebuild
60 @@ -0,0 +1,173 @@
61 +# Copyright 1999-2019 Gentoo Authors
62 +# Distributed under the terms of the GNU General Public License v2
63 +
64 +EAPI=6
65 +
66 +inherit flag-o-matic multilib-minimal toolchain-funcs
67 +
68 +# Official patches
69 +# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/
70 +PLEVEL="${PV##*_p}"
71 +MY_PV="${PV/_p*}"
72 +MY_PV="${MY_PV/_/-}"
73 +MY_P="${PN}-${MY_PV}"
74 +[[ ${PV} != *_p* ]] && PLEVEL=0
75 +patches() {
76 + [[ ${PLEVEL} -eq 0 ]] && return 1
77 + local opt=$1
78 + eval set -- {1..${PLEVEL}}
79 + set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@")
80 + if [[ ${opt} == -s ]] ; then
81 + echo "${@/#/${DISTDIR}/}"
82 + else
83 + local u
84 + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do
85 + printf "${u}/${PN}-${MY_PV}-patches/%s " "$@"
86 + done
87 + fi
88 +}
89 +
90 +DESCRIPTION="Another cute console display library"
91 +HOMEPAGE="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html"
92 +
93 +case ${PV} in
94 + *_alpha*|*_beta*|*_rc*)
95 + SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
96 + ;;
97 + *)
98 + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)"
99 + ;;
100 +esac
101 +
102 +LICENSE="GPL-3"
103 +SLOT="0/8" # subslot matches SONAME major
104 +#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
105 +IUSE="static-libs utils"
106 +
107 +RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,${MULTILIB_USEDEP}]"
108 +DEPEND="${RDEPEND}
109 + virtual/pkgconfig"
110 +
111 +S=${WORKDIR}/${MY_P}
112 +
113 +PATCHES=(
114 + "${FILESDIR}"/${PN}-5.0-no_rpath.patch
115 + "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091
116 + "${FILESDIR}"/${PN}-7.0-headers.patch
117 + "${FILESDIR}"/${PN}-8.0-headers.patch
118 +)
119 +
120 +# Needed because we don't want the patches being unpacked
121 +# (which emits annoying and useless error messages)
122 +src_unpack() {
123 + unpack ${MY_P}.tar.gz
124 +}
125 +
126 +src_prepare() {
127 + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s)
128 + default
129 +
130 + # Force ncurses linking. #71420
131 + # Use pkg-config to get the right values. #457558
132 + local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs)
133 + sed -i \
134 + -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \
135 + support/shobj-conf || die
136 + sed -i \
137 + -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
138 + examples/rlfe/configure || die
139 +
140 + # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
141 + # objformat for years, so we don't want to rely on that.
142 + sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
143 +
144 + ln -s ../.. examples/rlfe/readline || die # for local readline headers
145 +}
146 +
147 +src_configure() {
148 + # fix implicit decls with widechar funcs
149 + append-cppflags -D_GNU_SOURCE
150 + # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
151 + append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
152 +
153 + # Make sure configure picks a better ar than `ar`. #484866
154 + export ac_cv_prog_AR=$(tc-getAR)
155 +
156 + # Force the test since we used sed above to force it.
157 + export bash_cv_termcap_lib=ncurses
158 +
159 + # Control cross-compiling cases when we know the right answer.
160 + # In cases where the C library doesn't support wide characters, readline
161 + # itself won't work correctly, so forcing the answer below should be OK.
162 + if tc-is-cross-compiler ; then
163 + use kernel_Winnt || export bash_cv_func_sigsetjmp='present'
164 + export bash_cv_func_ctype_nonascii='yes'
165 + export bash_cv_wcwidth_broken='no' #503312
166 + fi
167 +
168 + # This is for rlfe, but we need to make sure LDFLAGS doesn't change
169 + # so we can re-use the config cache file between the two.
170 + append-ldflags -L.
171 +
172 + multilib-minimal_src_configure
173 +}
174 +
175 +multilib_src_configure() {
176 + local myeconfargs=(
177 + --cache-file="${BUILD_DIR}"/config.cache
178 + --with-curses
179 + $(use_enable static-libs static)
180 + )
181 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
182 +
183 + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
184 + # code is full of AC_TRY_RUN()
185 + mkdir -p examples/rlfe || die
186 + cd examples/rlfe || die
187 + ECONF_SOURCE="${S}"/examples/rlfe \
188 + econf --cache-file="${BUILD_DIR}"/config.cache
189 + fi
190 +}
191 +
192 +multilib_src_compile() {
193 + emake
194 +
195 + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
196 + # code is full of AC_TRY_RUN()
197 + cd examples/rlfe || die
198 + local l
199 + for l in readline history ; do
200 + ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die
201 + ln -s ../../lib${l}.a lib${l}.a || die
202 + done
203 + emake
204 + fi
205 +}
206 +
207 +multilib_src_install() {
208 + default
209 +
210 + if multilib_is_native_abi ; then
211 + gen_usr_ldscript -a readline history #4411
212 +
213 + if use utils && ! tc-is-cross-compiler; then
214 + dobin examples/rlfe/rlfe
215 + fi
216 + fi
217 +}
218 +
219 +multilib_src_install_all() {
220 + HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs
221 + dodoc USAGE
222 + docinto ps
223 + dodoc doc/*.ps
224 +}
225 +pkg_preinst() {
226 + # bug #29865
227 + # Reappeared in #595324 with paludis so keeping this for now...
228 + preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6,7}
229 +}
230 +
231 +pkg_postinst() {
232 + preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5,6,7}
233 +}