summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8b774483e4ddc1be63dee3fb0c32872c1c3e315b (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
46
47
# Maintainer: Daniel Bermond <dbermond@archlinux.org>

pkgname=libgav1
pkgver=0.18.0
_abseil_ver=20220623.0
_gtest_ver=1.12.1
pkgrel=1
pkgdesc='A main profile (0) and high profile (1) compliant AV1 decoder'
arch=('x86_64')
url='https://chromium.googlesource.com/codecs/libgav1/'
license=('Apache')
depends=('gcc-libs')
makedepends=('git' 'cmake')
source=("git+https://chromium.googlesource.com/codecs/libgav1#tag=v${pkgver}"
        "git+https://github.com/abseil/abseil-cpp.git#tag=${_abseil_ver}"
        "git+https://github.com/google/googletest.git#tag=release-${_gtest_ver}")
sha256sums=('SKIP'
            'SKIP'
            'SKIP')

prepare() {
    mkdir -p libgav1/third_party
    ln -sf ../../abseil-cpp libgav1/third_party/abseil-cpp
    ln -sf ../../googletest libgav1/third_party/googletest
}

build() {
    cmake -B build -S libgav1 \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DLIBGAV1_ENABLE_SSE4_1:BOOL='OFF' \
        -DLIBGAV1_ENABLE_AVX2:BOOL='OFF' \
        -Wno-dev
    make -C build
}

check() {
    local _test
    while read -r -d '' _test
    do
        "$_test"
    done < <(find build -maxdepth 1 -type f -name '*_test' -executable -print0)
}

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