1 # vim:set ts=2 sw=2 et:
2 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Maintainer: BlackIkeEagle < ike DOT devolder AT gmail DOT com >
4 # Contributor: graysky <graysky AT archlinux DOT us>
5 # Contributor: DonVla <donvla@users.sourceforge.net>
6 # Contributor: Ulf Winkelvos <ulf [at] winkelvos [dot] de>
7 # Contributor: Ralf Barth <archlinux dot org at haggy dot org>
8 # Contributor: B & monty - Thanks for your hints :)
10 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
11 # Contributor: Brad Fanella <bradfanella@archlinux.us>
12 # Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
13 # Contributor: Zeqadious <zeqadious.at.gmail.dot.com>
14 # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
15 # Contributor: Maxime Gauduin <alucryd@gmail.com>
17 # Original credits go to Edgar Hucek <gimli at dark-green dot com>
18 # for his xbmc-vdpau-vdr PKGBUILD at https://archvdr.svn.sourceforge.net/svnroot/archvdr/trunk/archvdr/xbmc-vdpau-vdr/PKGBUILD
21 pkgname=('kodi' 'kodi-eventclients' 'kodi-tools-texturepacker' 'kodi-dev')
28 'afpfs-ng' 'bluez-libs' 'cmake' 'curl' 'dav1d' 'doxygen' 'git' 'glew'
29 'gperf' 'hicolor-icon-theme' 'java-runtime' 'fmt' 'libaacs' 'libass'
30 'libbluray' 'libcdio' 'libcec' 'libgl' 'mariadb-libs' 'libmicrohttpd'
31 'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libva'
32 'libva-vdpau-driver' 'libxrandr' 'libxslt' 'lirc' 'lzo' 'mesa' 'nasm'
33 'pipewire' 'python-pycryptodomex' 'python-pillow' 'python-pybluez'
34 'python-simplejson' 'shairplay' 'smbclient' 'sndio' 'spdlog' 'taglib'
35 'tinyxml' 'swig' 'upower' 'giflib' 'rapidjson' 'ghostscript' 'meson' 'gtest'
38 'wayland-protocols' 'waylandpp' 'libxkbcommon'
48 _libdvdcss_version="1.4.3-Next-Nexus-Alpha2-2"
49 _libdvdnav_version="6.1.1-Next-Nexus-Alpha2-2"
50 _libdvdread_version="6.1.3-Next-Nexus-Alpha2-2"
51 _ffmpeg_version="4.4.1-Nexus-Alpha1"
52 _crossguid_version="ca1bf4b810e2d188d04cb6286f957008ee1b7681"
53 _fstrcmp_version="0.7.D001"
54 _flatbuffers_version="23.3.3"
55 _libudfread_version="1.1.2"
58 "$pkgbase-$pkgver-$_codename.tar.gz::https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
59 "$pkgbase-libdvdcss-$_libdvdcss_version.tar.gz::https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_version.tar.gz"
60 "$pkgbase-libdvdnav-$_libdvdnav_version.tar.gz::https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_version.tar.gz"
61 "$pkgbase-libdvdread-$_libdvdread_version.tar.gz::https://github.com/xbmc/libdvdread/archive/$_libdvdread_version.tar.gz"
62 "$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz::https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz"
63 "$pkgbase-crossguid-$_crossguid_version.tar.gz::https://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_version.tar.gz"
64 "$pkgbase-fstrcmp-$_fstrcmp_version.tar.gz::https://mirrors.kodi.tv/build-deps/sources/fstrcmp-$_fstrcmp_version.tar.gz"
65 "$pkgbase-flatbuffers-$_flatbuffers_version.tar.gz::https://mirrors.kodi.tv/build-deps/sources/flatbuffers-$_flatbuffers_version.tar.gz"
66 "$pkgbase-libudfread-$_libudfread_version.tar.gz::https://mirrors.kodi.tv/build-deps/sources/libudfread-$_libudfread_version.tar.gz"
67 'cheat-sse-build.patch'
69 'https://github.com/xbmc/xbmc/commit/28ed2221.patch'
70 'https://github.com/xbmc/xbmc/commit/023717ed.patch'
73 "$pkgbase-libdvdcss-$_libdvdcss_version.tar.gz"
74 "$pkgbase-libdvdnav-$_libdvdnav_version.tar.gz"
75 "$pkgbase-libdvdread-$_libdvdread_version.tar.gz"
76 "$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz"
77 "$pkgbase-crossguid-$_crossguid_version.tar.gz"
78 "$pkgbase-fstrcmp-$_fstrcmp_version.tar.gz"
79 "$pkgbase-flatbuffers-$_flatbuffers_version.tar.gz"
80 "$pkgbase-libudfread-$_libudfread_version.tar.gz"
82 sha512sums=('648df0649a0443d884b9414f43be4253764f1aaf9072aa8111e5a8a217c8291024ce1f27c2f7f673ac24005b32cc7dd25d86e99fc68166e3d5a637ae36b20f02'
83 'd3be3bfc13c5ea56d8db745c2aab090c99760684fe4c8f62a13d266feb319e9180ceeecf8116bfd2ed90d9accba2c11dbbf93b61ad00f69a40812ebf4eabcdda'
84 '51e6fc033121241354a5f0b3fc9a430577ae3ff6bb7f31445aa548ef4893037fb80eea3b2c6774c81e9ebaf9c45e9b490c98c2c65eb38f9f7daba84b236f7e1d'
85 '629a41157d07b8ec0ea1fe89ae5ec48f63047472a862782b805c531ae31a0376fc4dc15175f8280c3ef91d7fa977bacebb1b51232640034a34bab2293210fc5e'
86 '8beb04d577b5251e74b0d52f4d130997a8ba94bbd488c7c8309e6b45095c27807e150212888ce3a384b23dff52f8df1a7bde5407bae924ddc363f8125c0616c5'
87 'f0a80d8e99b10473bcfdfde3d1c5fd7b766959819f0d1c0595ac84ce46db9007a5fbfde9a55aca60530c46cb7f8ef4c7e472c6191559ded92f868589c141ccaf'
88 'aaeb0227afd5ada5955cbe6a565254ff88d2028d677d199c00e03b7cb5de1f2c69b18e6e8b032e452350a8eda7081807b01765adbeb8476eaf803d9de6e5509c'
89 '4066c94f2473c7ea16917d29a613e16f840a329089c88e0bdbdb999aef3442ba00abfd2aa92266fa9c067e399dc88e6f0ccac40dc151378857e665638e78bbf0'
90 '3069feb5db40288beb5b112b285186162a704f0fdd3cf67a17fd4eeea015f2cfcfbb455b7aa7c3d79d00fd095a3fd11cffc7b121dce94d99c3b06a509a8977d2'
91 '91409cc66959a30f2d0dbf8d28e47dd2acbac560efb8961550c5928ae8546a32d1f156f8e55f073f953b114230117ec96c224212d28c1c1d752540c836c9ae1a'
92 '4c9b6eebb0465f83b5ba13854b01fbecfef0c90c2a9ad5ec8ee275eccb00d3304ac378f30551a8011fef5f3e01959cf02f2e2109b73be19e24e5cbf4a209a09d'
93 '1c2bc6111e30033b13a912fc6ff49455a89ac71ddf22ecf2f833ed661154014f40c4b5625a98126ef8616184670b85e4b3aaef29f253ce46e559bcc56e07fbae'
94 'f2309773f7b12d6c0244549f3895f8cb24cb82d87a8c46f0c6987895e44ae97348e799f3237b859580aec0681fdfb09a92f07418e7a5c1cb0769f27aaaf9c45c')
97 [[ -d kodi-build ]] && rm -rf kodi-build
98 mkdir "$srcdir/kodi-build"
100 cd "xbmc-$pkgver-$_codename"
102 [[ "$_sse_workaround" -eq 1 ]] && patch -p1 -i "$srcdir/cheat-sse-build.patch"
103 patch -p1 -i ../28ed2221.patch # Fix build with GCC 13
104 patch -p1 -i ../023717ed.patch # Fix build with GCC 13
105 patch -p1 -i ../gcc13.patch # Fix build with GCC 13
109 cd "$srcdir/kodi-build"
112 -DCMAKE_BUILD_TYPE=Release
113 -DCMAKE_INSTALL_PREFIX=/usr
114 -DCMAKE_INSTALL_LIBDIR=/usr/lib
124 -DENABLE_EVENTCLIENTS=ON
125 -DENABLE_MICROHTTPD=ON
126 -DENABLE_MYSQLCLIENT=ON
129 -DENABLE_SMBCLIENT=ON
135 -DENABLE_LIRCCLIENT=ON
136 -DENABLE_INTERNAL_RapidJSON=OFF
137 -DENABLE_INTERNAL_FFMPEG=ON
138 -DENABLE_INTERNAL_CROSSGUID=ON
139 -DENABLE_INTERNAL_FSTRCMP=ON
140 -DENABLE_INTERNAL_FLATBUFFERS=ON
141 -DENABLE_INTERNAL_UDFREAD=ON
142 -Dlibdvdcss_URL="$srcdir/$pkgbase-libdvdcss-$_libdvdcss_version.tar.gz"
143 -Dlibdvdnav_URL="$srcdir/$pkgbase-libdvdnav-$_libdvdnav_version.tar.gz"
144 -Dlibdvdread_URL="$srcdir/$pkgbase-libdvdread-$_libdvdread_version.tar.gz"
145 -DFFMPEG_URL="$srcdir/$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz"
146 -DCROSSGUID_URL="$srcdir/$pkgbase-crossguid-$_crossguid_version.tar.gz"
147 -DFSTRCMP_URL="$srcdir/$pkgbase-fstrcmp-$_fstrcmp_version.tar.gz"
148 -DFLATBUFFERS_URL="$srcdir/$pkgbase-flatbuffers-$_flatbuffers_version.tar.gz"
149 -DUDFREAD_URL="$srcdir/$pkgbase-libudfread-$_libudfread_version.tar.gz"
150 -DAPP_RENDER_SYSTEM=gl
153 # https://github.com/google/flatbuffers/issues/7404
154 CXXFLAGS+=' -Wno-error=restrict'
158 ${_cmake_common_args[@]} \
159 ../"xbmc-$pkgver-$_codename"
166 pkgdesc="A software media player and entertainment hub for digital media"
168 'bluez-libs' 'curl' 'dav1d' 'desktop-file-utils' 'hicolor-icon-theme' 'fmt'
169 'lcms2' 'libass' 'libbluray' 'libcdio' 'libcec' 'libmicrohttpd' 'libnfs'
170 'libplist' 'libpulse' 'libva' 'libvdpau' 'libxslt' 'lirc' 'mariadb-libs'
171 'mesa' 'libpipewire' 'python-pillow' 'python-pycryptodomex'
172 'python-simplejson' 'shairplay' 'smbclient' 'sndio' 'spdlog' 'sqlite'
173 'taglib' 'tinyxml' 'libxrandr' 'libxkbcommon' 'waylandpp' 'libinput'
177 'afpfs-ng: Apple shares support'
178 'bluez: Blutooth support'
179 'python-pybluez: Bluetooth support'
180 'pulseaudio: PulseAudio support'
181 'pipewire: PipeWire support'
182 'upower: Display battery level'
184 provides=('kodi-common' 'kodi-x11' 'kodi-wayland' 'kodi-gbm')
185 replaces=('kodi-common' 'kodi-x11' 'kodi-wayland' 'kodi-gbm')
193 for _cmp in ${_components[@]}; do
194 DESTDIR="$pkgdir" /usr/bin/cmake \
195 -DCMAKE_INSTALL_COMPONENT="$_cmp" \
196 -P cmake_install.cmake
199 # make sure the addons directory for binary addons exists
200 # https://bugs.archlinux.org/task/77366
201 mkdir -p "$pkgdir"/usr/lib/kodi/addons
205 # components: kodi-eventclients-common kodi-eventclients-ps3 kodi-eventclients-kodi-send
206 package_kodi-eventclients() {
207 pkgdesc="Kodi Event Clients"
209 'kodi: local machine eventclient use'
210 'python: most eventclients are implemented in python'
214 'kodi-eventclients-common'
215 'kodi-eventclients-ps3'
216 'kodi-eventclients-kodi-send'
220 for _cmp in ${_components[@]}; do
221 DESTDIR="$pkgdir" /usr/bin/cmake \
222 -DCMAKE_INSTALL_COMPONENT="$_cmp" \
223 -P cmake_install.cmake
227 # kodi-tools-texturepacker
228 # components: kodi-tools-texturepacker
229 package_kodi-tools-texturepacker() {
230 pkgdesc="Kodi Texturepacker tool"
231 depends=('libpng' 'giflib' 'libjpeg-turbo' 'lzo')
234 'kodi-tools-texturepacker'
238 for _cmp in ${_components[@]}; do
239 DESTDIR="$pkgdir" /usr/bin/cmake \
240 -DCMAKE_INSTALL_COMPONENT="$_cmp" \
241 -P cmake_install.cmake
246 # components: kodi-addon-dev kodi-eventclients-dev
248 pkgdesc="Kodi dev files"
253 'kodi-eventclients-dev'
257 for _cmp in ${_components[@]}; do
258 DESTDIR="$pkgdir" /usr/bin/cmake \
259 -DCMAKE_INSTALL_COMPONENT="$_cmp" \
260 -P cmake_install.cmake