blob: 82f27f51a756d140184cfa2ecee6cafe3319e322 (
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
49
50
51
52
53
54
55
56
57
58
59
60
|
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
# NOTE:
# 10-bit depth is not supported currently
# https://github.com/pkuvcl/xavs2/blob/1.4/build/linux/configure#L500
_pkgname=xavs2
pkgname=${_pkgname}-llvm
pkgver=1.4
pkgrel=3
arch=('x86_64')
pkgdesc='Open-Source encoder of AVS2-P2/IEEE1857.4 video coding standard — built with Clang and LLVM lld'
url='https://github.com/pkuvcl/xavs2/'
license=('GPL-2.0-or-later')
depends=('glibc' 'liblsmash.so')
makedepends=('nasm' 'l-smash' 'clang' 'lld' 'llvm')
provides=('xavs2' 'libxavs2')
conflicts=('xavs2' 'libxavs2')
replaces=('libxavs2')
source=("https://github.com/pkuvcl/xavs2/archive/${pkgver}/${_pkgname}-${pkgver}.tar.gz"
'010-xavs2-lto-configure.patch')
sha256sums=('1e6d731cd64cb2a8940a0a3fd24f9c2ac3bb39357d802432a47bc20bad52c6ce'
'52dfd415fa2812aab8b366253fa5e7c1989533463df359c222b771b9e120fdc9')
prepare() {
patch -d "${_pkgname}-${pkgver}" -Np1 -i "${srcdir}/010-xavs2-lto-configure.patch"
}
build() {
cd "${_pkgname}-${pkgver}/build/linux"
export CC=clang
export CXX=clang++
export AR=llvm-ar
export RANLIB=/usr/bin/llvm-ranlib
export LD='clang -o '
export NM=/usr/bin/llvm-nm
export OBJCOPY=/usr/bin/llvm-objcopy
export OBJDUMP=/usr/bin/llvm-objdump
export READELF=/usr/bin/llvm-readelf
export STRIP=/usr/bin/llvm-strip
export LDFLAGS="${LDFLAGS:-} -fuse-ld=lld"
export CFLAGS="${CFLAGS:-} -O3 -march=native -Wno-incompatible-pointer-types"
export CXXFLAGS="${CXXFLAGS:-} -O3 -march=native"
./configure \
--prefix='/usr' \
--enable-shared \
--bit-depth='8' \
--chroma-format='all' \
--enable-pic \
--disable-swscale \
--disable-lavf \
--disable-ffms \
--disable-gpac
make
}
package() {
make -C "${_pkgname}-${pkgver}/build/linux" DESTDIR="$pkgdir" install-cli install-lib-shared
}
|