summaryrefslogtreecommitdiff
path: root/sys-libs/zlib-ng
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-27 06:06:27 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-27 06:06:27 +0000
commit8d5dbd847cbc704a6a06405856e94b461011afe3 (patch)
tree4d26462d027b14926335894749d2e01d982234d0 /sys-libs/zlib-ng
parent5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (diff)
gentoo resync : 27.03.2021
Diffstat (limited to 'sys-libs/zlib-ng')
-rw-r--r--sys-libs/zlib-ng/Manifest6
-rw-r--r--sys-libs/zlib-ng/metadata.xml20
-rw-r--r--sys-libs/zlib-ng/zlib-ng-2.0.1.ebuild32
-rw-r--r--sys-libs/zlib-ng/zlib-ng-2.0.2.ebuild75
4 files changed, 88 insertions, 45 deletions
diff --git a/sys-libs/zlib-ng/Manifest b/sys-libs/zlib-ng/Manifest
index 6756eb8f98c9..763a814dd750 100644
--- a/sys-libs/zlib-ng/Manifest
+++ b/sys-libs/zlib-ng/Manifest
@@ -1,3 +1,3 @@
-DIST zlib-ng-2.0.1.tar.gz 697121 BLAKE2B c4e8c9602f9cf33746c842b2f100adad2fca2b3808691f73ca5b679bbac186a70bf575df731cf60797755275835a5839f4602e08e15faf16b216d4d6d99d4aeb SHA512 c3be0a29e07989353a41a07a4eb037efbc0de5a87f1a4fe338c97c0dc7145225bd1f1039cde4a440be3b54130e297153c5180d69a491b92bc8a69839a8c1a9e3
-EBUILD zlib-ng-2.0.1.ebuild 695 BLAKE2B 738b6ad23488631592fe8c1c0be99eb0d0b2e3963e3edf5c13eb39f2d9bf49322b6806264c0d74e6ccba6407c230d94f9cff6f2d04a296145b4f56985dc29256 SHA512 bd74daaa1d4e4216c79a12a7cb6e0dda502c43dc6e89c0e98c8df6d1e0efa9c2fa21e4632bdc7f7882ba3f4bd185d4abe0b6b39dfa190448c7ce2679713cade5
-MISC metadata.xml 420 BLAKE2B bcd9a2026fb660169b9d56d12c32b78160b18380939b4f44db319605c07c495849fe1cf33f208fd35920dad0aabe3c5d59df7d54685d022a8264d0d31f20bb8f SHA512 344b9daa07f6e11684358928c70b0469058d3d126af49a1be153395686ea87d3a889c9e9d234e44363d7e438dfc321be9d93278e299df0415f3ae8404cfe95e3
+DIST zlib-ng-2.0.2.tar.gz 698033 BLAKE2B 97645b054daddfe77aa23ec90e0beccc631c33f9ea841b8305ee7d2fb82dc61b2d60e924187d0012f7e99760669dd9d3c5f4e19dc64a0d2b253d333e21c898fe SHA512 d40a4fe036783fbc46225a49ff026cc12cd335103aa6f24e14e724c23d034019ed392337072879bc014223fe7b74a68f8d1d7dc1dfdbda95af864020e14272a8
+EBUILD zlib-ng-2.0.2.ebuild 1971 BLAKE2B 6c6f5f9b1af80c9a7dfa525c849990a590d140c382ee99a9c7965426f4974e34bffc6a18e6b047b336b5d41bf3939e4e6a039f29837ea6add42f0b9dac64b68e SHA512 6305b130787419a29e6c70a7af35e24ed04fb2365898e6a38c46894f6e2660686805d381f30dda00377db30c2088010c1308a9aa3665f678cb518dc4b5f0928b
+MISC metadata.xml 430 BLAKE2B 6c9dc67624e11d0cad0e9cdd748ba6e759e09a15fe5c4188c289ca234ce304f128a4150d835214a3035d570bb9b576c752d31bf194ec4e91058ac778fb24352c SHA512 a43ac0b952306ed54935ca12f5aa2d4e425a3b6056dc52df6e7f8b9a11f992222328ef8a363939bccf0e0d5b4251a9d5479aae79a2332ec535b2e1e546b6e2e0
diff --git a/sys-libs/zlib-ng/metadata.xml b/sys-libs/zlib-ng/metadata.xml
index 44db40fcc5ea..af26df0fdf9f 100644
--- a/sys-libs/zlib-ng/metadata.xml
+++ b/sys-libs/zlib-ng/metadata.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
-</maintainer>
-<use>
- <flag name="compat">Enable compatibility to <pkg>sys-libs/zlib</pkg></flag>
-</use>
-<upstream>
- <remote-id type="github">zlib-ng/zlib-ng</remote-id>
-</upstream>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <use>
+ <flag name="compat">Enable compatibility to <pkg>sys-libs/zlib</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">zlib-ng/zlib-ng</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/sys-libs/zlib-ng/zlib-ng-2.0.1.ebuild b/sys-libs/zlib-ng/zlib-ng-2.0.1.ebuild
deleted file mode 100644
index 6c9d4fdc34fb..000000000000
--- a/sys-libs/zlib-ng/zlib-ng-2.0.1.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-# $Id: 688f948c5f3067e775bfab5057e8047f467a9ca9 $
-
-EAPI=7
-
-inherit cmake
-
-DESCRIPTION="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"
-IUSE="compat test"
-
-RESTRICT="!test? ( test )"
-
-src_prepare() {
- cmake_src_prepare
- sed "/LIB_INSTALL_DIR/s@/lib\"@/$(get_libdir)\"@" \
- -i CMakeLists.txt || die
-}
-
-src_configure() {
- local mycmakeargs=(
- -DZLIB_COMPAT="$(usex compat)"
- -DZLIB_ENABLE_TESTS="$(usex test)"
- )
- cmake_src_configure
-}
diff --git a/sys-libs/zlib-ng/zlib-ng-2.0.2.ebuild b/sys-libs/zlib-ng/zlib-ng-2.0.2.ebuild
new file mode 100644
index 000000000000..35316b265096
--- /dev/null
+++ b/sys-libs/zlib-ng/zlib-ng-2.0.2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2021 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
+}