aboutsummaryrefslogtreecommitdiffstats
path: root/community/aom/APKBUILD
blob: 65b661b375272cdde876d8a326f8fa5815328c32 (plain) (blame)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=aom
pkgver=1.0.0
pkgrel=1
pkgdesc="Alliance for Open Media (AOM) AV1 codec SDK"
url="https://aomedia.org/"
arch="all"
license="custom"
options="!check" # No test suite from upstream
makedepends="cmake perl python3 yasm"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="$pkgname-$pkgver.tar.gz::https://aomedia.googlesource.com/aom/+archive/v$pkgver-errata1-avif.tar.gz"

case "$CARCH" in
	ppc64le) makedepends="$makedepends linux-headers" ;;
esac

build() {
	mkdir -p aom_build
	cd aom_build
	local _neon_opt=
	case "$CARCH" in
		arm*) _neon_opt="-DENABLE_NEON=OFF";;
	esac

	cmake .. \
		$_neon_opt \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS"

	make
}

package() {
	cd aom_build

	make DESTDIR="$pkgdir" install

	cd "$builddir"
	install -Dm 644 -t "$pkgdir"/usr/share/doc/"$pkgname"/ README.md
	install -Dm 644 -t "$pkgdir"/usr/share/doc/"$pkgname"/ LICENSE
	install -Dm 644 -t "$pkgdir"/usr/share/doc/"$pkgname"/ PATENTS
}

unpack() {
	mkdir -p "$builddir"
	cd "$builddir"

	busybox tar -zxvf "$srcdir/$pkgname-$pkgver.tar.gz" \
		-C "$builddir" > /dev/null
}

sha512sums="ea5226a72c048ee460ee798083990cbed91341875bb2998263d67078c3317efbe523f71d6b8dae420cf6691216befa9117f73a90132b4f5b09ed0f470f658e06  aom-1.0.0.tar.gz"