Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/minizip-ng/
Date: Sat, 31 Dec 2022 23:09:41
Message-Id: 1672528134.bf1f9945bca502841480115ef59463a20da6e7da.sam@gentoo
1 commit: bf1f9945bca502841480115ef59463a20da6e7da
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 31 23:08:54 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 31 23:08:54 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf1f9945
7
8 sys-libs/minizip-ng: add 3.0.8
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-libs/minizip-ng/Manifest | 1 +
13 sys-libs/minizip-ng/minizip-ng-3.0.8.ebuild | 93 +++++++++++++++++++++++++++++
14 2 files changed, 94 insertions(+)
15
16 diff --git a/sys-libs/minizip-ng/Manifest b/sys-libs/minizip-ng/Manifest
17 index a2fc647f45d7..a313c1c988e6 100644
18 --- a/sys-libs/minizip-ng/Manifest
19 +++ b/sys-libs/minizip-ng/Manifest
20 @@ -1,2 +1,3 @@
21 DIST minizip-ng-3.0.6.tar.gz 642138 BLAKE2B 3faddeef035da0417671ef5578b90ad9ec9a69f376d04fb8095f93e27e3276931ef432e179613e841e754ff6e915e8c631eeaa48795aaa87773e45465bd14afa SHA512 92aaad655e7dbec60ab8075435ccdc72314f75f0516aa4a16094215df2b14b108c2b49cdf6c876e396f0f43f52ad63f52ce7db2e119efe25c55b8b873bef9d4f
22 DIST minizip-ng-3.0.7.tar.gz 643065 BLAKE2B e7026a5cc54fac6eba6fd1e79f8d53474966999aec1c24c70ff2207b93314f1e1cf5360841570ace66a30d6178f0057428757c7ba9b2d4bb14feb397142dedcb SHA512 01805ec955514efca32f4beb0e1241e94591d7d1d6119036c55d898a595de038bb18b8a2ffe5dab13101a890d14485aaefdf81680a7c60aa4ab3fd9de63ee991
23 +DIST minizip-ng-3.0.8.tar.gz 643788 BLAKE2B aa937fe8d0e776c8a00754c7a5eae7769b096d044a1b65b124adc0531b757579d8e0e0f5a4784669d9d94a7ea512625160b8b02f908a29e027f31911adf0f524 SHA512 f9742c5fc54ac08d78d7e942e90a7e7f1bc40a2812e7555570bd152ed441dbc5a004b79d2edf32d3fbda64db493cd1a0512d16deb84c0791d3fc86718e9ad0b1
24
25 diff --git a/sys-libs/minizip-ng/minizip-ng-3.0.8.ebuild b/sys-libs/minizip-ng/minizip-ng-3.0.8.ebuild
26 new file mode 100644
27 index 000000000000..42274c85d130
28 --- /dev/null
29 +++ b/sys-libs/minizip-ng/minizip-ng-3.0.8.ebuild
30 @@ -0,0 +1,93 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +# Worth keeping an eye on 'develop' branch upstream for possible backports,
37 +# as they copied this practice from sys-libs/zlib upstream.
38 +
39 +inherit cmake
40 +
41 +DESCRIPTION="Fork of the popular zip manipulation library found in the zlib distribution"
42 +HOMEPAGE="https://github.com/zlib-ng/minizip-ng"
43 +SRC_URI="https://github.com/zlib-ng/minizip-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
44 +
45 +LICENSE="ZLIB"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~x86"
48 +IUSE="compat openssl test zstd"
49 +RESTRICT="!test? ( test )"
50 +
51 +# Automagically prefers sys-libs/zlib-ng if installed, so let's
52 +# just depend on it as presumably it's better tested anyway.
53 +RDEPEND="
54 + app-arch/bzip2
55 + app-arch/xz-utils
56 + sys-libs/zlib-ng
57 + virtual/libiconv
58 + compat? ( !sys-libs/zlib[minizip] )
59 + openssl? ( dev-libs/openssl:= )
60 + zstd? ( app-arch/zstd:= )
61 +"
62 +DEPEND="
63 + ${RDEPEND}
64 + test? ( dev-cpp/gtest )
65 +"
66 +
67 +src_configure() {
68 + local mycmakeargs=(
69 + -DMZ_COMPAT=$(usex compat)
70 +
71 + -DMZ_BUILD_TESTS=$(usex test)
72 + -DMZ_BUILD_UNIT_TESTS=$(usex test)
73 +
74 + -DMZ_FETCH_LIBS=OFF
75 + -DMZ_FORCE_FETCH_LIBS=OFF
76 +
77 + # Compression library options
78 + -DMZ_ZLIB=ON
79 + -DMZ_BZIP2=ON
80 + -DMZ_LZMA=ON
81 + -DMZ_ZSTD=$(usex zstd)
82 + -DMZ_LIBCOMP=OFF
83 +
84 + # Encryption support options
85 + -DMZ_PKCRYPT=ON
86 + -DMZ_WZAES=ON
87 + -DMZ_OPENSSL=$(usex openssl)
88 + -DMZ_LIBBSD=ON
89 + -DMZ_SIGNING=ON
90 +
91 + # Character conversion options
92 + -DMZ_ICONV=ON
93 + )
94 +
95 + cmake_src_configure
96 +}
97 +
98 +src_test() {
99 + local myctestargs=(
100 + # TODO: investigate
101 + -E "(raw-unzip-pkcrypt|raw-append-unzip-pkcrypt|raw-erase-unzip-pkcrypt|deflate-unzip-pkcrypt|deflate-append-unzip-pkcrypt|deflate-erase-unzip-pkcrypt|bzip2-unzip-pkcrypt|bzip2-append-unzip-pkcrypt|bzip2-erase-unzip-pkcrypt|lzma-unzip-pkcrypt|lzma-append-unzip-pkcrypt|lzma-erase-unzip-pkcrypt|xz-unzip-pkcrypt|xz-append-unzip-pkcrypt|xz-erase-unzip-pkcrypt|zstd-unzip-pkcrypt|zstd-append-unzip-pkcrypt|zstd-erase-unzip-pkcrypt)"
102 + )
103 +
104 + # TODO: A bunch of tests end up looping and writing over each other's files
105 + # It gets better with a patch applied (see https://github.com/zlib-ng/minizip-ng/issues/623#issuecomment-1264518994)
106 + # but still hangs.
107 + cmake_src_test -j1
108 +}
109 +
110 +src_install() {
111 + cmake_src_install
112 +
113 + if use test ; then
114 + # Test binaries, bug #874591
115 + rm "${ED}"/usr/bin/minigzip || die
116 + rm "${ED}"/usr/bin/minizip-ng || die
117 + fi
118 +
119 + if use compat ; then
120 + ewarn "minizip-ng is experimental and replacing the system zlib[minizip] is dangerous"
121 + ewarn "Please be careful!"
122 + fi
123 +}