Merge pull request #49445 from sephalon/kodi-v18

Kodi v18 with InputStream Adaptive
This commit is contained in:
Carles Pagès 2019-02-23 02:41:10 +01:00 committed by GitHub
commit 24c3cbfcd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 61 additions and 33 deletions

View File

@ -18,7 +18,7 @@
, libcec, libcec_platform, dcadec, libuuid , libcec, libcec_platform, dcadec, libuuid
, libcrossguid, libmicrohttpd , libcrossguid, libmicrohttpd
, bluez, doxygen, giflib, glib, harfbuzz, lcms2, libidn, libpthreadstubs, libtasn1, libXdmcp , bluez, doxygen, giflib, glib, harfbuzz, lcms2, libidn, libpthreadstubs, libtasn1, libXdmcp
, libplist, p11-kit, zlib , libplist, p11-kit, zlib, flatbuffers, fmt, fstrcmp, rapidjson
, dbusSupport ? true, dbus ? null , dbusSupport ? true, dbus ? null
, joystickSupport ? true, cwiid ? null , joystickSupport ? true, cwiid ? null
, nfsSupport ? true, libnfs ? null , nfsSupport ? true, libnfs ? null
@ -40,21 +40,18 @@ assert usbSupport -> libusb != null && ! udevSupport; # libusb won't be used i
assert vdpauSupport -> libvdpau != null; assert vdpauSupport -> libvdpau != null;
# TODO for Kodi 18.0 # TODO for Kodi 18.0
# - cmake is no longer in project/cmake
# - maybe we can remove auto{conf,make} and libtool from inputs
# - check if dbus support PR has been merged and add dbus as a buildInput # - check if dbus support PR has been merged and add dbus as a buildInput
# - try to use system ffmpeg (kodi 17 works best with bundled 3.1 with patches)
let let
kodiReleaseDate = "20171115"; kodiReleaseDate = "20190129";
kodiVersion = "17.6"; kodiVersion = "18.0";
rel = "Krypton"; rel = "Leia";
kodi_src = fetchFromGitHub { kodi_src = fetchFromGitHub {
owner = "xbmc"; owner = "xbmc";
repo = "xbmc"; repo = "xbmc";
rev = "${kodiVersion}-${rel}"; rev = "${kodiVersion}-${rel}";
sha256 = "1pwmmbry7dajwdpmc1mdygjvxna4kl38h32d71g10yf3mdm5wmz3"; sha256 = "1ci5jjvqly01lysdp6j6jrnn49z4is9z5kan5zl3cpqm9w7rqarg";
}; };
kodiDependency = { name, version, rev, sha256, ... } @attrs: kodiDependency = { name, version, rev, sha256, ... } @attrs:
@ -72,9 +69,9 @@ let
ffmpeg = kodiDependency rec { ffmpeg = kodiDependency rec {
name = "FFmpeg"; name = "FFmpeg";
version = "3.1.11"; version = "4.0.3";
rev = "${version}-${rel}-17.5"; # TODO: change 17.5 back to ${kodiVersion} rev = "${version}-${rel}-RC5";
sha256 = "0nc4sb6v1g3l11v9h5l9n44a8r40186rcbp2xg5c7vg6wcpjid13"; sha256 = "0l20bysv2y711khwpnpw4dz6mzd37qllki3fnv4dx1lj8ivydrlx";
preConfigure = '' preConfigure = ''
cp ${kodi_src}/tools/depends/target/ffmpeg/{CMakeLists.txt,*.cmake} . cp ${kodi_src}/tools/depends/target/ffmpeg/{CMakeLists.txt,*.cmake} .
''; '';
@ -86,29 +83,29 @@ let
# we should be able to build these externally and have kodi reference them as buildInputs. # we should be able to build these externally and have kodi reference them as buildInputs.
# Doesn't work ATM though so we just use them for the src # Doesn't work ATM though so we just use them for the src
libdvdcss = kodiDependency { libdvdcss = kodiDependency rec {
name = "libdvdcss"; name = "libdvdcss";
version = "20160215"; version = "1.4.2";
rev = "2f12236bc1c92f73c21e973363f79eb300de603f"; rev = "${version}-${rel}-Beta-5";
sha256 = "198r0q73i55ga1dvyqq9nfcri0zq08b94hy8671lg14i3izx44dd"; sha256 = "0j41ydzx0imaix069s3z07xqw9q95k7llh06fc27dcn6f7b8ydyl";
buildInputs = [ libdvdread ]; buildInputs = [ libdvdread ];
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];
}; };
libdvdnav = kodiDependency { libdvdnav = kodiDependency rec {
name = "libdvdnav"; name = "libdvdnav";
version = "20170217"; version = "6.0.0";
rev = "981488f7f27554b103cca10c1fbeba027396c94a"; rev = "${version}-${rel}-Alpha-3";
sha256 = "089pswc51l3avh95zl4cpsh7gh1innh7b2y4xgx840mcmy46ycr8"; sha256 = "0qwlf4lgahxqxk1r2pzl866mi03pbp7l1fc0rk522sc0ak2s9jhb";
buildInputs = [ libdvdread ]; buildInputs = [ libdvdread ];
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];
}; };
libdvdread = kodiDependency { libdvdread = kodiDependency rec {
name = "libdvdread"; name = "libdvdread";
version = "20160221"; version = "6.0.0";
rev = "17d99db97e7b8f23077b342369d3c22a6250affd"; rev = "${version}-${rel}-Alpha-3";
sha256 = "1gr5aq1cjr3as9mnwrw29cxn4m6f6pfrxdahkdcjy70q3ldg90sl"; sha256 = "1xxn01mhkdnp10cqdr357wx77vyzfb5glqpqyg8m0skyi75aii59";
nativeBuildInputs = [ autoreconfHook pkgconfig ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];
}; };
@ -136,7 +133,7 @@ in stdenv.mkDerivation rec {
libgcrypt libgpgerror libunistring libgcrypt libgpgerror libunistring
libcrossguid cwiid libplist libcrossguid cwiid libplist
bluez giflib glib harfbuzz lcms2 libpthreadstubs libXdmcp bluez giflib glib harfbuzz lcms2 libpthreadstubs libXdmcp
ffmpeg ffmpeg flatbuffers fmt fstrcmp rapidjson
# libdvdcss libdvdnav libdvdread # libdvdcss libdvdnav libdvdread
] ]
++ lib.optional dbusSupport dbus ++ lib.optional dbusSupport dbus
@ -176,14 +173,10 @@ in stdenv.mkDerivation rec {
doCheck = false; doCheck = false;
postPatch = '' postPatch = ''
substituteInPlace xbmc/linux/LinuxTimezone.cpp \ substituteInPlace xbmc/platform/linux/LinuxTimezone.cpp \
--replace 'usr/share/zoneinfo' 'etc/zoneinfo' --replace 'usr/share/zoneinfo' 'etc/zoneinfo'
''; '';
preConfigure = ''
cd project/cmake
'';
postInstall = '' postInstall = ''
for p in $(ls $out/bin/) ; do for p in $(ls $out/bin/) ; do
wrapProgram $out/bin/$p \ wrapProgram $out/bin/$p \
@ -209,6 +202,6 @@ in stdenv.mkDerivation rec {
homepage = https://kodi.tv/; homepage = https://kodi.tv/;
license = licenses.gpl2; license = licenses.gpl2;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ domenkozar titanous edwtjo peterhoeg ]; maintainers = with maintainers; [ domenkozar titanous edwtjo peterhoeg sephalon ];
}; };
} }

View File

@ -1,7 +1,7 @@
{ stdenv, callPackage, fetchurl, fetchFromGitHub, unzip { stdenv, callPackage, fetchurl, fetchFromGitHub, unzip
, cmake, kodiPlain, libcec_platform, tinyxml , cmake, kodiPlain, libcec_platform, tinyxml
, steam, libusb, pcre-cpp, jsoncpp, libhdhomerun, zlib , steam, libusb, pcre-cpp, jsoncpp, libhdhomerun, zlib
, python2Packages }: , python2Packages, expat, glib, nspr, nss }:
with stdenv.lib; with stdenv.lib;
@ -64,7 +64,8 @@ let self = rec {
''; '';
} // args)); } // args));
mkKodiABIPlugin = { plugin, namespace, version, extraBuildInputs ? [], ... }@args: mkKodiABIPlugin = { plugin, namespace, version, extraBuildInputs ? [],
extraRuntimeDependencies ? [], extraInstallPhase ? "", ... }@args:
toKodiPlugin (stdenv.mkDerivation (rec { toKodiPlugin (stdenv.mkDerivation (rec {
name = "kodi-plugin-${plugin}-${version}"; name = "kodi-plugin-${plugin}-${version}";
@ -84,6 +85,7 @@ let self = rec {
installPhase = let n = namespace; in '' installPhase = let n = namespace; in ''
make install make install
ln -s $out/lib/addons/${n}/${n}.so.${version} $out${pluginDir}/${n}/${n}.so.${version} ln -s $out/lib/addons/${n}/${n}.so.${version} $out${pluginDir}/${n}/${n}.so.${version}
${extraInstallPhase}
''; '';
} // args)); } // args));
@ -470,4 +472,33 @@ let self = rec {
}; };
}); });
inputstream-adaptive = mkKodiABIPlugin rec {
plugin = "inputstream-adaptive";
namespace = "inputstream.adaptive";
version = "2.3.12";
src = fetchFromGitHub {
owner = "peak3d";
repo = "inputstream.adaptive";
rev = "${version}";
sha256 = "09d9b35mpaf3g5m51viyan9hv7d2i8ndvb9wm0j7rs5gwsf0k71z";
};
extraBuildInputs = [ expat ];
extraRuntimeDependencies = [ glib nspr nss stdenv.cc.cc.lib ];
extraInstallPhase = let n = namespace; in ''
ln -s $out/lib/addons/${n}/libssd_wv.so $out/${pluginDir}/${n}/libssd_wv.so
'';
meta = {
homepage = https://github.com/peak3d/inputstream.adaptive;
description = "Kodi inputstream addon for several manifest types";
platforms = platforms.all;
maintainers = with maintainers; [ sephalon ];
};
};
}; in self }; in self

View File

@ -14,7 +14,10 @@ buildEnv {
do do
makeWrapper ${kodi}/bin/$exe $out/bin/$exe \ makeWrapper ${kodi}/bin/$exe $out/bin/$exe \
--prefix PYTHONPATH : ${kodi.pythonPackages.makePythonPath plugins} \ --prefix PYTHONPATH : ${kodi.pythonPackages.makePythonPath plugins} \
--prefix KODI_HOME : $out/share/kodi --prefix KODI_HOME : $out/share/kodi \
--prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath
(stdenv.lib.concatMap
(plugin: plugin.extraRuntimeDependencies) plugins)}"
done done
''; '';

View File

@ -20104,6 +20104,7 @@ in
++ optional (config.kodi.enablePVRHTS or false) pvr-hts ++ optional (config.kodi.enablePVRHTS or false) pvr-hts
++ optional (config.kodi.enablePVRHDHomeRun or false) pvr-hdhomerun ++ optional (config.kodi.enablePVRHDHomeRun or false) pvr-hdhomerun
++ optional (config.kodi.enablePVRIPTVSimple or false) pvr-iptvsimple ++ optional (config.kodi.enablePVRIPTVSimple or false) pvr-iptvsimple
++ optional (config.kodi.enableInputStreamAdaptive or false) inputstream-adaptive
); );
}; };