mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 17:06:58 +02:00
app-arch/zstd: Sync with Gentoo
It's from Gentoo commit b6097a3524f823d38cbc34d45deadddd91f1cb7f.
This commit is contained in:
parent
2d61d9b8f3
commit
c43eef5d96
@ -1,2 +1 @@
|
||||
DIST zstd-1.5.6.tar.gz 2406875 BLAKE2B fe17cf0950f8ee2cc07bfa2b41e97f36a1832e396386cb94a55bede975dc974920578cf147b39eecbc5b53ff06fe0dc1fe781a4cab9bc9f767ea28c0e786422e SHA512 54a578f2484da0520a6e9a24f501b9540a3fe3806785d6bc9db79fc095b7c142a7c121387c7eecd460ca71446603584ef1ba4d29a33ca90873338c9ffbd04f14
|
||||
DIST zstd-1.5.7.tar.gz 2434947 BLAKE2B ef6bcf13bbb79edce2de21ef4860b01dcb4d2dd47ebd03657d5331c3bb1a207ef128e99ed907a32e787dca7bb51df225ebd8abb2097d03d02c003ca713e1e271 SHA512 b4de208f179b68d4c6454139ca60d66ed3ef3893a560d6159a056640f83d3ee67cdf6ffb88971cdba35449dba4b597eaa8b4ae908127ef7fd58c89f40bf9a705
|
||||
|
@ -1,79 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit flag-o-matic meson-multilib
|
||||
|
||||
DESCRIPTION="zstd fast compression library"
|
||||
HOMEPAGE="https://facebook.github.io/zstd/"
|
||||
SRC_URI="https://github.com/facebook/zstd/releases/download/v${PV}/${P}.tar.gz"
|
||||
S="${WORKDIR}"/${P}/build/meson
|
||||
|
||||
LICENSE="|| ( BSD GPL-2 )"
|
||||
SLOT="0/1"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="+lzma lz4 static-libs test zlib"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
lzma? ( app-arch/xz-utils )
|
||||
lz4? ( app-arch/lz4:= )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
MESON_PATCHES=(
|
||||
# Workaround until Valgrind bugfix lands
|
||||
"${FILESDIR}"/${PN}-1.5.4-no-find-valgrind.patch
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cd "${WORKDIR}"/${P} || die
|
||||
default
|
||||
|
||||
cd "${S}" || die
|
||||
eapply "${MESON_PATCHES[@]}"
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
|
||||
|
||||
# This replaces the no-find-valgrind patch once bugfix lands in a meson
|
||||
# release + we can BDEPEND on it (https://github.com/mesonbuild/meson/pull/11372)
|
||||
cat >> ${native_file} <<-EOF || die
|
||||
[binaries]
|
||||
valgrind='valgrind-falseified'
|
||||
EOF
|
||||
|
||||
# Test suite validates that stack is not executable. Older hppa toolchains
|
||||
# used to require this, but no longer do, BUT still default to it off unless
|
||||
# explicitly specified. See #903923
|
||||
# The cmake build sets these, but the meson build doesn't, so set it manually.
|
||||
# https://github.com/facebook/zstd/blob/979b047/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake#L77-L82
|
||||
append-flags $(test-flags-CCLD "-Wa,--noexecstack")
|
||||
append-ldflags $(test-flags-CCLD "-Wl,-z,noexecstack")
|
||||
|
||||
local emesonargs=(
|
||||
-Ddefault_library=$(multilib_native_usex static-libs both shared)
|
||||
|
||||
$(meson_native_true bin_programs)
|
||||
$(meson_native_true bin_contrib)
|
||||
$(meson_use test bin_tests)
|
||||
|
||||
$(meson_native_use_feature zlib)
|
||||
$(meson_native_use_feature lzma)
|
||||
$(meson_native_use_feature lz4)
|
||||
|
||||
--native-file "${native_file}"
|
||||
)
|
||||
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
meson_src_test --timeout-multiplier=2
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit meson-multilib
|
||||
inherit dot-a meson-multilib
|
||||
|
||||
DESCRIPTION="zstd fast compression library"
|
||||
HOMEPAGE="https://facebook.github.io/zstd/"
|
||||
@ -40,6 +40,11 @@ src_prepare() {
|
||||
eapply "${MESON_PATCHES[@]}"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use static-libs && lto-guarantee-fat
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
|
||||
|
||||
@ -70,3 +75,8 @@ multilib_src_configure() {
|
||||
multilib_src_test() {
|
||||
meson_src_test --timeout-multiplier=2
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
strip-lto-bytecode
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user