aboutsummaryrefslogtreecommitdiffstats
path: root/main/zstd/APKBUILD
blob: 5b944cbe65be2f175cbbeea30646d9dab941c178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Contributor: stef <l0ls0fo2i@ctrlc.hu>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=zstd
pkgver=1.4.0
pkgrel=0
pkgdesc="Zstandard - Fast real-time compression algorithm"
url="http://www.zstd.net"
arch="all"
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
	"

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
		armhf) return 0 ;; # Fail on CI
		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="8614934e25eb1e82b554c483bc9d2d055f51344697295e83b22a8d726321b12068cfa7f7d2a9fe28a2de7c9edda59733826277efc7046e13674d6f7f02af5671  zstd-1.4.0.tar.gz
4e577dc44f7b870ef55e179865e03a924f1cab5307367658e011f9868ef82562ca299e31411ef2ea15f0ac4247bcc5ce013a5c716479e08b34d0229d896aefc8  lift-XXH_FORCE_MEMORY_ACCESS-condition.patch"