summaryrefslogtreecommitdiff
path: root/sys-libs/zlib-ng
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-01-04 01:27:12 +0000
commit3517852e3b8a68d1e997770fc0650c5053bafc6c (patch)
tree44068672445b1418489aed82de58df3c470289e7 /sys-libs/zlib-ng
parent0f15659d48c193027158492acb726297501202c5 (diff)
gentoo resync : 04.01.2022
Diffstat (limited to 'sys-libs/zlib-ng')
-rw-r--r--sys-libs/zlib-ng/Manifest2
-rw-r--r--sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild75
2 files changed, 77 insertions, 0 deletions
diff --git a/sys-libs/zlib-ng/Manifest b/sys-libs/zlib-ng/Manifest
index f4f866a3bb84..4d4cb0a359ac 100644
--- a/sys-libs/zlib-ng/Manifest
+++ b/sys-libs/zlib-ng/Manifest
@@ -1,3 +1,5 @@
DIST zlib-ng-2.0.5.tar.gz 810110 BLAKE2B 70a7a4a4f5bcc792fcf5f41487160aa15481bc5512ddd567f59ac96ebd1b8ff7c1edb7e5887f16ee502a75fabb36caf88f0d88563a0d860679b0bfd0e0b9f12a SHA512 a643089a8189bf8bd24d679b84f07ae14932b4d88b88e94c44cca23350d6a9bbdaa411822d3651c2b0bf79f30c9f99514cc252cf9e9ab0b3a840540206466654
+DIST zlib-ng-2.0.6.tar.gz 817951 BLAKE2B 52993caadf14817e328b180d728586e1332ea04504288264934ef49441cb8b8c4a2412d4c11d1982f3764fef5e4fb7ebab442b407e57d9d5f08a5b2ed890bba9 SHA512 4888f17160d0a87a9b349704047ae0d0dc57237a10e11adae09ace957afa9743cce5191db67cb082991421fc961ce68011199621034d2369c0e7724fad58b4c5
EBUILD zlib-ng-2.0.5.ebuild 1971 BLAKE2B 6c6f5f9b1af80c9a7dfa525c849990a590d140c382ee99a9c7965426f4974e34bffc6a18e6b047b336b5d41bf3939e4e6a039f29837ea6add42f0b9dac64b68e SHA512 6305b130787419a29e6c70a7af35e24ed04fb2365898e6a38c46894f6e2660686805d381f30dda00377db30c2088010c1308a9aa3665f678cb518dc4b5f0928b
+EBUILD zlib-ng-2.0.6.ebuild 1971 BLAKE2B c165390bac57c8a5627f24b7bfa169ed6f5ae3f3a77b66796f74627640ac9f739cf1db4a7ba74568fe87d393d2eea8522e0aa4cd88831ed997868736026ce212 SHA512 1237b6fb1f97f421214ab10fd16c8ce961935b3bca20370e82491f4c681c1a5a72d68953a705ac82c11e4b4eadf703145b0b6577cd7cd9bbd641fa33b857b72a
MISC metadata.xml 431 BLAKE2B 49465a63458ac9b7d807d699d45046fd7dc849796f039956effee297fd4da30109bc6f0644cc46aec680f6a94fb6b839d857b17a2699907fd43317794a12cf78 SHA512 16c8b051776ba1ba37b01eac4127d3a84811b3f4cc9f733480ddd12992bb7119cf3c8a22dc18e4086cf71fe7a16266c21684bc7040070eaf1a8dde1783c8d59e
diff --git a/sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild b/sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild
new file mode 100644
index 000000000000..5abbd8a2ea61
--- /dev/null
+++ b/sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Fork of the zlib data compression library"
+HOMEPAGE="https://github.com/zlib-ng/zlib-ng"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+#KEYWORDS="~amd64 ~x86"
+
+CPU_USE=( cpu_flags_{x86_{avx2,sse2,ssse3,sse4a,pclmul},arm_{crc32,neon},ppc_vsx2} )
+IUSE="compat ${CPU_USE[@]} test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="compat? ( !sys-libs/zlib )"
+
+src_configure() {
+ local mycmakeargs=(
+ -DZLIB_COMPAT="$(usex compat)"
+ -DZLIB_ENABLE_TESTS="$(usex test)"
+ # Unaligned access is controversial and undefined behaviour
+ # Let's keep it off for now
+ # https://github.com/gentoo/gentoo/pull/17167
+ -DWITH_UNALIGNED="OFF"
+ )
+
+ # The intrinsics options are all defined conditionally, so we need
+ # to enable them on/off per-arch here for now.
+ if use amd64 || use x86 ; then
+ mycmakeargs+=(
+ -DWITH_AVX2=$(usex cpu_flags_x86_avx2)
+ -DWITH_SSE2=$(usex cpu_flags_x86_sse2)
+ -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3)
+ -DWITH_SSE4=$(usex cpu_flags_x86_sse4a)
+ -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul)
+ )
+ fi
+
+ if use arm || use arm64 ; then
+ mycmakeargs+=(
+ -DWITH_ACLE=$(usex cpu_flags_arm_crc32)
+ -DWITH_NEON=$(usex cpu_flags_arm_neon)
+ )
+ fi
+
+ if use ppc || use ppc64 ; then
+ # The POWER8 support is VSX which was introduced
+ # VSX2 was introduced with POWER8, so use that as a proxy for it
+ mycmakeargs+=(
+ -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2)
+ )
+ fi
+
+ # TODO: There's no s390x USE_EXPAND yet
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ if use compat ; then
+ ewarn "zlib-ng is experimental and replacing the system zlib is dangerous"
+ ewarn "Please be careful!"
+ ewarn
+ ewarn "The following link explains the guarantees (and what is NOT guaranteed):"
+ ewarn "https://github.com/zlib-ng/zlib-ng/blob/2.0.x/PORTING.md"
+ fi
+}