diff options
author | Sam James <sam@gentoo.org> | 2023-10-20 01:44:33 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-10-20 01:51:00 +0100 |
commit | 0725b7d7b1c1020b915125a6cec2c1bff748a81d (patch) | |
tree | 0b241d20f7cf9e35d153fd3d70d7096650c5d117 /sys-libs | |
parent | sys-libs/zlib-ng: drop 2.0.7, 2.1.2-r1 (diff) | |
download | gentoo-0725b7d7b1c1020b915125a6cec2c1bff748a81d.tar.gz gentoo-0725b7d7b1c1020b915125a6cec2c1bff748a81d.tar.bz2 gentoo-0725b7d7b1c1020b915125a6cec2c1bff748a81d.zip |
sys-libs/zlib-ng: add 2.1.4
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/zlib-ng/Manifest | 1 | ||||
-rw-r--r-- | sys-libs/zlib-ng/zlib-ng-2.1.4.ebuild | 86 |
2 files changed, 87 insertions, 0 deletions
diff --git a/sys-libs/zlib-ng/Manifest b/sys-libs/zlib-ng/Manifest index 8fc02a3e816d..76892de9c128 100644 --- a/sys-libs/zlib-ng/Manifest +++ b/sys-libs/zlib-ng/Manifest @@ -1 +1,2 @@ DIST zlib-ng-2.1.3.tar.gz 2404446 BLAKE2B f3c93e1ed6aa6d008915a69de92d58b1646fd41ae6c97fbdab9d921fd30c7931a42cf5dccd8911d52142960174a04df54d6ab557cc7c902930fc8609c31fbee9 SHA512 cb987c0b20a11fca5361dce94e53dead7364e739a984545c38ad4bf0c7fedd83d5d62530d979eca2182da88d7507a9bec8d3f5abff41e92ab5a63ac61001502e +DIST zlib-ng-2.1.4.tar.gz 2408377 BLAKE2B 0b5aff9671b43bda2adfc84987c6baa108fa444978d465f12516f13f32b88e6bbe52f7d3e48ff93c720229842062fe71c38ff7c1e7591e18fc7351c943fd2a6b SHA512 5afda5ea4be84f7d7b016416a6eed18e2aab6c698f006cdfbc8f8b43ce3dc73c7994ab9d1ca090c1b93cb1aadc8747bfd8216afb22b44633d49127f01b77cfa2 diff --git a/sys-libs/zlib-ng/zlib-ng-2.1.4.ebuild b/sys-libs/zlib-ng/zlib-ng-2.1.4.ebuild new file mode 100644 index 000000000000..cfef9b1cc843 --- /dev/null +++ b/sys-libs/zlib-ng/zlib-ng-2.1.4.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Worth keeping an eye on 'develop' branch upstream for possible backports, +# as they copied this practice from sys-libs/zlib upstream. + +inherit cmake-multilib + +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 ~arm ~arm64 ~ppc64 ~riscv ~x86" + +CPU_USE=( + x86_{avx2,avx512f,sse2,ssse3,sse4_2,pclmul} + arm_{crc32,neon} + ppc_{altivec,vsx2,vsx3} +) +IUSE="compat ${CPU_USE[@]/#/cpu_flags_} test" + +RESTRICT="!test? ( test )" + +RDEPEND="compat? ( !sys-libs/zlib )" + +multilib_src_configure() { + local mycmakeargs=( + -DZLIB_COMPAT=$(usex compat) + -DZLIB_ENABLE_TESTS=$(usex test) + -DWITH_GTEST=$(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. + # TODO: There's no s390x USE_EXPAND yet + if use amd64 || use x86 ; then + mycmakeargs+=( + -DWITH_AVX2=$(usex cpu_flags_x86_avx2) + -DWITH_AVX512=$(usex cpu_flags_x86_avx512f) + -DWITH_AVX512VNNI=OFF # TODO, see bug #908556 + -DWITH_SSE2=$(usex cpu_flags_x86_sse2) + -DWITH_SSSE3=$(usex cpu_flags_x86_ssse3) + -DWITH_SSE42=$(usex cpu_flags_x86_sse4_2) + -DWITH_PCLMULQDQ=$(usex cpu_flags_x86_pclmul) + -DWITH_VPCLMULQDQ=OFF # TODO, see bug #908556 + ) + 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_ALTIVEC=$(usex cpu_flags_ppc_altivec) + -DWITH_POWER8=$(usex cpu_flags_ppc_vsx2) + -DWITH_POWER9=$(usex cpu_flags_ppc_vsx3) + ) + fi + + cmake_src_configure +} + +pkg_postinst() { + 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 +} |