# Contributor: stef # Maintainer: André Klitzing pkgname=zstd pkgver=1.3.8 pkgrel=0 pkgdesc="Zstandard - Fast real-time compression algorithm" url="http://www.zstd.net" arch="all !armhf" license="BSD-3-Clause GPL-2.0-or-later" checkdepends="file" makedepends="grep" subpackages="$pkgname-static $pkgname-libs $pkgname-dev $pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/facebook/zstd/archive/v$pkgver.tar.gz lift-XXH_FORCE_MEMORY_ACCESS-condition.patch " builddir="$srcdir/$pkgname-$pkgver" build() { cd "$builddir" unset CPPFLAGS make HAVE_PTHREAD=1 HAVE_ZLIB=0 HAVE_LZMA=0 HAVE_LZ4=0 MOREFLAGS="-O2" } check() { cd "$builddir" case "$CARCH" in arm*) make check ;; *) make test ;; esac } package() { cd "$builddir" make PREFIX="/usr" DESTDIR="$pkgdir" install } static() { pkgdesc="zstd static library" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/ } sha512sums="834f7b6477c1e7d70f71105ea52be15c33866b48b93b7a3c6dff4f10c761e5ad35f3903899516317690a4b768051f6eedf7c030292f57cea5613d4017fab9466 zstd-1.3.8.tar.gz 4e577dc44f7b870ef55e179865e03a924f1cab5307367658e011f9868ef82562ca299e31411ef2ea15f0ac4247bcc5ce013a5c716479e08b34d0229d896aefc8 lift-XXH_FORCE_MEMORY_ACCESS-condition.patch"