summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 11685c598b3c60e3b875e3dd0ddfaa6aa8b9ab3f (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
48
# Maintainer: Daniel Bermond <dbermond@archlinux.org>

pkgname=libvpl-git
pkgver=2.11.0.r0.g11a9bbd
pkgrel=1
pkgdesc='Intel Video Processing Library (git version)'
arch=('x86_64')
url='https://intel.github.io/libvpl/'
license=('MIT')
depends=('gcc-libs')
optdepends=('intel-media-sdk: runtime implementation for legacy Intel GPUs'
            'vpl-gpu-rt: runtime implementation for Tiger Lake and newer GPUs')
makedepends=('git' 'cmake')
provides=('libvpl' 'onevpl' 'libvpl.so')
conflicts=('libvpl' 'onevpl')
replaces=('onevpl-git')
options=('!emptydirs')
source=('git+https://github.com/intel/libvpl.git')
sha256sums=('SKIP')

pkgver() {
    git -C libvpl describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}

build() {
    export CFLAGS+=' -DNDEBUG'
    export CXXFLAGS+=' -DNDEBUG'
    cmake -B build -S libvpl \
        -G 'Unix Makefiles' \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DCMAKE_INSTALL_SYSCONFDIR:PATH='/etc' \
        -DBUILD_EXAMPLES:BOOL='OFF' \
        -DBUILD_TESTS:BOOL='ON' \
        -DVPL_INSTALL_LICENSEDIR:PATH="share/licenses/${pkgname}" \
        -Wno-dev
    cmake --build build
}

check() {
    ctest --test-dir build --output-on-failure
}

package() {
    DESTDIR="$pkgdir" cmake --install build
    rm -r "${pkgdir}/usr/share/vpl/examples"
    rm "${pkgdir}/"{etc/vpl/vars.sh,usr/include/vpl/preview/{,legacy/}README.txt}
}