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: Tue, 14 Feb 2017 12:19:06
Message-Id: 1487074736.5ac2b116bdc346f4780e94e2639bc8661488301b.polynomial-c@gentoo
1 commit: 5ac2b116bdc346f4780e94e2639bc8661488301b
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 14 12:18:42 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 14 12:18:56 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ac2b116
7
8 sys-libs/readline: Bump to version 7.0_p3
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 sys-libs/readline/Manifest | 2 +
13 sys-libs/readline/readline-7.0_p3.ebuild | 163 +++++++++++++++++++++++++++++++
14 2 files changed, 165 insertions(+)
15
16 diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest
17 index 296f740fe2..043b8f97c4 100644
18 --- a/sys-libs/readline/Manifest
19 +++ b/sys-libs/readline/Manifest
20 @@ -36,3 +36,5 @@ DIST readline63-006 1982 SHA256 5c237ab3c6c97c23cf52b2a118adc265b7fb411b57c93a5f
21 DIST readline63-007 1428 SHA256 4d79b5a2adec3c2e8114cbd3d63c1771f7c6cf64035368624903d257014f5bea SHA512 abee331894846b360203a521d9a66fa02c03214120d5cafbd1cb4d680bd7bbef14321ae845dd67f7b5e8c87322801fd96fc9a5fd0ae026b41d98dc24a8949854 WHIRLPOOL fc9d866a6e0f0c2a2f752c65e6fcae56a1b0e1b5cef45154ff51b5d1b49fc75ffaa30bdf90c221fb6493381b9d67eb20168bdfd273fa0dd89602f18680bb3e5f
22 DIST readline63-008 1452 SHA256 3bc093cf526ceac23eb80256b0ec87fa1735540d659742107b6284d635c43787 SHA512 8e30bbca3aa5cea8c2ee511abe0ec8f131608d74fe5ab24d68bcf452267f0f97446ed6e7cd482360876ce6c027280e4f4450cae05eb18f56046240f4c224841c WHIRLPOOL 94d9371e6ca35e72565c1990e0ec8bedf8a141f0a3d061e4928f6184c3ef4a4b472f4278d443b990a53977ad6f3f7bdbf41e51a999202b48414df3a946bb9796
23 DIST readline70-001 1777 SHA256 9ac1b3ac2ec7b1bf0709af047f2d7d2a34ccde353684e57c6b47ebca77d7a376 SHA512 4402186905af8cd42c609d640c2e13b9ad61c7778e5a3fd2c2d9da301f0deab05b04d7836f31527262f44f406517823dbb18cb07f2c73931186c806b494699ec WHIRLPOOL 3f52c3e5b0c5a600585e58ed2e013cdba2dee47f3604e7db96b811d715618f19fd75835a5cd9790f582493a32f54993cbac69ee04fa6c73775f14741c215fd65
24 +DIST readline70-002 2953 SHA256 8747c92c35d5db32eae99af66f17b384abaca961653e185677f9c9a571ed2d58 SHA512 13d1489578508d4d2c3a1618024198a709dbce74a6bbf0f6d7ec67d2419c55bfec9f0ca9de0ed93f129d21d5c3a94307ccdc49408455bbb301c5e3a772b03185 WHIRLPOOL cef977cae25be029b5188703c3a4597c8b27dff9ff8f0e39824f4a156a4d771fa8f61092d5f7f70fad63dc51773b07f6670f4ccce73b5266988cdb273755bf53
25 +DIST readline70-003 1294 SHA256 9e43aa93378c7e9f7001d8174b1beb948deefa6799b6f581673f465b7d9d4780 SHA512 eaf962a1480eb3870519017b81ecc5cef171e4c41fcf8c17da61ccbfd0379ed6bca85c17b03e2207ae4d51509f33fd010294c75f4bd0433a52118015d4160385 WHIRLPOOL 14480a2b7f653dbc466a1f7b9785f176af8ddc93ffd0ebab1e5ae89898a6f0feab1f86f6a8550271fc5f8e76cd7abcefcc9e4a2f86692244cc583aaa67c8039c
26
27 diff --git a/sys-libs/readline/readline-7.0_p3.ebuild b/sys-libs/readline/readline-7.0_p3.ebuild
28 new file mode 100644
29 index 0000000000..2dbcb4b12c
30 --- /dev/null
31 +++ b/sys-libs/readline/readline-7.0_p3.ebuild
32 @@ -0,0 +1,163 @@
33 +# Copyright 1999-2017 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI="5"
37 +
38 +inherit eutils multilib toolchain-funcs flag-o-matic multilib-minimal
39 +
40 +# Official patches
41 +# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/
42 +PLEVEL=${PV##*_p}
43 +MY_PV=${PV/_p*}
44 +MY_PV=${MY_PV/_/-}
45 +MY_P=${PN}-${MY_PV}
46 +[[ ${PV} != *_p* ]] && PLEVEL=0
47 +patches() {
48 + [[ ${PLEVEL} -eq 0 ]] && return 1
49 + local opt=$1
50 + eval set -- {1..${PLEVEL}}
51 + set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@")
52 + if [[ ${opt} == -s ]] ; then
53 + echo "${@/#/${DISTDIR}/}"
54 + else
55 + local u
56 + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do
57 + printf "${u}/${PN}-${MY_PV}-patches/%s " "$@"
58 + done
59 + fi
60 +}
61 +
62 +DESCRIPTION="Another cute console display library"
63 +HOMEPAGE="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html"
64 +case ${PV} in
65 +*_alpha*|*_beta*|*_rc*) SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" ;;
66 +*) SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" ;;
67 +esac
68 +
69 +LICENSE="GPL-3"
70 +SLOT="0/7" # subslot matches SONAME major
71 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
72 +IUSE="static-libs utils"
73 +
74 +RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,${MULTILIB_USEDEP}]"
75 +DEPEND="${RDEPEND}
76 + virtual/pkgconfig"
77 +
78 +S=${WORKDIR}/${MY_P}
79 +
80 +src_unpack() {
81 + unpack ${MY_P}.tar.gz
82 +}
83 +
84 +src_prepare() {
85 + [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
86 + epatch "${FILESDIR}"/${PN}-5.0-no_rpath.patch
87 + epatch "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091
88 + epatch "${FILESDIR}"/${PN}-7.0-headers.patch
89 + epatch "${FILESDIR}"/${PN}-7.0-missing-echo-proto.patch
90 +
91 + # Force ncurses linking. #71420
92 + # Use pkg-config to get the right values. #457558
93 + local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs)
94 + sed -i \
95 + -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \
96 + support/shobj-conf || die
97 + sed -i \
98 + -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \
99 + examples/rlfe/configure || die
100 +
101 + # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
102 + # objformat for years, so we don't want to rely on that.
103 + sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
104 +
105 + ln -s ../.. examples/rlfe/readline # for local readline headers
106 +}
107 +
108 +src_configure() {
109 + # fix implicit decls with widechar funcs
110 + append-cppflags -D_GNU_SOURCE
111 + # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
112 + append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
113 +
114 + # Make sure configure picks a better ar than `ar`. #484866
115 + export ac_cv_prog_AR=$(tc-getAR)
116 +
117 + # Force the test since we used sed above to force it.
118 + export bash_cv_termcap_lib=ncurses
119 +
120 + # Control cross-compiling cases when we know the right answer.
121 + # In cases where the C library doesn't support wide characters, readline
122 + # itself won't work correctly, so forcing the answer below should be OK.
123 + if tc-is-cross-compiler ; then
124 + export bash_cv_func_sigsetjmp='present'
125 + export bash_cv_func_ctype_nonascii='yes'
126 + export bash_cv_wcwidth_broken='no' #503312
127 + fi
128 +
129 + # This is for rlfe, but we need to make sure LDFLAGS doesn't change
130 + # so we can re-use the config cache file between the two.
131 + append-ldflags -L.
132 +
133 + multilib-minimal_src_configure
134 +}
135 +
136 +multilib_src_configure() {
137 + ECONF_SOURCE=${S} \
138 + econf \
139 + --cache-file="${BUILD_DIR}"/config.cache \
140 + --docdir='$(datarootdir)'/doc/${PF} \
141 + --with-curses \
142 + $(use_enable static-libs static)
143 +
144 + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
145 + # code is full of AC_TRY_RUN()
146 + mkdir -p examples/rlfe || die
147 + cd examples/rlfe || die
148 + ECONF_SOURCE=${S}/examples/rlfe \
149 + econf --cache-file="${BUILD_DIR}"/config.cache
150 + fi
151 +}
152 +
153 +multilib_src_compile() {
154 + emake
155 +
156 + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then
157 + # code is full of AC_TRY_RUN()
158 + cd examples/rlfe || die
159 + local l
160 + for l in readline history ; do
161 + ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname)
162 + ln -sf ../../lib${l}.a lib${l}.a
163 + done
164 + emake
165 + fi
166 +}
167 +
168 +multilib_src_install() {
169 + default
170 +
171 + if multilib_is_native_abi ; then
172 + gen_usr_ldscript -a readline history #4411
173 +
174 + if use utils && ! tc-is-cross-compiler; then
175 + dobin examples/rlfe/rlfe
176 + fi
177 + fi
178 +}
179 +
180 +multilib_src_install_all() {
181 + einstalldocs
182 + dodoc USAGE
183 + dohtml -r doc/.
184 + docinto ps
185 + dodoc doc/*.ps
186 +}
187 +pkg_preinst() {
188 + # bug #29865
189 + # Reappeared in #595324 with paludis so keeping this for now...
190 + preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6}
191 +}
192 +
193 +pkg_postinst() {
194 + preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5,6}
195 +}