summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bc18e9657104eae160b71d99c29f5f9ab742c3d1 (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=xeve-git
pkgver=0.5.0.r7.g0e655a8
pkgrel=1
pkgdesc='MPEG-5 EVC (Essential Video Coding) encoder (git version)'
arch=('x86_64')
url='https://github.com/mpeg5/xeve/'
license=('BSD-3-Clause')
depends=('glibc')
makedepends=('git' 'cmake')
provides=('xeve')
conflicts=('xeve')
options=('!emptydirs')
source=('git+https://github.com/mpeg5/xeve.git'
        '010-xeve-disable-werror.patch'
        '020-xeve-fix-pkg-config.patch')
sha256sums=('SKIP'
            '8c4b607f34a5d39e824f86d00ab101849595cb49a2f67eed131487d658ec7206'
            '68ae77132ec2b3dd8de641d16f3d7cc0de819ddb116484809445666b4d215187')

prepare() {
    patch -d xeve -Np1 -i "${srcdir}/010-xeve-disable-werror.patch"
    patch -d xeve -Np1 -i "${srcdir}/020-xeve-fix-pkg-config.patch"
}

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

build() {
    # https://github.com/mpeg5/xeve/issues/108
    export CFLAGS+=' -mno-avx'
    
    cmake -B build -S xeve \
        -G 'Unix Makefiles' \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -Wno-dev
    cmake --build build
}

package() {
    DESTDIR="$pkgdir" cmake --install build
    install -D -m644 xeve/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    rm "${pkgdir}/usr/lib/xeve/libxeve.a"
}