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/
Date: Sun, 09 Feb 2020 00:35:32
Message-Id: 1581208520.12b0358a6fcf0ecd2acfa478e48455c314df0543.polynomial-c@gentoo
1 commit: 12b0358a6fcf0ecd2acfa478e48455c314df0543
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 9 00:29:29 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 9 00:35:20 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12b0358a
7
8 sys-libs/readline: Bump to version 8.0_p4
9
10 Package-Manager: Portage-2.3.87, Repoman-2.3.20
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-libs/readline/Manifest | 3 +
14 sys-libs/readline/readline-8.0_p4.ebuild | 175 +++++++++++++++++++++++++++++++
15 2 files changed, 178 insertions(+)
16
17 diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest
18 index 684e5d3b106..030cef77bba 100644
19 --- a/sys-libs/readline/Manifest
20 +++ b/sys-libs/readline/Manifest
21 @@ -15,3 +15,6 @@ DIST readline70-003 1294 BLAKE2B 9473e18b582fba69cea83e3f5b9fa278dd8b05443254393
22 DIST readline70-004 1501 BLAKE2B cebce69a21bee3a4d6a908de09f371d65eab6af51a8dc0f58fc915b916957db420252ce07b06703c05d984f62e1e849b6975f5444b2af6ba35ff7c939acf9d99 SHA512 7be41558eab3b88a3657f8589ecfaff0b8ee7f59083d385f50e8704fe830e05a50652a5feda19ff1f3cfd98bff4bb8e25e1637ec4dac8a618db9c8220a3d954e
23 DIST readline70-005 1641 BLAKE2B f720508f698b113c6328018f7e6e8775c7c79afc464047405a5c3dae017d611535017dfc2759c11483bb536fab1e9bf72c7a9d3c769b7aea3bd2cee9686bd522 SHA512 eeb27f4f9195cb905d5891f26480d58f59c885dde3457f7a30ff57760ac772e2333ee8aeae979214949f3b52030285b10db013e307ee7311abab677a4427e878
24 DIST readline80-001 927 BLAKE2B 95e3ac33ff4adb65813274864c17781056a8ea065f9a76571b4a6bcb2ebab090c3a021fa2b621832c11b5995e48a8a26dd6e3a8f5864a8e8b520bfcf85d7c4ab SHA512 a148cda6ac97935d51ede1bbacf847d7d2cba8861cf3941d32e3da2f45f16dcc05b20845b63d4264692520db8329e1236cf2bc4fd8ccbe6e40921bbbdeb2cb1c
25 +DIST readline80-002 1401 BLAKE2B a2f511272f6d651208469998330059d6bae17bb8b704b64468685bb0368b76df1ca5b1dcd8e5cb0019e80932130c8a92fd1a305679bf79f0b801532a94c4b4ae SHA512 a941d142a59fe592cc45c1cf4d416e2fc0ab543dd6a0496fb8b2ec6f651cedd6fb9e0c105f14880700b69b2d6912653b3f66371e45cbe4adc0cc9554801afd3c
26 +DIST readline80-003 2158 BLAKE2B d8910aef1b796a59500b255df8db71ad1738dd164fd69827759eade74b6d9806ecd364839cfa904fc2f2d48352342155f670e5ec43aac0693f36820fb7139a4d SHA512 85235fca047b4ac87b846d998fffc67ae67ed365b068fd2743e84f11fd00086f85e622955192e07e3560965e32ff5f6d014e0146cde528fb0d0f7b5b829875ca
27 +DIST readline80-004 1275 BLAKE2B ac260bab163f17ccc783e0c2a21351b05e9e86ad973383d228d10ec749f265df8588c38946c9da15e987192b50f1bcb81141c2f4e171f65455f58521e864a534 SHA512 301ced2361e7583468f9932038936387a016c20d1c41966658a78c7f7c48c70308bf66b3228de0a3c6fc880427b6a90ee1ac4d2693daed432e5ae970671a7461
28
29 diff --git a/sys-libs/readline/readline-8.0_p4.ebuild b/sys-libs/readline/readline-8.0_p4.ebuild
30 new file mode 100644
31 index 00000000000..cd51e2e9352
32 --- /dev/null
33 +++ b/sys-libs/readline/readline-8.0_p4.ebuild
34 @@ -0,0 +1,175 @@
35 +# Copyright 1999-2020 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +inherit flag-o-matic multilib-minimal preserve-libs toolchain-funcs usr-ldscript
41 +
42 +# Official patches
43 +# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/
44 +PLEVEL="${PV##*_p}"
45 +MY_PV="${PV/_p*}"
46 +MY_PV="${MY_PV/_/-}"
47 +MY_P="${PN}-${MY_PV}"
48 +[[ ${PV} != *_p* ]] && PLEVEL=0
49 +patches() {
50 + [[ ${PLEVEL} -eq 0 ]] && return 1
51 + local opt=$1
52 + eval set -- {1..${PLEVEL}}
53 + set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@")
54 + if [[ ${opt} == -s ]] ; then
55 + echo "${@/#/${DISTDIR}/}"
56 + else
57 + local u
58 + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do
59 + printf "${u}/${PN}-${MY_PV}-patches/%s " "$@"
60 + done
61 + fi
62 +}
63 +
64 +DESCRIPTION="Another cute console display library"
65 +HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html"
66 +
67 +case ${PV} in
68 + *_alpha*|*_beta*|*_rc*)
69 + SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
70 + ;;
71 + *)
72 + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)"
73 + ;;
74 +esac
75 +
76 +LICENSE="GPL-3"
77 +SLOT="0/8" # subslot matches SONAME major
78 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
79 +IUSE="static-libs +unicode utils"
80 +
81 +RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,unicode?,${MULTILIB_USEDEP}]"
82 +DEPEND="${RDEPEND}"
83 +BDEPEND="
84 + virtual/pkgconfig
85 +"
86 +
87 +S="${WORKDIR}/${MY_P}"
88 +
89 +PATCHES=(
90 + "${FILESDIR}"/${PN}-5.0-no_rpath.patch
91 + "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091
92 + "${FILESDIR}"/${PN}-7.0-headers.patch
93 + "${FILESDIR}"/${PN}-8.0-headers.patch
94 +)
95 +
96 +# Needed because we don't want the patches being unpacked
97 +# (which emits annoying and useless error messages)
98 +src_unpack() {
99 + unpack ${MY_P}.tar.gz
100 +}
101 +
102 +src_prepare() {
103 + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s)
104 + default
105 +
106 + # Force ncurses linking. #71420
107 + # Use pkg-config to get the right values. #457558
108 + local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs)
109 + sed -i \
110 + -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \
111 + support/shobj-conf || die
112 + sed -i \
113 + -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
114 + examples/rlfe/configure || die
115 +
116 + # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
117 + # objformat for years, so we don't want to rely on that.
118 + sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
119 +
120 + ln -s ../.. examples/rlfe/readline || die # for local readline headers
121 +}
122 +
123 +src_configure() {
124 + # fix implicit decls with widechar funcs
125 + append-cppflags -D_GNU_SOURCE
126 + # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
127 + append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
128 +
129 + # Make sure configure picks a better ar than `ar`. #484866
130 + export ac_cv_prog_AR=$(tc-getAR)
131 +
132 + # Force the test since we used sed above to force it.
133 + export bash_cv_termcap_lib=ncurses
134 +
135 + # Control cross-compiling cases when we know the right answer.
136 + # In cases where the C library doesn't support wide characters, readline
137 + # itself won't work correctly, so forcing the answer below should be OK.
138 + if tc-is-cross-compiler ; then
139 + use kernel_Winnt || export bash_cv_func_sigsetjmp='present'
140 + export bash_cv_func_ctype_nonascii='yes'
141 + export bash_cv_wcwidth_broken='no' #503312
142 + fi
143 +
144 + # This is for rlfe, but we need to make sure LDFLAGS doesn't change
145 + # so we can re-use the config cache file between the two.
146 + append-ldflags -L.
147 +
148 + multilib-minimal_src_configure
149 +}
150 +
151 +multilib_src_configure() {
152 + local myeconfargs=(
153 + --cache-file="${BUILD_DIR}"/config.cache
154 + --with-curses
155 + $(use_enable static-libs static)
156 + )
157 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
158 +
159 + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
160 + # code is full of AC_TRY_RUN()
161 + mkdir -p examples/rlfe || die
162 + cd examples/rlfe || die
163 + ECONF_SOURCE="${S}"/examples/rlfe \
164 + econf --cache-file="${BUILD_DIR}"/config.cache
165 + fi
166 +}
167 +
168 +multilib_src_compile() {
169 + emake
170 +
171 + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
172 + # code is full of AC_TRY_RUN()
173 + cd examples/rlfe || die
174 + local l
175 + for l in readline history ; do
176 + ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die
177 + ln -s ../../lib${l}.a lib${l}.a || die
178 + done
179 + emake
180 + fi
181 +}
182 +
183 +multilib_src_install() {
184 + default
185 +
186 + if multilib_is_native_abi ; then
187 + gen_usr_ldscript -a readline history #4411
188 +
189 + if use utils && ! tc-is-cross-compiler; then
190 + dobin examples/rlfe/rlfe
191 + fi
192 + fi
193 +}
194 +
195 +multilib_src_install_all() {
196 + HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs
197 + dodoc USAGE
198 + docinto ps
199 + dodoc doc/*.ps
200 +}
201 +pkg_preinst() {
202 + # bug #29865
203 + # Reappeared in #595324 with paludis so keeping this for now...
204 + preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6,7}
205 +}
206 +
207 +pkg_postinst() {
208 + preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5,6,7}
209 +}