Merge pull request #105417 from aanderse/kodi-19

kodi: 18.9 -> 19.0
This commit is contained in:
Aaron Andersen 2021-02-23 19:39:54 -05:00 committed by GitHub
commit 3a567bd7f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 63 additions and 51 deletions

View File

@ -1,9 +1,10 @@
{ stdenv, lib, fetchurl, fetchFromGitHub, autoconf, automake, libtool, makeWrapper, linuxHeaders { stdenv, lib, fetchurl, fetchFromGitHub, autoconf, automake, libtool, makeWrapper, linuxHeaders
, pkg-config, cmake, gnumake, yasm, python2Packages , pkg-config, cmake, gnumake, yasm, python3Packages
, libgcrypt, libgpgerror, libunistring , libgcrypt, libgpgerror, libunistring
, boost, avahi, lame , boost, avahi, lame
, gettext, pcre-cpp, yajl, fribidi, which , gettext, pcre-cpp, yajl, fribidi, which
, openssl, gperf, tinyxml2, taglib, libssh, swig, jre_headless , openssl, gperf, tinyxml2, taglib, libssh, swig, jre_headless
, gtest, ncurses, spdlog
, libxml2, systemd , libxml2, systemd
, alsaLib, libGLU, libGL, fontconfig, freetype, ftgl , alsaLib, libGLU, libGL, fontconfig, freetype, ftgl
, libjpeg, libpng, libtiff , libjpeg, libpng, libtiff
@ -42,17 +43,18 @@ assert udevSupport -> udev != null;
assert usbSupport -> libusb-compat-0_1 != null && ! udevSupport; # libusb-compat-0_1 won't be used if udev is avaliable assert usbSupport -> libusb-compat-0_1 != null && ! udevSupport; # libusb-compat-0_1 won't be used if udev is avaliable
assert vdpauSupport -> libvdpau != null; assert vdpauSupport -> libvdpau != null;
assert useWayland -> wayland != null && wayland-protocols != null && waylandpp != null && libxkbcommon != null; assert useWayland -> wayland != null && wayland-protocols != null && waylandpp != null && libxkbcommon != null;
assert useGbm || useWayland || x11Support;
let let
kodiReleaseDate = "20200728"; kodiReleaseDate = "20210219";
kodiVersion = "18.9"; kodiVersion = "19.0";
rel = "Leia"; rel = "Matrix";
kodi_src = fetchFromGitHub { kodi_src = fetchFromGitHub {
owner = "xbmc"; owner = "xbmc";
repo = "xbmc"; repo = "xbmc";
rev = "${kodiVersion}-${rel}"; rev = "${kodiVersion}-${rel}";
sha256 = "0nnf7823pixj6n2fkjc8rbdjwayvhlbglij2by4rnjzzfgmqmw20"; sha256 = "097dg6a7v4ia85jx1pmlpwzdpqcqxlrmniqd005q73zvgj67zc2p";
}; };
cmakeProto = fetchurl { cmakeProto = fetchurl {
@ -87,9 +89,9 @@ let
ffmpeg = kodiDependency rec { ffmpeg = kodiDependency rec {
name = "FFmpeg"; name = "FFmpeg";
version = "4.0.3"; version = "4.3.1";
rev = "${version}-${rel}-18.2"; rev = "${version}-${rel}-Beta1";
sha256 = "1krsjlr949iy5l6ljxancza1yi6w1annxc5s6k283i9mb15qy8cy"; sha256 = "1c5rwlxn6xj501iw7masdv2p6wb9rkmd299lmlkx97sw1kvxvg2w";
preConfigure = '' preConfigure = ''
cp ${kodi_src}/tools/depends/target/ffmpeg/{CMakeLists.txt,*.cmake} . cp ${kodi_src}/tools/depends/target/ffmpeg/{CMakeLists.txt,*.cmake} .
sed -i 's/ --cpu=''${CPU}//' CMakeLists.txt sed -i 's/ --cpu=''${CPU}//' CMakeLists.txt
@ -151,6 +153,12 @@ let
postPatch = cmakeProtoPatch; postPatch = cmakeProtoPatch;
}; };
kodi_platforms =
lib.optional useGbm "gbm" ++
lib.optional useWayland "wayland" ++
lib.optional x11Support "x11"
;
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "kodi-${lib.optionalString useWayland "wayland-"}${kodiVersion}"; name = "kodi-${lib.optionalString useWayland "wayland-"}${kodiVersion}";
@ -158,10 +166,11 @@ in stdenv.mkDerivation {
buildInputs = [ buildInputs = [
gnutls libidn libtasn1 nasm p11-kit gnutls libidn libtasn1 nasm p11-kit
libxml2 python2Packages.python libxml2 python3Packages.python
boost libmicrohttpd boost libmicrohttpd
gettext pcre-cpp yajl fribidi libva libdrm gettext pcre-cpp yajl fribidi libva libdrm
openssl gperf tinyxml2 taglib libssh openssl gperf tinyxml2 taglib libssh
gtest ncurses spdlog
alsaLib libGL libGLU fontconfig freetype ftgl alsaLib libGL libGLU fontconfig freetype ftgl
libjpeg libpng libtiff libjpeg libpng libtiff
libmpeg2 libsamplerate libmad libmpeg2 libsamplerate libmad
@ -210,7 +219,7 @@ in stdenv.mkDerivation {
which which
pkg-config gnumake pkg-config gnumake
autoconf automake libtool # still needed for some components. Check if that is the case with 19.0 autoconf automake libtool # still needed for some components. Check if that is the case with 19.0
jre_headless yasm gettext python2Packages.python flatbuffers jre_headless yasm gettext python3Packages.python flatbuffers
# for TexturePacker # for TexturePacker
giflib zlib libpng libjpeg lzo giflib zlib libpng libjpeg lzo
@ -221,6 +230,8 @@ in stdenv.mkDerivation {
]; ];
cmakeFlags = [ cmakeFlags = [
"-DAPP_RENDER_SYSTEM=${if useGbm then "gles" else "gl"}"
"-DCORE_PLATFORM_NAME=${lib.concatStringsSep " " kodi_platforms}"
"-Dlibdvdcss_URL=${libdvdcss.src}" "-Dlibdvdcss_URL=${libdvdcss.src}"
"-Dlibdvdnav_URL=${libdvdnav.src}" "-Dlibdvdnav_URL=${libdvdnav.src}"
"-Dlibdvdread_URL=${libdvdread.src}" "-Dlibdvdread_URL=${libdvdread.src}"
@ -231,14 +242,9 @@ in stdenv.mkDerivation {
"-DLIRC_DEVICE=/run/lirc/lircd" "-DLIRC_DEVICE=/run/lirc/lircd"
"-DSWIG_EXECUTABLE=${buildPackages.swig}/bin/swig" "-DSWIG_EXECUTABLE=${buildPackages.swig}/bin/swig"
"-DFLATBUFFERS_FLATC_EXECUTABLE=${buildPackages.flatbuffers}/bin/flatc" "-DFLATBUFFERS_FLATC_EXECUTABLE=${buildPackages.flatbuffers}/bin/flatc"
"-DPYTHON_EXECUTABLE=${buildPackages.python2Packages.python}/bin/python" "-DPYTHON_EXECUTABLE=${buildPackages.python3Packages.python}/bin/python"
] ++ lib.optional useWayland [ ] ++ lib.optional useWayland [
"-DCORE_PLATFORM_NAME=wayland"
"-DWAYLAND_RENDER_SYSTEM=gl"
"-DWAYLANDPP_SCANNER=${buildPackages.waylandpp}/bin/wayland-scanner++" "-DWAYLANDPP_SCANNER=${buildPackages.waylandpp}/bin/wayland-scanner++"
] ++ lib.optional useGbm [
"-DCORE_PLATFORM_NAME=gbm"
"-DGBM_RENDER_SYSTEM=gles"
]; ];
# 14 tests fail but the biggest issue is that every test takes 30 seconds - # 14 tests fail but the biggest issue is that every test takes 30 seconds -
@ -256,14 +262,14 @@ in stdenv.mkDerivation {
''; '';
postPatch = '' postPatch = ''
substituteInPlace xbmc/platform/linux/LinuxTimezone.cpp \ substituteInPlace xbmc/platform/posix/PosixTimezone.cpp \
--replace 'usr/share/zoneinfo' 'etc/zoneinfo' --replace 'usr/share/zoneinfo' 'etc/zoneinfo'
''; '';
postInstall = '' postInstall = ''
for p in $(ls $out/bin/) ; do for p in $(ls $out/bin/) ; do
wrapProgram $out/bin/$p \ wrapProgram $out/bin/$p \
--prefix PATH ":" "${lib.makeBinPath ([ python2Packages.python glxinfo ] ++ lib.optional x11Support xdpyinfo)}" \ --prefix PATH ":" "${lib.makeBinPath ([ python3Packages.python glxinfo ] ++ lib.optional x11Support xdpyinfo)}" \
--prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath --prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath
([ curl systemd libmad libvdpau libcec libcec_platform libass ] ([ curl systemd libmad libvdpau libcec libcec_platform libass ]
++ lib.optional nfsSupport libnfs ++ lib.optional nfsSupport libnfs
@ -279,7 +285,7 @@ in stdenv.mkDerivation {
installCheckPhase = "$out/bin/kodi --version"; installCheckPhase = "$out/bin/kodi --version";
passthru = { passthru = {
pythonPackages = python2Packages; pythonPackages = python3Packages;
}; };
meta = with lib; { meta = with lib; {

View File

@ -1,7 +1,7 @@
{ lib, stdenv, callPackage, fetchFromGitHub { lib, stdenv, callPackage, fetchFromGitHub
, cmake, kodiPlain, libcec_platform, tinyxml, rapidxml , cmake, kodiPlain, libcec_platform, tinyxml, pugixml
, steam, udev, libusb1, jsoncpp, libhdhomerun, zlib , steam, udev, libusb1, jsoncpp, libhdhomerun, zlib
, python2Packages, expat, glib, nspr, nss, openssl , python3Packages, expat, glib, nspr, nss, openssl
, libssh, libarchive, lzma, bzip2, lz4, lzo }: , libssh, libarchive, lzma, bzip2, lz4, lzo }:
with lib; with lib;
@ -9,7 +9,7 @@ with lib;
let self = rec { let self = rec {
pluginDir = "/share/kodi/addons"; pluginDir = "/share/kodi/addons";
rel = "Leia"; rel = "Matrix";
kodi = kodiPlain; kodi = kodiPlain;
@ -122,6 +122,7 @@ let self = rec {
''; '';
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ edwtjo ]; maintainers = with maintainers; [ edwtjo ];
broken = true; # requires port to python3
}; };
}; };
@ -151,6 +152,7 @@ let self = rec {
''; '';
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ edwtjo ]; maintainers = with maintainers; [ edwtjo ];
broken = true; # requires port to python3
}; };
}; };
@ -204,6 +206,7 @@ let self = rec {
homepage = "https://forum.kodi.tv/showthread.php?tid=258159"; homepage = "https://forum.kodi.tv/showthread.php?tid=258159";
description = "A ROM launcher for Kodi that uses HyperSpin assets."; description = "A ROM launcher for Kodi that uses HyperSpin assets.";
maintainers = with maintainers; [ edwtjo ]; maintainers = with maintainers; [ edwtjo ];
broken = true; # requires port to python3
}; };
in { in {
service = mkKodiPlugin { service = mkKodiPlugin {
@ -221,14 +224,14 @@ let self = rec {
joystick = mkKodiABIPlugin rec { joystick = mkKodiABIPlugin rec {
namespace = "peripheral.joystick"; namespace = "peripheral.joystick";
version = "1.4.7"; version = "1.7.1";
plugin = namespace; plugin = namespace;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "xbmc"; owner = "xbmc";
repo = namespace; repo = namespace;
rev = "v${version}"; rev = "${version}-${rel}";
sha256 = "03gsp4kg41s3n4ib4wsv7m3krfipgwc2z07i4mnd5zvg0c4xrmap"; sha256 = "1dhj4afr9kj938xx70fq5r409mz6lbw4n581ljvdjj9lq7akc914";
}; };
meta = { meta = {
@ -237,7 +240,7 @@ let self = rec {
maintainers = with maintainers; [ edwtjo ]; maintainers = with maintainers; [ edwtjo ];
}; };
extraBuildInputs = [ udev ]; extraBuildInputs = [ tinyxml udev ];
}; };
simpleplugin = mkKodiPlugin rec { simpleplugin = mkKodiPlugin rec {
@ -256,6 +259,7 @@ let self = rec {
homepage = src.meta.homepage; homepage = src.meta.homepage;
description = "Simpleplugin API"; description = "Simpleplugin API";
license = licenses.gpl3; license = licenses.gpl3;
broken = true; # requires port to python3
}; };
}; };
@ -263,14 +267,14 @@ let self = rec {
plugin = "svtplay"; plugin = "svtplay";
namespace = "plugin.video.svtplay"; namespace = "plugin.video.svtplay";
version = "4.0.48"; version = "5.1.12";
src = fetchFromGitHub { src = fetchFromGitHub {
name = plugin + "-" + version + ".tar.gz"; name = plugin + "-" + version + ".tar.gz";
owner = "nilzen"; owner = "nilzen";
repo = "xbmc-" + plugin; repo = "xbmc-" + plugin;
rev = "dc18ad002cd69257611d0032fba91f57bb199165"; rev = "v${version}";
sha256 = "0klk1jpjc243ak306k94mag4b4s17w68v69yb8lzzydszqkaqa7x"; sha256 = "04j1nhm7mh9chs995lz6bv1vsq5xzk7a7c0lmk4bnfv8jrfpj0w6";
}; };
meta = { meta = {
@ -290,14 +294,14 @@ let self = rec {
steam-controller = mkKodiABIPlugin rec { steam-controller = mkKodiABIPlugin rec {
namespace = "peripheral.steamcontroller"; namespace = "peripheral.steamcontroller";
version = "0.10.0"; version = "0.11.0";
plugin = namespace; plugin = namespace;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kodi-game"; owner = "kodi-game";
repo = namespace; repo = namespace;
rev = "ea345392ab5aa4485f3a48d2037fa8a8e8ab82de"; rev = "f68140ca44f163a03d3a625d1f2005a6edef96cb";
sha256 = "1hbd8fdvn7xkr9csz1g9wah78nhnq1rkazl4zwa31y70830k3279"; sha256 = "09lm8i119xlsxxk0c64rnp8iw0crr90v7m8iwi9r31qdmxrdxpmg";
}; };
extraBuildInputs = [ libusb1 ]; extraBuildInputs = [ libusb1 ];
@ -314,13 +318,13 @@ let self = rec {
plugin = "steam-launcher"; plugin = "steam-launcher";
namespace = "script.steam.launcher"; namespace = "script.steam.launcher";
version = "3.1.4"; version = "3.5.1";
src = fetchFromGitHub rec { src = fetchFromGitHub rec {
owner = "teeedubb"; owner = "teeedubb";
repo = owner + "-xbmc-repo"; repo = owner + "-xbmc-repo";
rev = "db67704c3e16bdcdd3bdfe2926c609f1f6bdc4fb"; rev = "8260bf9b464846a1f1965da495d2f2b7ceb81d55";
sha256 = "001a7zs3a4jfzj8ylxv2klc33mipmqsd5aqax7q81fbgwdlndvbm"; sha256 = "1fj3ry5s44nf1jzxk4bmnpa4b9p23nrpmpj2a4i6xf94h7jl7p5k";
}; };
propagatedBuildInputs = [ steam ]; propagatedBuildInputs = [ steam ];
@ -356,6 +360,7 @@ let self = rec {
homepage = "https://forum.kodi.tv/showthread.php?tid=187421"; homepage = "https://forum.kodi.tv/showthread.php?tid=187421";
description = "A comic book reader"; description = "A comic book reader";
maintainers = with maintainers; [ edwtjo ]; maintainers = with maintainers; [ edwtjo ];
broken = true; # requires port to python3
}; };
}; };
@ -363,13 +368,13 @@ let self = rec {
plugin = "pvr-hts"; plugin = "pvr-hts";
namespace = "pvr.hts"; namespace = "pvr.hts";
version = "4.4.14"; version = "8.2.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kodi-pvr"; owner = "kodi-pvr";
repo = "pvr.hts"; repo = "pvr.hts";
rev = "${version}-${rel}"; rev = "${version}-${rel}";
sha256 = "1bcwcwd2yjhw85yk6lyhf0iqiclrsz7r7vpbxgc650fwqbb146gr"; sha256 = "0jnn9gfjl556acqjf92wzzn371gxymhbbi665nqgg2gjcan0a49q";
}; };
meta = { meta = {
@ -385,13 +390,13 @@ let self = rec {
plugin = "pvr-hdhomerun"; plugin = "pvr-hdhomerun";
namespace = "pvr.hdhomerun"; namespace = "pvr.hdhomerun";
version = "3.5.0"; version = "7.1.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kodi-pvr"; owner = "kodi-pvr";
repo = "pvr.hdhomerun"; repo = "pvr.hdhomerun";
rev = "${version}-${rel}"; rev = "${version}-${rel}";
sha256 = "1zrkvfn0im2qmvqm93pa3cg8xkxv61sxlj8nsz4r5z9v9nhqadf6"; sha256 = "0gbwjssnd319csq2kwlyjj1rskg19m1dxac5dl2dymvx5hn3zrgm";
}; };
meta = { meta = {
@ -409,13 +414,13 @@ let self = rec {
plugin = "pvr-iptvsimple"; plugin = "pvr-iptvsimple";
namespace = "pvr.iptvsimple"; namespace = "pvr.iptvsimple";
version = "3.5.7"; version = "7.4.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kodi-pvr"; owner = "kodi-pvr";
repo = "pvr.iptvsimple"; repo = "pvr.iptvsimple";
rev = "${version}-${rel}"; rev = "${version}-${rel}";
sha256 = "17znib7c491h2ii4gagxradh0jyvgga0d548gbk4yjj2nc9qqc6d"; sha256 = "062i922qi0izkvn7v47yhyy2cf3fa7xc3k95b1gm9abfdwkk8ywr";
}; };
meta = { meta = {
@ -426,7 +431,7 @@ let self = rec {
license = licenses.gpl2Plus; license = licenses.gpl2Plus;
}; };
extraBuildInputs = [ zlib rapidxml ]; extraBuildInputs = [ zlib pugixml ];
}; };
osmc-skin = mkKodiPlugin rec { osmc-skin = mkKodiPlugin rec {
@ -451,7 +456,7 @@ let self = rec {
}; };
}; };
yatp = python2Packages.toPythonModule (mkKodiPlugin rec { yatp = python3Packages.toPythonModule (mkKodiPlugin rec {
plugin = "yatp"; plugin = "yatp";
namespace = "plugin.video.yatp"; namespace = "plugin.video.yatp";
version = "3.3.2"; version = "3.3.2";
@ -467,14 +472,15 @@ let self = rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
simpleplugin simpleplugin
python2Packages.requests python3Packages.requests
python2Packages.libtorrent-rasterbar python3Packages.libtorrent-rasterbar
]; ];
meta = { meta = {
homepage = src.meta.homepage; homepage = src.meta.homepage;
description = "Yet Another Torrent Player: libtorrent-based torrent streaming for Kodi"; description = "Yet Another Torrent Player: libtorrent-based torrent streaming for Kodi";
license = licenses.gpl3; license = licenses.gpl3;
broken = true; # requires port to python3
}; };
}); });
@ -482,13 +488,13 @@ let self = rec {
plugin = "inputstream-adaptive"; plugin = "inputstream-adaptive";
namespace = "inputstream.adaptive"; namespace = "inputstream.adaptive";
version = "2.4.6"; version = "2.6.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "peak3d"; owner = "peak3d";
repo = "inputstream.adaptive"; repo = "inputstream.adaptive";
rev = "${version}-${rel}"; rev = "${version}-${rel}";
sha256 = "09d9b35mpaf3g5m51viyan9hv7d2i8ndvb9wm0j7rs5gwsf0k71z"; sha256 = "1pwqmbr78wp12jn6rwv63npdfc456adwz0amlxf6gvgg43li6p7s";
}; };
extraBuildInputs = [ expat ]; extraBuildInputs = [ expat ];
@ -509,14 +515,14 @@ let self = rec {
vfs-sftp = mkKodiABIPlugin rec { vfs-sftp = mkKodiABIPlugin rec {
namespace = "vfs.sftp"; namespace = "vfs.sftp";
version = "1.0.6"; version = "2.0.0";
plugin = namespace; plugin = namespace;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "xbmc"; owner = "xbmc";
repo = namespace; repo = namespace;
rev = "${version}-${rel}"; rev = "${version}-${rel}";
sha256 = "044kkzcpzvbyih4vys33r4hqw38xa82snmvl4qj1r80wnszc8af1"; sha256 = "06w74sh8yagrrp7a7rjaz3xrh1j3wdqald9c4b72c33gpk5997dk";
}; };
meta = with lib; { meta = with lib; {
@ -531,14 +537,14 @@ let self = rec {
vfs-libarchive = mkKodiABIPlugin rec { vfs-libarchive = mkKodiABIPlugin rec {
namespace = "vfs.libarchive"; namespace = "vfs.libarchive";
version = "1.0.7"; version = "2.0.0";
plugin = namespace; plugin = namespace;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "xbmc"; owner = "xbmc";
repo = namespace; repo = namespace;
rev = "${version}-${rel}"; rev = "${version}-${rel}";
sha256 = "01qhv095h5j67ispm4iw18pd3kl7a0mnjkgm92al9qqiyif8lzgh"; sha256 = "1q62p1i6rvqk2zv6f1cpffkh95lgclys2xl4dwyhj3acmqdxd9i5";
}; };
meta = with lib; { meta = with lib; {