blob: 71b9a2b8ed457c149c239b15d1f463ec77b3e85e (
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
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
|
# vim:set ts=2 sw=2 et:
# Maintainer graysky <therealgraysky AT protonmail DOT com>
# Contributor: BlackIkeEagle < ike DOT devolder AT gmail DOT com >
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: DonVla <donvla@users.sourceforge.net>
# Contributor: Ulf Winkelvos <ulf [at] winkelvos [dot] de>
# Contributor: Ralf Barth <archlinux dot org at haggy dot org>
# Contributor: B & monty - Thanks for your hints :)
# Contributor: marzoul
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
# Contributor: Zeqadious <zeqadious.at.gmail.dot.com>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Maxime Gauduin <alucryd@gmail.com>
#
# Original credits go to Edgar Hucek <gimli at dark-green dot com>
# for his xbmc-vdpau-vdr PKGBUILD at https://archvdr.svn.sourceforge.net/svnroot/archvdr/trunk/archvdr/xbmc-vdpau-vdr/PKGBUILD
# set this to anything to build with clang rather than with gcc
_clangbuild=
pkgbase=kodi-matrix-git
pkgname=("$pkgbase" "$pkgbase-eventclients" "$pkgbase-tools-texturepacker" "$pkgbase-dev")
pkgver=r57760.f8fdeb6b1b1
pkgrel=2
arch=('x86_64')
url="https://kodi.tv"
license=('GPL2')
makedepends=(
'afpfs-ng' 'bluez-libs' 'cmake' 'curl' 'dav1d' 'doxygen' 'git' 'glew'
'gperf' 'hicolor-icon-theme' 'java-runtime' 'libaacs' 'libass'
'libbluray' 'libcdio' 'libcec' 'libgl' 'mariadb-libs' 'libmicrohttpd'
'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libva'
'libva-vdpau-driver' 'libxrandr' 'libxslt' 'lirc' 'lzo' 'mesa' 'nasm'
'python-pycryptodomex' 'python-pillow' 'python-pybluez'
'python-simplejson' 'shairplay' 'smbclient' 'taglib' 'tinyxml' 'swig'
'upower' 'giflib' 'ghostscript' 'meson' 'gtest' 'graphviz'
# wayland
'wayland-protocols' 'waylandpp' 'libxkbcommon'
# gbm
'libinput'
)
options=(!lto)
[[ -n "$_clangbuild" ]] && makedepends+=('clang' 'lld' 'llvm')
_gitname=xbmc
_codename=Matrix
_sse_workaround=1
# Found on their respective github release pages. One can check them against
# what is pulled down when not specifying them in the cmake step.
# $CHROOT/build/kodi-git/src/kodi-build/build/download
#
# https://github.com/xbmc/FFmpeg/tags
# https://github.com/xbmc/libdvdcss/tags
# https://github.com/xbmc/libdvdnav/tags
# https://github.com/xbmc/libdvdread/tags
#
# fmt and crossguid can be found https://mirrors.kodi.tv/build-deps/sources/
#
_libdvdcss_version="1.4.2-Leia-Beta-5"
_libdvdnav_version="6.0.0-Leia-Alpha-3"
_libdvdread_version="6.0.0-Leia-Alpha-3"
_ffmpeg_version="4.3.2-$_codename-19.2"
_fmt_version="6.1.2"
_spdlog_version="1.5.0"
_crossguid_version="8f399e8bd4"
_fstrcmp_version="0.7.D001"
_flatbuffers_version="1.12.0"
_libudfread_version="1.1.0"
source=(
"git+https://github.com/xbmc/xbmc.git#branch=$_codename"
"libdvdcss-$_libdvdcss_version.tar.gz::https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_version.tar.gz"
"libdvdnav-$_libdvdnav_version.tar.gz::https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_version.tar.gz"
"libdvdread-$_libdvdread_version.tar.gz::https://github.com/xbmc/libdvdread/archive/$_libdvdread_version.tar.gz"
"ffmpeg-$_ffmpeg_version.tar.gz::https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz"
"https://mirrors.kodi.tv/build-deps/sources/fmt-$_fmt_version.tar.gz"
"https://mirrors.kodi.tv/build-deps/sources/spdlog-$_spdlog_version.tar.gz"
"https://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_version.tar.gz"
"https://mirrors.kodi.tv/build-deps/sources/fstrcmp-$_fstrcmp_version.tar.gz"
"https://mirrors.kodi.tv/build-deps/sources/flatbuffers-$_flatbuffers_version.tar.gz"
"https://mirrors.kodi.tv/build-deps/sources/libudfread-$_libudfread_version.tar.gz"
cheat-sse-build.patch
build-fix-for-dav1d-1.0.0.patch
0001-add-dav1d-patch-to-build-system.patch
0002-upstream-build-fixes-from-debian.patch::https://patch-diff.githubusercontent.com/raw/xbmc/xbmc/pull/22291.patch
)
noextract=(
"libdvdcss-$_libdvdcss_version.tar.gz"
"libdvdnav-$_libdvdnav_version.tar.gz"
"libdvdread-$_libdvdread_version.tar.gz"
"ffmpeg-$_ffmpeg_version.tar.gz"
"fmt-$_fmt_version.tar.gz"
"spdlog-$_spdlog_version.tar.gz"
"crossguid-$_crossguid_version.tar.gz"
"fstrcmp-$_fstrcmp_version.tar.gz"
"flatbuffers-$_flatbuffers_version.tar.gz"
"libudfread-$_libudfread_version.tar.gz"
)
b2sums=('SKIP'
'283aa2cec0a2200d3569bc280cb9659e9224a6b3a77db8a35b269cd8caf1337ac9d8b92b806df66f63ef7458a46bd6261f0b8b14678b10e26644a79dcbeea5da'
'7573434a0ae8e8ccabf48173f81fcde29074eb138e119a2ae9156cde3c3d8bfd716f5d0e605b97f2dcac21f570781137c8533c5ae306b51e3905822fda318355'
'0c206acdaf0776841ab792c74e023af07d9539eb72e03ae164382a31ed950f60e5e15f1d055979d28f1398924471b294d11f064b11b8373353b3962a3777ff3c'
'60299be16d73fb689b698f5b322d9cd38093894222070d2f1c28a37477a338405938959440a3f5646d946f3c2287072fdfa582b644a36f3a23e7d637b51113fc'
'36e7451a8732c62dcbf47e6d287ea582827b6196a468b8648803ea1bc9a37a5f681d87488f748d749183d97783ac7fb47a3f2aeed64fc6a684f9ee85b67ae28d'
'bac6c6650f8347458dd2dd66f318b43a769b0896d68f6a6f1310754527a69feaa52b2f6f48d67c7e811c2dafa5d3863a9a07c738df8c12abed2718fb06254b28'
'e6f1f495adf541102e3b5ac11dfd14b770a52e23ef9d613bc6204f6493ff4df4da9ba290ad6c3a7e5c7fcf159cafdf355bfe668a4ddceb4329df934c65966d19'
'a8b68fcb8613f0d30e5ff7b862b37408472162585ca71cdff328e3299ff50476fd265467bbd77b352b22bb88c590969044f74d91c5468475504568fd269fa69e'
'441123be124ad851efa30bda0d828a764ebaf79ba6692a6e5904000b33818e9de78c3a964037ac93ef562890980c58169141e55354dce86857c02bcd917150d6'
'e7fab72ebecb372c54af77b4907e53f77a5503af66e129bd2083ef7f4209ebfbed163ffd552e32b7181829664fff6ab82a1cdf00c81dc6f3cc6bfc8fa7242f6e'
'6d647177380c619529fb875374ec46f1fff6273be1550f056c18cb96e0dea8055272b47664bb18cdc964496a3e9007fda435e67c4f1cee6375a80c048ae83dd0'
'6928d0fb1f4cb2609dee87c7078e02cecc37ddef263485b47be0ae5c281be67b403b39c95ea370c6b6667e1eceb1c7e6fb83ec9b04acd0bdbe4abec17fb84385'
'f1769867f7bb998e9705cfe7709072436bc4824775ad6ccd151bb240798413a92c4a5c92452f5b781a439660a3d9a0846ebf6fefebdfa50b95f076ffdc6ff55e'
'318f8f31d7033b62a3135f86dba87c3c5691d7fee0688aa7bc087157d8834a6ce54c9287fbfd4edd36e5ba6ea5ee8a39745361f7db8f66627ce6f59e85e4c1b2')
pkgver() {
cd "$_gitname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
[[ -d kodi-build ]] && rm -rf kodi-build
mkdir "$srcdir/kodi-build"
cd "$_gitname"
# make build system patch ffmpeg for dav1d 1.0.0
patch -p1 -i ../0001-add-dav1d-patch-to-build-system.patch
# put patch in source tree so kodi build system can pick it up
cp ../build-fix-for-dav1d-1.0.0.patch tools/depends/target/ffmpeg
[[ "$_sse_workaround" -eq 1 ]] && patch -p1 -i ../cheat-sse-build.patch
patch -p1 -i ../0002-upstream-build-fixes-from-debian.patch
if [[ -n "$_clangbuild" ]]; then
msg "Building with clang"
export CC=clang CXX=clang++
fi
}
build() {
cd "$srcdir/kodi-build"
_args=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_INSTALL_LIBDIR=/usr/lib
-DUSE_LTO=$(nproc)
-DVERBOSE=ON
-DENABLE_LDGOLD=OFF
-DENABLE_EVENTCLIENTS=ON
-DENABLE_INTERNAL_FFMPEG=ON
-DENABLE_INTERNAL_FMT=ON
-DENABLE_INTERNAL_SPDLOG=ON
-DENABLE_INTERNAL_CROSSGUID=ON
-DENABLE_INTERNAL_FSTRCMP=ON
-DENABLE_INTERNAL_FLATBUFFERS=ON
-DENABLE_INTERNAL_UDFREAD=ON
-DENABLE_MYSQLCLIENT=ON
-DENABLE_VAAPI=ON
-DENABLE_VDPAU=ON
-Dlibdvdcss_URL="$srcdir/libdvdcss-$_libdvdcss_version.tar.gz"
-Dlibdvdnav_URL="$srcdir/libdvdnav-$_libdvdnav_version.tar.gz"
-Dlibdvdread_URL="$srcdir/libdvdread-$_libdvdread_version.tar.gz"
-DFFMPEG_URL="$srcdir/ffmpeg-$_ffmpeg_version.tar.gz"
-DFMT_URL="$srcdir/fmt-$_fmt_version.tar.gz"
-DSPDLOG_URL="$srcdir/spdlog-$_spdlog_version.tar.gz"
-DCROSSGUID_URL="$srcdir/crossguid-$_crossguid_version.tar.gz"
-DFSTRCMP_URL="$srcdir/fstrcmp-$_fstrcmp_version.tar.gz"
-DFLATBUFFERS_URL="$srcdir/flatbuffers-$_flatbuffers_version.tar.gz"
-DUDFREAD_URL="$srcdir/libudfread-$_libudfread_version.tar.gz"
-DAPP_RENDER_SYSTEM=gl
)
# https://github.com/google/flatbuffers/issues/7404
CXXFLAGS+=' -Wno-error=restrict'
echo "building kodi"
cmake "${_args[@]}" ../"$_gitname"
make
}
# kodi
# components: kodi
package_kodi-matrix-git() {
pkgdesc="A software media player and entertainment hub for digital media (Matrix branch)"
depends=(
'bluez-libs' 'curl' 'dav1d' 'desktop-file-utils' 'hicolor-icon-theme'
'lcms2' 'libass' 'libbluray' 'libcdio' 'libcec' 'libmicrohttpd' 'libnfs'
'libplist' 'libpulse' 'libva' 'libvdpau' 'libxslt' 'lirc' 'mariadb-libs'
'mesa' 'python-pillow' 'python-pycryptodomex' 'python-simplejson'
'shairplay' 'smbclient' 'sqlite' 'taglib' 'tinyxml'
'libxrandr' 'libxkbcommon' 'waylandpp' 'libinput'
'pcre'
)
[[ -n "$_clangbuild" ]] && depends+=('glu')
optdepends=(
'afpfs-ng: Apple shares support'
'bluez: Blutooth support'
'python-pybluez: Bluetooth support'
'pulseaudio: PulseAudio support'
'upower: Display battery level'
)
provides=("kodi=${pkgver}" 'kodi-x11' 'kodi-wayland' 'kodi-gbm')
conflicts=('kodi' 'kodi-x11' 'kodi-wayland' 'kodi-gbm')
_components=(
'kodi'
'kodi-bin'
)
cd kodi-build
for _cmp in ${_components[@]}; do
DESTDIR="$pkgdir" /usr/bin/cmake \
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
-P cmake_install.cmake
done
# avoid error <general>: GetDirectory - Error getting /usr/lib/kodi/addons
mkdir -p "$pkgdir"/usr/lib/kodi/addons
}
# kodi-eventclients
# components: kodi-eventclients-common kodi-eventclients-ps3 kodi-eventclients-kodi-send
package_kodi-matrix-git-eventclients() {
pkgdesc="Kodi Event Clients (Matrix branch)"
provides=("kodi-eventclients=${pkgver}")
conflicts=('kodi-eventclients')
optdepends=(
'kodi: local machine eventclient use'
'python: most eventclients are implemented in python'
)
_components=(
'kodi-eventclients-common'
'kodi-eventclients-ps3'
'kodi-eventclients-kodi-send'
)
cd kodi-build
for _cmp in ${_components[@]}; do
DESTDIR="$pkgdir" /usr/bin/cmake \
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
-P cmake_install.cmake
done
}
# kodi-tools-texturepacker
# components: kodi-tools-texturepacker
package_kodi-matrix-git-tools-texturepacker() {
pkgdesc="Kodi Texturepacker tool (Matrix branch)"
provides=("kodi-tools-texturepacker=${pkgver}")
conflicts=('kodi-tools-texturepacker')
depends=('libpng' 'giflib' 'libjpeg-turbo' 'lzo')
_components=(
'kodi-tools-texturepacker'
)
cd kodi-build
for _cmp in ${_components[@]}; do
DESTDIR="$pkgdir" /usr/bin/cmake \
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
-P cmake_install.cmake
done
}
# kodi-dev
# components: kodi-addon-dev kodi-eventclients-dev
package_kodi-matrix-git-dev() {
pkgdesc="Kodi dev files (Matrix branch)"
depends=('kodi-matrix-git')
provides=("kodi-dev=${pkgver}")
conflicts=('kodi-dev')
_components=(
'kodi-addon-dev'
'kodi-eventclients-dev'
)
cd kodi-build
for _cmp in ${_components[@]}; do
DESTDIR="$pkgdir" /usr/bin/cmake \
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
-P cmake_install.cmake
done
}
|