Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/readline: readline-6.2_p5-r1.ebuild ChangeLog
Date: Fri, 27 Dec 2013 22:55:46
Message-Id: 20131227225542.42BF12004C@flycatcher.gentoo.org
1 mgorny 13/12/27 22:55:42
2
3 Modified: ChangeLog
4 Added: readline-6.2_p5-r1.ebuild
5 Log:
6 Add multilib support, bug #496006.
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
9
10 Revision Changes Path
11 1.186 sys-libs/readline/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/readline/ChangeLog?rev=1.186&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/readline/ChangeLog?rev=1.186&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/readline/ChangeLog?r1=1.185&r2=1.186
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-libs/readline/ChangeLog,v
20 retrieving revision 1.185
21 retrieving revision 1.186
22 diff -u -r1.185 -r1.186
23 --- ChangeLog 25 Dec 2013 23:46:50 -0000 1.185
24 +++ ChangeLog 27 Dec 2013 22:55:42 -0000 1.186
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sys-libs/readline
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/ChangeLog,v 1.185 2013/12/25 23:46:50 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/ChangeLog,v 1.186 2013/12/27 22:55:42 mgorny Exp $
30 +
31 +*readline-6.2_p5-r1 (27 Dec 2013)
32 +
33 + 27 Dec 2013; Michał Górny <mgorny@g.o> +readline-6.2_p5-r1.ebuild:
34 + Add multilib support, bug #496006.
35
36 25 Dec 2013; Mike Frysinger <vapier@g.o> readline-6.2_p5.ebuild:
37 update dodoc line
38
39
40
41 1.1 sys-libs/readline/readline-6.2_p5-r1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/readline/readline-6.2_p5-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/readline/readline-6.2_p5-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: readline-6.2_p5-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2013 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/readline-6.2_p5-r1.ebuild,v 1.1 2013/12/27 22:55:41 mgorny Exp $
51
52 EAPI="4"
53
54 inherit eutils multilib toolchain-funcs flag-o-matic multilib-minimal
55
56 # Official patches
57 # See ftp://ftp.cwru.edu/pub/bash/readline-6.2-patches/
58 PLEVEL=${PV##*_p}
59 MY_PV=${PV/_p*}
60 MY_PV=${MY_PV/_/-}
61 MY_P=${PN}-${MY_PV}
62 [[ ${PV} != *_p* ]] && PLEVEL=0
63 patches() {
64 [[ ${PLEVEL} -eq 0 ]] && return 1
65 local opt=$1
66 eval set -- {1..${PLEVEL}}
67 set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@")
68 if [[ ${opt} == -s ]] ; then
69 echo "${@/#/${DISTDIR}/}"
70 else
71 local u
72 for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do
73 printf "${u}/${PN}-${MY_PV}-patches/%s " "$@"
74 done
75 fi
76 }
77
78 DESCRIPTION="Another cute console display library"
79 HOMEPAGE="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html"
80 SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)"
81
82 LICENSE="GPL-3"
83 SLOT="0"
84 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
85 IUSE="static-libs"
86
87 RDEPEND=">=sys-libs/ncurses-5.2-r2[${MULTILIB_USEDEP}]
88 abi_x86_32? (
89 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
90 !<=app-emulation/emul-linux-x86-baselibs-20131008-r6
91 )"
92 DEPEND="${RDEPEND}"
93
94 S=${WORKDIR}/${MY_P}
95
96 src_unpack() {
97 unpack ${MY_P}.tar.gz
98 }
99
100 src_prepare() {
101 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
102 epatch "${FILESDIR}"/${PN}-5.0-no_rpath.patch
103 epatch "${FILESDIR}"/${PN}-5.2-no-ignore-shlib-errors.patch #216952
104 epatch "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091
105
106 # Force ncurses linking. #71420
107 # Use pkg-config to get the right values. #457558
108 sed -i \
109 -e "s:^SHLIB_LIBS=:SHLIB_LIBS='$($(tc-getPKG_CONFIG) ncurses --libs)':" \
110 support/shobj-conf || die
111
112 # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated
113 # objformat for years, so we don't want to rely on that.
114 sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die
115
116 ln -s ../.. examples/rlfe/readline # for local readline headers
117 }
118
119 src_configure() {
120 # fix implicit decls with widechar funcs
121 append-cppflags -D_GNU_SOURCE
122 # http://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html
123 append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free
124
125 # Make sure configure picks a better ar than `ar`. #484866
126 export ac_cv_prog_AR=$(tc-getAR)
127
128 # Force the test since we used sed above to force it.
129 export bash_cv_termcap_lib=ncurses
130
131 # This is for rlfe, but we need to make sure LDFLAGS doesn't change
132 # so we can re-use the config cache file between the two.
133 append-ldflags -L.
134
135 multilib-minimal_src_configure
136 }
137
138 multilib_src_configure() {
139 ECONF_SOURCE=${S} \
140 econf \
141 --cache-file="${BUILD_DIR}"/config.cache \
142 --with-curses \
143 $(use_enable static-libs static)
144
145 if multilib_build_binaries && ! tc-is-cross-compiler ; then
146 # code is full of AC_TRY_RUN()
147 mkdir -p examples/rlfe || die
148 cd examples/rlfe || die
149 ECONF_SOURCE=${S}/examples/rlfe \
150 econf --cache-file="${BUILD_DIR}"/config.cache
151 fi
152 }
153
154 multilib_src_compile() {
155 emake
156
157 if multilib_build_binaries && ! tc-is-cross-compiler ; then
158 # code is full of AC_TRY_RUN()
159 cd examples/rlfe || die
160 local l
161 for l in readline history ; do
162 ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname)
163 ln -sf ../../lib${l}.a lib${l}.a
164 done
165 emake
166 fi
167 }
168
169 multilib_src_install() {
170 default
171
172 if multilib_build_binaries ; then
173 gen_usr_ldscript -a readline history #4411
174
175 if ! tc-is-cross-compiler; then
176 dobin examples/rlfe/rlfe
177 fi
178 fi
179 }
180
181 multilib_src_install_all() {
182 einstalldocs
183 dodoc USAGE
184 dohtml -r doc/.
185 docinto ps
186 dodoc doc/*.ps
187 }
188
189 pkg_preinst() {
190 preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5} #29865
191 }
192
193 pkg_postinst() {
194 preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5}
195 }