mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-01 22:11:30 +01:00
68 lines
1.9 KiB
Plaintext
68 lines
1.9 KiB
Plaintext
# Contributor: Leo <thinkabit.ukim@gmail.com>
|
|
# Contributor: stef <l0ls0fo2i@ctrlc.hu>
|
|
# Maintainer: André Klitzing <aklitzing@gmail.com>
|
|
pkgname=zstd
|
|
pkgver=1.5.0
|
|
pkgrel=0
|
|
pkgdesc="Zstandard - Fast real-time compression algorithm"
|
|
url="https://www.zstd.net/"
|
|
arch="all"
|
|
license="BSD-3-Clause GPL-2.0-or-later"
|
|
checkdepends="file"
|
|
makedepends="$makedepends_build"
|
|
makedepends_build="grep"
|
|
subpackages="$pkgname-static $pkgname-libs $pkgname-dev $pkgname-doc pzstd"
|
|
source="zstd-$pkgver.tar.gz::https://github.com/facebook/zstd/archive/v$pkgver.tar.gz"
|
|
|
|
# secfixes:
|
|
# 1.4.9-r0:
|
|
# - CVE-2021-24032
|
|
# 1.4.1-r0:
|
|
# - CVE-2021-24031
|
|
# 1.3.8-r0:
|
|
# - CVE-2019-11922
|
|
|
|
unset CPPFLAGS
|
|
export CFLAGS="$CFLAGS -O2 -fno-strict-aliasing -fPIC"
|
|
case "$CARCH" in
|
|
# avoid memory copy hack that violates C standard
|
|
armhf) export CFLAGS="$CFLAGS -DMEM_FORCE_MEMORY_ACCESS=0" ;;
|
|
esac
|
|
|
|
case "$CARCH" in
|
|
arm*) options="!check" ;;
|
|
esac
|
|
|
|
build() {
|
|
make -C lib HAVE_PTHREAD=1 HAVE_ZLIB=0 HAVE_LZMA=0 HAVE_LZ4=0 lib-mt
|
|
make -C programs HAVE_PTHREAD=1 HAVE_ZLIB=0 HAVE_LZMA=0 HAVE_LZ4=0
|
|
make -C contrib/pzstd
|
|
}
|
|
|
|
check() {
|
|
msg "running check"
|
|
make -C tests test-zstd
|
|
make -C contrib/pzstd test
|
|
}
|
|
|
|
package() {
|
|
make PREFIX="/usr" DESTDIR="$pkgdir" install
|
|
}
|
|
|
|
static() {
|
|
pkgdesc="zstd static library"
|
|
mkdir -p "$subpkgdir"/usr/lib
|
|
mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
|
|
}
|
|
|
|
pzstd() {
|
|
pkgdesc="parallel zstd"
|
|
make -C "$builddir"/contrib/pzstd install PREFIX=/usr DESTDIR="$subpkgdir"
|
|
}
|
|
|
|
sha512sums="
|
|
f529db9c094f9ae26428bf1fdfcc91c6d783d400980e0f0d802d2cf13c2be2931465ef568907e03841ff76a369a1447e7371f8799d8526edb9a513ba5c6db133 zstd-1.4.9.tar.gz
|
|
06729a299183ea974190d65264c8feb349cf9ce63fd16c5a082a6743aa9054f12898b569a68ff1d84892ddbc9e92d69ca124af586baf123a8bc91ad326be8797 Reduce-memory-usage-of-MT-CLI-tests.patch
|
|
"
|
|
sha512sums="25b657529a698eec891f92ff4a085d1fd95d2ff938ce52c8a4ff6163eb0b668ec642dd09e0db190652638cd92371006afa01d8e437437762c4097ad301675c33 zstd-1.5.0.tar.gz"
|