commit c211fe65f87b01e0d526f578d3b84ecc901dcecf
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Mon Jul 6 18:56:16 2020 -0500
Rebase against Kodi 19 git snapshots
kodi-18-assert.patch | 21 -
kodi-18-libfmt.patch | 44 --
kodi-18-python3-0001.patch | 54 ---
kodi-18-python3-0002.patch | 931 ---------------------------------------
kodi-18-python3-0003.patch | 370 ----------------
kodi-18.0-versioning.patch | 12 -
kodi-19-httprequesthandler.patch | 20 +
kodi-19-python.patch | 41 ++
kodi-19-versioning.patch | 11 +
kodi-19-webserver.patch | 29 ++
kodi-generate-tarball-xz.sh | 14 +-
kodi.spec | 59 +--
12 files changed, 132 insertions(+), 1474 deletions(-)
---
diff --git a/kodi-19-httprequesthandler.patch b/kodi-19-httprequesthandler.patch
new file mode 100644
index 0000000..e0b279c
--- /dev/null
+++ b/kodi-19-httprequesthandler.patch
@@ -0,0 +1,20 @@
+--- a/xbmc/network/httprequesthandler/HTTPRequestHandlerUtils.cpp 2020-07-05
15:50:53.000000000 -0500
++++ b/xbmc/network/httprequesthandler/HTTPRequestHandlerUtils.cpp 2020-07-06
18:19:35.362146987 -0500
+@@ -41,7 +41,7 @@ int HTTPRequestHandlerUtils::GetRequestH
+ if (connection == nullptr)
+ return -1;
+
+- return MHD_get_connection_values(connection, kind, FillArgumentMap,
&headerValues);
++ return MHD_get_connection_values(connection, kind,
(MHD_KeyValueIterator)FillArgumentMap, &headerValues);
+ }
+
+ int HTTPRequestHandlerUtils::GetRequestHeaderValues(struct MHD_Connection *connection,
enum MHD_ValueKind kind, std::multimap<std::string, std::string> &headerValues)
+@@ -49,7 +49,7 @@ int HTTPRequestHandlerUtils::GetRequestH
+ if (connection == nullptr)
+ return -1;
+
+- return MHD_get_connection_values(connection, kind, FillArgumentMultiMap,
&headerValues);
++ return MHD_get_connection_values(connection, kind,
(MHD_KeyValueIterator)FillArgumentMultiMap, &headerValues);
+ }
+
+ bool HTTPRequestHandlerUtils::GetRequestedRanges(struct MHD_Connection *connection,
uint64_t totalLength, CHttpRanges &ranges)
diff --git a/kodi-19-python.patch b/kodi-19-python.patch
new file mode 100644
index 0000000..3bddb90
--- /dev/null
+++ b/kodi-19-python.patch
@@ -0,0 +1,41 @@
+--- a/xbmc/interfaces/python/PythonInvoker.cpp 2020-07-05 15:50:53.000000000 -0500
++++ b/xbmc/interfaces/python/PythonInvoker.cpp 2020-07-06 18:15:35.325028237 -0500
+@@ -10,17 +10,6 @@
+ #include <Python.h>
+ #include <iterator>
+
+-// This is a workaround to compile Kodi against python 3.8
+-//! @todo implement a compliant way to get access to the chain of thread states
+-#if PY_VERSION_HEX >= 0x03080000
+-# define Py_BUILD_CORE
+-# undef HAVE_STD_ATOMIC
+-/* for access to the fields of PyInterpreterState */
+-# include <internal/pycore_pystate.h>
+-# undef Py_BUILD_CORE
+-# define HAVE_STD_ATOMIC
+-#endif
+-
+ #include "Application.h"
+ #include "PythonInvoker.h"
+ #include "ServiceBroker.h"
+@@ -406,9 +395,9 @@ bool CPythonInvoker::execute(const std::
+ // make sure all sub threads have finished
+ for (PyThreadState* old = nullptr; m_threadState != nullptr;)
+ {
+- PyThreadState* s = m_threadState->interp->tstate_head;
++ PyThreadState* s = PyInterpreterState_ThreadHead(m_threadState->interp);
+ for (; s && s == m_threadState;)
+- s = s->next;
++ s = PyThreadState_Next(s);
+
+ if (!s)
+ break;
+@@ -536,7 +525,7 @@ bool CPythonInvoker::stop(bool abort)
+ PyEval_RestoreThread((PyThreadState*)m_threadState);
+ }
+
+- for (PyThreadState* state =
((PyThreadState*)m_threadState)->interp->tstate_head; state; state =
state->next)
++ for (PyThreadState* state =
PyInterpreterState_ThreadHead(m_threadState->interp); state; state =
PyThreadState_Next(state))
+ {
+ // Raise a SystemExit exception in python threads
+ Py_XDECREF(state->async_exc);
diff --git a/kodi-19-versioning.patch b/kodi-19-versioning.patch
new file mode 100644
index 0000000..317bed3
--- /dev/null
+++ b/kodi-19-versioning.patch
@@ -0,0 +1,11 @@
+--- a/xbmc/Application.cpp 2020-07-05 15:50:53.000000000 -0500
++++ b/xbmc/Application.cpp 2020-07-06 17:37:10.892852743 -0500
+@@ -439,7 +439,7 @@ bool CApplication::Create(const CAppPara
+ init_emu_environ();
+
+ CLog::Log(LOGINFO,
"-----------------------------------------------------------------------");
+- CLog::Log(LOGINFO, "Starting %s (%s). Platform: %s %s %d-bit",
CSysInfo::GetAppName().c_str(),
++ CLog::Log(LOGINFO, "Starting %s from RPM Fusion (%s). Platform: %s %s
%d-bit", CSysInfo::GetAppName().c_str(),
+ CSysInfo::GetVersion().c_str(),
g_sysinfo.GetBuildTargetPlatformName().c_str(),
+ g_sysinfo.GetBuildTargetCpuFamily().c_str(), g_sysinfo.GetXbmcBitness());
+
diff --git a/kodi-19-webserver.patch b/kodi-19-webserver.patch
new file mode 100644
index 0000000..6d351a3
--- /dev/null
+++ b/kodi-19-webserver.patch
@@ -0,0 +1,29 @@
+--- a/xbmc/network/WebServer.cpp 2020-07-05 15:50:53.000000000 -0500
++++ b/xbmc/network/WebServer.cpp 2020-07-06 17:24:42.764074424 -0500
+@@ -510,7 +510,7 @@
+ return;
+
+ // otherwise we can use MHD's POST processor
+- connectionHandler->postprocessor = MHD_create_post_processor(request.connection,
MAX_POST_BUFFER_SIZE, &CWebServer::HandlePostField,
static_cast<void*>(connectionHandler));
++ connectionHandler->postprocessor = MHD_create_post_processor(request.connection,
MAX_POST_BUFFER_SIZE, (MHD_PostDataIterator)(&CWebServer::HandlePostField),
static_cast<void*>(connectionHandler));
+
+ // MHD doesn't seem to be able to handle this post request
+ if (connectionHandler->postprocessor == nullptr)
+@@ -1155,7 +1155,7 @@
+ port,
+ 0,
+ 0,
+- &CWebServer::AnswerToConnection,
++
(MHD_AccessHandlerCallback)(&CWebServer::AnswerToConnection),
+ this,
+
+ MHD_OPTION_CONNECTION_LIMIT, 512,
+@@ -1182,7 +1182,7 @@
+ port,
+ 0,
+ 0,
+- &CWebServer::AnswerToConnection,
++
(MHD_AccessHandlerCallback)(&CWebServer::AnswerToConnection),
+ this,
+
+ MHD_OPTION_CONNECTION_LIMIT, 512,
diff --git a/kodi-generate-tarball-xz.sh b/kodi-generate-tarball-xz.sh
index 9475bd5..b8d6585 100755
--- a/kodi-generate-tarball-xz.sh
+++ b/kodi-generate-tarball-xz.sh
@@ -1,15 +1,15 @@
#!/bin/sh
-MAJORVERSION=18
-MINORVERSION=6
-#GITCOMMIT=e988513175fccca83f8b688bb77b932f6a403b96
-#GITSHORT=ge988513
-CODENAME=Leia
+MAJORVERSION=19
+MINORVERSION=0
+GITCOMMIT=b6daed5dc4f8ab6d0b50cc8bcb80bfb9e6a3e583
+GITSHORT=b6daed5
+CODENAME=Matrix
VERSION=${MAJORVERSION}.${MINORVERSION}${GITSHORT:+-${GITSHORT}}
-GITHUBURL=https://github.com/xbmc/xbmc/zipball/$VERSION-$CODENAME
-#GITHUBURL=https://github.com/xbmc/xbmc/zipball/$GITCOMMIT
+#GITHUBURL=https://github.com/xbmc/xbmc/zipball/$VERSION-$CODENAME
+GITHUBURL=https://github.com/xbmc/xbmc/zipball/$GITCOMMIT
# download zipball
if [[ ! -f xbmc-$VERSION.zip ]]; then
diff --git a/kodi.spec b/kodi.spec
index 20508b4..ef56cff 100644
--- a/kodi.spec
+++ b/kodi.spec
@@ -1,7 +1,8 @@
#global PRERELEASE rc5
-%global DIRVERSION %{version}
-#global GITCOMMIT Gotham_r2-ge988513
+#global DIRVERSION %{version}
+%global GITCOMMIT b6daed5
# use the line below for pre-releases
+%global DIRVERSION %{version}-%{GITCOMMIT}
#global DIRVERSION %{version}%{PRERELEASE}
%global _hardened_build 1
@@ -33,8 +34,8 @@
%endif
Name: kodi
-Version: 18.6
-Release: 3%{?dist}
+Version: 19.0
+Release: 0.20200705gitb6daed5%{?dist}
Summary: Media center
License: GPLv2+ and GPLv3+ and LGPLv2+ and BSD and MIT
@@ -66,7 +67,7 @@ Source5: ffmpeg-4.0.4-Leia-18.4.tar.gz
%endif
# Set program version parameters
-Patch1: kodi-18.0-versioning.patch
+Patch1: kodi-19-versioning.patch
# Prevent trousers from being linked, which breaks Samba
Patch2: kodi-18-trousers.patch
@@ -74,25 +75,15 @@ Patch2: kodi-18-trousers.patch
# Fix an annobin issue
Patch3: kodi-18-annobin-workaround.patch
-# Python 3 support
-#
https://github.com/xbmc/xbmc/commits/feature_python3
-#
https://github.com/xbmc/xbmc/issues/16560
-Patch4: kodi-18-python3-0001.patch
-Patch5: kodi-18-python3-0002.patch
-# apply latest git master work for Python 3 crashing fixes
-Patch6: kodi-18-python3-0003.patch
-
-# Fix missing include (gcc requirement)
-Patch7: kodi-18-assert.patch
-
# Workaround for brp-mangle-shebangs behavior (RHBZ#1787088)
-Patch8: kodi-18-brp-mangle-shebangs.patch
+Patch4: kodi-18-brp-mangle-shebangs.patch
+
+# GCC/libmicrohttpd casting fix
+Patch5: kodi-19-webserver.patch
+Patch6: kodi-19-httprequesthandler.patch
-# libfmt change fixed an issue that broke Kodi, both libfmt and Kodi fixed it, but we can
apply the Kodi-only fix
-#
https://github.com/fmtlib/fmt/issues/1620
-#
https://github.com/xbmc/xbmc/issues/17629
-#
https://github.com/xbmc/xbmc/pull/17683
-Patch9: kodi-18-libfmt.patch
+# Python 3.9 fix
+Patch7: kodi-19-python.patch
%ifarch x86_64 i686
%global _with_crystalhd 1
@@ -145,6 +136,7 @@ BuildRequires: giflib-devel
BuildRequires: glew-devel
BuildRequires: glib2-devel
BuildRequires: gperf
+BuildRequires: gtest-devel
BuildRequires: jasper-devel
BuildRequires: java-devel
BuildRequires: lame-devel
@@ -229,6 +221,7 @@ BuildRequires: python2-pillow
%endif
BuildRequires: /usr/bin/pathfix.py
BuildRequires: rapidjson-devel
+BuildRequires: spdlog-devel
BuildRequires: sqlite-devel
BuildRequires: swig
BuildRequires: systemd-devel
@@ -372,20 +365,11 @@ This package contains the Kodi binary for X11 servers.
%setup -q -n %{name}-%{DIRVERSION}
%patch1 -p1 -b.versioning
%patch2 -p1 -b.trousers
-
-%if 0%{?fedora} > 29
%patch3 -p1 -b.innobinfix
-%endif
-
-%if 0%{?fedora} > 31
-%patch4 -p1 -b.python3-0001
-%patch5 -p1 -b.python3-0002
-%patch6 -p1 -b.python3-0003
-%endif
-
-%patch7 -p1 -b.assert
-%patch8 -p1 -b.brp-mangle-shebangs
-%patch9 -p1 -b.libfmt
+%patch4 -p1 -b.brp-mangle-shebangs
+%patch5 -p1 -b.webserver
+%patch6 -p1 -b.httprequesthandler
+%patch7 -p1 -b.python
# Fix up Python shebangs
%if 0%{?fedora} > 31
@@ -437,9 +421,11 @@ do
%endif
-DCORE_PLATFORM_NAME=$BACKEND \
%ifarch x86_64 i686
+ -DX11_RENDER_SYSTEM=gl \
-DWAYLAND_RENDER_SYSTEM=gl \
-DGBM_RENDER_SYSTEM=gl \
%else
+ -DX11_RENDER_SYSTEM=gles \
-DWAYLAND_RENDER_SYSTEM=gles \
-DGBM_RENDER_SYSTEM=gles \
%endif
@@ -566,6 +552,9 @@ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/kodi-wiiremote.1
%changelog
+* Mon Jul 06 2020 Michael Cronenworth <mike(a)cchtml.com> -
19.0-0.20200705gitb6daed5
+- Initial version 19 snapshot
+
* Sun Apr 26 2020 Michael Cronenworth <mike(a)cchtml.com> - 18.6-3
- Python 3 and libfmt fixes