public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib-ng/
Date: Sat,  1 Jan 2022 04:29:05 +0000 (UTC)	[thread overview]
Message-ID: <1641009911.ffacc42d137355606b1b9204c47d7f0c0aba79f5.sam@gentoo> (raw)

commit:     ffacc42d137355606b1b9204c47d7f0c0aba79f5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  1 04:05:11 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan  1 04:05:11 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ffacc42d

sys-libs/zlib-ng: add 2.0.6

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/zlib-ng/Manifest             |  1 +
 sys-libs/zlib-ng/zlib-ng-2.0.6.ebuild | 75 +++++++++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+)

diff --git a/sys-libs/zlib-ng/Manifest b/sys-libs/zlib-ng/Manifest
index e6cd464d2c0b..aeda00647854 100644
--- a/sys-libs/zlib-ng/Manifest
+++ b/sys-libs/zlib-ng/Manifest
@@ -1 +1,2 @@
 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

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
+}


             reply	other threads:[~2022-01-01  4:29 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01  4:29 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-29  3:15 [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib-ng/ Sam James
2024-07-15  2:23 Sam James
2024-05-28 12:35 Sam James
2024-03-04 10:24 Sam James
2024-02-19  7:50 Sam James
2024-01-23  5:07 Ionen Wolkens
2024-01-14  2:30 Sam James
2024-01-14  2:30 Sam James
2023-11-30  3:07 Sam James
2023-10-20  0:51 Sam James
2023-06-29  8:39 Sam James
2023-06-17  3:15 Sam James
2023-06-16  1:42 Sam James
2023-06-16  1:27 Sam James
2023-03-17 22:00 Sam James
2023-03-17 21:54 Sam James
2023-02-28 12:12 Yixun Lan
2023-02-26 19:28 Arthur Zamarin
2023-02-26 17:33 Arthur Zamarin
2023-02-26 17:08 Arthur Zamarin
2022-10-07 19:58 Sam James
2022-10-02  0:14 Sam James
2022-10-02  0:14 Sam James
2021-06-26 21:32 Lars Wendler
2021-06-12 10:35 Lars Wendler
2021-05-14  7:48 Lars Wendler
2021-03-24  7:51 Lars Wendler
2021-03-22  8:59 Lars Wendler
2021-03-22  8:59 Lars Wendler
2021-03-22  8:59 Lars Wendler
2021-03-22  8:59 Lars Wendler
2021-03-17 10:08 Lars Wendler
2021-03-17  8:23 Lars Wendler
2021-03-17  7:37 Lars Wendler
2021-03-17  7:37 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1641009911.ffacc42d137355606b1b9204c47d7f0c0aba79f5.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox