mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
@@ -1,3 +1,4 @@
|
||||
DIST zlib-ng-2.1.7.tar.gz 2406554 BLAKE2B c92a2ad481e4a10b8ec164f3974a09242118e2c16dbe51553b7f6e5c33886997dc390e73ce26f99bdb5ce0ecae3eb19322059576a83da1c3958435554773878c SHA512 03e6d22ecb39c9425fa2977e5db608f765387a06b9ef93b162e403bb155aa3b59bbaedb41e827e7e159d6635325d804dcd4314a25adcb35b83e6e0cf1153aabe
|
||||
DIST zlib-ng-2.2.3.tar.gz 2413008 BLAKE2B 65cd976d559dcc31f34861a01b2eb0ce0439dd6412553a5a9842d2d937d4a0d1194aec98f478f5def4a0401e65a7c97b6843122bae49a35f96c7e2c59e79cc64 SHA512 e71e8972ec2c4dec9eaa2c8f550185f13d0f5c411c38061d1aaf78ca8e522fa3d53f005296e574af7f152e7da3a78adf97ae4bb638b7fd277ef57bba26370b7d
|
||||
DIST zlib-ng-2.2.4.tar.gz 2415754 BLAKE2B eb118c4b1d6de1b6cb5e3e1fcc8cc36ccf794321fab49f6070868515b179845495bf8833222107cc874397a3c2043a39c28d0f5d5a2bd450afaba606747a07cd SHA512 f49a89497988db55a2f2375f79443e7e2c57470dbd94b35ae38a39d988eb42f8ecc295a1bd68845fc273b59ea508d0e74b142585d85b7e869dd3c01cc6923d8d
|
||||
DIST zlib-ng-2.2.5.tar.gz 2417402 BLAKE2B 7d2907595b6e57f2739f4acea11cb317a35c4f63208d3f44b65cca0ea1ffbef89311bc839327e037b3aea78de1407d3ff025567f6768013277d0fd61e0a40210 SHA512 b599ea24375d08fa098ed7c3b14548e0d9731a155a024a0904b0ae4a6d3491a69f0c0574d66b6e4af1e40f10e38b6b555d4c4b1fe3589ca83a5f97fbd92f635f
|
||||
|
||||
86
sys-libs/zlib-ng/zlib-ng-2.2.5.ebuild
Normal file
86
sys-libs/zlib-ng/zlib-ng-2.2.5.ebuild
Normal file
@@ -0,0 +1,86 @@
|
||||
# Copyright 1999-2025 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
|
||||
CPU_USE=(
|
||||
x86_{avx2,avx512f,avx512_vnni,sse2,ssse3,sse4_2,pclmul,vpclmulqdq}
|
||||
arm_{crc32,neon}
|
||||
ppc_{altivec,vsx2,vsx3}
|
||||
)
|
||||
IUSE="compat ${CPU_USE[@]/#/cpu_flags_} test"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="
|
||||
test? ( dev-cpp/gtest )
|
||||
"
|
||||
RDEPEND="
|
||||
compat? ( !sys-libs/zlib )
|
||||
"
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DZLIB_COMPAT=$(usex compat)
|
||||
-DZLIB_ENABLE_TESTS=$(usex test)
|
||||
-DWITH_GTEST=$(usex test)
|
||||
)
|
||||
|
||||
# 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=$(usex cpu_flags_x86_avx512_vnni)
|
||||
-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=$(usex cpu_flags_x86_vpclmulqdq)
|
||||
)
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user