Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/ncurses/
Date: Thu, 01 Sep 2022 02:21:15
Message-Id: 1661998862.061152bfe742b09799ea7c3ff2fa2e145e49f2b1.sam@gentoo
1 commit: 061152bfe742b09799ea7c3ff2fa2e145e49f2b1
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 1 02:21:02 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 1 02:21:02 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=061152bf
7
8 sys-libs/ncurses: drop versions
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-libs/ncurses/ncurses-6.3_p20220423-r1.ebuild | 407 ----------------------
13 sys-libs/ncurses/ncurses-6.3_p20220820-r1.ebuild | 426 -----------------------
14 sys-libs/ncurses/ncurses-6.3_p20220820.ebuild | 424 ----------------------
15 3 files changed, 1257 deletions(-)
16
17 diff --git a/sys-libs/ncurses/ncurses-6.3_p20220423-r1.ebuild b/sys-libs/ncurses/ncurses-6.3_p20220423-r1.ebuild
18 deleted file mode 100644
19 index f7f4f7c7d153..000000000000
20 --- a/sys-libs/ncurses/ncurses-6.3_p20220423-r1.ebuild
21 +++ /dev/null
22 @@ -1,407 +0,0 @@
23 -# Copyright 1999-2022 Gentoo Authors
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -EAPI=7
27 -
28 -VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/thomasdickey.asc
29 -inherit flag-o-matic toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript verify-sig
30 -
31 -MY_PV="${PV:0:3}"
32 -MY_P="${PN}-${MY_PV}"
33 -DESCRIPTION="Console display library"
34 -HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/"
35 -SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz
36 - https://invisible-island.net/archives/${PN}/${MY_P}.tar.gz
37 - verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig )"
38 -
39 -if [[ ${PV} == *_p* ]] ; then
40 - # Sometimes, after releases, there's no megapatch available yet.
41 - #
42 - # From upstream README at e.g. https://invisible-island.net/archives/ncurses/6.3/:
43 - #
44 - # "At times (generally to mark a relatively stable point), I create a rollup
45 - # patch, which consists of all changes from the release through the current date."
46 - #
47 - # Also, from https://lists.gnu.org/archive/html/bug-ncurses/2019-08/msg00039.html,
48 - # the patches are considered to be acceptable to use after some testing. They
49 - # are both for development but also bug fixes.
50 - #
51 - # This array should contain a list of all the snapshots since the last
52 - # release if there's no megapatch available yet.
53 - PATCH_DATES=(
54 - 20211026
55 - 20211030
56 - 20211106
57 - 20211113
58 - 20211115
59 - 20211120
60 - 20211127
61 - 20211204
62 - 20211211
63 - 20211219
64 - 20211225
65 - 20220101
66 - 20220115
67 - 20220122
68 - 20220129
69 - 20220205
70 - 20220212
71 - 20220219
72 - 20220226
73 - 20220305
74 - 20220312
75 - 20220319
76 - 20220326
77 - 20220402
78 - 20220409
79 - 20220416
80 -
81 - # Latest patch is just _pN = $(ver_cut 4)
82 - $(ver_cut 4)
83 - )
84 -
85 - if [[ -z ${PATCH_DATES[@]} ]] ; then
86 - SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz"
87 - SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz.asc"
88 - else
89 - patch_url=
90 - my_patch_index=
91 - for ((my_patch_index=0; my_patch_index < "${#PATCH_DATES[@]}"; my_patch_index++)); do
92 - patch_url="$(printf "https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-%s" ${PATCH_DATES[${my_patch_index}]}.patch.gz)"
93 - SRC_URI+=" ${patch_url}"
94 - SRC_URI+=" verify-sig? ( ${patch_url}.asc )"
95 - done
96 - unset patch_url
97 - unset my_patch_index
98 - fi
99 -fi
100 -
101 -LICENSE="MIT"
102 -# The subslot reflects the SONAME.
103 -SLOT="0/6"
104 -#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
105 -IUSE="ada +cxx debug doc gpm minimal profile +stack-realign static-libs test tinfo trace"
106 -RESTRICT="!test? ( test )"
107 -
108 -DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
109 -# Block the older ncurses that installed all files w/SLOT=5, bug #557472
110 -RDEPEND="${DEPEND}
111 - !<=sys-libs/ncurses-5.9-r4:5
112 - !<sys-libs/slang-2.3.2_pre23
113 - !<x11-terms/rxvt-unicode-9.06-r3
114 - !<x11-terms/st-0.6-r1"
115 -BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
116 -
117 -S="${WORKDIR}/${MY_P}"
118 -
119 -PATCHES=(
120 - "${FILESDIR}/${PN}-5.7-nongnu.patch"
121 - "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" # bug #192083, bug #383871
122 - "${FILESDIR}/${PN}-6.0-pkg-config.patch"
123 - "${FILESDIR}/${PN}-6.0-ticlib.patch" # bug #557360
124 - "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" # bug #601426
125 -)
126 -
127 -src_prepare() {
128 - if [[ ${PV} == *_p* ]] ; then
129 - if [[ -z ${PATCH_DATES[@]} ]] ; then
130 - # If we have a rollup patch, use that instead of the individual ones.
131 - eapply "${WORKDIR}"/${P/_p/-}-patch.sh
132 - else
133 - eapply "${WORKDIR}"/
134 - fi
135 - fi
136 -
137 - default
138 -}
139 -
140 -src_configure() {
141 - # bug #115036
142 - unset TERMINFO
143 -
144 - tc-export_build_env BUILD_{CC,CPP}
145 -
146 - # bug #214642
147 - BUILD_CPPFLAGS+=" -D_GNU_SOURCE"
148 -
149 - # Should be fixed upstream soon:
150 - # https://lists.gnu.org/archive/html/bug-ncurses/2022-08/msg00024.html
151 - # bug #866398
152 - sed -i -e 's/ld --verbose/${LD} --verbose/' configure || die
153 - sed -i -e 's/pkg-config --version/${PKG_CONFIG} --version/' misc/gen-pkgconfig.in || die
154 -
155 - # Build the various variants of ncurses -- narrow, wide, and threaded. #510440
156 - # Order matters here -- we want unicode/thread versions to come last so that the
157 - # binaries in /usr/bin support both wide and narrow.
158 - # The naming is also important as we use these directly with filenames and when
159 - # checking configure flags.
160 - NCURSES_TARGETS=(
161 - ncurses
162 - ncursesw
163 - ncursest
164 - ncursestw
165 - )
166 -
167 - # When installing ncurses, we have to use a compatible version of tic.
168 - # This comes up when cross-compiling, doing multilib builds, upgrading,
169 - # or installing for the first time. Build a local copy of tic whenever
170 - # the host version isn't available. bug #249363, bug #557598
171 - if ! has_version -b "~sys-libs/${P}:0" ; then
172 - local lbuildflags="-static"
173 -
174 - # some toolchains don't quite support static linking
175 - local dbuildflags="-Wl,-rpath,${WORKDIR}/lib"
176 - case ${CHOST} in
177 - *-darwin*) dbuildflags= ;;
178 - *-solaris*) dbuildflags="-Wl,-R,${WORKDIR}/lib" ;;
179 - esac
180 - echo "int main() {}" | \
181 - $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \
182 - || lbuildflags="${dbuildflags}"
183 -
184 - # We can't re-use the multilib BUILD_DIR because we run outside of it.
185 - BUILD_DIR="${WORKDIR}" \
186 - CC=${BUILD_CC} \
187 - CHOST=${CBUILD} \
188 - CFLAGS=${BUILD_CFLAGS} \
189 - CXXFLAGS=${BUILD_CXXFLAGS} \
190 - CPPFLAGS=${BUILD_CPPFLAGS} \
191 - LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
192 - do_configure cross --without-shared --with-normal --with-progs
193 - fi
194 - multilib-minimal_src_configure
195 -}
196 -
197 -multilib_src_configure() {
198 - if [[ ${ABI} == x86 ]] ; then
199 - # For compatibility with older binaries at slight performance cost.
200 - # bug #616402
201 - use stack-realign && append-flags -mstackrealign
202 - fi
203 -
204 - local t
205 - for t in "${NCURSES_TARGETS[@]}" ; do
206 - do_configure "${t}"
207 - done
208 -}
209 -
210 -do_configure() {
211 - local target=$1
212 - shift
213 -
214 - mkdir "${BUILD_DIR}/${target}" || die
215 - cd "${BUILD_DIR}/${target}" || die
216 -
217 - local conf=(
218 - # We need the basic terminfo files in /etc, bug #37026. We will
219 - # add '--with-terminfo-dirs' and then populate /etc/terminfo in
220 - # src_install() ...
221 - --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
222 -
223 - # Enable installation of .pc files.
224 - --enable-pc-files
225 - # This path is used to control where the .pc files are installed.
226 - --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
227 -
228 - # Now the rest of the various standard flags.
229 - --with-shared
230 - # (Originally disabled until bug #245417 is sorted out, but now
231 - # just keeping it off for good, given nobody needed it until now
232 - # (2022) and we're trying to phase out bdb.)
233 - --without-hashed-db
234 - $(use_with ada)
235 - $(use_with cxx)
236 - $(use_with cxx cxx-binding)
237 - --with-cxx-shared
238 - $(use_with debug)
239 - $(use_with profile)
240 - # The configure script uses ldd to parse the linked output which
241 - # is flaky for cross-compiling/multilib/ldd versions/etc...
242 - $(use_with gpm gpm libgpm.so.1)
243 - # Required for building on mingw-w64, and possibly other windows
244 - # platforms, bug #639670
245 - $(use_enable kernel_Winnt term-driver)
246 - --disable-termcap
247 - --enable-symlinks
248 - --with-rcs-ids
249 - --with-manpage-format=normal
250 - --enable-const
251 - --enable-colorfgbg
252 - --enable-hard-tabs
253 - --enable-echo
254 - $(use_enable !ada warnings)
255 - $(use_with debug assertions)
256 - $(use_enable !debug leaks)
257 - $(use_with debug expanded)
258 - $(use_with !debug macros)
259 - $(multilib_native_with progs)
260 - $(use_with test tests)
261 - $(use_with trace)
262 - $(use_with tinfo termlib)
263 - --disable-stripping
264 - --disable-pkg-ldflags
265 - )
266 -
267 - if [[ ${target} == ncurses*w ]] ; then
268 - conf+=( --enable-widec )
269 - else
270 - conf+=( --disable-widec )
271 - fi
272 - if [[ ${target} == ncursest* ]] ; then
273 - conf+=( --with-{pthread,reentrant} )
274 - else
275 - conf+=( --without-{pthread,reentrant} )
276 - fi
277 -
278 - # Make sure each variant goes in a unique location.
279 - if [[ ${target} == "ncurses" ]] ; then
280 - # "ncurses" variant goes into "${EPREFIX}"/usr/include
281 - # It is needed on Prefix because the configure script appends
282 - # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr.
283 - conf+=( --enable-overwrite )
284 - else
285 - conf+=( --includedir="${EPREFIX}"/usr/include/${target} )
286 - fi
287 - # See comments in src_configure.
288 - if [[ ${target} != "cross" ]] ; then
289 - local cross_path="${WORKDIR}/cross"
290 - [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic"
291 - fi
292 -
293 - ECONF_SOURCE="${S}" econf "${conf[@]}" "$@"
294 -}
295 -
296 -src_compile() {
297 - # See comments in src_configure.
298 - if ! has_version -b "~sys-libs/${P}:0" ; then
299 - # We could possibly merge these two branches but opting to be
300 - # conservative when merging some of the Prefix changes.
301 -
302 - if [[ ${CHOST} == *-cygwin* ]] && ! multilib_is_native_abi ; then
303 - # We make 'tic$(x)' here, for Cygwin having x=".exe".
304 - BUILD_DIR="${WORKDIR}" \
305 - do_compile cross -C progs all PROGS='tic$(x)'
306 - else
307 - BUILD_DIR="${WORKDIR}" \
308 - do_compile cross -C progs tic
309 - fi
310 - fi
311 -
312 - multilib-minimal_src_compile
313 -}
314 -
315 -multilib_src_compile() {
316 - local t
317 - for t in "${NCURSES_TARGETS[@]}" ; do
318 - do_compile "${t}"
319 - done
320 -}
321 -
322 -do_compile() {
323 - local target=$1
324 - shift
325 -
326 - cd "${BUILD_DIR}/${target}" || die
327 -
328 - # A little hack to fix parallel builds ... they break when
329 - # generating sources so if we generate the sources first (in
330 - # non-parallel), we can then build the rest of the package
331 - # in parallel. This is not really a perf hit since the source
332 - # generation is quite small.
333 - emake -j1 sources
334 -
335 - # For some reason, sources depends on pc-files which depends on
336 - # compiled libraries which depends on sources which ...
337 - # Manually delete the pc-files file so the install step will
338 - # create the .pc files we want.
339 - rm -f misc/pc-files || die
340 - emake "$@"
341 -}
342 -
343 -multilib_src_install() {
344 - local target
345 - for target in "${NCURSES_TARGETS[@]}" ; do
346 - emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install
347 - done
348 -
349 - # Move main libraries into /.
350 - if multilib_is_native_abi ; then
351 - gen_usr_ldscript -a \
352 - "${NCURSES_TARGETS[@]}" \
353 - $(usex tinfo 'tinfow tinfo' '')
354 - fi
355 -
356 - # Don't delete '*.dll.a', needed for linking, bug #631468
357 - if ! use static-libs; then
358 - find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die
359 - fi
360 -
361 - # Build fails to create this ...
362 - # -FIXME-
363 - # Ugly hackaround for riscv having two parts libdir (bug #689240)
364 - # Replace this hack with an official solution once we have one...
365 - # -FIXME-
366 - dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \
367 - /usr/$(get_libdir)/terminfo
368 -
369 - # Remove obsolete libcurses symlink that is created by the build
370 - # system. Technically, this could be also achieved
371 - # via --disable-overwrite but it also moves headers implicitly,
372 - # and we do not want to do this yet.
373 - # bug #836696
374 - rm "${ED}"/usr/$(get_libdir)/libcurses* || die
375 -}
376 -
377 -multilib_src_install_all() {
378 - # We need the basic terminfo files in /etc for embedded/recovery, bug #37026
379 - einfo "Installing basic terminfo files in /etc..."
380 - local terms=(
381 - # Dumb/simple values that show up when using the in-kernel VT.
382 - ansi console dumb linux
383 - vt{52,100,102,200,220}
384 - # [u]rxvt users used to be pretty common. Probably should drop this
385 - # since upstream is dead and people are moving away from it.
386 - rxvt{,-unicode}{,-256color}
387 - # xterm users are common, as is terminals re-using/spoofing it.
388 - xterm xterm-{,256}color
389 - # screen is common (and reused by tmux).
390 - screen{,-256color}
391 - screen.xterm-256color
392 - )
393 - local x
394 - for x in "${terms[@]}"; do
395 - local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
396 - local basedir=$(basename "$(dirname "${termfile}")")
397 -
398 - if [[ -n ${termfile} ]] ; then
399 - dodir "/etc/terminfo/${basedir}"
400 - mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die
401 - dosym "../../../../etc/terminfo/${basedir}/${x}" \
402 - "/usr/share/terminfo/${basedir}/${x}"
403 - fi
404 - done
405 -
406 - echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses
407 -
408 - use minimal && rm -r "${ED}"/usr/share/terminfo*
409 - # Because ncurses5-config --terminfo returns the directory we keep it
410 - # bug #245374
411 - keepdir /usr/share/terminfo
412 -
413 - cd "${S}" || die
414 - dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc
415 - if use doc ; then
416 - docinto html
417 - dodoc -r doc/html/
418 - fi
419 -}
420 -
421 -pkg_preinst() {
422 - preserve_old_lib /$(get_libdir)/libncurses.so.5
423 - preserve_old_lib /$(get_libdir)/libncursesw.so.5
424 -}
425 -
426 -pkg_postinst() {
427 - preserve_old_lib_notify /$(get_libdir)/libncurses.so.5
428 - preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5
429 -}
430
431 diff --git a/sys-libs/ncurses/ncurses-6.3_p20220820-r1.ebuild b/sys-libs/ncurses/ncurses-6.3_p20220820-r1.ebuild
432 deleted file mode 100644
433 index ee652af5700d..000000000000
434 --- a/sys-libs/ncurses/ncurses-6.3_p20220820-r1.ebuild
435 +++ /dev/null
436 @@ -1,426 +0,0 @@
437 -# Copyright 1999-2022 Gentoo Authors
438 -# Distributed under the terms of the GNU General Public License v2
439 -
440 -EAPI=7
441 -
442 -VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/thomasdickey.asc
443 -inherit flag-o-matic toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript verify-sig
444 -
445 -MY_PV="${PV:0:3}"
446 -MY_P="${PN}-${MY_PV}"
447 -DESCRIPTION="Console display library"
448 -HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/"
449 -SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz
450 - https://invisible-island.net/archives/${PN}/${MY_P}.tar.gz
451 - verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig )"
452 -
453 -if [[ ${PV} == *_p* ]] ; then
454 - # Sometimes, after releases, there's no megapatch available yet.
455 - #
456 - # From upstream README at e.g. https://invisible-island.net/archives/ncurses/6.3/:
457 - #
458 - # "At times (generally to mark a relatively stable point), I create a rollup
459 - # patch, which consists of all changes from the release through the current date."
460 - #
461 - # Also, from https://lists.gnu.org/archive/html/bug-ncurses/2019-08/msg00039.html,
462 - # the patches are considered to be acceptable to use after some testing. They
463 - # are both for development but also bug fixes.
464 - #
465 - # This array should contain a list of all the snapshots since the last
466 - # release if there's no megapatch available yet.
467 - PATCH_DATES=(
468 - 20211026
469 - 20211030
470 - 20211106
471 - 20211113
472 - 20211115
473 - 20211120
474 - 20211127
475 - 20211204
476 - 20211211
477 - 20211219
478 - 20211225
479 - 20220101
480 - 20220115
481 - 20220122
482 - 20220129
483 - 20220205
484 - 20220212
485 - 20220219
486 - 20220226
487 - 20220305
488 - 20220312
489 - 20220319
490 - 20220326
491 - 20220402
492 - 20220409
493 - 20220416
494 - 20220423
495 - 20220430
496 - 20220501
497 - 20220507
498 - 20220514
499 - 20220521
500 - 20220529
501 - 20220604
502 - 20220612
503 - 20220618
504 - 20220625
505 - 20220703
506 - 20220709
507 - 20220716
508 - 20220724
509 - 20220729
510 - 20220806
511 - 20220813
512 - 20220820
513 -
514 - # Latest patch is just _pN = $(ver_cut 4)
515 - $(ver_cut 4)
516 - )
517 -
518 - if [[ -z ${PATCH_DATES[@]} ]] ; then
519 - SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz"
520 - SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz.asc"
521 - else
522 - patch_url=
523 - my_patch_index=
524 - for ((my_patch_index=0; my_patch_index < "${#PATCH_DATES[@]}"; my_patch_index++)); do
525 - patch_url="$(printf "https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-%s" ${PATCH_DATES[${my_patch_index}]}.patch.gz)"
526 - SRC_URI+=" ${patch_url}"
527 - SRC_URI+=" verify-sig? ( ${patch_url}.asc )"
528 - done
529 - unset patch_url
530 - unset my_patch_index
531 - fi
532 -fi
533 -
534 -LICENSE="MIT"
535 -# The subslot reflects the SONAME.
536 -SLOT="0/6"
537 -#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
538 -IUSE="ada +cxx debug doc gpm minimal profile +stack-realign static-libs test tinfo trace"
539 -RESTRICT="!test? ( test )"
540 -
541 -DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
542 -# Block the older ncurses that installed all files w/SLOT=5, bug #557472
543 -RDEPEND="${DEPEND}
544 - !<=sys-libs/ncurses-5.9-r4:5
545 - !<sys-libs/slang-2.3.2_pre23
546 - !<x11-terms/rxvt-unicode-9.06-r3
547 - !<x11-terms/st-0.6-r1"
548 -BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
549 -
550 -S="${WORKDIR}/${MY_P}"
551 -
552 -PATCHES=(
553 - "${FILESDIR}/${PN}-5.7-nongnu.patch"
554 - "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" # bug #192083, bug #383871
555 - "${FILESDIR}/${PN}-6.0-pkg-config.patch"
556 - "${FILESDIR}/${PN}-6.0-ticlib.patch" # bug #557360
557 - "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" # bug #601426
558 -)
559 -
560 -src_prepare() {
561 - if [[ ${PV} == *_p* ]] ; then
562 - if [[ -z ${PATCH_DATES[@]} ]] ; then
563 - # If we have a rollup patch, use that instead of the individual ones.
564 - eapply "${WORKDIR}"/${P/_p/-}-patch.sh
565 - else
566 - eapply "${WORKDIR}"/
567 - fi
568 - fi
569 -
570 - default
571 -}
572 -
573 -src_configure() {
574 - # bug #115036
575 - unset TERMINFO
576 -
577 - tc-export_build_env BUILD_{CC,CPP}
578 -
579 - # bug #214642
580 - BUILD_CPPFLAGS+=" -D_GNU_SOURCE"
581 -
582 - # Should be fixed upstream soon:
583 - # https://lists.gnu.org/archive/html/bug-ncurses/2022-08/msg00024.html
584 - # bug #866398
585 - sed -i -e 's/ld --verbose/${LD} --verbose/' configure || die
586 - sed -i -e 's/pkg-config --version/${PKG_CONFIG} --version/' misc/gen-pkgconfig.in || die
587 -
588 - # Build the various variants of ncurses -- narrow, wide, and threaded. #510440
589 - # Order matters here -- we want unicode/thread versions to come last so that the
590 - # binaries in /usr/bin support both wide and narrow.
591 - # The naming is also important as we use these directly with filenames and when
592 - # checking configure flags.
593 - NCURSES_TARGETS=(
594 - ncurses
595 - ncursesw
596 - ncursest
597 - ncursestw
598 - )
599 -
600 - # When installing ncurses, we have to use a compatible version of tic.
601 - # This comes up when cross-compiling, doing multilib builds, upgrading,
602 - # or installing for the first time. Build a local copy of tic whenever
603 - # the host version isn't available. bug #249363, bug #557598
604 - if ! has_version -b "~sys-libs/${P}:0" ; then
605 - local lbuildflags="-static"
606 -
607 - # some toolchains don't quite support static linking
608 - local dbuildflags="-Wl,-rpath,${WORKDIR}/lib"
609 - case ${CHOST} in
610 - *-darwin*) dbuildflags= ;;
611 - *-solaris*) dbuildflags="-Wl,-R,${WORKDIR}/lib" ;;
612 - esac
613 - echo "int main() {}" | \
614 - $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \
615 - || lbuildflags="${dbuildflags}"
616 -
617 - # We can't re-use the multilib BUILD_DIR because we run outside of it.
618 - BUILD_DIR="${WORKDIR}" \
619 - CC=${BUILD_CC} \
620 - CHOST=${CBUILD} \
621 - CFLAGS=${BUILD_CFLAGS} \
622 - CXXFLAGS=${BUILD_CXXFLAGS} \
623 - CPPFLAGS=${BUILD_CPPFLAGS} \
624 - LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
625 - do_configure cross --without-shared --with-normal --with-progs
626 - fi
627 - multilib-minimal_src_configure
628 -}
629 -
630 -multilib_src_configure() {
631 - if [[ ${ABI} == x86 ]] ; then
632 - # For compatibility with older binaries at slight performance cost.
633 - # bug #616402
634 - use stack-realign && append-flags -mstackrealign
635 - fi
636 -
637 - local t
638 - for t in "${NCURSES_TARGETS[@]}" ; do
639 - do_configure "${t}"
640 - done
641 -}
642 -
643 -do_configure() {
644 - local target=$1
645 - shift
646 -
647 - mkdir "${BUILD_DIR}/${target}" || die
648 - cd "${BUILD_DIR}/${target}" || die
649 -
650 - local conf=(
651 - # We need the basic terminfo files in /etc, bug #37026. We will
652 - # add '--with-terminfo-dirs' and then populate /etc/terminfo in
653 - # src_install() ...
654 - --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
655 -
656 - # Enable installation of .pc files.
657 - --enable-pc-files
658 - # This path is used to control where the .pc files are installed.
659 - --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
660 -
661 - # Now the rest of the various standard flags.
662 - --with-shared
663 - # (Originally disabled until bug #245417 is sorted out, but now
664 - # just keeping it off for good, given nobody needed it until now
665 - # (2022) and we're trying to phase out bdb.)
666 - --without-hashed-db
667 - $(use_with ada)
668 - $(use_with cxx)
669 - $(use_with cxx cxx-binding)
670 - --with-cxx-shared
671 - $(use_with debug)
672 - $(use_with profile)
673 - # The configure script uses ldd to parse the linked output which
674 - # is flaky for cross-compiling/multilib/ldd versions/etc...
675 - $(use_with gpm gpm libgpm.so.1)
676 - # Required for building on mingw-w64, and possibly other windows
677 - # platforms, bug #639670
678 - $(use_enable kernel_Winnt term-driver)
679 - --disable-termcap
680 - --enable-symlinks
681 - --with-rcs-ids
682 - --with-manpage-format=normal
683 - --enable-const
684 - --enable-colorfgbg
685 - --enable-hard-tabs
686 - --enable-echo
687 - $(use_enable !ada warnings)
688 - $(use_with debug assertions)
689 - $(use_enable !debug leaks)
690 - $(use_with debug expanded)
691 - $(use_with !debug macros)
692 - $(multilib_native_with progs)
693 - $(use_with test tests)
694 - $(use_with trace)
695 - $(use_with tinfo termlib)
696 - --disable-stripping
697 - --disable-pkg-ldflags
698 - )
699 -
700 - if [[ ${target} == ncurses*w ]] ; then
701 - conf+=( --enable-widec )
702 - else
703 - conf+=( --disable-widec )
704 - fi
705 - if [[ ${target} == ncursest* ]] ; then
706 - conf+=( --with-{pthread,reentrant} )
707 - else
708 - conf+=( --without-{pthread,reentrant} )
709 - fi
710 -
711 - # Make sure each variant goes in a unique location.
712 - if [[ ${target} == "ncurses" ]] ; then
713 - # "ncurses" variant goes into "${EPREFIX}"/usr/include
714 - # It is needed on Prefix because the configure script appends
715 - # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr.
716 - conf+=( --enable-overwrite )
717 - else
718 - conf+=( --includedir="${EPREFIX}"/usr/include/${target} )
719 - fi
720 - # See comments in src_configure.
721 - if [[ ${target} != "cross" ]] ; then
722 - local cross_path="${WORKDIR}/cross"
723 - [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic"
724 - fi
725 -
726 - ECONF_SOURCE="${S}" econf "${conf[@]}" "$@"
727 -}
728 -
729 -src_compile() {
730 - # See comments in src_configure.
731 - if ! has_version -b "~sys-libs/${P}:0" ; then
732 - # We could possibly merge these two branches but opting to be
733 - # conservative when merging some of the Prefix changes.
734 -
735 - if [[ ${CHOST} == *-cygwin* ]] && ! multilib_is_native_abi ; then
736 - # We make 'tic$(x)' here, for Cygwin having x=".exe".
737 - BUILD_DIR="${WORKDIR}" \
738 - do_compile cross -C progs all PROGS='tic$(x)'
739 - else
740 - BUILD_DIR="${WORKDIR}" \
741 - do_compile cross -C progs tic
742 - fi
743 - fi
744 -
745 - multilib-minimal_src_compile
746 -}
747 -
748 -multilib_src_compile() {
749 - local t
750 - for t in "${NCURSES_TARGETS[@]}" ; do
751 - do_compile "${t}"
752 - done
753 -}
754 -
755 -do_compile() {
756 - local target=$1
757 - shift
758 -
759 - cd "${BUILD_DIR}/${target}" || die
760 -
761 - # A little hack to fix parallel builds ... they break when
762 - # generating sources so if we generate the sources first (in
763 - # non-parallel), we can then build the rest of the package
764 - # in parallel. This is not really a perf hit since the source
765 - # generation is quite small.
766 - emake -j1 sources
767 -
768 - # For some reason, sources depends on pc-files which depends on
769 - # compiled libraries which depends on sources which ...
770 - # Manually delete the pc-files file so the install step will
771 - # create the .pc files we want.
772 - rm -f misc/pc-files || die
773 - emake "$@"
774 -}
775 -
776 -multilib_src_install() {
777 - local target
778 - for target in "${NCURSES_TARGETS[@]}" ; do
779 - emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install
780 - done
781 -
782 - # Move main libraries into /.
783 - if multilib_is_native_abi ; then
784 - gen_usr_ldscript -a \
785 - "${NCURSES_TARGETS[@]}" \
786 - $(usex tinfo 'tinfow tinfo' '')
787 - fi
788 -
789 - # Don't delete '*.dll.a', needed for linking, bug #631468
790 - if ! use static-libs; then
791 - find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die
792 - fi
793 -
794 - # Build fails to create this ...
795 - # -FIXME-
796 - # Ugly hackaround for riscv having two parts libdir (bug #689240)
797 - # Replace this hack with an official solution once we have one...
798 - # -FIXME-
799 - dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \
800 - /usr/$(get_libdir)/terminfo
801 -
802 - # Remove obsolete libcurses symlink that is created by the build
803 - # system. Technically, this could be also achieved
804 - # via --disable-overwrite but it also moves headers implicitly,
805 - # and we do not want to do this yet.
806 - # bug #836696
807 - rm "${ED}"/usr/$(get_libdir)/libcurses* || die
808 -}
809 -
810 -multilib_src_install_all() {
811 - # We need the basic terminfo files in /etc for embedded/recovery, bug #37026
812 - einfo "Installing basic terminfo files in /etc..."
813 - local terms=(
814 - # Dumb/simple values that show up when using the in-kernel VT.
815 - ansi console dumb linux
816 - vt{52,100,102,200,220}
817 - # [u]rxvt users used to be pretty common. Probably should drop this
818 - # since upstream is dead and people are moving away from it.
819 - rxvt{,-unicode}{,-256color}
820 - # xterm users are common, as is terminals re-using/spoofing it.
821 - xterm xterm-{,256}color
822 - # screen is common (and reused by tmux).
823 - screen{,-256color}
824 - screen.xterm-256color
825 - )
826 - local x
827 - for x in "${terms[@]}"; do
828 - local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
829 - local basedir=$(basename "$(dirname "${termfile}")")
830 -
831 - if [[ -n ${termfile} ]] ; then
832 - dodir "/etc/terminfo/${basedir}"
833 - mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die
834 - dosym "../../../../etc/terminfo/${basedir}/${x}" \
835 - "/usr/share/terminfo/${basedir}/${x}"
836 - fi
837 - done
838 -
839 - echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses
840 -
841 - use minimal && rm -r "${ED}"/usr/share/terminfo*
842 - # Because ncurses5-config --terminfo returns the directory we keep it
843 - # bug #245374
844 - keepdir /usr/share/terminfo
845 -
846 - cd "${S}" || die
847 - dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc
848 - if use doc ; then
849 - docinto html
850 - dodoc -r doc/html/
851 - fi
852 -}
853 -
854 -pkg_preinst() {
855 - preserve_old_lib /$(get_libdir)/libncurses.so.5
856 - preserve_old_lib /$(get_libdir)/libncursesw.so.5
857 -}
858 -
859 -pkg_postinst() {
860 - preserve_old_lib_notify /$(get_libdir)/libncurses.so.5
861 - preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5
862 -}
863
864 diff --git a/sys-libs/ncurses/ncurses-6.3_p20220820.ebuild b/sys-libs/ncurses/ncurses-6.3_p20220820.ebuild
865 deleted file mode 100644
866 index d911bf424397..000000000000
867 --- a/sys-libs/ncurses/ncurses-6.3_p20220820.ebuild
868 +++ /dev/null
869 @@ -1,424 +0,0 @@
870 -# Copyright 1999-2022 Gentoo Authors
871 -# Distributed under the terms of the GNU General Public License v2
872 -
873 -EAPI=7
874 -
875 -VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/thomasdickey.asc
876 -inherit flag-o-matic toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript verify-sig
877 -
878 -MY_PV="${PV:0:3}"
879 -MY_P="${PN}-${MY_PV}"
880 -DESCRIPTION="Console display library"
881 -HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/"
882 -SRC_URI="mirror://gnu/ncurses/${MY_P}.tar.gz
883 - https://invisible-island.net/archives/${PN}/${MY_P}.tar.gz
884 - verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig )"
885 -
886 -if [[ ${PV} == *_p* ]] ; then
887 - # Sometimes, after releases, there's no megapatch available yet.
888 - #
889 - # From upstream README at e.g. https://invisible-island.net/archives/ncurses/6.3/:
890 - #
891 - # "At times (generally to mark a relatively stable point), I create a rollup
892 - # patch, which consists of all changes from the release through the current date."
893 - #
894 - # Also, from https://lists.gnu.org/archive/html/bug-ncurses/2019-08/msg00039.html,
895 - # the patches are considered to be acceptable to use after some testing. They
896 - # are both for development but also bug fixes.
897 - #
898 - # This array should contain a list of all the snapshots since the last
899 - # release if there's no megapatch available yet.
900 - PATCH_DATES=(
901 - 20211026
902 - 20211030
903 - 20211106
904 - 20211113
905 - 20211115
906 - 20211120
907 - 20211127
908 - 20211204
909 - 20211211
910 - 20211219
911 - 20211225
912 - 20220101
913 - 20220115
914 - 20220122
915 - 20220129
916 - 20220205
917 - 20220212
918 - 20220219
919 - 20220226
920 - 20220305
921 - 20220312
922 - 20220319
923 - 20220326
924 - 20220402
925 - 20220409
926 - 20220416
927 - 20220423
928 - 20220430
929 - 20220501
930 - 20220507
931 - 20220514
932 - 20220521
933 - 20220529
934 - 20220604
935 - 20220612
936 - 20220618
937 - 20220625
938 - 20220703
939 - 20220709
940 - 20220716
941 - 20220724
942 - 20220729
943 - 20220806
944 - 20220813
945 - 20220820
946 -
947 - # Latest patch is just _pN = $(ver_cut 4)
948 - $(ver_cut 4)
949 - )
950 -
951 - if [[ -z ${PATCH_DATES[@]} ]] ; then
952 - SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz"
953 - SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz.asc"
954 - else
955 - patch_url=
956 - my_patch_index=
957 - for ((my_patch_index=0; my_patch_index < "${#PATCH_DATES[@]}"; my_patch_index++)); do
958 - patch_url="$(printf "https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-%s" ${PATCH_DATES[${my_patch_index}]}.patch.gz)"
959 - SRC_URI+=" ${patch_url}"
960 - SRC_URI+=" verify-sig? ( ${patch_url}.asc )"
961 - done
962 - unset patch_url
963 - unset my_patch_index
964 - fi
965 -fi
966 -
967 -LICENSE="MIT"
968 -# The subslot reflects the SONAME.
969 -SLOT="0/6"
970 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
971 -IUSE="ada +cxx debug doc gpm minimal profile +stack-realign static-libs test tinfo trace"
972 -RESTRICT="!test? ( test )"
973 -
974 -DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
975 -# Block the older ncurses that installed all files w/SLOT=5, bug #557472
976 -RDEPEND="${DEPEND}
977 - !<=sys-libs/ncurses-5.9-r4:5
978 - !<sys-libs/slang-2.3.2_pre23
979 - !<x11-terms/rxvt-unicode-9.06-r3
980 - !<x11-terms/st-0.6-r1"
981 -BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
982 -
983 -S="${WORKDIR}/${MY_P}"
984 -
985 -PATCHES=(
986 - "${FILESDIR}/${PN}-5.7-nongnu.patch"
987 - "${FILESDIR}/${PN}-6.0-rxvt-unicode-9.15.patch" # bug #192083, bug #383871
988 - "${FILESDIR}/${PN}-6.0-pkg-config.patch"
989 - "${FILESDIR}/${PN}-6.0-ticlib.patch" # bug #557360
990 - "${FILESDIR}/${PN}-6.2_p20210123-cppflags-cross.patch" # bug #601426
991 -)
992 -
993 -src_prepare() {
994 - if [[ ${PV} == *_p* ]] ; then
995 - if [[ -z ${PATCH_DATES[@]} ]] ; then
996 - # If we have a rollup patch, use that instead of the individual ones.
997 - eapply "${WORKDIR}"/${P/_p/-}-patch.sh
998 - else
999 - eapply "${WORKDIR}"/
1000 - fi
1001 - fi
1002 -
1003 - default
1004 -}
1005 -
1006 -src_configure() {
1007 - # bug #115036
1008 - unset TERMINFO
1009 -
1010 - tc-export_build_env BUILD_{CC,CPP}
1011 -
1012 - # bug #214642
1013 - BUILD_CPPFLAGS+=" -D_GNU_SOURCE"
1014 -
1015 - # Should be fixed upstream soon:
1016 - # https://lists.gnu.org/archive/html/bug-ncurses/2022-08/msg00024.html
1017 - # bug #866398
1018 - sed -i -e 's/ld --verbose/${LD} --verbose/' configure || die
1019 - sed -i -e 's/pkg-config --version/${PKG_CONFIG} --version/' misc/gen-pkgconfig.in || die
1020 -
1021 - # Build the various variants of ncurses -- narrow, wide, and threaded. #510440
1022 - # Order matters here -- we want unicode/thread versions to come last so that the
1023 - # binaries in /usr/bin support both wide and narrow.
1024 - # The naming is also important as we use these directly with filenames and when
1025 - # checking configure flags.
1026 - NCURSES_TARGETS=(
1027 - ncurses
1028 - ncursesw
1029 - ncursest
1030 - ncursestw
1031 - )
1032 -
1033 - # When installing ncurses, we have to use a compatible version of tic.
1034 - # This comes up when cross-compiling, doing multilib builds, upgrading,
1035 - # or installing for the first time. Build a local copy of tic whenever
1036 - # the host version isn't available. bug #249363, bug #557598
1037 - if ! has_version -b "~sys-libs/${P}:0" ; then
1038 - local lbuildflags="-static"
1039 -
1040 - # some toolchains don't quite support static linking
1041 - local dbuildflags="-Wl,-rpath,${WORKDIR}/lib"
1042 - case ${CHOST} in
1043 - *-darwin*) dbuildflags= ;;
1044 - *-solaris*) dbuildflags="-Wl,-R,${WORKDIR}/lib" ;;
1045 - esac
1046 - echo "int main() {}" | \
1047 - $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \
1048 - || lbuildflags="${dbuildflags}"
1049 -
1050 - # We can't re-use the multilib BUILD_DIR because we run outside of it.
1051 - BUILD_DIR="${WORKDIR}" \
1052 - CC=${BUILD_CC} \
1053 - CHOST=${CBUILD} \
1054 - CFLAGS=${BUILD_CFLAGS} \
1055 - CXXFLAGS=${BUILD_CXXFLAGS} \
1056 - CPPFLAGS=${BUILD_CPPFLAGS} \
1057 - LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
1058 - do_configure cross --without-shared --with-normal --with-progs
1059 - fi
1060 - multilib-minimal_src_configure
1061 -}
1062 -
1063 -multilib_src_configure() {
1064 - if [[ ${ABI} == x86 ]] ; then
1065 - # For compatibility with older binaries at slight performance cost.
1066 - # bug #616402
1067 - use stack-realign && append-flags -mstackrealign
1068 - fi
1069 -
1070 - local t
1071 - for t in "${NCURSES_TARGETS[@]}" ; do
1072 - do_configure "${t}"
1073 - done
1074 -}
1075 -
1076 -do_configure() {
1077 - local target=$1
1078 - shift
1079 -
1080 - mkdir "${BUILD_DIR}/${target}" || die
1081 - cd "${BUILD_DIR}/${target}" || die
1082 -
1083 - local conf=(
1084 - # We need the basic terminfo files in /etc, bug #37026. We will
1085 - # add '--with-terminfo-dirs' and then populate /etc/terminfo in
1086 - # src_install() ...
1087 - --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
1088 -
1089 - # Enable installation of .pc files.
1090 - --enable-pc-files
1091 - # This path is used to control where the .pc files are installed.
1092 - --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
1093 -
1094 - # Now the rest of the various standard flags.
1095 - --with-shared
1096 - # (Originally disabled until bug #245417 is sorted out, but now
1097 - # just keeping it off for good, given nobody needed it until now
1098 - # (2022) and we're trying to phase out bdb.)
1099 - --without-hashed-db
1100 - $(use_with ada)
1101 - $(use_with cxx)
1102 - $(use_with cxx cxx-binding)
1103 - --with-cxx-shared
1104 - $(use_with debug)
1105 - $(use_with profile)
1106 - # The configure script uses ldd to parse the linked output which
1107 - # is flaky for cross-compiling/multilib/ldd versions/etc...
1108 - $(use_with gpm gpm libgpm.so.1)
1109 - # Required for building on mingw-w64, and possibly other windows
1110 - # platforms, bug #639670
1111 - $(use_enable kernel_Winnt term-driver)
1112 - --disable-termcap
1113 - --enable-symlinks
1114 - --with-rcs-ids
1115 - --with-manpage-format=normal
1116 - --enable-const
1117 - --enable-colorfgbg
1118 - --enable-hard-tabs
1119 - --enable-echo
1120 - $(use_enable !ada warnings)
1121 - $(use_with debug assertions)
1122 - $(use_enable !debug leaks)
1123 - $(use_with debug expanded)
1124 - $(use_with !debug macros)
1125 - $(multilib_native_with progs)
1126 - $(use_with test tests)
1127 - $(use_with trace)
1128 - $(use_with tinfo termlib)
1129 - --disable-stripping
1130 - --disable-pkg-ldflags
1131 - )
1132 -
1133 - if [[ ${target} == ncurses*w ]] ; then
1134 - conf+=( --enable-widec )
1135 - else
1136 - conf+=( --disable-widec )
1137 - fi
1138 - if [[ ${target} == ncursest* ]] ; then
1139 - conf+=( --with-{pthread,reentrant} )
1140 - else
1141 - conf+=( --without-{pthread,reentrant} )
1142 - fi
1143 -
1144 - # Make sure each variant goes in a unique location.
1145 - if [[ ${target} == "ncurses" ]] ; then
1146 - # "ncurses" variant goes into "${EPREFIX}"/usr/include
1147 - # It is needed on Prefix because the configure script appends
1148 - # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr.
1149 - conf+=( --enable-overwrite )
1150 - else
1151 - conf+=( --includedir="${EPREFIX}"/usr/include/${target} )
1152 - fi
1153 - # See comments in src_configure.
1154 - if [[ ${target} != "cross" ]] ; then
1155 - local cross_path="${WORKDIR}/cross"
1156 - [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic"
1157 - fi
1158 -
1159 - ECONF_SOURCE="${S}" econf "${conf[@]}" "$@"
1160 -}
1161 -
1162 -src_compile() {
1163 - # See comments in src_configure.
1164 - if ! has_version -b "~sys-libs/${P}:0" ; then
1165 - # We could possibly merge these two branches but opting to be
1166 - # conservative when merging some of the Prefix changes.
1167 -
1168 - if [[ ${CHOST} == *-cygwin* ]] && ! multilib_is_native_abi ; then
1169 - # We make 'tic$(x)' here, for Cygwin having x=".exe".
1170 - BUILD_DIR="${WORKDIR}" \
1171 - do_compile cross -C progs all PROGS='tic$(x)'
1172 - else
1173 - BUILD_DIR="${WORKDIR}" \
1174 - do_compile cross -C progs tic
1175 - fi
1176 - fi
1177 -
1178 - multilib-minimal_src_compile
1179 -}
1180 -
1181 -multilib_src_compile() {
1182 - local t
1183 - for t in "${NCURSES_TARGETS[@]}" ; do
1184 - do_compile "${t}"
1185 - done
1186 -}
1187 -
1188 -do_compile() {
1189 - local target=$1
1190 - shift
1191 -
1192 - cd "${BUILD_DIR}/${target}" || die
1193 -
1194 - # A little hack to fix parallel builds ... they break when
1195 - # generating sources so if we generate the sources first (in
1196 - # non-parallel), we can then build the rest of the package
1197 - # in parallel. This is not really a perf hit since the source
1198 - # generation is quite small.
1199 - emake -j1 sources
1200 -
1201 - # For some reason, sources depends on pc-files which depends on
1202 - # compiled libraries which depends on sources which ...
1203 - # Manually delete the pc-files file so the install step will
1204 - # create the .pc files we want.
1205 - rm -f misc/pc-files || die
1206 - emake "$@"
1207 -}
1208 -
1209 -multilib_src_install() {
1210 - local target
1211 - for target in "${NCURSES_TARGETS[@]}" ; do
1212 - emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install
1213 - done
1214 -
1215 - # Move main libraries into /.
1216 - if multilib_is_native_abi ; then
1217 - gen_usr_ldscript -a \
1218 - "${NCURSES_TARGETS[@]}" \
1219 - $(usex tinfo 'tinfow tinfo' '')
1220 - fi
1221 -
1222 - if ! tc-is-static-only ; then
1223 - # Provide a link for -lcurses.
1224 - ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die
1225 - fi
1226 -
1227 - # Don't delete '*.dll.a', needed for linking, bug #631468
1228 - if ! use static-libs; then
1229 - find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die
1230 - fi
1231 -
1232 - # Build fails to create this ...
1233 - # -FIXME-
1234 - # Ugly hackaround for riscv having two parts libdir (bug #689240)
1235 - # Replace this hack with an official solution once we have one...
1236 - # -FIXME-
1237 - dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \
1238 - /usr/$(get_libdir)/terminfo
1239 -}
1240 -
1241 -multilib_src_install_all() {
1242 - # We need the basic terminfo files in /etc for embedded/recovery, bug #37026
1243 - einfo "Installing basic terminfo files in /etc..."
1244 - local terms=(
1245 - # Dumb/simple values that show up when using the in-kernel VT.
1246 - ansi console dumb linux
1247 - vt{52,100,102,200,220}
1248 - # [u]rxvt users used to be pretty common. Probably should drop this
1249 - # since upstream is dead and people are moving away from it.
1250 - rxvt{,-unicode}{,-256color}
1251 - # xterm users are common, as is terminals re-using/spoofing it.
1252 - xterm xterm-{,256}color
1253 - # screen is common (and reused by tmux).
1254 - screen{,-256color}
1255 - screen.xterm-256color
1256 - )
1257 - local x
1258 - for x in "${terms[@]}"; do
1259 - local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
1260 - local basedir=$(basename "$(dirname "${termfile}")")
1261 -
1262 - if [[ -n ${termfile} ]] ; then
1263 - dodir "/etc/terminfo/${basedir}"
1264 - mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die
1265 - dosym "../../../../etc/terminfo/${basedir}/${x}" \
1266 - "/usr/share/terminfo/${basedir}/${x}"
1267 - fi
1268 - done
1269 -
1270 - echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses
1271 -
1272 - use minimal && rm -r "${ED}"/usr/share/terminfo*
1273 - # Because ncurses5-config --terminfo returns the directory we keep it
1274 - # bug #245374
1275 - keepdir /usr/share/terminfo
1276 -
1277 - cd "${S}" || die
1278 - dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc
1279 - if use doc ; then
1280 - docinto html
1281 - dodoc -r doc/html/
1282 - fi
1283 -}
1284 -
1285 -pkg_preinst() {
1286 - preserve_old_lib /$(get_libdir)/libncurses.so.5
1287 - preserve_old_lib /$(get_libdir)/libncursesw.so.5
1288 -}
1289 -
1290 -pkg_postinst() {
1291 - preserve_old_lib_notify /$(get_libdir)/libncurses.so.5
1292 - preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5
1293 -}