diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2017-02-14 13:18:42 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2017-02-14 13:18:56 +0100 |
commit | 5ac2b116bdc346f4780e94e2639bc8661488301b (patch) | |
tree | b0e9f402e6ada92ae2981ae881767fe1b711f9da /sys-libs/readline | |
parent | sci-libs/scikits_learn: sed to counter more bundled imports (diff) | |
download | gentoo-5ac2b116bdc346f4780e94e2639bc8661488301b.tar.gz gentoo-5ac2b116bdc346f4780e94e2639bc8661488301b.tar.bz2 gentoo-5ac2b116bdc346f4780e94e2639bc8661488301b.zip |
sys-libs/readline: Bump to version 7.0_p3
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sys-libs/readline')
-rw-r--r-- | sys-libs/readline/Manifest | 2 | ||||
-rw-r--r-- | sys-libs/readline/readline-7.0_p3.ebuild | 163 |
2 files changed, 165 insertions, 0 deletions
diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest index 296f740fe226..043b8f97c479 100644 --- a/sys-libs/readline/Manifest +++ b/sys-libs/readline/Manifest @@ -36,3 +36,5 @@ DIST readline63-006 1982 SHA256 5c237ab3c6c97c23cf52b2a118adc265b7fb411b57c93a5f DIST readline63-007 1428 SHA256 4d79b5a2adec3c2e8114cbd3d63c1771f7c6cf64035368624903d257014f5bea SHA512 abee331894846b360203a521d9a66fa02c03214120d5cafbd1cb4d680bd7bbef14321ae845dd67f7b5e8c87322801fd96fc9a5fd0ae026b41d98dc24a8949854 WHIRLPOOL fc9d866a6e0f0c2a2f752c65e6fcae56a1b0e1b5cef45154ff51b5d1b49fc75ffaa30bdf90c221fb6493381b9d67eb20168bdfd273fa0dd89602f18680bb3e5f DIST readline63-008 1452 SHA256 3bc093cf526ceac23eb80256b0ec87fa1735540d659742107b6284d635c43787 SHA512 8e30bbca3aa5cea8c2ee511abe0ec8f131608d74fe5ab24d68bcf452267f0f97446ed6e7cd482360876ce6c027280e4f4450cae05eb18f56046240f4c224841c WHIRLPOOL 94d9371e6ca35e72565c1990e0ec8bedf8a141f0a3d061e4928f6184c3ef4a4b472f4278d443b990a53977ad6f3f7bdbf41e51a999202b48414df3a946bb9796 DIST readline70-001 1777 SHA256 9ac1b3ac2ec7b1bf0709af047f2d7d2a34ccde353684e57c6b47ebca77d7a376 SHA512 4402186905af8cd42c609d640c2e13b9ad61c7778e5a3fd2c2d9da301f0deab05b04d7836f31527262f44f406517823dbb18cb07f2c73931186c806b494699ec WHIRLPOOL 3f52c3e5b0c5a600585e58ed2e013cdba2dee47f3604e7db96b811d715618f19fd75835a5cd9790f582493a32f54993cbac69ee04fa6c73775f14741c215fd65 +DIST readline70-002 2953 SHA256 8747c92c35d5db32eae99af66f17b384abaca961653e185677f9c9a571ed2d58 SHA512 13d1489578508d4d2c3a1618024198a709dbce74a6bbf0f6d7ec67d2419c55bfec9f0ca9de0ed93f129d21d5c3a94307ccdc49408455bbb301c5e3a772b03185 WHIRLPOOL cef977cae25be029b5188703c3a4597c8b27dff9ff8f0e39824f4a156a4d771fa8f61092d5f7f70fad63dc51773b07f6670f4ccce73b5266988cdb273755bf53 +DIST readline70-003 1294 SHA256 9e43aa93378c7e9f7001d8174b1beb948deefa6799b6f581673f465b7d9d4780 SHA512 eaf962a1480eb3870519017b81ecc5cef171e4c41fcf8c17da61ccbfd0379ed6bca85c17b03e2207ae4d51509f33fd010294c75f4bd0433a52118015d4160385 WHIRLPOOL 14480a2b7f653dbc466a1f7b9785f176af8ddc93ffd0ebab1e5ae89898a6f0feab1f86f6a8550271fc5f8e76cd7abcefcc9e4a2f86692244cc583aaa67c8039c diff --git a/sys-libs/readline/readline-7.0_p3.ebuild b/sys-libs/readline/readline-7.0_p3.ebuild new file mode 100644 index 000000000000..2dbcb4b12cb5 --- /dev/null +++ b/sys-libs/readline/readline-7.0_p3.ebuild @@ -0,0 +1,163 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils multilib toolchain-funcs flag-o-matic multilib-minimal + +# Official patches +# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/ +PLEVEL=${PV##*_p} +MY_PV=${PV/_p*} +MY_PV=${MY_PV/_/-} +MY_P=${PN}-${MY_PV} +[[ ${PV} != *_p* ]] && PLEVEL=0 +patches() { + [[ ${PLEVEL} -eq 0 ]] && return 1 + local opt=$1 + eval set -- {1..${PLEVEL}} + set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") + if [[ ${opt} == -s ]] ; then + echo "${@/#/${DISTDIR}/}" + else + local u + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do + printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" + done + fi +} + +DESCRIPTION="Another cute console display library" +HOMEPAGE="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" +case ${PV} in +*_alpha*|*_beta*|*_rc*) SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" ;; +*) SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" ;; +esac + +LICENSE="GPL-3" +SLOT="0/7" # subslot matches SONAME major +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" +IUSE="static-libs utils" + +RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S=${WORKDIR}/${MY_P} + +src_unpack() { + unpack ${MY_P}.tar.gz +} + +src_prepare() { + [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s) + epatch "${FILESDIR}"/${PN}-5.0-no_rpath.patch + epatch "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 + epatch "${FILESDIR}"/${PN}-7.0-headers.patch + epatch "${FILESDIR}"/${PN}-7.0-missing-echo-proto.patch + + # Force ncurses linking. #71420 + # Use pkg-config to get the right values. #457558 + local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs) + 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 + + ln -s ../.. examples/rlfe/readline # for local readline headers +} + +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`. #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' + export bash_cv_wcwidth_broken='no' #503312 + 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() { + ECONF_SOURCE=${S} \ + econf \ + --cache-file="${BUILD_DIR}"/config.cache \ + --docdir='$(datarootdir)'/doc/${PF} \ + --with-curses \ + $(use_enable static-libs static) + + 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) + ln -sf ../../lib${l}.a lib${l}.a + done + emake + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi ; then + gen_usr_ldscript -a readline history #4411 + + if use utils && ! tc-is-cross-compiler; then + dobin examples/rlfe/rlfe + fi + fi +} + +multilib_src_install_all() { + einstalldocs + dodoc USAGE + dohtml -r doc/. + docinto ps + dodoc doc/*.ps +} +pkg_preinst() { + # bug #29865 + # Reappeared in #595324 with paludis so keeping this for now... + preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6} +} + +pkg_postinst() { + preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5,6} +} |