diff options
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/Manifest.gz | bin | 14553 -> 14546 bytes | |||
-rw-r--r-- | sys-libs/minizip-ng/Manifest | 6 | ||||
-rw-r--r-- | sys-libs/minizip-ng/files/minizip-ng-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch | 68 | ||||
-rw-r--r-- | sys-libs/minizip-ng/files/minizip-ng-3.0.6-test-temporary.patch | 129 | ||||
-rw-r--r-- | sys-libs/minizip-ng/minizip-ng-3.0.8.ebuild (renamed from sys-libs/minizip-ng/minizip-ng-3.0.6-r1.ebuild) | 20 | ||||
-rw-r--r-- | sys-libs/ncurses/Manifest | 4 | ||||
-rw-r--r-- | sys-libs/ncurses/ncurses-6.4.ebuild | 428 |
7 files changed, 446 insertions, 209 deletions
diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz Binary files differindex 2ac8a484dae3..3eb53bd468f0 100644 --- a/sys-libs/Manifest.gz +++ b/sys-libs/Manifest.gz diff --git a/sys-libs/minizip-ng/Manifest b/sys-libs/minizip-ng/Manifest index dfd281b88071..daa5eda80065 100644 --- a/sys-libs/minizip-ng/Manifest +++ b/sys-libs/minizip-ng/Manifest @@ -1,8 +1,6 @@ -AUX minizip-ng-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch 2040 BLAKE2B 679a4c8878b06eb28352942e6b0f8285daf0f2d1cc3315071e3592f10fcfaaa11caf1b67e4a73c83201a85bf63750bbf7d3d0d4d7c2a5b2dd1b317eb5beac9f6 SHA512 b1913d03a49931b929435372b2e07d63ec13bf0513ac39549612514443efcd114d143848e6d0a6de751f1ed8499ecae4ecbfb0fce579e6e66549ea90f862417d -AUX minizip-ng-3.0.6-test-temporary.patch 6922 BLAKE2B 65bc4803aec94e56d7d868096320bac78f425485cff9c0d8d7214e5321e136e239100c292356be69e638f34bba6104bbca95e3db7e8b9f71ccec5e60cab92510 SHA512 e52ebc658cf1bc6df0fcff481562fe61527fbae6fd4a1477ef0a9185e967d9eb0ea7678e6f330429f993fae97a639baf82df672fc1a71275c7f3d7f1c83c8596 AUX minizip-ng-3.0.7-system-gtest.patch 733 BLAKE2B 9af012238754b34424eeb55d117fd5ae700ef971a8b58e0240d576b459bf7c1ae67e762bfd16dcbb95b206b019f9728eae8d4a1482fe85f21e884880494e9e78 SHA512 9020ef82288e9e92136a68acbc2310ff227d1e4f089f625b95224c5944c17c4c092dd7ed93345fb2cd8522e18ba0361868fd269dc545181270416009bbf6c37f -DIST minizip-ng-3.0.6.tar.gz 642138 BLAKE2B 3faddeef035da0417671ef5578b90ad9ec9a69f376d04fb8095f93e27e3276931ef432e179613e841e754ff6e915e8c631eeaa48795aaa87773e45465bd14afa SHA512 92aaad655e7dbec60ab8075435ccdc72314f75f0516aa4a16094215df2b14b108c2b49cdf6c876e396f0f43f52ad63f52ce7db2e119efe25c55b8b873bef9d4f DIST minizip-ng-3.0.7.tar.gz 643065 BLAKE2B e7026a5cc54fac6eba6fd1e79f8d53474966999aec1c24c70ff2207b93314f1e1cf5360841570ace66a30d6178f0057428757c7ba9b2d4bb14feb397142dedcb SHA512 01805ec955514efca32f4beb0e1241e94591d7d1d6119036c55d898a595de038bb18b8a2ffe5dab13101a890d14485aaefdf81680a7c60aa4ab3fd9de63ee991 -EBUILD minizip-ng-3.0.6-r1.ebuild 2630 BLAKE2B 064300fb88178deb975a1d289da94d6ab8160a9abb4fe56eb6d97c9a97891b33bd87103879b23357de7f1d752fa97b0a5bb243c9fd5e423495db6e739c0e736c SHA512 2c3bcf82cf6791458fbfef030f2299a3fe1b841501b4b80666fb4f14d35eb90e1533eed8724002e04af5dc3375ced455144f639806f37ea0b828576caa304c8a +DIST minizip-ng-3.0.8.tar.gz 643788 BLAKE2B aa937fe8d0e776c8a00754c7a5eae7769b096d044a1b65b124adc0531b757579d8e0e0f5a4784669d9d94a7ea512625160b8b02f908a29e027f31911adf0f524 SHA512 f9742c5fc54ac08d78d7e942e90a7e7f1bc40a2812e7555570bd152ed441dbc5a004b79d2edf32d3fbda64db493cd1a0512d16deb84c0791d3fc86718e9ad0b1 EBUILD minizip-ng-3.0.7.ebuild 2584 BLAKE2B 2eb43757b21e6cc60d3bdd18700e86d10b2d98102780adf0d56407e899762850e0ac1113242b642b9b5a300ec848168dbff3436706030b94ff33b25486060699 SHA512 541621a23fcb02d2a58583f39193c81fd9e06079596240f6424f764d5b8f9b810c4c5b9279119019ed1f657aac575134247475957a79b59caf5021132feeeee0 +EBUILD minizip-ng-3.0.8.ebuild 2526 BLAKE2B 91191963335fbdcb08a62bcf4abcfc6e0389f14e813b949eaafd6fa91b6f4d7806cb0913c5025fd2f94be1a2a9681f1b6ca51455be8237217b2baec1ce300b81 SHA512 653d3d2ad33a897956373cfe0590d69fda129670731a5dbb60daf1dfc56ab85e7f52039ff71714591483665d5c87d26867d882296b18ef9608e44f15d8554798 MISC metadata.xml 638 BLAKE2B 8a74cb73b53a8fa34aa5ad31ff7770fe47a6224161b6cce692d837004ffcbad15de7d318b3eb9dfa6db0f6f83eae0ed6238df19c27a82daeb7d958113f96478f SHA512 596d4f19cd3680b59ba2f94a8ebedb1fa84f5ca9e3d5125c76b5e787cd8b2e560152bf8151bfe140d03beae6a244b7a87210cc211c8493e0766852c776eef721 diff --git a/sys-libs/minizip-ng/files/minizip-ng-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch b/sys-libs/minizip-ng/files/minizip-ng-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch deleted file mode 100644 index 92db9c05b5d1..000000000000 --- a/sys-libs/minizip-ng/files/minizip-ng-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch +++ /dev/null @@ -1,68 +0,0 @@ -https://github.com/zlib-ng/minizip-ng/pull/651 - -From 1be6ea22e127a99786aefd2896e08bab43ad1333 Mon Sep 17 00:00:00 2001 -From: Sam James <sam@gentoo.org> -Date: Sun, 2 Oct 2022 01:39:17 +0100 -Subject: [PATCH] Switch getrandom() and arc4random_buf() usage order - -We need to match the order of inclusions at the top of the file -otherwise we might end up trying to use arc4random_buf() when -available (because HAVE_ARC4RANODM_BUF is set) even though -we hit HAVE_GETRANDOM first above and only included -<sys/random.h> because of it. - -Besides, if getrandom() is available, we should really prefer -it anyway. - -Fixes an implicit function declaration: -``` -minizip-ng-3.0.6/mz_os_posix.c:124:5: error: implicit declaration of function 'arc4random_buf' [-Werror=implicit-function-declaration] -``` ---- a/mz_os_posix.c -+++ b/mz_os_posix.c -@@ -117,7 +117,22 @@ void mz_os_utf8_string_delete(uint8_t **string) { - - /***************************************************************************/ - --#if defined(HAVE_ARC4RANDOM_BUF) -+#if defined(HAVE_GETRANDOM) -+int32_t mz_os_rand(uint8_t *buf, int32_t size) { -+ int32_t left = size; -+ int32_t written = 0; -+ -+ while (left > 0) { -+ written = getrandom(buf, left, 0); -+ if (written < 0) -+ return MZ_INTERNAL_ERROR; -+ -+ buf += written; -+ left -= written; -+ } -+ return size - left; -+} -+#elif defined(HAVE_ARC4RANDOM_BUF) - int32_t mz_os_rand(uint8_t *buf, int32_t size) { - if (size < 0) - return 0; -@@ -139,21 +154,6 @@ int32_t mz_os_rand(uint8_t *buf, int32_t size) { - } - return size - left; - } --#elif defined(HAVE_GETRANDOM) --int32_t mz_os_rand(uint8_t *buf, int32_t size) { -- int32_t left = size; -- int32_t written = 0; -- -- while (left > 0) { -- written = getrandom(buf, left, 0); -- if (written < 0) -- return MZ_INTERNAL_ERROR; -- -- buf += written; -- left -= written; -- } -- return size - left; --} - #else - int32_t mz_os_rand(uint8_t *buf, int32_t size) { - static unsigned calls = 0; diff --git a/sys-libs/minizip-ng/files/minizip-ng-3.0.6-test-temporary.patch b/sys-libs/minizip-ng/files/minizip-ng-3.0.6-test-temporary.patch deleted file mode 100644 index d38603ac7378..000000000000 --- a/sys-libs/minizip-ng/files/minizip-ng-3.0.6-test-temporary.patch +++ /dev/null @@ -1,129 +0,0 @@ -https://github.com/zlib-ng/minizip-ng/issues/623 -https://github.com/zlib-ng/minizip-ng/commit/6261d6f5ec5bd275257354c048f68ad9723c3231 - -From 6261d6f5ec5bd275257354c048f68ad9723c3231 Mon Sep 17 00:00:00 2001 -From: Nathan Moinvaziri <nathan@solidstatenetworks.com> -Date: Sat, 11 Jun 2022 10:36:42 -0700 -Subject: [PATCH] Generate test files in binary temp directory. - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -804,6 +804,8 @@ if(MZ_BUILD_TESTS AND MZ_BUILD_UNIT_TESTS) - endif() - endif() - -+ set(TEST_TEMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/Testing/Temporary) -+ - add_test(NAME test_cmd COMMAND test_cmd WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - - function(create_compress_tests EXTRA_NAME EXTRA_ARGS) -@@ -840,33 +842,43 @@ if(MZ_BUILD_TESTS AND MZ_BUILD_UNIT_TESTS) - foreach(INDEX RANGE ${COMPRESS_METHOD_COUNT}) - list(GET COMPRESS_METHOD_NAMES ${INDEX} COMPRESS_METHOD_NAME) - list(GET COMPRESS_METHOD_ARGS ${INDEX} COMPRESS_METHOD_ARG) -+ -+ set(COMPRESS_METHOD_DEST_DIR -+ ${TEST_TEMP_DIR}/${COMPRESS_METHOD_NAME}-${EXTRA_NAME}) -+ set(COMPRESS_METHOD_PATH -+ ${TEST_TEMP_DIR}/${COMPRESS_METHOD_NAME}-${EXTRA_NAME}.zip) -+ - add_test(NAME ${COMPRESS_METHOD_NAME}-zip-${EXTRA_NAME} - COMMAND minizip_cmd ${COMPRESS_METHOD_ARG} -o ${EXTRA_ARGS} -- result.zip test.c test.h empty.txt random.bin uniform.bin fuzz -+ ${COMPRESS_METHOD_PATH} -+ test.c test.h empty.txt random.bin uniform.bin fuzz - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - add_test(NAME ${COMPRESS_METHOD_NAME}-list-${EXTRA_NAME} -- COMMAND minizip_cmd -l ${EXTRA_ARGS} result.zip -+ COMMAND minizip_cmd -l ${EXTRA_ARGS} ${COMPRESS_METHOD_PATH} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - if(NOT MZ_COMPRESS_ONLY) - add_test(NAME ${COMPRESS_METHOD_NAME}-unzip-${EXTRA_NAME} -- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out result.zip -+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -+ -d ${COMPRESS_METHOD_DEST_DIR} ${COMPRESS_METHOD_PATH} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - endif() - add_test(NAME ${COMPRESS_METHOD_NAME}-append-${EXTRA_NAME} - COMMAND minizip_cmd ${COMPRESS_METHOD_ARG} -a ${EXTRA_ARGS} -- result.zip single.txt -+ ${COMPRESS_METHOD_PATH} single.txt - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - if(NOT MZ_COMPRESS_ONLY) - add_test(NAME ${COMPRESS_METHOD_NAME}-append-unzip-${EXTRA_NAME} -- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out result.zip -+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -+ -d ${COMPRESS_METHOD_DEST_DIR} ${COMPRESS_METHOD_PATH} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - endif() - add_test(NAME ${COMPRESS_METHOD_NAME}-erase-${EXTRA_NAME} -- COMMAND minizip_cmd -o -e result.zip test.c test.h -+ COMMAND minizip_cmd -o -e ${COMPRESS_METHOD_PATH} test.c test.h - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - if(NOT MZ_COMPRESS_ONLY) - add_test(NAME ${COMPRESS_METHOD_NAME}-erase-unzip-${EXTRA_NAME} -- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out result.zip -+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -+ -d ${COMPRESS_METHOD_DEST_DIR} ${COMPRESS_METHOD_PATH} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - endif() - endforeach() -@@ -891,43 +903,49 @@ if(MZ_BUILD_TESTS AND MZ_BUILD_UNIT_TESTS) - if(NOT MZ_COMPRESS_ONLY) - if(MZ_ZLIB OR MZ_LIBCOMP) - add_test(NAME unzip-tiny -- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out -+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -+ -d ${TEST_TEMP_DIR}/unzip-tiny - fuzz/unzip_fuzzer_seed_corpus/tiny.zip - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - endif() - if(MZ_BZIP2) - add_test(NAME unzip-bzip2 -- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out -+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -+ -d ${TEST_TEMP_DIR}/unzip-bzip2 - fuzz/unzip_fuzzer_seed_corpus/bzip2.zip - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - endif() - if(MZ_LZMA) - add_test(NAME unzip-lzma -- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out -+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -+ -d ${TEST_TEMP_DIR}/unzip-lzma - fuzz/unzip_fuzzer_seed_corpus/lzma.zip - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - endif() - if(MZ_PKCRYPT) - add_test(NAME unzip-pkcrypt -- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out -p test123 -+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -+ -d ${TEST_TEMP_DIR}/unzip-pkcrypt -p test123 - fuzz/unzip_fuzzer_seed_corpus/encrypted_pkcrypt.zip - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - endif() - if(MZ_WZAES) - add_test(NAME unzip-wzaes -- COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -d out -p test123 -+ COMMAND minizip_cmd -x -o ${EXTRA_ARGS} -+ -d ${TEST_TEMP_DIR}/unzip-wzaes -p test123 - fuzz/unzip_fuzzer_seed_corpus/encrypted_wzaes.zip - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - endif() - endif() - if(NOT MZ_COMPRESS_ONLY AND NOT MZ_DECOMPRESS_ONLY) - if(MZ_ZLIB AND NOT MZ_LIBCOMP) -+ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test/random.bin DESTINATION ${TEST_TEMP_DIR}) - add_test(NAME gz - COMMAND minigzip_cmd random.bin -- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) -+ WORKING_DIRECTORY ${TEST_TEMP_DIR}) - add_test(NAME ungz -- COMMAND minigzip_cmd -x -d out random.bin.gz -- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) -+ COMMAND minigzip_cmd -x -d ${TEST_TEMP_DIR} random.bin.gz -+ WORKING_DIRECTORY ${TEST_TEMP_DIR}) - endif() - endif() - endif() - diff --git a/sys-libs/minizip-ng/minizip-ng-3.0.6-r1.ebuild b/sys-libs/minizip-ng/minizip-ng-3.0.8.ebuild index cbc57fa9e859..42274c85d130 100644 --- a/sys-libs/minizip-ng/minizip-ng-3.0.6-r1.ebuild +++ b/sys-libs/minizip-ng/minizip-ng-3.0.8.ebuild @@ -29,18 +29,18 @@ RDEPEND=" openssl? ( dev-libs/openssl:= ) zstd? ( app-arch/zstd:= ) " -DEPEND="${RDEPEND}" - -PATCHES=( - "${FILESDIR}"/${PN}-3.0.6-Switch-getrandom-and-arc4random_buf-usage-order.patch - "${FILESDIR}"/${P}-test-temporary.patch -) +DEPEND=" + ${RDEPEND} + test? ( dev-cpp/gtest ) +" src_configure() { local mycmakeargs=( -DMZ_COMPAT=$(usex compat) + -DMZ_BUILD_TESTS=$(usex test) -DMZ_BUILD_UNIT_TESTS=$(usex test) + -DMZ_FETCH_LIBS=OFF -DMZ_FORCE_FETCH_LIBS=OFF @@ -55,8 +55,6 @@ src_configure() { -DMZ_PKCRYPT=ON -DMZ_WZAES=ON -DMZ_OPENSSL=$(usex openssl) - # TODO: Re-enable, ideally unconditionally, for arc4random - # Revisit when https://github.com/zlib-ng/minizip-ng/pull/648 fixed -DMZ_LIBBSD=ON -DMZ_SIGNING=ON @@ -82,6 +80,12 @@ src_test() { src_install() { cmake_src_install + if use test ; then + # Test binaries, bug #874591 + rm "${ED}"/usr/bin/minigzip || die + rm "${ED}"/usr/bin/minizip-ng || die + fi + if use compat ; then ewarn "minizip-ng is experimental and replacing the system zlib[minizip] is dangerous" ewarn "Please be careful!" diff --git a/sys-libs/ncurses/Manifest b/sys-libs/ncurses/Manifest index 1f9170122ca9..ccfd7460cb66 100644 --- a/sys-libs/ncurses/Manifest +++ b/sys-libs/ncurses/Manifest @@ -121,5 +121,9 @@ 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-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 EBUILD ncurses-6.3_p20221203-r2.ebuild 14185 BLAKE2B b473ccb4ec78ec3481b2d0ef5aa942524aaba9ae8c973cbd37540cb4227bfb83220bec92b44fe2158a1014795ed2e11f13ee2604a0878925a2a26ed44de49b01 SHA512 46580c1e32fac62170942f5a3dc14a010c78b9242a105dfe44a70ac3ac7485a97de74bbc2de47bc8ecde543a20248df340b1afe8c874a797c3d985c16635f1b7 +EBUILD ncurses-6.4.ebuild 13427 BLAKE2B 1984ab8f8c05bd522dd1f3e496f2996309e754d652fc2e22836f7c03bafda1fd37d3dea768ad596e667a4fa34df6fe04ed46edaec49cccde0c1e1f8e163e6963 SHA512 05f48536f7d8a11643c43a09dfe09fbec67d2b7fcc564d5f9a73392f04f6dec2f7c90cf07882ecc9576b925746952e907c08511737866eef4f2d085f195be407 MISC metadata.xml 1094 BLAKE2B a65bbb9584f77fb07fff735e6471ef48a5d63e7fa79112bf75df67f2f94e816706165fdd42a482708a7fd2ab3b3e308f9766eac0b39c3a4e31dcff5b3db25d57 SHA512 adf0f939a1e14c964bfb44ab80b1b8c1ee897a036a994848ba3e40280ab3a73ddb3beef540c905efd623e71b890c4c91e0b7c24651561d0e2bb2a4c86f039dba diff --git a/sys-libs/ncurses/ncurses-6.4.ebuild b/sys-libs/ncurses/ncurses-6.4.ebuild new file mode 100644 index 000000000000..2bbacd762737 --- /dev/null +++ b/sys-libs/ncurses/ncurses-6.4.ebuild @@ -0,0 +1,428 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/thomasdickey.asc +inherit flag-o-matic toolchain-funcs 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 +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=( + #20221126 + + # 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" + + # 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-rcs-ids + --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 + # We could possibly merge these two branches but opting to be + # conservative when merging some of the Prefix changes. + + if [[ ${CHOST} == *-cygwin* ]] && ! multilib_is_native_abi ; then + # We make 'tic$(x)' here, for Cygwin having x=".exe". + BUILD_DIR="${WORKDIR}" \ + do_compile cross -C progs all PROGS='tic$(x)' + else + BUILD_DIR="${WORKDIR}" \ + do_compile cross -C progs tic + fi + 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 +} |