From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DC1AF1581EC for ; Sat, 23 Nov 2024 14:51:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 36DB1E0869; Sat, 23 Nov 2024 14:51:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1235DE0869 for ; Sat, 23 Nov 2024 14:51:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E4570342FA2 for ; Sat, 23 Nov 2024 14:51:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 565F81E15 for ; Sat, 23 Nov 2024 14:51:55 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1732373430.2c6c6c8ef64fdc3dc45475c91190f4d231ed3052.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libzip/, dev-libs/libzip/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libzip/Manifest dev-libs/libzip/files/libzip-1.11.2-nullability.patch dev-libs/libzip/libzip-1.11.2.ebuild X-VCS-Directories: dev-libs/libzip/files/ dev-libs/libzip/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 2c6c6c8ef64fdc3dc45475c91190f4d231ed3052 X-VCS-Branch: master Date: Sat, 23 Nov 2024 14:51:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: be7b7b82-d7d9-4e9a-810b-642a013e37e8 X-Archives-Hash: 6574c611740e861766bf73fe2711731f commit: 2c6c6c8ef64fdc3dc45475c91190f4d231ed3052 Author: Sam James gentoo org> AuthorDate: Sat Nov 23 14:46:24 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sat Nov 23 14:50:30 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c6c6c8e dev-libs/libzip: add 1.11.2 Closes: https://bugs.gentoo.org/771789 Closes: https://bugs.gentoo.org/830231 Closes: https://bugs.gentoo.org/932816 Signed-off-by: Sam James gentoo.org> dev-libs/libzip/Manifest | 1 + .../libzip/files/libzip-1.11.2-nullability.patch | 96 ++++++++++++++++ dev-libs/libzip/libzip-1.11.2.ebuild | 123 +++++++++++++++++++++ 3 files changed, 220 insertions(+) diff --git a/dev-libs/libzip/Manifest b/dev-libs/libzip/Manifest index 01ddc1b30655..0ce5516d5423 100644 --- a/dev-libs/libzip/Manifest +++ b/dev-libs/libzip/Manifest @@ -1 +1,2 @@ +DIST libzip-1.11.2.tar.xz 787300 BLAKE2B 84b41a4dfb5f61404972314021ee5de153199747d8724bbc86adb982fdcea74ede67fac03523081a12e463c33e25441037beb1f6312f93f0c011471c3b150c72 SHA512 e80afcff8a65d614c4e7087223e8afafe0b1c6799d6f1d04d1a3735d37a63d134ec2335fe87923a27f0845ee71062da444fe7a6c8a4458827333a52d9dee8166 DIST libzip-1.9.2.tar.xz 763980 BLAKE2B ceeca4dccbe7552f7f545b00ea44b342398d18eb996e39045b9d6efafe50f8890333ddf220c86b59f5ab2849420eb76761c42b16de8b174629f53e327f9e83e7 SHA512 82cb2533c25b5b540aa73856c958750d32eeceb192cce257eded15b396a24652041c8531f20366ac4c2dc6b7c0310c558d19c12b611576eccb07cfbaf98120b5 diff --git a/dev-libs/libzip/files/libzip-1.11.2-nullability.patch b/dev-libs/libzip/files/libzip-1.11.2-nullability.patch new file mode 100644 index 000000000000..e0ca4185617f --- /dev/null +++ b/dev-libs/libzip/files/libzip-1.11.2-nullability.patch @@ -0,0 +1,96 @@ +https://bugs.gentoo.org/830231 +https://github.com/nih-at/libzip/issues/253 +https://github.com/nih-at/libzip/commit/e29f28b4fe66ef24e205678dc29f65d693c649eb + +From e29f28b4fe66ef24e205678dc29f65d693c649eb Mon Sep 17 00:00:00 2001 +From: Dieter Baron +Date: Fri, 22 Nov 2024 11:32:32 +0100 +Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20hardcode=20=5FNullable=20suppor?= + =?UTF-8?q?t=20in=20zip.h.?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Based on and closes #253. +--- + CMakeLists.txt | 11 ----------- + config.h.in | 1 - + lib/zip.h | 9 +++++++++ + zipconf.h.in | 2 -- + 6 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 23e0f0fd8..3d5fa1bc8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -192,10 +192,6 @@ check_c_source_compiles("#include + #include + int main(int argc, char *argv[]) { unsigned long x = FICLONERANGE; }" HAVE_FICLONERANGE) + +-check_c_source_compiles(" +-int foo(char * _Nullable bar); +-int main(int argc, char *argv[]) { }" HAVE_NULLABLE) +- + test_big_endian(WORDS_BIGENDIAN) + + find_package(ZLIB 1.1.2 REQUIRED) +@@ -458,13 +454,6 @@ elseif(LONG_LONG_LIBZIP EQUAL 8) + set(ZIP_UINT64_T "unsigned long long") + endif() + +-if(HAVE_NULLABLE) +- set(ZIP_NULLABLE_DEFINES) +-else() +- set(ZIP_NULLABLE_DEFINES "#define _Nullable +-#define _Nonnull") +-endif() +- + # write out config file + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${PROJECT_BINARY_DIR}/config.h) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zipconf.h.in ${PROJECT_BINARY_DIR}/zipconf.h) +diff --git a/config.h.in b/config.h.in +index 90a324285..09d42384d 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -41,7 +41,6 @@ + #cmakedefine HAVE_MEMCPY_S + #cmakedefine HAVE_MBEDTLS + #cmakedefine HAVE_MKSTEMP +-#cmakedefine HAVE_NULLABLE + #cmakedefine HAVE_OPENSSL + #cmakedefine HAVE_SETMODE + #cmakedefine HAVE_SNPRINTF +diff --git a/lib/zip.h b/lib/zip.h +index 14064062f..c2a8a8b46 100644 +--- a/lib/zip.h ++++ b/lib/zip.h +@@ -34,6 +34,15 @@ + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#if defined(__has_feature) ++ #if !__has_feature(nullability) ++ #define _Nullable ++ #define _Nonnull ++ #endif ++#else ++ #define _Nullable ++ #define _Nonnull ++#endif + + #ifdef __cplusplus + extern "C" { +diff --git a/zipconf.h.in b/zipconf.h.in +index b88ed267f..04dce7184 100644 +--- a/zipconf.h.in ++++ b/zipconf.h.in +@@ -15,8 +15,6 @@ + + #cmakedefine ZIP_STATIC + +-${ZIP_NULLABLE_DEFINES} +- + ${LIBZIP_TYPES_INCLUDE} + + typedef ${ZIP_INT8_T} zip_int8_t; + diff --git a/dev-libs/libzip/libzip-1.11.2.ebuild b/dev-libs/libzip/libzip-1.11.2.ebuild new file mode 100644 index 000000000000..df692d7df5cc --- /dev/null +++ b/dev-libs/libzip/libzip-1.11.2.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake multibuild flag-o-matic + +DESCRIPTION="Library for manipulating zip archives" +HOMEPAGE="https://nih.at/libzip/" +SRC_URI="https://www.nih.at/libzip/${P}.tar.xz" + +LICENSE="BSD" +SLOT="0/5" +KEYWORDS="~amd64" +IUSE="bzip2 gnutls lzma mbedtls ssl static-libs test tools zstd" +REQUIRED_USE="test? ( tools )" +RESTRICT="!test? ( test )" + +DEPEND=" + sys-libs/zlib + bzip2? ( app-arch/bzip2:= ) + lzma? ( app-arch/xz-utils ) + ssl? ( + gnutls? ( + dev-libs/nettle:= + >=net-libs/gnutls-3.6.5:= + ) + !gnutls? ( + mbedtls? ( net-libs/mbedtls:= ) + !mbedtls? ( dev-libs/openssl:= ) + ) + ) + zstd? ( >=app-arch/zstd-1.4.0:= ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + test? ( dev-util/nihtest ) +" + +PATCHES=( + "${FILESDIR}"/${P}-nullability.patch +) + +pkg_setup() { + # Upstream doesn't support building dynamic & static + # simultaneously: https://github.com/nih-at/libzip/issues/76 + MULTIBUILD_VARIANTS=( shared $(usev static-libs) ) +} + +src_configure() { + append-lfs-flags + myconfigure() { + local mycmakeargs=( + -DBUILD_OSSFUZZ=OFF + -DBUILD_EXAMPLES=OFF # nothing is installed + -DENABLE_COMMONCRYPTO=OFF # not in tree + -DENABLE_BZIP2=$(usex bzip2) + -DENABLE_LZMA=$(usex lzma) + -DENABLE_ZSTD=$(usex zstd) + ) + if [[ ${MULTIBUILD_VARIANT} = static-libs ]]; then + mycmakeargs+=( + -DBUILD_DOC=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_SHARED_LIBS=OFF + -DBUILD_TOOLS=OFF + ) + else + mycmakeargs+=( + -DBUILD_DOC=ON + -DBUILD_REGRESS=$(usex test) + -DBUILD_TOOLS=$(usex tools) + ) + fi + + if use ssl; then + if use gnutls; then + mycmakeargs+=( + -DENABLE_GNUTLS=$(usex gnutls) + -DENABLE_MBEDTLS=OFF + -DENABLE_OPENSSL=OFF + ) + elif use mbedtls; then + mycmakeargs+=( + -DENABLE_GNUTLS=OFF + -DENABLE_MBEDTLS=$(usex mbedtls) + -DENABLE_OPENSSL=OFF + ) + else + mycmakeargs+=( + -DENABLE_GNUTLS=OFF + -DENABLE_MBEDTLS=OFF + -DENABLE_OPENSSL=ON + ) + fi + else + mycmakeargs+=( + -DENABLE_GNUTLS=OFF + -DENABLE_MBEDTLS=OFF + -DENABLE_OPENSSL=OFF + ) + fi + cmake_src_configure + } + + multibuild_foreach_variant myconfigure +} + +src_compile() { + multibuild_foreach_variant cmake_src_compile +} + +src_test() { + run_tests() { + [[ ${MULTIBUILD_VARIANT} = shared ]] && cmake_src_test + } + + multibuild_foreach_variant run_tests +} + +src_install() { + multibuild_foreach_variant cmake_src_install +}