diff options
author | Sam James <sam@gentoo.org> | 2022-10-28 08:15:04 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-10-28 08:17:19 +0100 |
commit | 20503a2f0881b3b519ebfdc32b25ec8bf99ad3c2 (patch) | |
tree | 322a0b88edf9b5a7e79dc71073e2f78f2a269b29 /dev-libs/zziplib | |
parent | net-misc/nx: use more BDEPEND (diff) | |
download | gentoo-20503a2f0881b3b519ebfdc32b25ec8bf99ad3c2.tar.gz gentoo-20503a2f0881b3b519ebfdc32b25ec8bf99ad3c2.tar.bz2 gentoo-20503a2f0881b3b519ebfdc32b25ec8bf99ad3c2.zip |
dev-libs/zziplib: fix Python dep; workaround Clang 16 failure
Closes: https://bugs.gentoo.org/835755
Closes: https://bugs.gentoo.org/869980
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/zziplib')
-rw-r--r-- | dev-libs/zziplib/files/zziplib-0.13.72-Wint-conversion.patch | 22 | ||||
-rw-r--r-- | dev-libs/zziplib/zziplib-0.13.72-r2.ebuild | 52 |
2 files changed, 74 insertions, 0 deletions
diff --git a/dev-libs/zziplib/files/zziplib-0.13.72-Wint-conversion.patch b/dev-libs/zziplib/files/zziplib-0.13.72-Wint-conversion.patch new file mode 100644 index 000000000000..c27c33f7c3ab --- /dev/null +++ b/dev-libs/zziplib/files/zziplib-0.13.72-Wint-conversion.patch @@ -0,0 +1,22 @@ +https://copr-dist-git.fedorainfracloud.org/cgit/@fedora-llvm-team/clang-rpm-config/clang-rpm-config.git/tree/zziplib-0001-Fix-Wint-conversion-warning.patch +https://bugs.gentoo.org/869980 +https://github.com/gdraheim/zziplib/issues/140 + +From 1189f99a7f84d6a5e66a6057abfe0543de48ec82 Mon Sep 17 00:00:00 2001 +From: Tom Stellard <tstellar@redhat.com> +Date: Wed, 26 Oct 2022 05:32:17 +0000 +Subject: [PATCH] Fix -Wint-conversion warning + +/builddir/build/BUILD/zziplib-0.13.72/zzip/mmapped.c:685:24: error: incompatible integer to pointer conversion assigning to 'Bytef *' (aka 'unsigned char *') from 'off_t' (aka 'long') [-Wint-conversion] + file->zlib.next_in = offset; +--- a/zzip/mmapped.c ++++ b/zzip/mmapped.c +@@ -682,7 +682,7 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTRY * entry) + file->zlib.zalloc = Z_NULL; + file->zlib.zfree = Z_NULL; + file->zlib.avail_in = csize; +- file->zlib.next_in = offset; ++ file->zlib.next_in = (Bytef*)offset; + ____; + + DBG2("compressed size %i", (int) file->zlib.avail_in); diff --git a/dev-libs/zziplib/zziplib-0.13.72-r2.ebuild b/dev-libs/zziplib/zziplib-0.13.72-r2.ebuild new file mode 100644 index 000000000000..a954272b3435 --- /dev/null +++ b/dev-libs/zziplib/zziplib-0.13.72-r2.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +# Needed for docs, bug #835755 +PYTHON_REQ_USE="xml(+)" +inherit cmake flag-o-matic python-any-r1 + +DESCRIPTION="Lightweight library for extracting data from files archived in a single zip file" +HOMEPAGE="https://github.com/gdraheim/zziplib http://zziplib.sourceforge.net/" +SRC_URI="https://github.com/gdraheim/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="|| ( LGPL-2.1 MPL-1.1 )" +SLOT="0/13" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="sdl static-libs" + +# Tests require internet access +# https://github.com/gdraheim/zziplib/issues/24 + +BDEPEND=" + ${PYTHON_DEPS} +" +DEPEND=" + sys-libs/zlib + sdl? ( >=media-libs/libsdl-1.2.6 ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-0.13.72-Wint-conversion.patch +) + +src_configure() { + # https://github.com/gdraheim/zziplib/commit/f3bfc0dd6663b7df272cc0cf17f48838ad724a2f#diff-b7b1e314614cf326c6e2b6eba1540682R100 + append-flags -fno-strict-aliasing + # https://github.com/gdraheim/zziplib/issues/140 (bug #869980) + append-flags $(test-flags-CC -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion) + + local mycmakeargs=( + -DZZIPSDL="$(usex sdl)" + -DBUILD_STATIC_LIBS="$(usex static-libs)" + -DBUILD_TESTS=OFF + -DZZIPTEST=OFF + -DZZIPDOCS=ON + -DZZIPWRAP=OFF + ) + + cmake_src_configure +} |