1 |
commit: db6c8d18b9061ca0ba298edc4cb8dceca75beecc |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 1 01:29:25 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 1 01:29:35 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db6c8d18 |
7 |
|
8 |
sys-libs/ncurses: add 6.4 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
sys-libs/ncurses/Manifest | 3 + |
13 |
sys-libs/ncurses/ncurses-6.4.ebuild | 428 ++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 431 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/ncurses/Manifest b/sys-libs/ncurses/Manifest |
17 |
index 26c0085100be..833dc709e4bd 100644 |
18 |
--- a/sys-libs/ncurses/Manifest |
19 |
+++ b/sys-libs/ncurses/Manifest |
20 |
@@ -121,3 +121,6 @@ DIST ncurses-6.3-20221203.patch.gz.asc 729 BLAKE2B a663141e389946fb6967c61c0b6b8 |
21 |
DIST ncurses-6.3.tar.gz 3583550 BLAKE2B b2c174ac48d587b4d3aa054f04e4ec8bffd8a657a4aff5f090104965c741901e600712c8f8e5e98f3b8a26bc558996a1e14a746f113854832853b855e9d406c3 SHA512 5373f228cba6b7869210384a607a2d7faecfcbfef6dbfcd7c513f4e84fbd8bcad53ac7db2e7e84b95582248c1039dcfc7c4db205a618f7da22a166db482f0105 |
22 |
DIST ncurses-6.3.tar.gz.sig 438 BLAKE2B d7f9852292110fe7a048a9e38611ea06564b5142cb4cbeb8d99bba752d5df8eeffa3b57e5ca315c14024520bc008b30650e99669c995dca05a798399a0c85d39 SHA512 b9a2a25e0b1854c272bf89c610c81fc0ba061f0296eca5c0079a79cfe310e44eb16c46eb5a0dd018f1ca9114d569c9d5087a2b8e60b0344f1eb97f7c5addafc6 |
23 |
DIST ncurses-6.3_p20221203-patches.tar.xz 66988 BLAKE2B ea01eee64b0468fbd5b1a540103f88deff1669533d7b5187440a07ef969249fa664cf770ea8b0cce14b8d93fef9c4fc783c26df13699e205abebacb278d61766 SHA512 2cdadfbd9aed0f33a58150ba71a1a79a23f1590f82dc57a79fe7892bf9a1d86d4604d4c5224f11fdc7c133bcc8d8b60b075e1a493e8cb63743259f0b8d2b66f4 |
24 |
+DIST ncurses-6.4-patches.tar.xz 63720 BLAKE2B 6b767f65a9c7e8f9fdebaa2623e3770872e710fa103d11e48509e5315ebf5ad1a37519b1b40c5138e631693fb2e2e30ea5eef11002698a341a623a85c5b0b4fc SHA512 5094f6cb8fa54d9df0802173f1e0ff2ad40fc3d4bd298c0742479f72ba4f9afee0ccf9f0a4eb068b0a5552523abf7b212861b61abbde6f69ff22d62dd686daa9 |
25 |
+DIST ncurses-6.4.tar.gz 3612591 BLAKE2B 47fd9c2d27f44fa9942552881a471e5067465dbace40bf68b28998dded0556127a1d8662b96de4de4fd76c1c8b98bdae796036553ab4b05ca9f160839d841ba3 SHA512 1c2efff87a82a57e57b0c60023c87bae93f6718114c8f9dc010d4c21119a2f7576d0225dab5f0a227c2cfc6fb6bdbd62728e407f35fce5bf351bb50cf9e0fd34 |
26 |
+DIST ncurses-6.4.tar.gz.sig 438 BLAKE2B e6a78b8d0cbce1577205b49b0260394094632cefd95294813c7e4e51a2908e8599a9f24b3b648e42ba16c015fb9424b2a82236f58aac3bf96f5400a50482e44e SHA512 f2a7859725b4d5d62f68006338d56598ac6b38a1448983108906e192f0ec922be287cc89bcc79c1ae49ebc80c967af3dd077427f35ae579b00d445c882414fed |
27 |
|
28 |
diff --git a/sys-libs/ncurses/ncurses-6.4.ebuild b/sys-libs/ncurses/ncurses-6.4.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..2bbacd762737 |
31 |
--- /dev/null |
32 |
+++ b/sys-libs/ncurses/ncurses-6.4.ebuild |
33 |
@@ -0,0 +1,428 @@ |
34 |
+# Copyright 1999-2023 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/thomasdickey.asc |
40 |
+inherit flag-o-matic toolchain-funcs multilib-minimal preserve-libs usr-ldscript verify-sig |
41 |
+ |
42 |
+MY_PV="${PV:0:3}" |
43 |
+MY_P="${PN}-${MY_PV}" |
44 |
+DESCRIPTION="Console display library" |
45 |
+HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/" |
46 |
+# Keep invisible-mirror.net here as some users reported 403 forbidden with invisible-island.net |
47 |
+SRC_URI=" |
48 |
+ mirror://gnu/ncurses/${MY_P}.tar.gz |
49 |
+ https://invisible-island.net/archives/${PN}/${MY_P}.tar.gz |
50 |
+ https://invisible-mirror.net/archives/${PN}/${MY_P}.tar.gz |
51 |
+ verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig ) |
52 |
+" |
53 |
+ |
54 |
+GENTOO_PATCH_DEV=sam |
55 |
+GENTOO_PATCH_PV=6.4 |
56 |
+GENTOO_PATCH_NAME=${PN}-${GENTOO_PATCH_PV}-patches |
57 |
+ |
58 |
+# Populated below in a loop. Do not add patches manually here. |
59 |
+UPSTREAM_PATCHES=() |
60 |
+ |
61 |
+if [[ ${PV} == *_p* ]] ; then |
62 |
+ # Sometimes, after releases, there's no megapatch available yet. |
63 |
+ # |
64 |
+ # From upstream README at e.g. https://invisible-island.net/archives/ncurses/6.3/: |
65 |
+ # |
66 |
+ # "At times (generally to mark a relatively stable point), I create a rollup |
67 |
+ # patch, which consists of all changes from the release through the current date." |
68 |
+ # |
69 |
+ # Also, from https://lists.gnu.org/archive/html/bug-ncurses/2019-08/msg00039.html, |
70 |
+ # the patches are considered to be acceptable to use after some testing. They |
71 |
+ # are both for development but also bug fixes. |
72 |
+ # |
73 |
+ # This array should contain a list of all the snapshots since the last |
74 |
+ # release if there's no megapatch available yet. |
75 |
+ PATCH_DATES=( |
76 |
+ #20221126 |
77 |
+ |
78 |
+ # Latest patch is just _pN = $(ver_cut 4) |
79 |
+ $(ver_cut 4) |
80 |
+ ) |
81 |
+ |
82 |
+ if [[ -z ${PATCH_DATES[@]} ]] ; then |
83 |
+ SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz" |
84 |
+ SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz.asc" |
85 |
+ |
86 |
+ # If we have a rollup patch, use that instead of the individual ones. |
87 |
+ UPSTREAM_PATCHES+=( "${WORKDIR}"/${P/_p/-}-patch.sh ) |
88 |
+ else |
89 |
+ patch_url= |
90 |
+ my_patch_index= |
91 |
+ |
92 |
+ # We keep a bunch of mirrors here as we've had reports of invisible*.net |
93 |
+ # being 403 forbidden for some users. |
94 |
+ urls=( |
95 |
+ "https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-%s" |
96 |
+ "https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-%s" |
97 |
+ "https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${MY_P}-%s" |
98 |
+ ) |
99 |
+ |
100 |
+ for ((my_patch_index=0; my_patch_index < "${#PATCH_DATES[@]}"; my_patch_index++)); do |
101 |
+ for url in "${urls[@]}" ; do |
102 |
+ patch_url="$(printf ${urls} ${PATCH_DATES[${my_patch_index}]}.patch.gz)" |
103 |
+ SRC_URI+=" ${patch_url}" |
104 |
+ SRC_URI+=" verify-sig? ( ${patch_url}.asc )" |
105 |
+ done |
106 |
+ |
107 |
+ UPSTREAM_PATCHES+=( "${WORKDIR}"/${MY_P}-${PATCH_DATES[${my_patch_index}]}.patch ) |
108 |
+ done |
109 |
+ |
110 |
+ unset patch_url |
111 |
+ unset my_patch_index |
112 |
+ unset urls |
113 |
+ fi |
114 |
+fi |
115 |
+ |
116 |
+SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${GENTOO_PATCH_NAME}.tar.xz" |
117 |
+ |
118 |
+LICENSE="MIT" |
119 |
+# The subslot reflects the SONAME. |
120 |
+SLOT="0/6" |
121 |
+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" |
122 |
+IUSE="ada +cxx debug doc gpm minimal profile split-usr +stack-realign static-libs test tinfo trace" |
123 |
+RESTRICT="!test? ( test )" |
124 |
+ |
125 |
+DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )" |
126 |
+# Block the older ncurses that installed all files w/SLOT=5, bug #557472 |
127 |
+RDEPEND=" |
128 |
+ ${DEPEND} |
129 |
+ !<=sys-libs/ncurses-5.9-r4:5 |
130 |
+ !<sys-libs/slang-2.3.2_pre23 |
131 |
+ !<x11-terms/rxvt-unicode-9.06-r3 |
132 |
+ !<x11-terms/st-0.6-r1 |
133 |
+" |
134 |
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )" |
135 |
+ |
136 |
+S="${WORKDIR}/${MY_P}" |
137 |
+ |
138 |
+PATCHES=( |
139 |
+ "${UPSTREAM_PATCHES[@]}" |
140 |
+ |
141 |
+ # When rebasing Gentoo's patchset, please use git from a clean |
142 |
+ # src_prepare with upstream patches already applied. git am --reject |
143 |
+ # the existing patchset and rebase as required. This makes it easier |
144 |
+ # to manage future rebasing & adding new patches. |
145 |
+ # |
146 |
+ # For the same reasons, please include the original configure.in changes, |
147 |
+ # NOT just the generated results! |
148 |
+ "${WORKDIR}"/${GENTOO_PATCH_NAME} |
149 |
+) |
150 |
+ |
151 |
+src_unpack() { |
152 |
+ # Avoid trying to verify our own patchset tarball, there's no point |
153 |
+ if use verify-sig ; then |
154 |
+ local file |
155 |
+ for file in ${A} ; do |
156 |
+ if [[ ${file} == ${MY_P}.tar.gz ]] ; then |
157 |
+ verify-sig_verify_detached "${DISTDIR}"/${file} "${DISTDIR}"/${file}.sig |
158 |
+ else |
159 |
+ [[ ${file} == @(*${GENTOO_PATCH_NAME}.tar.xz|*.asc|*.sig) ]] && continue |
160 |
+ |
161 |
+ verify-sig_verify_detached "${DISTDIR}"/${file} "${DISTDIR}"/${file}.asc |
162 |
+ fi |
163 |
+ done |
164 |
+ fi |
165 |
+ |
166 |
+ default |
167 |
+} |
168 |
+ |
169 |
+src_configure() { |
170 |
+ # bug #115036 |
171 |
+ unset TERMINFO |
172 |
+ |
173 |
+ tc-export_build_env BUILD_{CC,CXX,CPP} |
174 |
+ |
175 |
+ # bug #214642 |
176 |
+ BUILD_CPPFLAGS+=" -D_GNU_SOURCE" |
177 |
+ |
178 |
+ # Build the various variants of ncurses -- narrow, wide, and threaded. #510440 |
179 |
+ # Order matters here -- we want unicode/thread versions to come last so that the |
180 |
+ # binaries in /usr/bin support both wide and narrow. |
181 |
+ # The naming is also important as we use these directly with filenames and when |
182 |
+ # checking configure flags. |
183 |
+ NCURSES_TARGETS=( |
184 |
+ ncurses |
185 |
+ ncursesw |
186 |
+ ncursest |
187 |
+ ncursestw |
188 |
+ ) |
189 |
+ |
190 |
+ # When installing ncurses, we have to use a compatible version of tic. |
191 |
+ # This comes up when cross-compiling, doing multilib builds, upgrading, |
192 |
+ # or installing for the first time. Build a local copy of tic whenever |
193 |
+ # the host version isn't available. bug #249363, bug #557598 |
194 |
+ if ! has_version -b "~sys-libs/${P}:0" ; then |
195 |
+ local lbuildflags="-static" |
196 |
+ |
197 |
+ # some toolchains don't quite support static linking |
198 |
+ local dbuildflags="-Wl,-rpath,${WORKDIR}/lib" |
199 |
+ case ${CHOST} in |
200 |
+ *-darwin*) dbuildflags= ;; |
201 |
+ *-solaris*) dbuildflags="-Wl,-R,${WORKDIR}/lib" ;; |
202 |
+ esac |
203 |
+ echo "int main() {}" | \ |
204 |
+ $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \ |
205 |
+ || lbuildflags="${dbuildflags}" |
206 |
+ |
207 |
+ # We can't re-use the multilib BUILD_DIR because we run outside of it. |
208 |
+ BUILD_DIR="${WORKDIR}" \ |
209 |
+ CC=${BUILD_CC} \ |
210 |
+ CXX=${BUILD_CXX} \ |
211 |
+ CPP=${BUILD_CPP} \ |
212 |
+ CHOST=${CBUILD} \ |
213 |
+ CFLAGS=${BUILD_CFLAGS} \ |
214 |
+ CXXFLAGS=${BUILD_CXXFLAGS} \ |
215 |
+ CPPFLAGS=${BUILD_CPPFLAGS} \ |
216 |
+ LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \ |
217 |
+ do_configure cross --without-shared --with-normal --with-progs |
218 |
+ fi |
219 |
+ multilib-minimal_src_configure |
220 |
+} |
221 |
+ |
222 |
+multilib_src_configure() { |
223 |
+ if [[ ${ABI} == x86 ]] ; then |
224 |
+ # For compatibility with older binaries at slight performance cost. |
225 |
+ # bug #616402 |
226 |
+ use stack-realign && append-flags -mstackrealign |
227 |
+ fi |
228 |
+ |
229 |
+ local t |
230 |
+ for t in "${NCURSES_TARGETS[@]}" ; do |
231 |
+ do_configure "${t}" |
232 |
+ done |
233 |
+} |
234 |
+ |
235 |
+do_configure() { |
236 |
+ local target=$1 |
237 |
+ shift |
238 |
+ |
239 |
+ mkdir "${BUILD_DIR}/${target}" || die |
240 |
+ cd "${BUILD_DIR}/${target}" || die |
241 |
+ |
242 |
+ local conf=( |
243 |
+ # We need the basic terminfo files in /etc, bug #37026. We will |
244 |
+ # add '--with-terminfo-dirs' and then populate /etc/terminfo in |
245 |
+ # src_install() ... |
246 |
+ --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo" |
247 |
+ |
248 |
+ # Enable installation of .pc files. |
249 |
+ --enable-pc-files |
250 |
+ # This path is used to control where the .pc files are installed. |
251 |
+ --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" |
252 |
+ |
253 |
+ # Now the rest of the various standard flags. |
254 |
+ --with-shared |
255 |
+ # (Originally disabled until bug #245417 is sorted out, but now |
256 |
+ # just keeping it off for good, given nobody needed it until now |
257 |
+ # (2022) and we're trying to phase out bdb.) |
258 |
+ --without-hashed-db |
259 |
+ $(use_with ada) |
260 |
+ $(use_with cxx) |
261 |
+ $(use_with cxx cxx-binding) |
262 |
+ --with-cxx-shared |
263 |
+ $(use_with debug) |
264 |
+ $(use_with profile) |
265 |
+ # The configure script uses ldd to parse the linked output which |
266 |
+ # is flaky for cross-compiling/multilib/ldd versions/etc... |
267 |
+ $(use_with gpm gpm libgpm.so.1) |
268 |
+ # Required for building on mingw-w64, and possibly other windows |
269 |
+ # platforms, bug #639670 |
270 |
+ $(use_enable kernel_Winnt term-driver) |
271 |
+ --disable-termcap |
272 |
+ --enable-symlinks |
273 |
+ --with-rcs-ids |
274 |
+ --with-manpage-format=normal |
275 |
+ --enable-const |
276 |
+ --enable-colorfgbg |
277 |
+ --enable-hard-tabs |
278 |
+ --enable-echo |
279 |
+ $(use_enable !ada warnings) |
280 |
+ $(use_with debug assertions) |
281 |
+ $(use_enable !debug leaks) |
282 |
+ $(use_with debug expanded) |
283 |
+ $(use_with !debug macros) |
284 |
+ $(multilib_native_with progs) |
285 |
+ $(use_with test tests) |
286 |
+ $(use_with trace) |
287 |
+ $(use_with tinfo termlib) |
288 |
+ --disable-stripping |
289 |
+ --disable-pkg-ldflags |
290 |
+ ) |
291 |
+ |
292 |
+ if [[ ${target} == ncurses*w ]] ; then |
293 |
+ conf+=( --enable-widec ) |
294 |
+ else |
295 |
+ conf+=( --disable-widec ) |
296 |
+ fi |
297 |
+ if [[ ${target} == ncursest* ]] ; then |
298 |
+ conf+=( --with-{pthread,reentrant} ) |
299 |
+ else |
300 |
+ conf+=( --without-{pthread,reentrant} ) |
301 |
+ fi |
302 |
+ |
303 |
+ # Make sure each variant goes in a unique location. |
304 |
+ if [[ ${target} == "ncurses" ]] ; then |
305 |
+ # "ncurses" variant goes into "${EPREFIX}"/usr/include |
306 |
+ # It is needed on Prefix because the configure script appends |
307 |
+ # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr. |
308 |
+ conf+=( --enable-overwrite ) |
309 |
+ else |
310 |
+ conf+=( --includedir="${EPREFIX}"/usr/include/${target} ) |
311 |
+ fi |
312 |
+ # See comments in src_configure. |
313 |
+ if [[ ${target} != "cross" ]] ; then |
314 |
+ local cross_path="${WORKDIR}/cross" |
315 |
+ [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic" |
316 |
+ fi |
317 |
+ |
318 |
+ ECONF_SOURCE="${S}" econf "${conf[@]}" "$@" |
319 |
+} |
320 |
+ |
321 |
+src_compile() { |
322 |
+ # See comments in src_configure. |
323 |
+ if ! has_version -b "~sys-libs/${P}:0" ; then |
324 |
+ # We could possibly merge these two branches but opting to be |
325 |
+ # conservative when merging some of the Prefix changes. |
326 |
+ |
327 |
+ if [[ ${CHOST} == *-cygwin* ]] && ! multilib_is_native_abi ; then |
328 |
+ # We make 'tic$(x)' here, for Cygwin having x=".exe". |
329 |
+ BUILD_DIR="${WORKDIR}" \ |
330 |
+ do_compile cross -C progs all PROGS='tic$(x)' |
331 |
+ else |
332 |
+ BUILD_DIR="${WORKDIR}" \ |
333 |
+ do_compile cross -C progs tic |
334 |
+ fi |
335 |
+ fi |
336 |
+ |
337 |
+ multilib-minimal_src_compile |
338 |
+} |
339 |
+ |
340 |
+multilib_src_compile() { |
341 |
+ local t |
342 |
+ for t in "${NCURSES_TARGETS[@]}" ; do |
343 |
+ do_compile "${t}" |
344 |
+ done |
345 |
+} |
346 |
+ |
347 |
+do_compile() { |
348 |
+ local target=$1 |
349 |
+ shift |
350 |
+ |
351 |
+ cd "${BUILD_DIR}/${target}" || die |
352 |
+ |
353 |
+ # A little hack to fix parallel builds ... they break when |
354 |
+ # generating sources so if we generate the sources first (in |
355 |
+ # non-parallel), we can then build the rest of the package |
356 |
+ # in parallel. This is not really a perf hit since the source |
357 |
+ # generation is quite small. |
358 |
+ emake -j1 sources |
359 |
+ |
360 |
+ # For some reason, sources depends on pc-files which depends on |
361 |
+ # compiled libraries which depends on sources which ... |
362 |
+ # Manually delete the pc-files file so the install step will |
363 |
+ # create the .pc files we want. |
364 |
+ rm -f misc/pc-files || die |
365 |
+ emake "$@" |
366 |
+} |
367 |
+ |
368 |
+multilib_src_install() { |
369 |
+ local target |
370 |
+ for target in "${NCURSES_TARGETS[@]}" ; do |
371 |
+ emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install |
372 |
+ done |
373 |
+ |
374 |
+ # Move main libraries into /. |
375 |
+ if multilib_is_native_abi ; then |
376 |
+ gen_usr_ldscript -a \ |
377 |
+ "${NCURSES_TARGETS[@]}" \ |
378 |
+ $(usex tinfo 'tinfow tinfo' '') |
379 |
+ fi |
380 |
+ |
381 |
+ # Don't delete '*.dll.a', needed for linking, bug #631468 |
382 |
+ if ! use static-libs; then |
383 |
+ find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die |
384 |
+ fi |
385 |
+ |
386 |
+ # Build fails to create this ... |
387 |
+ # -FIXME- |
388 |
+ # Ugly hackaround for riscv having two parts libdir (bug #689240) |
389 |
+ # Replace this hack with an official solution once we have one... |
390 |
+ # -FIXME- |
391 |
+ dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \ |
392 |
+ /usr/$(get_libdir)/terminfo |
393 |
+ |
394 |
+ # Remove obsolete libcurses symlink that is created by the build |
395 |
+ # system. Technically, this could be also achieved |
396 |
+ # via --disable-overwrite but it also moves headers implicitly, |
397 |
+ # and we do not want to do this yet. |
398 |
+ # bug #836696 |
399 |
+ rm "${ED}"/usr/$(get_libdir)/libcurses* || die |
400 |
+} |
401 |
+ |
402 |
+multilib_src_install_all() { |
403 |
+ local terms=( |
404 |
+ # Dumb/simple values that show up when using the in-kernel VT. |
405 |
+ ansi console dumb linux |
406 |
+ vt{52,100,102,200,220} |
407 |
+ # [u]rxvt users used to be pretty common. Probably should drop this |
408 |
+ # since upstream is dead and people are moving away from it. |
409 |
+ rxvt{,-unicode}{,-256color} |
410 |
+ # xterm users are common, as is terminals re-using/spoofing it. |
411 |
+ xterm xterm-{,256}color |
412 |
+ # screen is common (and reused by tmux). |
413 |
+ screen{,-256color} |
414 |
+ screen.xterm-256color |
415 |
+ ) |
416 |
+ if use split-usr ; then |
417 |
+ local x |
418 |
+ # We need the basic terminfo files in /etc for embedded/recovery, bug #37026 |
419 |
+ einfo "Installing basic terminfo files in /etc..." |
420 |
+ for x in "${terms[@]}"; do |
421 |
+ local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null) |
422 |
+ local basedir=$(basename "$(dirname "${termfile}")") |
423 |
+ |
424 |
+ if [[ -n ${termfile} ]] ; then |
425 |
+ dodir "/etc/terminfo/${basedir}" |
426 |
+ mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die |
427 |
+ dosym "../../../../etc/terminfo/${basedir}/${x}" \ |
428 |
+ "/usr/share/terminfo/${basedir}/${x}" |
429 |
+ fi |
430 |
+ done |
431 |
+ |
432 |
+ echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses |
433 |
+ |
434 |
+ use minimal && rm -r "${ED}"/usr/share/terminfo* |
435 |
+ # Because ncurses5-config --terminfo returns the directory we keep it |
436 |
+ # bug #245374 |
437 |
+ keepdir /usr/share/terminfo |
438 |
+ elif use minimal ; then |
439 |
+ # Keep only the basic terminfo files |
440 |
+ find "${ED}"/usr/share/terminfo/ \ |
441 |
+ \( -type f -o -type l \) ${terms[*]/#/! -name } -delete , \ |
442 |
+ -type d -empty -delete || die |
443 |
+ fi |
444 |
+ |
445 |
+ cd "${S}" || die |
446 |
+ dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc |
447 |
+ if use doc ; then |
448 |
+ docinto html |
449 |
+ dodoc -r doc/html/ |
450 |
+ fi |
451 |
+} |
452 |
+ |
453 |
+pkg_preinst() { |
454 |
+ preserve_old_lib /$(get_libdir)/libncurses.so.5 |
455 |
+ preserve_old_lib /$(get_libdir)/libncursesw.so.5 |
456 |
+} |
457 |
+ |
458 |
+pkg_postinst() { |
459 |
+ preserve_old_lib_notify /$(get_libdir)/libncurses.so.5 |
460 |
+ preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5 |
461 |
+} |