1 |
commit: 801178136a0d22e286625a2854d38f024c1e741a |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 14 10:51:39 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 14 10:51:39 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=80117813 |
7 |
|
8 |
sys-libs/readline: sync with gx86, bug #675372 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/675372 |
11 |
Package-Manager: Portage-2.3.55-prefix, Repoman-2.3.12 |
12 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
13 |
|
14 |
sys-libs/readline/Manifest | 1 + |
15 |
.../readline-8.0-darwin-shlib-versioning.patch | 40 ++++ |
16 |
sys-libs/readline/files/readline-8.0-headers.patch | 17 ++ |
17 |
sys-libs/readline/readline-8.0.ebuild | 214 +++++++++++++++++++++ |
18 |
4 files changed, 272 insertions(+) |
19 |
|
20 |
diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest |
21 |
index 8b437c12ad..4eb982c3c0 100644 |
22 |
--- a/sys-libs/readline/Manifest |
23 |
+++ b/sys-libs/readline/Manifest |
24 |
@@ -1,6 +1,7 @@ |
25 |
DIST host-libtool-0.1.0.tar.gz 388867 BLAKE2B e8bfd1212f39d6262721c4a12535799f4e3428b83f3174bac373c15813462950218dd689380ab8caaf84186b60c29a1fafadfa1c2d0e5cb7f76f6d1699bdcabc SHA512 d8764d7814abf06556fb6eb19c12c2de1d1dc9f2f325deae55606ddfcf88963d65713d6fbd1fae0ab1a0668d90f84204e1cdcbd557944660ab01ecfe3a824ca5 |
26 |
DIST readline-6.3.tar.gz 2468560 BLAKE2B 24488ec141734c050ba985a93423692396f105619bae3ce5b109bc68a4f43862bcf3a6fb8d82fec1145d665cdb408765e179379bb35f008d09c441fa2e5739df SHA512 f70efaf46d570b85c7637172b0ee2eb9a4aa73ba38a62bb45075e665929d9701b96fba0aea6c767fd9a2a0d39dfe8e70ab06da08f8524aee76a7c502f370a401 |
27 |
DIST readline-7.0.tar.gz 2910016 BLAKE2B 679b8aa7ce003017b729e6d8d4cb69d0f991578441a3e69005090079e61f6aa48b7ad4d0b1f34b6041528cf33254a1bf3ddb05b60db53a06e443d7922d49d0d4 SHA512 18243189d39bf0d4c8a76cddcce75243c1bae8824c686e9b6ba352667607e5b10c5feb79372a1093c1c388d821841670702e940df12eae94bcebdeed90047870 |
28 |
+DIST readline-8.0.tar.gz 2975937 BLAKE2B 95e08b28cc46582f036379413810ca40c97d4d3bc59a9e03e04e57d531573abfbe955f6f1cb86e39c208bf6c3f4c618cff70a87bec596d0b9120909d6c5a2f69 SHA512 41759d27bc3a258fefd7f4ff3277fa6ab9c21abb7b160e1a75aa8eba547bd90b288514e76264bd94fb0172da8a4faa54aab2c07b68a0356918ecf7f1969e866f |
29 |
DIST readline63-001 1366 BLAKE2B 82af5be99597719329db3f1d6049e75a5654ccf6597cf557c71ad7ada0ac03be87381a7738931eb78716de65902ae87498f574b84150a69eae9cc308c4bfffdd SHA512 e70f89ca52a4eae7e1cddd70de6a7162252231ee029c89bb3fcb0f6c8c8b46c666be910c8b2eee72e96983ec2f1a23663694dc222f67228d82e8e4684f1504a2 |
30 |
DIST readline63-002 1297 BLAKE2B 5ace4a81381910ee48dee8cdbb2ca95a1bef2d1f8acca6d39a910c078c86de10a0fc29486939b336110ecb0281b3edb16e4b985f41e7ee161904728f289fff04 SHA512 4e23bd67433577e6e361d10a6c32768ea9e13b10e77493e565b870f56069b673fbcb0b860225f79fa9931845fc91d35c9a82c1385c23f8b757ebfd59f27851f4 |
31 |
DIST readline63-003 985 BLAKE2B cf2cda505b100d5f820d8bfc99eed6b50e65c92b6a495073352fc7385c6456478594e5c2dc293ce556b66853dff705050fb97982aa25fce452ae53d2cb272cf4 SHA512 6bfb84a5b980091b995e2b96bdf5680f97fe670e6cac1b8606d2d75a1ef922ff5bd4e73f029f7af98a115006b7ab7828146f2cd6986287543d8a29987c91dc12 |
32 |
|
33 |
diff --git a/sys-libs/readline/files/readline-8.0-darwin-shlib-versioning.patch b/sys-libs/readline/files/readline-8.0-darwin-shlib-versioning.patch |
34 |
new file mode 100644 |
35 |
index 0000000000..5012300b7c |
36 |
--- /dev/null |
37 |
+++ b/sys-libs/readline/files/readline-8.0-darwin-shlib-versioning.patch |
38 |
@@ -0,0 +1,40 @@ |
39 |
+diff -ur readline-6.3.orig/support/shobj-conf readline-6.3/support/shobj-conf |
40 |
+--- readline-6.3.orig/support/shobj-conf 2014-11-29 13:14:17.000000000 -0200 |
41 |
++++ readline-6.3/support/shobj-conf 2014-11-29 13:32:43.000000000 -0200 |
42 |
+@@ -180,34 +180,8 @@ |
43 |
+ SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' |
44 |
+ SHLIB_LIBSUFF='dylib' |
45 |
+ |
46 |
+- # unused at this time |
47 |
+- SHLIB_SONAME='$(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF)' |
48 |
+- |
49 |
+- case "${host_os}" in |
50 |
+- # Darwin versions 1, 5, 6, 7 correspond to Mac OS X 10.0, 10.1, 10.2, |
51 |
+- # and 10.3, respectively. |
52 |
+- darwin[1-7].*) |
53 |
+- SHOBJ_STATUS=unsupported |
54 |
+- SHOBJ_LDFLAGS='-dynamic' |
55 |
+- SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -v' |
56 |
+- ;; |
57 |
+- # Darwin 8 == Mac OS X 10.4; Mac OS X 10.N == Darwin N+4 |
58 |
+- *) |
59 |
+- case "${host_os}" in |
60 |
+- darwin[89]*|darwin1[012]*) |
61 |
+- SHOBJ_ARCHFLAGS='-arch_only `/usr/bin/arch`' |
62 |
+- ;; |
63 |
+- *) # Mac OS X 10.9 (Mavericks) and later |
64 |
+- SHOBJ_ARCHFLAGS= |
65 |
+- # for 32 and 64bit universal library |
66 |
+- #SHOBJ_ARCHFLAGS='-arch i386 -arch x86_64' |
67 |
+- #SHOBJ_CFLAGS=${SHOBJ_CFLAGS}' -arch i386 -arch x86_64' |
68 |
+- ;; |
69 |
+- esac |
70 |
+- SHOBJ_LDFLAGS="-dynamiclib -dynamic -undefined dynamic_lookup ${SHOBJ_ARCHFLAGS}" |
71 |
+- SHLIB_XLDFLAGS="-dynamiclib ${SHOBJ_ARCHFLAGS}"' -install_name $(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -v' |
72 |
+- ;; |
73 |
+- esac |
74 |
++ SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup' |
75 |
++ SHLIB_XLDFLAGS='-dynamiclib -install_name $(libdir)/`basename $@ $(SHLIB_MINOR)$(SHLIB_DOT)$(SHLIB_LIBSUFF)`$(SHLIB_DOT)$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR)' |
76 |
+ |
77 |
+ SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 |
78 |
+ ;; |
79 |
|
80 |
diff --git a/sys-libs/readline/files/readline-8.0-headers.patch b/sys-libs/readline/files/readline-8.0-headers.patch |
81 |
new file mode 100644 |
82 |
index 0000000000..f19a3b136e |
83 |
--- /dev/null |
84 |
+++ b/sys-libs/readline/files/readline-8.0-headers.patch |
85 |
@@ -0,0 +1,17 @@ |
86 |
+Required by bash-5.0 or else compilation fails: |
87 |
+ |
88 |
+ bashline.c:69:10: fatal error: readline/rlmbutil.h: No such file or directory |
89 |
+ #include <readline/rlmbutil.h> |
90 |
+ ^~~~~~~~~~~~~~~~~~~~~ |
91 |
+ |
92 |
+--- readline-8.0/Makefile.in |
93 |
++++ readline-8.0/Makefile.in |
94 |
+@@ -153,7 +153,7 @@ |
95 |
+ CREATED_TAGS = TAGS tags |
96 |
+ |
97 |
+ INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \ |
98 |
+- rlstdc.h rlconf.h rltypedefs.h |
99 |
++ rlstdc.h rlconf.h rltypedefs.h rlmbutil.h |
100 |
+ |
101 |
+ OTHER_DOCS = $(srcdir)/CHANGES $(srcdir)/INSTALL $(srcdir)/README |
102 |
+ OTHER_INSTALLED_DOCS = CHANGES INSTALL README |
103 |
|
104 |
diff --git a/sys-libs/readline/readline-8.0.ebuild b/sys-libs/readline/readline-8.0.ebuild |
105 |
new file mode 100644 |
106 |
index 0000000000..581f9040a2 |
107 |
--- /dev/null |
108 |
+++ b/sys-libs/readline/readline-8.0.ebuild |
109 |
@@ -0,0 +1,214 @@ |
110 |
+# Copyright 1999-2019 Gentoo Authors |
111 |
+# Distributed under the terms of the GNU General Public License v2 |
112 |
+ |
113 |
+EAPI=6 |
114 |
+ |
115 |
+inherit flag-o-matic multilib-minimal toolchain-funcs libtool ltprune |
116 |
+ |
117 |
+# Official patches |
118 |
+# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/ |
119 |
+PLEVEL="${PV##*_p}" |
120 |
+MY_PV="${PV/_p*}" |
121 |
+MY_PV="${MY_PV/_/-}" |
122 |
+MY_P="${PN}-${MY_PV}" |
123 |
+[[ ${PV} != *_p* ]] && PLEVEL=0 |
124 |
+patches() { |
125 |
+ [[ ${PLEVEL} -eq 0 ]] && return 1 |
126 |
+ local opt=$1 |
127 |
+ eval set -- {1..${PLEVEL}} |
128 |
+ set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") |
129 |
+ if [[ ${opt} == -s ]] ; then |
130 |
+ echo "${@/#/${DISTDIR}/}" |
131 |
+ else |
132 |
+ local u |
133 |
+ for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do |
134 |
+ printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" |
135 |
+ done |
136 |
+ fi |
137 |
+} |
138 |
+ |
139 |
+DESCRIPTION="Another cute console display library" |
140 |
+HOMEPAGE="http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" |
141 |
+ |
142 |
+case ${PV} in |
143 |
+ *_alpha*|*_beta*|*_rc*) |
144 |
+ SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" |
145 |
+ ;; |
146 |
+ *) |
147 |
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" |
148 |
+ ;; |
149 |
+esac |
150 |
+ |
151 |
+HOSTLTV="0.1.0" |
152 |
+HOSTLT="host-libtool-${HOSTLTV}" |
153 |
+HOSTLT_URI="https://github.com/haubi/host-libtool/releases/download/v${HOSTLTV}/${HOSTLT}.tar.gz" |
154 |
+SRC_URI+=" ${HOSTLT_URI}" |
155 |
+HOSTLT_S=${WORKDIR}/${HOSTLT} |
156 |
+ |
157 |
+LICENSE="GPL-3" |
158 |
+SLOT="0/8" # subslot matches SONAME major |
159 |
+KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
160 |
+IUSE="static-libs utils" |
161 |
+ |
162 |
+RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,${MULTILIB_USEDEP}]" |
163 |
+DEPEND="${RDEPEND} |
164 |
+ virtual/pkgconfig" |
165 |
+ |
166 |
+S=${WORKDIR}/${MY_P} |
167 |
+ |
168 |
+PATCHES=( |
169 |
+ "${FILESDIR}"/${PN}-5.0-no_rpath.patch |
170 |
+ "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 |
171 |
+ "${FILESDIR}"/${PN}-7.0-headers.patch |
172 |
+ "${FILESDIR}"/${PN}-8.0-headers.patch |
173 |
+ |
174 |
+ "${FILESDIR}"/${PN}-5.2-rlfe-aix-eff_uid.patch |
175 |
+ "${FILESDIR}"/${PN}-5.2-rlfe-hpux.patch |
176 |
+ "${FILESDIR}"/${PN}-5.2-ia64hpux.patch |
177 |
+ "${FILESDIR}"/${PN}-6.0-mint.patch |
178 |
+ "${FILESDIR}"/${PN}-6.0-rlfe-solaris.patch |
179 |
+ "${FILESDIR}"/${PN}-6.1-aix-soname.patch |
180 |
+ "${FILESDIR}"/${PN}-6.1-aix-expfull.patch |
181 |
+ "${FILESDIR}"/${PN}-6.3-interix.patch |
182 |
+ "${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch |
183 |
+ |
184 |
+ "${FILESDIR}"/${PN}-7.0-libtool.patch # this enables building via libtool |
185 |
+) |
186 |
+ |
187 |
+# Needed because we don't want the patches being unpacked |
188 |
+# (which emits annoying and useless error messages) |
189 |
+src_unpack() { |
190 |
+ unpack ${HOSTLT}.tar.gz |
191 |
+ S="${HOSTLT_S}" elibtoolize |
192 |
+ unpack ${MY_P}.tar.gz |
193 |
+} |
194 |
+ |
195 |
+src_prepare() { |
196 |
+ [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) |
197 |
+ default |
198 |
+ |
199 |
+ # Force ncurses linking. #71420 |
200 |
+ # Use pkg-config to get the right values. #457558 |
201 |
+ local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs) |
202 |
+ sed -i \ |
203 |
+ -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \ |
204 |
+ support/shobj-conf || die |
205 |
+ sed -i \ |
206 |
+ -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \ |
207 |
+ examples/rlfe/configure || die |
208 |
+ |
209 |
+ # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated |
210 |
+ # objformat for years, so we don't want to rely on that. |
211 |
+ sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die |
212 |
+ |
213 |
+ ln -s ../.. examples/rlfe/readline || die # for local readline headers |
214 |
+} |
215 |
+ |
216 |
+src_configure() { |
217 |
+ mkdir -p "${WORKDIR}/${HOSTLT}-${ABI}" || die |
218 |
+ cd "${WORKDIR}/${HOSTLT}-${ABI}" || die |
219 |
+ ECONF_SOURCE="${HOSTLT_S}" econf $(use_enable static-libs static) |
220 |
+ cd "${BUILD_DIR}" |
221 |
+ |
222 |
+ export PATH="${WORKDIR}/${HOSTLT}-${ABI}:${PATH}" |
223 |
+ export ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs) |
224 |
+ |
225 |
+ # fix implicit decls with widechar funcs |
226 |
+ append-cppflags -D_GNU_SOURCE |
227 |
+ # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html |
228 |
+ append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free |
229 |
+ |
230 |
+ # Make sure configure picks a better ar than `ar`. #484866 |
231 |
+ export ac_cv_prog_AR=$(tc-getAR) |
232 |
+ |
233 |
+ # Force the test since we used sed above to force it. |
234 |
+ export bash_cv_termcap_lib=ncurses |
235 |
+ |
236 |
+ # Control cross-compiling cases when we know the right answer. |
237 |
+ # In cases where the C library doesn't support wide characters, readline |
238 |
+ # itself won't work correctly, so forcing the answer below should be OK. |
239 |
+ if tc-is-cross-compiler ; then |
240 |
+ use kernel_Winnt || export bash_cv_func_sigsetjmp='present' |
241 |
+ export bash_cv_func_ctype_nonascii='yes' |
242 |
+ export bash_cv_wcwidth_broken='no' #503312 |
243 |
+ fi |
244 |
+ |
245 |
+ # This is for rlfe, but we need to make sure LDFLAGS doesn't change |
246 |
+ # so we can re-use the config cache file between the two. |
247 |
+ append-ldflags -L. |
248 |
+ export LDFLAGS="-L${BUILD_DIR}/shlib ${LDFLAGS}" # search local dirs first |
249 |
+ |
250 |
+ multilib-minimal_src_configure |
251 |
+} |
252 |
+ |
253 |
+multilib_src_configure() { |
254 |
+ local myeconfargs=( |
255 |
+ --cache-file="${BUILD_DIR}"/config.cache |
256 |
+ --with-curses |
257 |
++ --disable-shared # use libtool instead |
258 |
+ ) |
259 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
260 |
+ |
261 |
+ if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then |
262 |
+ # code is full of AC_TRY_RUN() |
263 |
+ mkdir -p examples/rlfe || die |
264 |
+ cd examples/rlfe || die |
265 |
+ ECONF_SOURCE="${S}"/examples/rlfe \ |
266 |
+ econf --cache-file="${BUILD_DIR}"/config.cache |
267 |
+ fi |
268 |
+} |
269 |
+ |
270 |
+multilib_src_compile() { |
271 |
+ export PATH="${WORKDIR}/${HOSTLT}-${ABI}:${PATH}" |
272 |
+ export ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs) |
273 |
+ emake shared |
274 |
+ |
275 |
+ if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then |
276 |
+ # code is full of AC_TRY_RUN() |
277 |
+ cd examples/rlfe || die |
278 |
+ local l |
279 |
+ for l in readline history ; do |
280 |
+ ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die |
281 |
+ ln -s ../../lib${l}.a lib${l}.a || die |
282 |
+ done |
283 |
+ emake LTLINK='libtool --mode=link --tag=CC' |
284 |
+ fi |
285 |
+} |
286 |
+ |
287 |
+multilib_src_install() { |
288 |
+ export PATH="${WORKDIR}/${HOSTLT}-${ABI}:${PATH}" |
289 |
+ export ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs) |
290 |
+ emake DESTDIR="${D}" install-shared |
291 |
+ |
292 |
+ if multilib_is_native_abi ; then |
293 |
+ gen_usr_ldscript -a readline history #4411 |
294 |
+ |
295 |
+ if use utils && ! tc-is-cross-compiler; then |
296 |
+ dobin examples/rlfe/rlfe |
297 |
+ fi |
298 |
+ fi |
299 |
+} |
300 |
+ |
301 |
+multilib_src_install_all() { |
302 |
+ HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs |
303 |
+ dodoc USAGE |
304 |
+ docinto ps |
305 |
+ dodoc doc/*.ps |
306 |
+ |
307 |
+ prune_libtool_files --all |
308 |
+} |
309 |
+pkg_preinst() { |
310 |
+ # bug #29865 |
311 |
+ # Reappeared in #595324 with paludis so keeping this for now... |
312 |
+ preserve_old_lib \ |
313 |
+ /$(get_libdir)/lib{history,readline}$(get_libname 4) \ |
314 |
+ /$(get_libdir)/lib{history,readline}$(get_libname 5) \ |
315 |
+ /$(get_libdir)/lib{history,readline}$(get_libname 6) |
316 |
+} |
317 |
+ |
318 |
+pkg_postinst() { |
319 |
+ preserve_old_lib_notify \ |
320 |
+ /$(get_libdir)/lib{history,readline}$(get_libname 4) \ |
321 |
+ /$(get_libdir)/lib{history,readline}$(get_libname 5) \ |
322 |
+ /$(get_libdir)/lib{history,readline}$(get_libname 6) |
323 |
+} |