1 |
commit: f9738c03da6cbac21abd409464a779b02e313b80 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 29 07:48:04 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 29 07:48:04 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9738c03 |
7 |
|
8 |
sys-libs/ncurses: Removed old. |
9 |
|
10 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
sys-libs/ncurses/files/ncurses-6.0-gfbsd.patch | 24 -- |
14 |
.../files/ncurses-6.1-st07_terminfo_typo.patch | 14 - |
15 |
sys-libs/ncurses/ncurses-6.1-r2.ebuild | 295 -------------------- |
16 |
sys-libs/ncurses/ncurses-6.1-r3.ebuild | 305 --------------------- |
17 |
4 files changed, 638 deletions(-) |
18 |
|
19 |
diff --git a/sys-libs/ncurses/files/ncurses-6.0-gfbsd.patch b/sys-libs/ncurses/files/ncurses-6.0-gfbsd.patch |
20 |
deleted file mode 100644 |
21 |
index 1403a29c933..00000000000 |
22 |
--- a/sys-libs/ncurses/files/ncurses-6.0-gfbsd.patch |
23 |
+++ /dev/null |
24 |
@@ -1,24 +0,0 @@ |
25 |
-we'll hijack the freebsd* case that comes later |
26 |
- |
27 |
---- ncurses-6.0/aclocal.m4 |
28 |
-+++ ncurses-6.0/aclocal.m4 |
29 |
-@@ -5711,7 +5711,7 @@ |
30 |
- fi |
31 |
- cf_cv_rm_so_locs=yes |
32 |
- ;; |
33 |
-- (linux*|gnu*|k*bsd*-gnu) |
34 |
-+ (linux*|gnu*|k*bsd*-gnu|freebsd*|dragonfly*) |
35 |
- if test "$DFT_LWR_MODEL" = "shared" ; then |
36 |
- LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" |
37 |
- LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" |
38 |
---- ncurses-6.0/configure |
39 |
-+++ ncurses-6.0/configure |
40 |
-@@ -6188,7 +6188,7 @@ |
41 |
- fi |
42 |
- cf_cv_rm_so_locs=yes |
43 |
- ;; |
44 |
-- (linux*|gnu*|k*bsd*-gnu) |
45 |
-+ (linux*|gnu*|k*bsd*-gnu|freebsd*|dragonfly*) |
46 |
- if test "$DFT_LWR_MODEL" = "shared" ; then |
47 |
- LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" |
48 |
- LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" |
49 |
|
50 |
diff --git a/sys-libs/ncurses/files/ncurses-6.1-st07_terminfo_typo.patch b/sys-libs/ncurses/files/ncurses-6.1-st07_terminfo_typo.patch |
51 |
deleted file mode 100644 |
52 |
index 4532d648a64..00000000000 |
53 |
--- a/sys-libs/ncurses/files/ncurses-6.1-st07_terminfo_typo.patch |
54 |
+++ /dev/null |
55 |
@@ -1,14 +0,0 @@ |
56 |
-https://github.com/tmux/tmux/issues/1264 |
57 |
-https://bugs.gentoo.org/651494 |
58 |
- |
59 |
---- ncurses-6.1/misc/terminfo.src |
60 |
-+++ ncurses-6.1/misc/terminfo.src |
61 |
-@@ -6260,7 +6260,7 @@ |
62 |
- %=%t3%e%p1%d%;m, |
63 |
- sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%| |
64 |
- %t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m, |
65 |
-- Ss=\E]52;%p1%s;%p2%s\007, kDN3=\E[1;3B, kDN5=\E[1;5B, |
66 |
-+ Ms=\E]52;%p1%s;%p2%s\007, kDN3=\E[1;3B, kDN5=\E[1;5B, |
67 |
- kLFT3=\E[1;3D, kLFT5=\E[1;5D, kNXT3=\E[6;3~, |
68 |
- kNXT5=\E[6;5~, kPRV3=\E[5;3~, kPRV5=\E[5;5~, |
69 |
- kRIT3=\E[1;3C, kRIT5=\E[1;5C, kUP3=\E[1;3A, kUP5=\E[1;5A, |
70 |
|
71 |
diff --git a/sys-libs/ncurses/ncurses-6.1-r2.ebuild b/sys-libs/ncurses/ncurses-6.1-r2.ebuild |
72 |
deleted file mode 100644 |
73 |
index 85d9d9203ce..00000000000 |
74 |
--- a/sys-libs/ncurses/ncurses-6.1-r2.ebuild |
75 |
+++ /dev/null |
76 |
@@ -1,295 +0,0 @@ |
77 |
-# Copyright 1999-2019 Gentoo Authors |
78 |
-# Distributed under the terms of the GNU General Public License v2 |
79 |
- |
80 |
-EAPI=6 |
81 |
- |
82 |
-inherit flag-o-matic toolchain-funcs multilib-minimal preserve-libs usr-ldscript |
83 |
- |
84 |
-MY_PV=${PV:0:3} |
85 |
-PV_SNAP=${PV:4} |
86 |
-MY_P=${PN}-${MY_PV} |
87 |
-DESCRIPTION="console display library" |
88 |
-HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/" |
89 |
-SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz" |
90 |
- |
91 |
-LICENSE="MIT" |
92 |
-# The subslot reflects the SONAME. |
93 |
-SLOT="0/6" |
94 |
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" |
95 |
-IUSE="ada +cxx debug doc gpm minimal profile static-libs test threads tinfo trace unicode" |
96 |
- |
97 |
-DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )" |
98 |
-# berkdb? ( sys-libs/db )" |
99 |
-# Block the older ncurses that installed all files w/SLOT=5. #557472 |
100 |
-RDEPEND="${DEPEND} |
101 |
- !<=sys-libs/ncurses-5.9-r4:5 |
102 |
- !<sys-libs/slang-2.3.2_pre23 |
103 |
- !<x11-terms/rxvt-unicode-9.06-r3 |
104 |
- !<x11-terms/st-0.6-r1" |
105 |
- |
106 |
-S=${WORKDIR}/${MY_P} |
107 |
- |
108 |
-PATCHES=( |
109 |
- "${FILESDIR}/${PN}-6.0-gfbsd.patch" |
110 |
- "${FILESDIR}/${PN}-5.7-nongnu.patch" |
111 |
- "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" #192083 #383871 |
112 |
- "${FILESDIR}/${PN}-6.0-pkg-config.patch" |
113 |
- "${FILESDIR}/${PN}-5.9-gcc-5.patch" #545114 |
114 |
- "${FILESDIR}/${PN}-6.0-ticlib.patch" #557360 |
115 |
- "${FILESDIR}/${PN}-6.0-cppflags-cross.patch" #601426 |
116 |
- "${FILESDIR}/${PN}-6.1-st07_terminfo_typo.patch" #651494 |
117 |
-) |
118 |
- |
119 |
-src_prepare() { |
120 |
- [[ -n ${PV_SNAP} ]] && eapply "${WORKDIR}"/${MY_P}-${PV_SNAP}-patch.sh |
121 |
- default |
122 |
-} |
123 |
- |
124 |
-src_configure() { |
125 |
- unset TERMINFO #115036 |
126 |
- tc-export_build_env BUILD_{CC,CPP} |
127 |
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642 |
128 |
- |
129 |
- # Build the various variants of ncurses -- narrow, wide, and threaded. #510440 |
130 |
- # Order matters here -- we want unicode/thread versions to come last so that the |
131 |
- # binaries in /usr/bin support both wide and narrow. |
132 |
- # The naming is also important as we use these directly with filenames and when |
133 |
- # checking configure flags. |
134 |
- NCURSES_TARGETS=( |
135 |
- ncurses |
136 |
- $(usex unicode 'ncursesw' '') |
137 |
- $(usex threads 'ncursest' '') |
138 |
- $(use unicode && usex threads 'ncursestw' '') |
139 |
- ) |
140 |
- |
141 |
- # When installing ncurses, we have to use a compatible version of tic. |
142 |
- # This comes up when cross-compiling, doing multilib builds, upgrading, |
143 |
- # or installing for the first time. Build a local copy of tic whenever |
144 |
- # the host version isn't available. #249363 #557598 |
145 |
- if ! ROOT=/ has_version "~sys-libs/${P}:0" ; then |
146 |
- local lbuildflags="-static" |
147 |
- |
148 |
- # some toolchains don't quite support static linking |
149 |
- local dbuildflags="-Wl,-rpath,${WORKDIR}/lib" |
150 |
- case ${CHOST} in |
151 |
- *-darwin*) dbuildflags= ;; |
152 |
- *-aix*) dbuildflags= ;; |
153 |
- esac |
154 |
- echo "int main() {}" | \ |
155 |
- $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \ |
156 |
- || lbuildflags="${dbuildflags}" |
157 |
- |
158 |
- # We can't re-use the multilib BUILD_DIR because we run outside of it. |
159 |
- BUILD_DIR="${WORKDIR}" \ |
160 |
- CHOST=${CBUILD} \ |
161 |
- CFLAGS=${BUILD_CFLAGS} \ |
162 |
- CXXFLAGS=${BUILD_CXXFLAGS} \ |
163 |
- CPPFLAGS=${BUILD_CPPFLAGS} \ |
164 |
- LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \ |
165 |
- do_configure cross --without-shared --with-normal |
166 |
- fi |
167 |
- multilib-minimal_src_configure |
168 |
-} |
169 |
- |
170 |
-multilib_src_configure() { |
171 |
- local t |
172 |
- for t in "${NCURSES_TARGETS[@]}" ; do |
173 |
- do_configure "${t}" |
174 |
- done |
175 |
-} |
176 |
- |
177 |
-do_configure() { |
178 |
- local target=$1 |
179 |
- shift |
180 |
- |
181 |
- mkdir "${BUILD_DIR}/${target}" || die |
182 |
- cd "${BUILD_DIR}/${target}" || die |
183 |
- |
184 |
- local conf=( |
185 |
- # We need the basic terminfo files in /etc, bug #37026. We will |
186 |
- # add '--with-terminfo-dirs' and then populate /etc/terminfo in |
187 |
- # src_install() ... |
188 |
- --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo" |
189 |
- |
190 |
- # Disabled until #245417 is sorted out. |
191 |
- #$(use_with berkdb hashed-db) |
192 |
- |
193 |
- # Enable installation of .pc files. |
194 |
- --enable-pc-files |
195 |
- # This path is used to control where the .pc files are installed. |
196 |
- --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" |
197 |
- |
198 |
- # Now the rest of the various standard flags. |
199 |
- --with-shared |
200 |
- --without-hashed-db |
201 |
- $(use_with ada) |
202 |
- $(use_with cxx) |
203 |
- $(use_with cxx cxx-binding) |
204 |
- --with-cxx-shared |
205 |
- $(use_with debug) |
206 |
- $(use_with profile) |
207 |
- # The configure script uses ldd to parse the linked output which |
208 |
- # is flaky for cross-compiling/multilib/ldd versions/etc... |
209 |
- $(use_with gpm gpm libgpm.so.1) |
210 |
- # Required for building on mingw-w64, and possibly other windows |
211 |
- # platforms, bug #639670 |
212 |
- $(use_enable kernel_Winnt term-driver) |
213 |
- --disable-termcap |
214 |
- --enable-symlinks |
215 |
- --with-rcs-ids |
216 |
- --with-manpage-format=normal |
217 |
- --enable-const |
218 |
- --enable-colorfgbg |
219 |
- --enable-hard-tabs |
220 |
- --enable-echo |
221 |
- $(use_enable !ada warnings) |
222 |
- $(use_with debug assertions) |
223 |
- $(use_enable !debug leaks) |
224 |
- $(use_with debug expanded) |
225 |
- $(use_with !debug macros) |
226 |
- $(multilib_native_with progs) |
227 |
- $(use_with test tests) |
228 |
- $(use_with trace) |
229 |
- $(use_with tinfo termlib) |
230 |
- --disable-stripping |
231 |
- ) |
232 |
- |
233 |
- if [[ ${target} == ncurses*w ]] ; then |
234 |
- conf+=( --enable-widec ) |
235 |
- else |
236 |
- conf+=( --disable-widec ) |
237 |
- fi |
238 |
- if [[ ${target} == ncursest* ]] ; then |
239 |
- conf+=( --with-{pthread,reentrant} ) |
240 |
- else |
241 |
- conf+=( --without-{pthread,reentrant} ) |
242 |
- fi |
243 |
- # Make sure each variant goes in a unique location. |
244 |
- if [[ ${target} == "ncurses" ]] ; then |
245 |
- # "ncurses" variant goes into "${EPREFIX}"/usr/include |
246 |
- # It is needed on Prefix because the configure script appends |
247 |
- # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr. |
248 |
- conf+=( --enable-overwrite ) |
249 |
- else |
250 |
- conf+=( --includedir="${EPREFIX}"/usr/include/${target} ) |
251 |
- fi |
252 |
- # See comments in src_configure. |
253 |
- if [[ ${target} != "cross" ]] ; then |
254 |
- local cross_path="${WORKDIR}/cross" |
255 |
- [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic" |
256 |
- fi |
257 |
- |
258 |
- # Force bash until upstream rebuilds the configure script with a newer |
259 |
- # version of autotools. #545532 |
260 |
- CONFIG_SHELL=${EPREFIX}/bin/bash \ |
261 |
- ECONF_SOURCE="${S}" \ |
262 |
- econf "${conf[@]}" "$@" |
263 |
-} |
264 |
- |
265 |
-src_compile() { |
266 |
- # See comments in src_configure. |
267 |
- if ! ROOT=/ has_version "~sys-libs/${P}:0" ; then |
268 |
- BUILD_DIR="${WORKDIR}" \ |
269 |
- do_compile cross -C progs tic |
270 |
- fi |
271 |
- |
272 |
- multilib-minimal_src_compile |
273 |
-} |
274 |
- |
275 |
-multilib_src_compile() { |
276 |
- local t |
277 |
- for t in "${NCURSES_TARGETS[@]}" ; do |
278 |
- do_compile "${t}" |
279 |
- done |
280 |
-} |
281 |
- |
282 |
-do_compile() { |
283 |
- local target=$1 |
284 |
- shift |
285 |
- |
286 |
- cd "${BUILD_DIR}/${target}" || die |
287 |
- |
288 |
- # A little hack to fix parallel builds ... they break when |
289 |
- # generating sources so if we generate the sources first (in |
290 |
- # non-parallel), we can then build the rest of the package |
291 |
- # in parallel. This is not really a perf hit since the source |
292 |
- # generation is quite small. |
293 |
- emake -j1 sources |
294 |
- # For some reason, sources depends on pc-files which depends on |
295 |
- # compiled libraries which depends on sources which ... |
296 |
- # Manually delete the pc-files file so the install step will |
297 |
- # create the .pc files we want. |
298 |
- rm -f misc/pc-files || die |
299 |
- emake "$@" |
300 |
-} |
301 |
- |
302 |
-multilib_src_install() { |
303 |
- local target |
304 |
- for target in "${NCURSES_TARGETS[@]}" ; do |
305 |
- emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install |
306 |
- done |
307 |
- |
308 |
- # Move main libraries into /. |
309 |
- if multilib_is_native_abi ; then |
310 |
- gen_usr_ldscript -a \ |
311 |
- "${NCURSES_TARGETS[@]}" \ |
312 |
- $(use tinfo && usex unicode 'tinfow' '') \ |
313 |
- $(usev tinfo) |
314 |
- fi |
315 |
- if ! tc-is-static-only ; then |
316 |
- # Provide a link for -lcurses. |
317 |
- ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die |
318 |
- fi |
319 |
- # don't delete '*.dll.a', needed for linking #631468 |
320 |
- if ! use static-libs; then |
321 |
- find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die |
322 |
- fi |
323 |
- |
324 |
- # Build fails to create this ... |
325 |
- dosym ../share/terminfo /usr/$(get_libdir)/terminfo |
326 |
-} |
327 |
- |
328 |
-multilib_src_install_all() { |
329 |
-# if ! use berkdb ; then |
330 |
- # We need the basic terminfo files in /etc, bug #37026 |
331 |
- einfo "Installing basic terminfo files in /etc..." |
332 |
- local x |
333 |
- for x in ansi console dumb linux rxvt rxvt-unicode screen{,-256color} vt{52,100,102,200,220} \ |
334 |
- xterm xterm-{,256}color |
335 |
- do |
336 |
- local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null) |
337 |
- local basedir=$(basename $(dirname "${termfile}")) |
338 |
- |
339 |
- if [[ -n ${termfile} ]] ; then |
340 |
- dodir /etc/terminfo/${basedir} |
341 |
- mv ${termfile} "${ED}"/etc/terminfo/${basedir}/ |
342 |
- dosym ../../../../etc/terminfo/${basedir}/${x} \ |
343 |
- /usr/share/terminfo/${basedir}/${x} |
344 |
- fi |
345 |
- done |
346 |
-# fi |
347 |
- |
348 |
- echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" > "${T}"/50ncurses |
349 |
- doenvd "${T}"/50ncurses |
350 |
- |
351 |
- use minimal && rm -r "${ED}"/usr/share/terminfo* |
352 |
- # Because ncurses5-config --terminfo returns the directory we keep it |
353 |
- keepdir /usr/share/terminfo #245374 |
354 |
- |
355 |
- cd "${S}" || die |
356 |
- dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc |
357 |
- if use doc ; then |
358 |
- docinto html |
359 |
- dodoc -r doc/html/ |
360 |
- fi |
361 |
-} |
362 |
- |
363 |
-pkg_preinst() { |
364 |
- preserve_old_lib /$(get_libdir)/libncurses.so.5 |
365 |
- use unicode && preserve_old_lib /$(get_libdir)/libncursesw.so.5 |
366 |
-} |
367 |
- |
368 |
-pkg_postinst() { |
369 |
- preserve_old_lib_notify /$(get_libdir)/libncurses.so.5 |
370 |
- use unicode && preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5 |
371 |
-} |
372 |
|
373 |
diff --git a/sys-libs/ncurses/ncurses-6.1-r3.ebuild b/sys-libs/ncurses/ncurses-6.1-r3.ebuild |
374 |
deleted file mode 100644 |
375 |
index 4fd2cc589a8..00000000000 |
376 |
--- a/sys-libs/ncurses/ncurses-6.1-r3.ebuild |
377 |
+++ /dev/null |
378 |
@@ -1,305 +0,0 @@ |
379 |
-# Copyright 1999-2019 Gentoo Authors |
380 |
-# Distributed under the terms of the GNU General Public License v2 |
381 |
- |
382 |
-EAPI="6" |
383 |
- |
384 |
-inherit flag-o-matic toolchain-funcs multilib-minimal preserve-libs usr-ldscript |
385 |
- |
386 |
-MY_PV=${PV:0:3} |
387 |
-PV_SNAP=${PV:4} |
388 |
-MY_P=${PN}-${MY_PV} |
389 |
-DESCRIPTION="console display library" |
390 |
-HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/" |
391 |
-SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz" |
392 |
- |
393 |
-LICENSE="MIT" |
394 |
-# The subslot reflects the SONAME. |
395 |
-SLOT="0/6" |
396 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
397 |
-IUSE="ada +cxx debug doc gpm minimal profile static-libs test threads tinfo trace unicode" |
398 |
- |
399 |
-DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )" |
400 |
-# berkdb? ( sys-libs/db )" |
401 |
-# Block the older ncurses that installed all files w/SLOT=5. #557472 |
402 |
-RDEPEND="${DEPEND} |
403 |
- !<=sys-libs/ncurses-5.9-r4:5 |
404 |
- !<sys-libs/slang-2.3.2_pre23 |
405 |
- !<x11-terms/rxvt-unicode-9.06-r3 |
406 |
- !<x11-terms/st-0.6-r1" |
407 |
- |
408 |
-S=${WORKDIR}/${MY_P} |
409 |
- |
410 |
-PATCHES=( |
411 |
- "${FILESDIR}/${PN}-6.0-gfbsd.patch" |
412 |
- "${FILESDIR}/${PN}-5.7-nongnu.patch" |
413 |
- "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" #192083 #383871 |
414 |
- "${FILESDIR}/${PN}-6.0-pkg-config.patch" |
415 |
- "${FILESDIR}/${PN}-5.9-gcc-5.patch" #545114 |
416 |
- "${FILESDIR}/${PN}-6.0-ticlib.patch" #557360 |
417 |
- "${FILESDIR}/${PN}-6.0-cppflags-cross.patch" #601426 |
418 |
- "${FILESDIR}/${PN}-6.1-st07_terminfo_typo.patch" #651494 |
419 |
-) |
420 |
- |
421 |
-src_prepare() { |
422 |
- [[ -n ${PV_SNAP} ]] && eapply "${WORKDIR}"/${MY_P}-${PV_SNAP}-patch.sh |
423 |
- default |
424 |
-} |
425 |
- |
426 |
-src_configure() { |
427 |
- unset TERMINFO #115036 |
428 |
- tc-export_build_env BUILD_{CC,CPP} |
429 |
- BUILD_CPPFLAGS+=" -D_GNU_SOURCE" #214642 |
430 |
- |
431 |
- # Build the various variants of ncurses -- narrow, wide, and threaded. #510440 |
432 |
- # Order matters here -- we want unicode/thread versions to come last so that the |
433 |
- # binaries in /usr/bin support both wide and narrow. |
434 |
- # The naming is also important as we use these directly with filenames and when |
435 |
- # checking configure flags. |
436 |
- NCURSES_TARGETS=( |
437 |
- ncurses |
438 |
- $(usex unicode 'ncursesw' '') |
439 |
- $(usex threads 'ncursest' '') |
440 |
- $(use unicode && usex threads 'ncursestw' '') |
441 |
- ) |
442 |
- |
443 |
- # When installing ncurses, we have to use a compatible version of tic. |
444 |
- # This comes up when cross-compiling, doing multilib builds, upgrading, |
445 |
- # or installing for the first time. Build a local copy of tic whenever |
446 |
- # the host version isn't available. #249363 #557598 |
447 |
- if ! ROOT=/ has_version "~sys-libs/${P}:0" ; then |
448 |
- local lbuildflags="-static" |
449 |
- |
450 |
- # some toolchains don't quite support static linking |
451 |
- local dbuildflags="-Wl,-rpath,${WORKDIR}/lib" |
452 |
- case ${CHOST} in |
453 |
- *-darwin*) dbuildflags= ;; |
454 |
- *-aix*) dbuildflags= ;; |
455 |
- esac |
456 |
- echo "int main() {}" | \ |
457 |
- $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \ |
458 |
- || lbuildflags="${dbuildflags}" |
459 |
- |
460 |
- # We can't re-use the multilib BUILD_DIR because we run outside of it. |
461 |
- BUILD_DIR="${WORKDIR}" \ |
462 |
- CHOST=${CBUILD} \ |
463 |
- CFLAGS=${BUILD_CFLAGS} \ |
464 |
- CXXFLAGS=${BUILD_CXXFLAGS} \ |
465 |
- CPPFLAGS=${BUILD_CPPFLAGS} \ |
466 |
- LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \ |
467 |
- do_configure cross --without-shared --with-normal |
468 |
- fi |
469 |
- multilib-minimal_src_configure |
470 |
-} |
471 |
- |
472 |
-multilib_src_configure() { |
473 |
- local t |
474 |
- for t in "${NCURSES_TARGETS[@]}" ; do |
475 |
- do_configure "${t}" |
476 |
- done |
477 |
-} |
478 |
- |
479 |
-do_configure() { |
480 |
- local target=$1 |
481 |
- shift |
482 |
- |
483 |
- mkdir "${BUILD_DIR}/${target}" || die |
484 |
- cd "${BUILD_DIR}/${target}" || die |
485 |
- |
486 |
- local conf=( |
487 |
- # We need the basic terminfo files in /etc, bug #37026. We will |
488 |
- # add '--with-terminfo-dirs' and then populate /etc/terminfo in |
489 |
- # src_install() ... |
490 |
- --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo" |
491 |
- |
492 |
- # Disabled until #245417 is sorted out. |
493 |
- #$(use_with berkdb hashed-db) |
494 |
- |
495 |
- # Enable installation of .pc files. |
496 |
- --enable-pc-files |
497 |
- # This path is used to control where the .pc files are installed. |
498 |
- --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" |
499 |
- |
500 |
- # Now the rest of the various standard flags. |
501 |
- --with-shared |
502 |
- --without-hashed-db |
503 |
- $(use_with ada) |
504 |
- $(use_with cxx) |
505 |
- $(use_with cxx cxx-binding) |
506 |
- --with-cxx-shared |
507 |
- $(use_with debug) |
508 |
- $(use_with profile) |
509 |
- # The configure script uses ldd to parse the linked output which |
510 |
- # is flaky for cross-compiling/multilib/ldd versions/etc... |
511 |
- $(use_with gpm gpm libgpm.so.1) |
512 |
- # Required for building on mingw-w64, and possibly other windows |
513 |
- # platforms, bug #639670 |
514 |
- $(use_enable kernel_Winnt term-driver) |
515 |
- --disable-termcap |
516 |
- --enable-symlinks |
517 |
- --with-rcs-ids |
518 |
- --with-manpage-format=normal |
519 |
- --enable-const |
520 |
- --enable-colorfgbg |
521 |
- --enable-hard-tabs |
522 |
- --enable-echo |
523 |
- $(use_enable !ada warnings) |
524 |
- $(use_with debug assertions) |
525 |
- $(use_enable !debug leaks) |
526 |
- $(use_with debug expanded) |
527 |
- $(use_with !debug macros) |
528 |
- $(multilib_native_with progs) |
529 |
- $(use_with test tests) |
530 |
- $(use_with trace) |
531 |
- $(use_with tinfo termlib) |
532 |
- --disable-stripping |
533 |
- ) |
534 |
- |
535 |
- if [[ ${target} == ncurses*w ]] ; then |
536 |
- conf+=( --enable-widec ) |
537 |
- else |
538 |
- conf+=( --disable-widec ) |
539 |
- fi |
540 |
- if [[ ${target} == ncursest* ]] ; then |
541 |
- conf+=( --with-{pthread,reentrant} ) |
542 |
- else |
543 |
- conf+=( --without-{pthread,reentrant} ) |
544 |
- fi |
545 |
- # Make sure each variant goes in a unique location. |
546 |
- if [[ ${target} == "ncurses" ]] ; then |
547 |
- # "ncurses" variant goes into "${EPREFIX}"/usr/include |
548 |
- # It is needed on Prefix because the configure script appends |
549 |
- # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr. |
550 |
- conf+=( --enable-overwrite ) |
551 |
- else |
552 |
- conf+=( --includedir="${EPREFIX}"/usr/include/${target} ) |
553 |
- fi |
554 |
- # See comments in src_configure. |
555 |
- if [[ ${target} != "cross" ]] ; then |
556 |
- local cross_path="${WORKDIR}/cross" |
557 |
- [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic" |
558 |
- fi |
559 |
- |
560 |
- # Force bash until upstream rebuilds the configure script with a newer |
561 |
- # version of autotools. #545532 |
562 |
- CONFIG_SHELL=${EPREFIX}/bin/bash \ |
563 |
- ECONF_SOURCE="${S}" \ |
564 |
- econf "${conf[@]}" "$@" |
565 |
-} |
566 |
- |
567 |
-src_compile() { |
568 |
- # See comments in src_configure. |
569 |
- if ! ROOT=/ has_version "~sys-libs/${P}:0" ; then |
570 |
- BUILD_DIR="${WORKDIR}" \ |
571 |
- do_compile cross -C progs tic |
572 |
- fi |
573 |
- |
574 |
- multilib-minimal_src_compile |
575 |
-} |
576 |
- |
577 |
-multilib_src_compile() { |
578 |
- local t |
579 |
- for t in "${NCURSES_TARGETS[@]}" ; do |
580 |
- do_compile "${t}" |
581 |
- done |
582 |
-} |
583 |
- |
584 |
-do_compile() { |
585 |
- local target=$1 |
586 |
- shift |
587 |
- |
588 |
- cd "${BUILD_DIR}/${target}" || die |
589 |
- |
590 |
- # A little hack to fix parallel builds ... they break when |
591 |
- # generating sources so if we generate the sources first (in |
592 |
- # non-parallel), we can then build the rest of the package |
593 |
- # in parallel. This is not really a perf hit since the source |
594 |
- # generation is quite small. |
595 |
- emake -j1 sources |
596 |
- # For some reason, sources depends on pc-files which depends on |
597 |
- # compiled libraries which depends on sources which ... |
598 |
- # Manually delete the pc-files file so the install step will |
599 |
- # create the .pc files we want. |
600 |
- rm -f misc/pc-files || die |
601 |
- emake "$@" |
602 |
-} |
603 |
- |
604 |
-multilib_src_install() { |
605 |
- local target |
606 |
- for target in "${NCURSES_TARGETS[@]}" ; do |
607 |
- emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install |
608 |
- done |
609 |
- |
610 |
- # Move main libraries into /. |
611 |
- if multilib_is_native_abi ; then |
612 |
- gen_usr_ldscript -a \ |
613 |
- "${NCURSES_TARGETS[@]}" \ |
614 |
- $(use tinfo && usex unicode 'tinfow' '') \ |
615 |
- $(usev tinfo) |
616 |
- fi |
617 |
- if ! tc-is-static-only ; then |
618 |
- # Provide a link for -lcurses. |
619 |
- ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die |
620 |
- fi |
621 |
- # don't delete '*.dll.a', needed for linking #631468 |
622 |
- if ! use static-libs; then |
623 |
- find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die |
624 |
- fi |
625 |
- |
626 |
- # Build fails to create this ... |
627 |
- dosym ../share/terminfo /usr/$(get_libdir)/terminfo |
628 |
-} |
629 |
- |
630 |
-multilib_src_install_all() { |
631 |
-# if ! use berkdb ; then |
632 |
- # We need the basic terminfo files in /etc for embedded/recovery. #37026 |
633 |
- einfo "Installing basic terminfo files in /etc..." |
634 |
- local terms=( |
635 |
- # Dumb/simple values that show up when using the in-kernel VT. |
636 |
- ansi console dumb linux |
637 |
- vt{52,100,102,200,220} |
638 |
- # [u]rxvt users used to be pretty common. Probably should drop this |
639 |
- # since upstream is dead and people are moving away from it. |
640 |
- rxvt{,-unicode}{,-256color} |
641 |
- # xterm users are common, as is terminals re-using/spoofing it. |
642 |
- xterm xterm-{,256}color |
643 |
- # screen is common (and reused by tmux). |
644 |
- screen{,-256color} |
645 |
- screen.xterm-256color |
646 |
- ) |
647 |
- local x |
648 |
- for x in "${terms[@]}"; do |
649 |
- local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null) |
650 |
- local basedir=$(basename "$(dirname "${termfile}")") |
651 |
- |
652 |
- if [[ -n ${termfile} ]] ; then |
653 |
- dodir "/etc/terminfo/${basedir}" |
654 |
- mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die |
655 |
- dosym "../../../../etc/terminfo/${basedir}/${x}" \ |
656 |
- "/usr/share/terminfo/${basedir}/${x}" |
657 |
- fi |
658 |
- done |
659 |
-# fi |
660 |
- |
661 |
- echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses |
662 |
- |
663 |
- use minimal && rm -r "${ED}"/usr/share/terminfo* |
664 |
- # Because ncurses5-config --terminfo returns the directory we keep it |
665 |
- keepdir /usr/share/terminfo #245374 |
666 |
- |
667 |
- cd "${S}" || die |
668 |
- dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc |
669 |
- if use doc ; then |
670 |
- docinto html |
671 |
- dodoc -r doc/html/ |
672 |
- fi |
673 |
-} |
674 |
- |
675 |
-pkg_preinst() { |
676 |
- preserve_old_lib /$(get_libdir)/libncurses.so.5 |
677 |
- use unicode && preserve_old_lib /$(get_libdir)/libncursesw.so.5 |
678 |
-} |
679 |
- |
680 |
-pkg_postinst() { |
681 |
- preserve_old_lib_notify /$(get_libdir)/libncurses.so.5 |
682 |
- use unicode && preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5 |
683 |
-} |