summaryrefslogtreecommitdiff
path: root/sys-libs/ncurses
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-13 05:42:42 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-13 05:42:42 +0100
commit37cf2a8dbadd546a550aac7c8079c3f77427cb63 (patch)
tree01b4d88cf5ffbb0cc059bd4e1cbca9d8352ee900 /sys-libs/ncurses
parent7bb99171a372e6cff495daf7dbef2e03d216be29 (diff)
gentoo auto-resync : 13:04:2023 - 05:42:42
Diffstat (limited to 'sys-libs/ncurses')
-rw-r--r--sys-libs/ncurses/Manifest22
-rw-r--r--sys-libs/ncurses/ncurses-6.4_p20230408.ebuild430
2 files changed, 452 insertions, 0 deletions
diff --git a/sys-libs/ncurses/Manifest b/sys-libs/ncurses/Manifest
index f0fe7bfc380a..063146942fd2 100644
--- a/sys-libs/ncurses/Manifest
+++ b/sys-libs/ncurses/Manifest
@@ -121,9 +121,31 @@ DIST ncurses-6.3-20221203.patch.gz.asc 729 BLAKE2B a663141e389946fb6967c61c0b6b8
DIST ncurses-6.3.tar.gz 3583550 BLAKE2B b2c174ac48d587b4d3aa054f04e4ec8bffd8a657a4aff5f090104965c741901e600712c8f8e5e98f3b8a26bc558996a1e14a746f113854832853b855e9d406c3 SHA512 5373f228cba6b7869210384a607a2d7faecfcbfef6dbfcd7c513f4e84fbd8bcad53ac7db2e7e84b95582248c1039dcfc7c4db205a618f7da22a166db482f0105
DIST ncurses-6.3.tar.gz.sig 438 BLAKE2B d7f9852292110fe7a048a9e38611ea06564b5142cb4cbeb8d99bba752d5df8eeffa3b57e5ca315c14024520bc008b30650e99669c995dca05a798399a0c85d39 SHA512 b9a2a25e0b1854c272bf89c610c81fc0ba061f0296eca5c0079a79cfe310e44eb16c46eb5a0dd018f1ca9114d569c9d5087a2b8e60b0344f1eb97f7c5addafc6
DIST ncurses-6.3_p20221203-patches.tar.xz 66988 BLAKE2B ea01eee64b0468fbd5b1a540103f88deff1669533d7b5187440a07ef969249fa664cf770ea8b0cce14b8d93fef9c4fc783c26df13699e205abebacb278d61766 SHA512 2cdadfbd9aed0f33a58150ba71a1a79a23f1590f82dc57a79fe7892bf9a1d86d4604d4c5224f11fdc7c133bcc8d8b60b075e1a493e8cb63743259f0b8d2b66f4
+DIST ncurses-6.4-20230107.patch.gz 196232 BLAKE2B 8751142f825a4b79413986e45bc160d49cc9ccef23ae542c59a74435e251de82bdc8f450df14db0867b8679b5ecb81f0fb9abda662a82fb033a7eb5e079ee308 SHA512 970670d8eee50d44b8c7f29daf4c6a575beff3b4fafe12fff786cbd7ac03edeb1e7dae99c8064de99c166e9b3d7811f035ecf75c0eaffb382127cc9df5388d9b
+DIST ncurses-6.4-20230107.patch.gz.asc 729 BLAKE2B 483156747c88de46d131cf1f4e460972f95f689baaec0fb4c7c9966bec6e53d41285261761af17cbd8a9543108095587e598e3fe2fe21d76dc4fedde85a3eb0a SHA512 e14d0a27dae59e95f503bf1a569b0cc3115755043eb0cb4fa481e90bf24d097fae675e08c1247c0746fbb5c03c363dc88e6a60c0e9d6abb278df4e8d581749b1
+DIST ncurses-6.4-20230114.patch.gz 179019 BLAKE2B 8e7290f41133177275249c084c93a5fe6cb1dcd75e4deea0e44dbdd79774a364705bcd20b30b735996e19e861b5cde2216b5ce7c8d89066095d7c06ce38e5454 SHA512 202c02b09bf21d5c8341fc0e8a30a2c906f0e260a4d536f1332f978ebbe4d93250b832c6449a81ffdc9e030802f064237f39fd0f473e75e61cc77e15232c9a01
+DIST ncurses-6.4-20230114.patch.gz.asc 729 BLAKE2B dbb676160938bf5a65780a446bdffc8521410d216609d38817ea8977ea0f244dc221ec33a0475e05542fba4be7349f0948e9fa32be7fd439e57721b6a6e08fe3 SHA512 bfa1b6856fdf503aa17bac83ba0170009242ac950d46bb8789fb0e0f68c406fed364104565351df70ab58b12bbf8aedd4e587df3bd7ee69a6a0c287f67fd0c3b
+DIST ncurses-6.4-20230121.patch.gz 44888 BLAKE2B 355b2f283b978a2aadee0f4e1bc1694eb8d4ef559014d86b1ef05ab818a8852192b09976336ecd73f2610e87a8a3ccd4f799e6e0585ec4a2a8e85abbbae2f467 SHA512 7bee1b23afff48b5319a60f9e90cfd7593c0a107bcd5606da8e765b4d38904a6f732fe8077ecfac45ee2daceed301026ef3fb67435cae1d94ef5fec01440c100
+DIST ncurses-6.4-20230121.patch.gz.asc 729 BLAKE2B ddd69de4d17066b79ed9c99dfafcd051ebfb32cc31b5ea88fe013b991ca91e3bf4d00fbb36bd73b5d2ff0d4fdf33525b14bbe6ccb5216af5459e276e161a716b SHA512 f0a6eb2c81782c2d2da6d15b82a3167e4209887b868efe2e36708ffba93c987f358828d353a4b211f5fe6c1abce90b42e7d6dd2cb6ad322de78bbe2ceb04e1ad
+DIST ncurses-6.4-20230128.patch.gz 119721 BLAKE2B e91942151653415ba09e384c683a2d13854c6a751fbb4b60ee74245e71207f98d7a89b000e93cc3555f302dba2c5ca55d8313cab2197dc4074251044ef7b4eae SHA512 fffc86e953213ddc9bbe5c6a51bd60725ef75655452d03a53a38bfd5ca318d4801bb9ae4244e7e14ca8c77a9aa6fba298f45a01ae26a964cfc3300268f87c479
+DIST ncurses-6.4-20230128.patch.gz.asc 729 BLAKE2B 0faa8eb037867b99e7ea6f23c99d487426986cf9e5bc5a89179bd1ad4f363c5621d7c81214f4e38eed4ddbce9cd2cb569ff700325585e56ba706c7f1b56cabd6 SHA512 9cc84a4e32b7a67965106e8f414f87a160b632d49a5489880cd4f3f43daa7043d33894b22a16efdef5cd04914cf69019a1abefc8b9234ba2a92d1dc7c46f72fa
+DIST ncurses-6.4-20230211.patch.gz 13004 BLAKE2B 1935bee908c20f065f93100745755177012a49709bca3b14edb0414aa1493dbd6c52313a16ed04b58dff635fb6e853c39e3e3fe2b47ac5662fc274d59976ae94 SHA512 f70ad2605dfe867d8cdcbd6516c759bbf5422bf297d1ee0fb20b2b4262177cb018b7612c735efeccf8794a6fde55e388e4c9ef0bed41e9c467902835c6bf678e
+DIST ncurses-6.4-20230211.patch.gz.asc 729 BLAKE2B 42a64222042021f85a70d88555cdb6854abcc0202fd3580fff0984aee1d6154bb995d6357ed45cbb90ba92c17c32d8fd573ba0c59d37e9add2d7ece68044ac52 SHA512 27930c85a4ff2cb83c54def0fdf8f1765c4d1ca36935b26022bfe48ab6e87f39c6e45b8d1427d448e0a7b2bae864b00811ac9f1f1ab9f97d4c8f4b001dc2cb01
+DIST ncurses-6.4-20230218.patch.gz 146502 BLAKE2B 571cf7f5df5eeef21ab719ea2e941a431751ffd973de11783b96bea1ff6162f9fbbd3c3616d4c63906135cb4a6f16f8ee1a566743760c20bf026c2f378d57ce6 SHA512 7c8cec6437bef737235cf0a684646d3b6bf38c66314c14d5f07ec5dc2ca20e3036ffbd9900bb5c45e48929b1454711de412b77e527a7df643dd4403a5abfc787
+DIST ncurses-6.4-20230218.patch.gz.asc 729 BLAKE2B ca55b37bf6e647c5e39eaba1174c9c9699ffa77fc7ec1b53771586303184cf4b64cf5def844fc87d563a847109d7b00beac17e758a9803350831ebe14d36b0d9 SHA512 5471a2c8389742c0c8b74f1c27e9b97012c5d5eb0256fbd4bb904daab685614fe2506b5a204d958273eb66b56c5ff4b5e5aba8e28f59e2fe0cba392dde59b473
+DIST ncurses-6.4-20230225.patch.gz 68561 BLAKE2B ab80ea189f975e6fc0c2a1dd22898e2d4dde6bf2767ed47000c534430af09948266188cf54a527aabdfa6f4b5df4946c8bc3afdd7869bcccc75429b3e828b48a SHA512 fed222bbdb5d3c472ec7283f5612e12d6b1806c49ca5d1dc7dde68bbf72e8b1fe9c31a4737b6bbcf721d97babc9156a524d127f9e3d6c41547813bef70fb247d
+DIST ncurses-6.4-20230225.patch.gz.asc 729 BLAKE2B f7b4ff7fe78a69ec20c79225cce7bee628476663600129e5eee0c0f1ef2f0783e46485f57a774847851e6e192231610405ff923dcafd68c1dcc3d2ec622f0b78 SHA512 937a4bb33acf0c86b201145f2abe65e5b7defe63c064aeb2b7cb8869494c02a5d50af3f048dd758ea39b828b8cdd0dac54004dc41cd609afcf3de71454195135
+DIST ncurses-6.4-20230311.patch.gz 15262 BLAKE2B b3ca38dc63d64dd59af08b4c642c5b081eb137db6d7590a92f29c55be7148b26032553e1b72b0977394608ac144a12dfa0f919d943d41fd6ff419f8e568c655d SHA512 17662557194e81668dac748bce1240276d48e09df2416934da9660861154137024aee989287e9aac17b884e9707cf1c86c438cbcc583902af8a5ecc5a5e08140
+DIST ncurses-6.4-20230311.patch.gz.asc 729 BLAKE2B c5f513390bae7cbd5cf9d6a6f67c00161cb7c1712ebfa7ee9b27b391dbdb8f9386fc55daaa25b34c55955cc0362191256a2288b85d2d1dd9ff945561a2850449 SHA512 2b0f9ec58e011bb969397018258519b09a5af42ac49b7609677f983c1d69543aaeb052fb762d358b3fcfba7a3d40c01f61f3a680102d10f76958750b531a89d2
+DIST ncurses-6.4-20230401.patch.gz 5172 BLAKE2B bf4a9d9bcecc2fa91191139a4f1aa39aa4f08346986fe14f43b7dc4cbdaed767d198f426c8517024c5d4fe481a45c6d7e0a0b62d35cd72250e08da47edcbe86e SHA512 dd3d89cabec528c95c4b065a32d3496210571b0baaab079c2b381563f374072630aab0ec919c26e10ea476b7aebf1eab45ea25f8b4dfcd8172f44270d03c9cc9
+DIST ncurses-6.4-20230401.patch.gz.asc 729 BLAKE2B 18588b7cc4e3f256a4e9aa9e6221e54b1a29711df01784397b1055d9fea8ae5f1bb544a8acfd660ef1b7d72ccae1ab94b61f38ba19159e4efc7563a79e93fbb3 SHA512 bf9da77a0da1640d883e0a6ac7f807995f3678eaa054255e8591dbe9a2c4cebb43d8d2781b8ddf7c7432a38f63eb72d519445edcc2721a01d7a785964adee8a1
+DIST ncurses-6.4-20230408.patch.gz 15680 BLAKE2B 7d1fa16a79e317be3c2746f7117559a9cc65b7ca20aca86a314591d376db59f8a151d739bfbc502691808f16130b89a9d5b4ee8bcd357a01ef033ac2ad7277d1 SHA512 036d4b08c0d17656c75f89625d5b5a253e70458bc9f2303269b4c72349ad62c719951b9ebd65385d6d8ad4be9e89a36090fa842fbb62713d9b8fa6a359170a88
+DIST ncurses-6.4-20230408.patch.gz.asc 729 BLAKE2B 7648e24297dc66dc4d5f08bf592b2db628a5962b0d6d34c1f0725257c3a04d2430897edd99d741ba837196e9a6f2c138e4826f40f80ea88e9d5dc04a41c11986 SHA512 eabe6e49b94969fbba7bf8de3bef803a8151e6d3bb0e9d1f0d4b11d27c7156be37f623e6785a205b7b8acaef2a2d646099aef8c410a6addb7592a9af2ec930c4
DIST ncurses-6.4-patches.tar.xz 63720 BLAKE2B 6b767f65a9c7e8f9fdebaa2623e3770872e710fa103d11e48509e5315ebf5ad1a37519b1b40c5138e631693fb2e2e30ea5eef11002698a341a623a85c5b0b4fc SHA512 5094f6cb8fa54d9df0802173f1e0ff2ad40fc3d4bd298c0742479f72ba4f9afee0ccf9f0a4eb068b0a5552523abf7b212861b61abbde6f69ff22d62dd686daa9
DIST ncurses-6.4.tar.gz 3612591 BLAKE2B 47fd9c2d27f44fa9942552881a471e5067465dbace40bf68b28998dded0556127a1d8662b96de4de4fd76c1c8b98bdae796036553ab4b05ca9f160839d841ba3 SHA512 1c2efff87a82a57e57b0c60023c87bae93f6718114c8f9dc010d4c21119a2f7576d0225dab5f0a227c2cfc6fb6bdbd62728e407f35fce5bf351bb50cf9e0fd34
DIST ncurses-6.4.tar.gz.sig 438 BLAKE2B e6a78b8d0cbce1577205b49b0260394094632cefd95294813c7e4e51a2908e8599a9f24b3b648e42ba16c015fb9424b2a82236f58aac3bf96f5400a50482e44e SHA512 f2a7859725b4d5d62f68006338d56598ac6b38a1448983108906e192f0ec922be287cc89bcc79c1ae49ebc80c967af3dd077427f35ae579b00d445c882414fed
+DIST ncurses-6.4_p20230408-patches.tar.xz 80472 BLAKE2B 0ba8156ebd4f1691fec7bc1b800ef39ce6a4210573c027dd437919cdcd7c995830116da06c69f31c65923845a4d5c88e974673fac38acce5813f7d6cdc646e3e SHA512 32960e2cc4cd9dc60c38b49f46c5ce2c02179479abb66ca29f63cd06475ae8e26299a78b5f06762d114aefbbca3ba6fbebe7093a58106eeaa40cf500d21633a4
EBUILD ncurses-6.3_p20221203-r2.ebuild 13942 BLAKE2B 8d7b3769d860b133ad0424968417211236330c1c52fe9de430515b46bf93f3a6464af9265acf2fdb78589f670ecd77c35f09121bfd022234be61b37a8883da33 SHA512 05f9634de9ae52baed8fff3c952ab29fce9470eb28069cf045ef6c9ba610955b806f18c5cc6e1b583b8bcb4b250e322c136f3a89d0c775a805ffa93c64085494
EBUILD ncurses-6.4.ebuild 13184 BLAKE2B 0f3688fdbfbeff0db2e9dc42b32d524ab1e129fb2261781b7b698fc360800ef82158bbf3b90e6dc1f970ffc1c114cba1548f2faa258b5a47eeb6328ff6089a6f SHA512 573d98ed4127b8d68ff32844a3600a46390395c362405d987875b5628fb4b838b49b7a575dcee76a821e1b698accfdb1991b498985afc02543192a6becd5a9f4
+EBUILD ncurses-6.4_p20230408.ebuild 13280 BLAKE2B c915f5d63ab49e4f6bbac7877b831d93513511db8d4c2a6789fa6346188ad44e1c166459e9eed8962c52b3bfe6f3095bf24c44f192f0c9bc5d467f6dd163816a SHA512 067d5b90e423d54ca665ddb3dcbf86d863331a2431935f8fb2949d69b725ddcd009b2dee46cbd980feffe1f488eb800f2cfee39b51840f27a48a5c0caf254e6c
MISC metadata.xml 1094 BLAKE2B a65bbb9584f77fb07fff735e6471ef48a5d63e7fa79112bf75df67f2f94e816706165fdd42a482708a7fd2ab3b3e308f9766eac0b39c3a4e31dcff5b3db25d57 SHA512 adf0f939a1e14c964bfb44ab80b1b8c1ee897a036a994848ba3e40280ab3a73ddb3beef540c905efd623e71b890c4c91e0b7c24651561d0e2bb2a4c86f039dba
diff --git a/sys-libs/ncurses/ncurses-6.4_p20230408.ebuild b/sys-libs/ncurses/ncurses-6.4_p20230408.ebuild
new file mode 100644
index 000000000000..1aeefdfc13fd
--- /dev/null
+++ b/sys-libs/ncurses/ncurses-6.4_p20230408.ebuild
@@ -0,0 +1,430 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/thomasdickey.asc
+inherit flag-o-matic toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript verify-sig
+
+MY_PV="${PV:0:3}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="Console display library"
+HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/"
+# Keep invisible-mirror.net here as some users reported 403 forbidden with invisible-island.net
+SRC_URI="
+ mirror://gnu/ncurses/${MY_P}.tar.gz
+ https://invisible-island.net/archives/${PN}/${MY_P}.tar.gz
+ https://invisible-mirror.net/archives/${PN}/${MY_P}.tar.gz
+ verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig )
+"
+
+GENTOO_PATCH_DEV=sam
+GENTOO_PATCH_PV=6.4_p20230408
+GENTOO_PATCH_NAME=${PN}-${GENTOO_PATCH_PV}-patches
+
+# Populated below in a loop. Do not add patches manually here.
+UPSTREAM_PATCHES=()
+
+if [[ ${PV} == *_p* ]] ; then
+ # Sometimes, after releases, there's no megapatch available yet.
+ #
+ # From upstream README at e.g. https://invisible-island.net/archives/ncurses/6.3/:
+ #
+ # "At times (generally to mark a relatively stable point), I create a rollup
+ # patch, which consists of all changes from the release through the current date."
+ #
+ # Also, from https://lists.gnu.org/archive/html/bug-ncurses/2019-08/msg00039.html,
+ # the patches are considered to be acceptable to use after some testing. They
+ # are both for development but also bug fixes.
+ #
+ # This array should contain a list of all the snapshots since the last
+ # release if there's no megapatch available yet.
+ PATCH_DATES=(
+ 20230107
+ 20230114
+ 20230121
+ 20230128
+ 20230211
+ 20230218
+ 20230225
+ 20230311
+ 20230401
+
+ # Latest patch is just _pN = $(ver_cut 4)
+ $(ver_cut 4)
+ )
+
+ if [[ -z ${PATCH_DATES[@]} ]] ; then
+ SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz"
+ SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz.asc"
+
+ # If we have a rollup patch, use that instead of the individual ones.
+ UPSTREAM_PATCHES+=( "${WORKDIR}"/${P/_p/-}-patch.sh )
+ else
+ patch_url=
+ my_patch_index=
+
+ # We keep a bunch of mirrors here as we've had reports of invisible*.net
+ # being 403 forbidden for some users.
+ urls=(
+ "https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-%s"
+ "https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-%s"
+ "https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${MY_P}-%s"
+ )
+
+ for ((my_patch_index=0; my_patch_index < "${#PATCH_DATES[@]}"; my_patch_index++)); do
+ for url in "${urls[@]}" ; do
+ patch_url="$(printf ${urls} ${PATCH_DATES[${my_patch_index}]}.patch.gz)"
+ SRC_URI+=" ${patch_url}"
+ SRC_URI+=" verify-sig? ( ${patch_url}.asc )"
+ done
+
+ UPSTREAM_PATCHES+=( "${WORKDIR}"/${MY_P}-${PATCH_DATES[${my_patch_index}]}.patch )
+ done
+
+ unset patch_url
+ unset my_patch_index
+ unset urls
+ fi
+fi
+
+SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${GENTOO_PATCH_NAME}.tar.xz"
+
+LICENSE="MIT"
+# The subslot reflects the SONAME.
+SLOT="0/6"
+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"
+IUSE="ada +cxx debug doc gpm minimal profile split-usr +stack-realign static-libs test tinfo trace"
+RESTRICT="!test? ( test )"
+
+DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )"
+# Block the older ncurses that installed all files w/SLOT=5, bug #557472
+RDEPEND="
+ ${DEPEND}
+ !<=sys-libs/ncurses-5.9-r4:5
+ !<sys-libs/slang-2.3.2_pre23
+ !<x11-terms/rxvt-unicode-9.06-r3
+ !<x11-terms/st-0.6-r1
+"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${UPSTREAM_PATCHES[@]}"
+
+ # When rebasing Gentoo's patchset, please use git from a clean
+ # src_prepare with upstream patches already applied. git am --reject
+ # the existing patchset and rebase as required. This makes it easier
+ # to manage future rebasing & adding new patches.
+ #
+ # For the same reasons, please include the original configure.in changes,
+ # NOT just the generated results!
+ "${WORKDIR}"/${GENTOO_PATCH_NAME}
+)
+
+src_unpack() {
+ # Avoid trying to verify our own patchset tarball, there's no point
+ if use verify-sig ; then
+ local file
+ for file in ${A} ; do
+ if [[ ${file} == ${MY_P}.tar.gz ]] ; then
+ verify-sig_verify_detached "${DISTDIR}"/${file} "${DISTDIR}"/${file}.sig
+ else
+ [[ ${file} == @(*${GENTOO_PATCH_NAME}.tar.xz|*.asc|*.sig) ]] && continue
+
+ verify-sig_verify_detached "${DISTDIR}"/${file} "${DISTDIR}"/${file}.asc
+ fi
+ done
+ fi
+
+ default
+}
+
+src_configure() {
+ # bug #115036
+ unset TERMINFO
+
+ tc-export_build_env BUILD_{CC,CXX,CPP}
+
+ # bug #214642
+ BUILD_CPPFLAGS+=" -D_GNU_SOURCE"
+
+ # bug #852665
+ if [[ ${CHOST} == *-cygwin* ]]; then
+ BUILD_CPPFLAGS+=" -DBUILDING_NCURSES"
+ fi
+
+ # Build the various variants of ncurses -- narrow, wide, and threaded. #510440
+ # Order matters here -- we want unicode/thread versions to come last so that the
+ # binaries in /usr/bin support both wide and narrow.
+ # The naming is also important as we use these directly with filenames and when
+ # checking configure flags.
+ NCURSES_TARGETS=(
+ ncurses
+ ncursesw
+ ncursest
+ ncursestw
+ )
+
+ # When installing ncurses, we have to use a compatible version of tic.
+ # This comes up when cross-compiling, doing multilib builds, upgrading,
+ # or installing for the first time. Build a local copy of tic whenever
+ # the host version isn't available. bug #249363, bug #557598
+ if ! has_version -b "~sys-libs/${P}:0" ; then
+ local lbuildflags="-static"
+
+ # some toolchains don't quite support static linking
+ local dbuildflags="-Wl,-rpath,${WORKDIR}/lib"
+ case ${CHOST} in
+ *-darwin*) dbuildflags= ;;
+ *-solaris*) dbuildflags="-Wl,-R,${WORKDIR}/lib" ;;
+ esac
+ echo "int main() {}" | \
+ $(tc-getCC) -o x -x c - ${lbuildflags} -pipe >& /dev/null \
+ || lbuildflags="${dbuildflags}"
+
+ # We can't re-use the multilib BUILD_DIR because we run outside of it.
+ BUILD_DIR="${WORKDIR}" \
+ CC=${BUILD_CC} \
+ CXX=${BUILD_CXX} \
+ CPP=${BUILD_CPP} \
+ CHOST=${CBUILD} \
+ CFLAGS=${BUILD_CFLAGS} \
+ CXXFLAGS=${BUILD_CXXFLAGS} \
+ CPPFLAGS=${BUILD_CPPFLAGS} \
+ LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \
+ do_configure cross --without-shared --with-normal --with-progs
+ fi
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ if [[ ${ABI} == x86 ]] ; then
+ # For compatibility with older binaries at slight performance cost.
+ # bug #616402
+ use stack-realign && append-flags -mstackrealign
+ fi
+
+ local t
+ for t in "${NCURSES_TARGETS[@]}" ; do
+ do_configure "${t}"
+ done
+}
+
+do_configure() {
+ local target=$1
+ shift
+
+ mkdir "${BUILD_DIR}/${target}" || die
+ cd "${BUILD_DIR}/${target}" || die
+
+ local conf=(
+ # We need the basic terminfo files in /etc, bug #37026. We will
+ # add '--with-terminfo-dirs' and then populate /etc/terminfo in
+ # src_install() ...
+ --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
+
+ # Enable installation of .pc files.
+ --enable-pc-files
+ # This path is used to control where the .pc files are installed.
+ --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
+
+ # Now the rest of the various standard flags.
+ --with-shared
+ # (Originally disabled until bug #245417 is sorted out, but now
+ # just keeping it off for good, given nobody needed it until now
+ # (2022) and we're trying to phase out bdb.)
+ --without-hashed-db
+ $(use_with ada)
+ $(use_with cxx)
+ $(use_with cxx cxx-binding)
+ --with-cxx-shared
+ $(use_with debug)
+ $(use_with profile)
+ # The configure script uses ldd to parse the linked output which
+ # is flaky for cross-compiling/multilib/ldd versions/etc...
+ $(use_with gpm gpm libgpm.so.1)
+ # Required for building on mingw-w64, and possibly other windows
+ # platforms, bug #639670
+ $(use_enable kernel_Winnt term-driver)
+ --disable-termcap
+ --enable-symlinks
+ --with-manpage-format=normal
+ --enable-const
+ --enable-colorfgbg
+ --enable-hard-tabs
+ --enable-echo
+ $(use_enable !ada warnings)
+ $(use_with debug assertions)
+ $(use_enable !debug leaks)
+ $(use_with debug expanded)
+ $(use_with !debug macros)
+ $(multilib_native_with progs)
+ $(use_with test tests)
+ $(use_with trace)
+ $(use_with tinfo termlib)
+ --disable-stripping
+ --disable-pkg-ldflags
+ )
+
+ if [[ ${target} == ncurses*w ]] ; then
+ conf+=( --enable-widec )
+ else
+ conf+=( --disable-widec )
+ fi
+ if [[ ${target} == ncursest* ]] ; then
+ conf+=( --with-{pthread,reentrant} )
+ else
+ conf+=( --without-{pthread,reentrant} )
+ fi
+
+ # Make sure each variant goes in a unique location.
+ if [[ ${target} == "ncurses" ]] ; then
+ # "ncurses" variant goes into "${EPREFIX}"/usr/include
+ # It is needed on Prefix because the configure script appends
+ # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr.
+ conf+=( --enable-overwrite )
+ else
+ conf+=( --includedir="${EPREFIX}"/usr/include/${target} )
+ fi
+ # See comments in src_configure.
+ if [[ ${target} != "cross" ]] ; then
+ local cross_path="${WORKDIR}/cross"
+ [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic"
+ fi
+
+ ECONF_SOURCE="${S}" econf "${conf[@]}" "$@"
+}
+
+src_compile() {
+ # See comments in src_configure.
+ if ! has_version -b "~sys-libs/${P}:0" ; then
+ BUILD_DIR="${WORKDIR}" do_compile cross -C progs tic$(get_exeext)
+ fi
+
+ multilib-minimal_src_compile
+}
+
+multilib_src_compile() {
+ local t
+ for t in "${NCURSES_TARGETS[@]}" ; do
+ do_compile "${t}"
+ done
+}
+
+do_compile() {
+ local target=$1
+ shift
+
+ cd "${BUILD_DIR}/${target}" || die
+
+ # A little hack to fix parallel builds ... they break when
+ # generating sources so if we generate the sources first (in
+ # non-parallel), we can then build the rest of the package
+ # in parallel. This is not really a perf hit since the source
+ # generation is quite small.
+ emake -j1 sources
+
+ # For some reason, sources depends on pc-files which depends on
+ # compiled libraries which depends on sources which ...
+ # Manually delete the pc-files file so the install step will
+ # create the .pc files we want.
+ rm -f misc/pc-files || die
+ emake "$@"
+}
+
+multilib_src_install() {
+ local target
+ for target in "${NCURSES_TARGETS[@]}" ; do
+ emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install
+ done
+
+ # Move main libraries into /.
+ if multilib_is_native_abi ; then
+ gen_usr_ldscript -a \
+ "${NCURSES_TARGETS[@]}" \
+ $(usex tinfo 'tinfow tinfo' '')
+ fi
+
+ # Don't delete '*.dll.a', needed for linking, bug #631468
+ if ! use static-libs; then
+ find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die
+ fi
+
+ # Build fails to create this ...
+ # -FIXME-
+ # Ugly hackaround for riscv having two parts libdir (bug #689240)
+ # Replace this hack with an official solution once we have one...
+ # -FIXME-
+ dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \
+ /usr/$(get_libdir)/terminfo
+
+ # Remove obsolete libcurses symlink that is created by the build
+ # system. Technically, this could be also achieved
+ # via --disable-overwrite but it also moves headers implicitly,
+ # and we do not want to do this yet.
+ # bug #836696
+ rm "${ED}"/usr/$(get_libdir)/libcurses* || die
+}
+
+multilib_src_install_all() {
+ local terms=(
+ # Dumb/simple values that show up when using the in-kernel VT.
+ ansi console dumb linux
+ vt{52,100,102,200,220}
+ # [u]rxvt users used to be pretty common. Probably should drop this
+ # since upstream is dead and people are moving away from it.
+ rxvt{,-unicode}{,-256color}
+ # xterm users are common, as is terminals re-using/spoofing it.
+ xterm xterm-{,256}color
+ # screen is common (and reused by tmux).
+ screen{,-256color}
+ screen.xterm-256color
+ )
+ if use split-usr ; then
+ local x
+ # We need the basic terminfo files in /etc for embedded/recovery, bug #37026
+ einfo "Installing basic terminfo files in /etc..."
+ for x in "${terms[@]}"; do
+ local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
+ local basedir=$(basename "$(dirname "${termfile}")")
+
+ if [[ -n ${termfile} ]] ; then
+ dodir "/etc/terminfo/${basedir}"
+ mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die
+ dosym "../../../../etc/terminfo/${basedir}/${x}" \
+ "/usr/share/terminfo/${basedir}/${x}"
+ fi
+ done
+
+ echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses
+
+ use minimal && rm -r "${ED}"/usr/share/terminfo*
+ # Because ncurses5-config --terminfo returns the directory we keep it
+ # bug #245374
+ keepdir /usr/share/terminfo
+ elif use minimal ; then
+ # Keep only the basic terminfo files
+ find "${ED}"/usr/share/terminfo/ \
+ \( -type f -o -type l \) ${terms[*]/#/! -name } -delete , \
+ -type d -empty -delete || die
+ fi
+
+ cd "${S}" || die
+ dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc
+ if use doc ; then
+ docinto html
+ dodoc -r doc/html/
+ fi
+}
+
+pkg_preinst() {
+ preserve_old_lib /$(get_libdir)/libncurses.so.5
+ preserve_old_lib /$(get_libdir)/libncursesw.so.5
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /$(get_libdir)/libncurses.so.5
+ preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5
+}