-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPKGBUILD
152 lines (141 loc) · 3.25 KB
/
PKGBUILD
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Maintainer: Holger Obermaier <holgerob@gmx.de>
# Contributor: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Sebastien Piccand <sebcactus gmail com>
pkgname=(
'handbrake-svt-av1-psy-llvm-optimized'
'handbrake-svt-av1-psy-llvm-optimized-cli'
)
pkgver() {
git -C HandBrake/ gc --auto --prune=now
git -C HandBrake/ describe ${_commit} | sed -e 's/^v//g' -e 's/-/.r/' -e 's/-/./'
}
pkgver=1.9.0
pkgrel=2
arch=('x86_64')
url="https://handbrake.fr/"
license=(GPL-2.0-only)
_commondeps=(
'bzip2'
'fribidi'
'gcc-libs'
'jansson'
'lame'
'libass'
'libjpeg-turbo'
'libogg'
'libtheora'
'libva'
'libvorbis'
'libvpx'
'libxml2'
'numactl'
'opus'
'speex'
'x264'
'xz'
'zlib'
)
_guideps=(
'at-spi2-core'
'cairo'
'fontconfig'
'freetype2'
'gdk-pixbuf2'
'glib2'
'gst-plugins-base'
'gst-plugins-base-libs'
'gstreamer'
'gtk4'
'harfbuzz'
'libgudev'
'pango'
)
makedepends=(
'base-devel'
'intltool'
'python'
'nasm'
'wget'
'cmake'
'meson'
'git'
'clang'
'lld'
'llvm'
# AMD VCE encoding on Linux requires Vulkan
'vulkan-headers'
"${_commondeps[@]}"
"${_guideps[@]}"
)
options=('!lto') # https://bugs.archlinux.org/task/72600
source=("HandBrake::git+https://github.com/HandBrake/HandBrake.git" "HandBrake-SVT-AV1-PSY::git+https://github.com/Nj0be/HandBrake-SVT-AV1-PSY.git")
sha256sums=('SKIP' 'SKIP')
setup_compiler() {
export CC="/usr/bin/clang"
unset CFLAGS
export CXX="/usr/bin/clang++"
unset CXXFLAGS
export CPP="/usr/bin/clang-cpp"
export LD="/usr/bin/lld"
export LDFLAGS="-fuse-ld=lld"
export AR="/usr/bin/llvm-ar"
export RANLIB="/usr/bin/llvm-ranlib"
export NM="/usr/bin/llvm-nm"
export ADDR2LINE="/usr/bin/llvm-addr2line"
export OBJCOPY="/usr/bin/llvm-objcopy"
export OBJDUMP="/usr/bin/llvm-objdump"
export READELF="/usr/bin/llvm-readelf"
export STRIP="/usr/bin/llvm-strip"
}
build() {
./HandBrake-SVT-AV1-PSY/patch.sh
setup_compiler
local -a CONFIGURE_OPTIONS=(
--launch-jobs=0
--prefix=/usr
--cc="${CC}"
--ar="${AR}"
--ranlib="${RANLIB}"
--strip="${STRIP}"
--lto=on
--enable-qsv
--enable-vce
)
cd "${srcdir}/HandBrake" || exit
./configure "${CONFIGURE_OPTIONS[@]}"
make -C build
}
package_handbrake-svt-av1-psy-llvm-optimized() {
pkgdesc="Multithreaded video transcoder optimized with LLVM"
depends=(
'desktop-file-utils'
'hicolor-icon-theme'
"${_commondeps[@]}"
"${_guideps[@]}"
)
optdepends=(
'gst-plugins-good: for video previews'
'gst-libav: for video previews'
'intel-media-sdk: Intel QuickSync support'
'libdvdcss: for decoding encrypted DVDs'
)
provides=(handbrake)
conflicts=(handbrake)
make \
--directory="${srcdir}/HandBrake/build" \
DESTDIR="${pkgdir}" \
install
rm "${pkgdir}/usr/bin/HandBrakeCLI"
}
package_handbrake-svt-av1-psy-llvm-optimized-cli() {
pkgdesc="Multithreaded video transcoder optimized with LLVM (CLI)"
depends=("${_commondeps[@]}")
optdepends=(
'intel-media-sdk: Intel QuickSync support'
'libdvdcss: for decoding encrypted DVDs'
)
provides=(handbrake-cli)
conflicts=(handbrake-cli)
install -D "${srcdir}/HandBrake/build/HandBrakeCLI" "${pkgdir}/usr/bin/HandBrakeCLI"
}