commit a2ab9322fc09f0ee116037b3a4561e90b2733f34
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Mon May 18 12:46:57 2020 -0500
Link against Python 2 again. The Python 3 experiment was a disaster.
kodi-18-python3-0001.patch | 54 ---
kodi-18-python3-0002.patch | 931 ---------------------------------------------
kodi-18-python3-0003.patch | 370 ------------------
kodi.spec | 58 +--
4 files changed, 12 insertions(+), 1401 deletions(-)
---
diff --git a/kodi.spec b/kodi.spec
index 20508b4..f792a67 100644
--- a/kodi.spec
+++ b/kodi.spec
@@ -34,7 +34,7 @@
Name: kodi
Version: 18.6
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Media center
License: GPLv2+ and GPLv3+ and LGPLv2+ and BSD and MIT
@@ -74,25 +74,17 @@ 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
+Patch4: kodi-18-assert.patch
# Workaround for brp-mangle-shebangs behavior (RHBZ#1787088)
-Patch8: kodi-18-brp-mangle-shebangs.patch
+Patch5: kodi-18-brp-mangle-shebangs.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
+Patch6: kodi-18-libfmt.patch
%ifarch x86_64 i686
%global _with_crystalhd 1
@@ -221,12 +213,11 @@ BuildRequires: pcre-devel
BuildRequires: pixman-devel
BuildRequires: pulseaudio-libs-devel
%if 0%{?fedora} > 31
-BuildRequires: python3-devel
-BuildRequires: python3-pillow
+BuildRequires: python27
%else
BuildRequires: python2-devel
-BuildRequires: python2-pillow
%endif
+BuildRequires: python2-pillow
BuildRequires: /usr/bin/pathfix.py
BuildRequires: rapidjson-devel
BuildRequires: sqlite-devel
@@ -289,11 +280,7 @@ Requires: xorg-x11-utils
# This is just symlinked to, but needed both at build-time
# and for installation
-%if 0%{?fedora} > 31
-Requires: python3-pillow%{?_isa}
-%else
Requires: python2-pillow%{?_isa}
-%endif
%description common
Common Kodi files and binaries
@@ -377,22 +364,12 @@ This package contains the Kodi binary for X11 servers.
%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.assert
+%patch5 -p1 -b.brp-mangle-shebangs
+%patch6 -p1 -b.libfmt
# Fix up Python shebangs
-%if 0%{?fedora} > 31
-pathfix.py -pni "%{__python3} %{py3_shbang_opts}" \
-%else
pathfix.py -pni "%{__python2} %{py2_shbang_opts}" \
-%endif
tools/EventClients/lib/python/zeroconf.py \
tools/EventClients/Clients/PS3BDRemote/ps3_remote.py \
tools/EventClients/lib/python/ps3/sixaxis.py \
@@ -401,10 +378,8 @@ pathfix.py -pni "%{__python2} %{py2_shbang_opts}" \
tools/EventClients/Clients/KodiSend/kodi-send.py \
tools/EventClients/lib/python/xbmcclient.py
-%if 0%{?fedora} < 32
# Fix python binary search
sed -i 's/ pkg_check_modules(PC_PYTHON python>=2.7 QUIET)/
pkg_check_modules(PC_PYTHON python=2.7 QUIET)/' cmake/modules/FindPython.cmake
-%endif
%build
@@ -430,11 +405,7 @@ do
-DLIRC_DEVICE=/var/run/lirc/lircd \
-DLIBDVDNAV_URL=%{SOURCE2} \
-DLIBDVDREAD_URL=%{SOURCE3} \
-%if 0%{?fedora} > 31
- -DPYTHON_EXECUTABLE=%{__python3} \
-%else
-DPYTHON_EXECUTABLE=%{__python2} \
-%endif
-DCORE_PLATFORM_NAME=$BACKEND \
%ifarch x86_64 i686
-DWAYLAND_RENDER_SYSTEM=gl \
@@ -470,11 +441,7 @@ rm -f $RPM_BUILD_ROOT/%{_datadir}/xsessions/xbmc.desktop
# Normally we are expected to build these manually. But since we are using
# the system Python interpreter, we also want to use the system libraries
install -d $RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.module.pil/lib
-%if 0%{?fedora} > 31
-ln -s %{python3_sitearch}/PIL
$RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.module.pil/lib/PIL
-%else
ln -s %{python2_sitearch}/PIL
$RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.module.pil/lib/PIL
-%endif
#install -d $RPM_BUILD_ROOT%{_libdir}/xbmc/addons/script.module.pysqlite/lib
#ln -s %{python2_sitearch}/pysqlite2
$RPM_BUILD_ROOT%{_libdir}/xbmc/addons/script.module.pysqlite/lib/pysqlite2
@@ -522,11 +489,7 @@ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/kodi-wiiremote.1
%files eventclients
%license LICENSE.md LICENSES/
-%if 0%{?fedora} > 31
-%{python3_sitelib}/kodi
-%else
%{python2_sitelib}/kodi
-%endif
%dir %{_datadir}/pixmaps/kodi
%{_datadir}/pixmaps/kodi/*.png
%{_bindir}/kodi-ps3remote
@@ -566,6 +529,9 @@ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/kodi-wiiremote.1
%changelog
+* Mon May 18 2020 Michael Cronenworth <mike(a)cchtml.com> - 18.6-4
+- Link against python27
+
* Sun Apr 26 2020 Michael Cronenworth <mike(a)cchtml.com> - 18.6-3
- Python 3 and libfmt fixes