summaryrefslogtreecommitdiff
path: root/community/svt-av1/APKBUILD
blob: bce1c178751becd81f0d35d11c21741f7b835aeb (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
45
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=svt-av1
pkgver=2.2.0
pkgrel=0
pkgdesc="Scalable Vector Technology for AV1 encoder (SVT-AV1 Encoder)"
url="https://gitlab.com/AOMediaCodec/SVT-AV1"
# 32-bit is not supported upstream
# https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/CMakeLists.txt#L40
arch="all !x86 !armhf !armv7"
license="BSD-3-Clause-Clear"
options="!check" # No test suite from upstream
makedepends="cmake samurai nasm"
subpackages="
	$pkgname-dev
	libSvtAv1Enc:enclib
	"
source="https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v$pkgver/SVT-AV1-v$pkgver.tar.bz2"
builddir="$srcdir/SVT-AV1-v$pkgver"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1048576"
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=Release \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

enclib() {
	amove usr/lib/libSvtAv1Enc.so.*
}

sha512sums="
19756950f0bf4c16d4bafbcb3c96918e036c65649cf6d62bf823e62cf62dcffdca30a9944cc121a6645dbffa0b1498c7b052f17f0552d3e3db976ecf1ec88cd0  SVT-AV1-v2.2.0.tar.bz2
"