diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-24 03:02:55 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-24 03:02:55 +0000 |
commit | 530a5a826feeb71085fb8a01927f4d775a0b131b (patch) | |
tree | b7669c45ea3f2a3a37b2437817a370226bb1c819 /dev-libs/libzip | |
parent | 71dd9d29cdaf7cc0ecdb9ea37d128726a941c630 (diff) |
gentoo auto-resync : 24:11:2024 - 03:02:54
Diffstat (limited to 'dev-libs/libzip')
-rw-r--r-- | dev-libs/libzip/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/libzip/files/libzip-1.11.2-nullability.patch | 96 | ||||
-rw-r--r-- | dev-libs/libzip/libzip-1.11.2.ebuild | 123 |
3 files changed, 222 insertions, 0 deletions
diff --git a/dev-libs/libzip/Manifest b/dev-libs/libzip/Manifest index d6e922a1f4a7..f90b6e967ad6 100644 --- a/dev-libs/libzip/Manifest +++ b/dev-libs/libzip/Manifest @@ -1,3 +1,6 @@ +AUX libzip-1.11.2-nullability.patch 2580 BLAKE2B 77fa6f497ddb0520edb6284465e10032e4f5215ac83a7228ee8bd656418d643d3895d0f01446d18a8ff11ccc43ca446e8bbfc6be2ee4e8a4b7004e6f551cbb05 SHA512 f077517a96828bf60a0e00407fc9130d839300d325fe946c2f236e02e7766a83e00ca0594b6434c04fcd344b1ebe257b4fe213232df301b5f6b7d985298d7398 +DIST libzip-1.11.2.tar.xz 787300 BLAKE2B 84b41a4dfb5f61404972314021ee5de153199747d8724bbc86adb982fdcea74ede67fac03523081a12e463c33e25441037beb1f6312f93f0c011471c3b150c72 SHA512 e80afcff8a65d614c4e7087223e8afafe0b1c6799d6f1d04d1a3735d37a63d134ec2335fe87923a27f0845ee71062da444fe7a6c8a4458827333a52d9dee8166 DIST libzip-1.9.2.tar.xz 763980 BLAKE2B ceeca4dccbe7552f7f545b00ea44b342398d18eb996e39045b9d6efafe50f8890333ddf220c86b59f5ab2849420eb76761c42b16de8b174629f53e327f9e83e7 SHA512 82cb2533c25b5b540aa73856c958750d32eeceb192cce257eded15b396a24652041c8531f20366ac4c2dc6b7c0310c558d19c12b611576eccb07cfbaf98120b5 +EBUILD libzip-1.11.2.ebuild 2499 BLAKE2B a55cd6192aca4923881e774a5c1b0fa02c79241611eb9a3e06a41efd16587e12912df1e67f2af629f08dd36c50582d5c85397a66ee244b47275c6982169700a9 SHA512 c129db58cfbf529547eeced996d0670d7b84cf74e76cfd98a02d52006de188dee58cd42b8406b0f2a291bf0a0deaec1e1c2c7155ac1b6b697ffa3993d788f8fc EBUILD libzip-1.9.2.ebuild 2438 BLAKE2B 78f610e67dec398354b7a675b456aa9f4b344b6f85416f450a6bc13f114463e4bef72142b4304dca2dd7673f25c7425c824be421ef9cb1a6be88c1702d868cc0 SHA512 0f151c1ee3896d906a3b36e98419161f0c91828484f49b428259cdaf7e907c2a6bc787372727f35b054896143c243339aa1dfb38ef322ebe66edcd13bbcbfa8f MISC metadata.xml 563 BLAKE2B 2cb57938618664b1424b3c4d475d79ae6a66964788665c559520ff8d7466d9a1c41c1a1821dd1213dde1062898e3bdb79478ff44fa3290c4ef6802a64539e77c SHA512 d14c625c1a43bbe8d69508cba6c78adad10287b6018693938a46af322614b3ba999fabf6f2d97c48836a80ded2dd7e0e32c1d6491654a8bdb5b77bd23acd1b24 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 <dillo@nih.at> +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 <sys/ioctl.h> + #include <linux/fs.h> + 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..39ea0e50d5e4 --- /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 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86" +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 +} |