# vim:set ts=2 sw=2 et: # Maintainer: Sergej Pupykin # Maintainer: BlackIkeEagle < ike DOT devolder AT gmail DOT com > # Contributor: graysky # Contributor: DonVla # Contributor: Ulf Winkelvos # Contributor: Ralf Barth # Contributor: B & monty - Thanks for your hints :) # Contributor: marzoul # Contributor: Sergej Pupykin # Contributor: Brad Fanella # Contributor: [vEX] # Contributor: Zeqadious # Contributor: Bartłomiej Piotrowski # Contributor: Maxime Gauduin # # Original credits go to Edgar Hucek # for his xbmc-vdpau-vdr PKGBUILD at https://archvdr.svn.sourceforge.net/svnroot/archvdr/trunk/archvdr/xbmc-vdpau-vdr/PKGBUILD pkgbase=kodi pkgname=( 'kodi-common' 'kodi-x11' 'kodi-wayland' 'kodi-gbm' 'kodi-eventclients' 'kodi-tools-texturepacker' 'kodi-dev' ) pkgver=19.1 pkgrel=1 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' 'rapidjson' 'ghostscript' 'meson' 'gtest' 'graphviz' # wayland 'wayland-protocols' 'waylandpp' 'libxkbcommon' # gbm 'libinput' ) _codename=Matrix _sse_workaround=1 _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.1" _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=( "$pkgbase-$pkgver-$_codename.tar.gz::https://github.com/xbmc/xbmc/archive/refs/tags/$pkgver-$_codename.tar.gz" "$pkgbase-libdvdcss-$_libdvdcss_version.tar.gz::https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_version.tar.gz" "$pkgbase-libdvdnav-$_libdvdnav_version.tar.gz::https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_version.tar.gz" "$pkgbase-libdvdread-$_libdvdread_version.tar.gz::https://github.com/xbmc/libdvdread/archive/$_libdvdread_version.tar.gz" "$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz::https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz" "$pkgbase-fmt-$_fmt_version.tar.gz::http://mirrors.kodi.tv/build-deps/sources/fmt-$_fmt_version.tar.gz" "$pkgbase-spdlog-$_spdlog_version.tar.gz::http://mirrors.kodi.tv/build-deps/sources/spdlog-$_spdlog_version.tar.gz" "$pkgbase-crossguid-$_crossguid_version.tar.gz::http://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_version.tar.gz" "$pkgbase-fstrcmp-$_fstrcmp_version.tar.gz::http://mirrors.kodi.tv/build-deps/sources/fstrcmp-$_fstrcmp_version.tar.gz" "$pkgbase-flatbuffers-$_flatbuffers_version.tar.gz::http://mirrors.kodi.tv/build-deps/sources/flatbuffers-$_flatbuffers_version.tar.gz" "$pkgbase-libudfread-$_libudfread_version.tar.gz::http://mirrors.kodi.tv/build-deps/sources/libudfread-$_libudfread_version.tar.gz" 'cheat-sse-build.patch' '0001-allow-separate-windowing-binaries-being-launched-fro.patch' ) noextract=( "$pkgbase-libdvdcss-$_libdvdcss_version.tar.gz" "$pkgbase-libdvdnav-$_libdvdnav_version.tar.gz" "$pkgbase-libdvdread-$_libdvdread_version.tar.gz" "$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz" "$pkgbase-fmt-$_fmt_version.tar.gz" "$pkgbase-spdlog-$_spdlog_version.tar.gz" "$pkgbase-crossguid-$_crossguid_version.tar.gz" "$pkgbase-fstrcmp-$_fstrcmp_version.tar.gz" "$pkgbase-flatbuffers-$_flatbuffers_version.tar.gz" "$pkgbase-libudfread-$_libudfread_version.tar.gz" ) sha512sums=('e9725a61828fa59502fdbb42d689c4948af792522049dadae136b5e90f53ee6fff570e6adb818dcce2ce54e957b0a31796b59aefd87fc55356531e2379ac6289' '5185dbdbeb1bd13ea9d8723f1f4ab599d6f3102f5ba1096cd085aa1cda252c045f327c719227bba8e1b742352ade5e335106c8d0c1637a5a6b93ce661620dd7e' '11c93eaacd156f8fd7dec7c43d366438b201f31ad55b2870463a9e286912b6ada08882319a021fb7992190f87b909a49f2b83e0321cc17aedc29f7fe5898fa72' 'b3419ba0a1a2dd70f1bb6236afdfe1c6e88c9ad4264198b289e3bba9375e077cecf7f89848c7b09debaa445327f3507101f3d157e692f7a7163b2bb52643e1e7' 'd3719253d674b16638b873545583b82fba3176803c81ba8bcb37e90456dd956f1c2ee8996493840cff2d61c6399f06ed0524a759f46e4ce174bce23e9c6eda4a' '8770bf4bd2bb6d938e75e0cf1e665c41930dbd9d2a6825274a5a43cd1d85b9c9ca621bb040ed099429f0e16bddbc3399361c453eb1bf3fc01376e6ad9dd875b7' '78991c943dd95af563c4b29545b9b5d635caf1af5031262dde734ecf70c0b4ae866d954ee77b050f9f0cc089a3bc57ee9583895e51cb00dd1cc6c10ff905ca34' '2682d63609d3dcdfcd8136be632e45df26ad88ce93b9c49745cf728bbd2e6254a7b05c8b059ab581d532372e504206a525a52564b64d076dfdae9c965a09fd16' 'aaeb0227afd5ada5955cbe6a565254ff88d2028d677d199c00e03b7cb5de1f2c69b18e6e8b032e452350a8eda7081807b01765adbeb8476eaf803d9de6e5509c' '8a0b88d739fa4694a69d3630140fe89fdd70d50bba4dadd1758d9aa2920cda16700bcafb8d89fe2a09ac907d3f378240c3cb4abc7106318136799836aba4b063' '340a03fe90d26a8a5c78e1e4f558a0b448a14332a661494f44af7de3e6c98cd219125e19f69d2a611ecb4870648a5d5b55d794e665eb8ec4192c0b499a0701ed' '91409cc66959a30f2d0dbf8d28e47dd2acbac560efb8961550c5928ae8546a32d1f156f8e55f073f953b114230117ec96c224212d28c1c1d752540c836c9ae1a' '372eb5ef438458a3fd2d38c20ad9385e208d670bdc8e5ffb62c5bde2e3e93a3548704118aced33e6a956e12ae70a42316afafa482cf16e171dd0f07330de3509') prepare() { [[ -d kodi-build ]] && rm -rf kodi-build mkdir "$srcdir/kodi-build" cd "xbmc-$pkgver-$_codename" [[ "$_sse_workaround" -eq 1 ]] && patch -p1 -i "$srcdir/cheat-sse-build.patch" patch -p1 -i "$srcdir/0001-allow-separate-windowing-binaries-being-launched-fro.patch" } build() { cd "$srcdir/kodi-build" _cmake_common_args=( -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib -DUSE_LTO=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 -Dlibdvdcss_URL="$srcdir/$pkgbase-libdvdcss-$_libdvdcss_version.tar.gz" -Dlibdvdnav_URL="$srcdir/$pkgbase-libdvdnav-$_libdvdnav_version.tar.gz" -Dlibdvdread_URL="$srcdir/$pkgbase-libdvdread-$_libdvdread_version.tar.gz" -DFFMPEG_URL="$srcdir/$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz" -DFMT_URL="$srcdir/$pkgbase-fmt-$_fmt_version.tar.gz" -DSPDLOG_URL="$srcdir/$pkgbase-spdlog-$_spdlog_version.tar.gz" -DCROSSGUID_URL="$srcdir/$pkgbase-crossguid-$_crossguid_version.tar.gz" -DFSTRCMP_URL="$srcdir/$pkgbase-fstrcmp-$_fstrcmp_version.tar.gz" -DFLATBUFFERS_URL="$srcdir/$pkgbase-flatbuffers-$_flatbuffers_version.tar.gz" -DUDFREAD_URL="$srcdir/$pkgbase-libudfread-$_libudfread_version.tar.gz" -DAPP_RENDER_SYSTEM=gl ) # echo "building kodi-wayland" # cmake \ # ${_cmake_common_args[@]} \ # -DCORE_PLATFORM_NAME=wayland \ # ../"xbmc-$pkgver-$_codename" # make # echo "building kodi-gbm" # cmake \ # ${_cmake_common_args[@]} \ # -DCORE_PLATFORM_NAME=gbm \ # ../"xbmc-$pkgver-$_codename" # make # build x11 version last that will make it fallback in the launcher script echo "building kodi-x11" cmake \ ${_cmake_common_args[@]} \ -DCORE_PLATFORM_NAME=x11 \ ../"xbmc-$pkgver-$_codename" make } # kodi # components: kodi package_kodi-common() { pkgdesc="A software media player and entertainment hub for digital media" depends=( 'bluez-libs' 'curl' 'dav1d' 'desktop-file-utils' 'hicolor-icon-theme' 'lcms2' 'libass' 'libbluray' 'libcdio' 'libcec' 'libmicrohttpd' 'libnfs' 'libplist' 'libpulse' 'libva' 'libxslt' 'lirc' 'mariadb-libs' 'mesa' 'python-pillow' 'python-pycryptodomex' 'python-simplejson' 'shairplay' 'smbclient' 'sqlite' 'taglib' 'tinyxml' ) optdepends=( 'afpfs-ng: Apple shares support' 'bluez: Blutooth support' 'python-pybluez: Bluetooth support' 'pulseaudio: PulseAudio support' 'upower: Display battery level' ) _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 # remove windowing specific binaries rm -f "$pkgdir/usr/lib/kodi/"{kodi-x11,kodi-xrandr,kodi-wayland,kodi-gbm} } # kodi-x11 # components: kodi-bin package_kodi-x11() { pkgdesc="x11 kodi binary" provides=('kodi') replaces=('kodi') depends=( 'kodi-common' 'libxrandr' ) cd kodi-build install -Dm755 kodi-x11 "$pkgdir/usr/lib/kodi/kodi-x11" install -Dm755 kodi-xrandr "$pkgdir/usr/lib/kodi/kodi-xrandr" } # kodi-wayland # components: kodi-bin package_kodi-wayland() { pkgdesc="wayland kodi binary" provides=('kodi') replaces=('kodi') depends=( 'kodi-common' 'libxkbcommon' 'waylandpp' ) cd kodi-build install -Dm755 kodi-wayland "$pkgdir/usr/lib/kodi/kodi-wayland" } # kodi-gbm # components: kodi-bin package_kodi-gbm() { pkgdesc="gbm kodi binary" provides=('kodi') replaces=('kodi') depends=( 'kodi-common' 'libxkbcommon' 'libinput' ) cd kodi-build install -Dm755 kodi-gbm "$pkgdir/usr/lib/kodi/kodi-gbm" } # kodi-eventclients # components: kodi-eventclients-common kodi-eventclients-ps3 kodi-eventclients-kodi-send package_kodi-eventclients() { pkgdesc="Kodi Event Clients" 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-tools-texturepacker() { pkgdesc="Kodi Texturepacker tool" 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-dev() { pkgdesc="Kodi dev files" depends=('kodi-common') _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 }