commit 239546edd042411485174c68fbb7a6dfa4fbd2b4
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Sat Jul 30 12:39:02 2016 -0500
Disable DVD support, fix CURL definitions
kodi-17a2-curl.patch | 28 ++++++++++++++++++++++++++++
kodi-17a2-libdvd.patch | 21 +++++++++++++++++++++
kodi.spec | 32 +++++++++++++++++++++++---------
3 files changed, 72 insertions(+), 9 deletions(-)
---
diff --git a/kodi-17a2-curl.patch b/kodi-17a2-curl.patch
new file mode 100644
index 0000000..cd69e79
--- /dev/null
+++ b/kodi-17a2-curl.patch
@@ -0,0 +1,28 @@
+--- a/xbmc/filesystem/DllLibCurl.h 2016-07-30 12:05:53.891636907 -0500
++++ b/xbmc/filesystem/DllLibCurl.h 2016-07-30 12:06:36.590142106 -0500
+@@ -52,7 +52,7 @@
+ virtual CURLMcode multi_fdset(CURLM *multi_handle, fd_set *read_fd_set, fd_set
*write_fd_set, fd_set *exc_fd_set, int *max_fd)=0;
+ virtual CURLMcode multi_timeout(CURLM *multi_handle, long *timeout)=0;
+ virtual CURLMsg* multi_info_read(CURLM *multi_handle, int *msgs_in_queue)=0;
+- virtual void multi_cleanup(CURL_HANDLE * handle )=0;
++ virtual void multi_cleanup(CURLM *multi_handle)=0;
+ virtual struct curl_slist* slist_append(struct curl_slist *, const char *)=0;
+ virtual void slist_free_all(struct curl_slist *)=0;
+ };
+--- a/xbmc/filesystem/CurlFile.h 2016-07-30 12:07:48.496992870 -0500
++++ b/xbmc/filesystem/CurlFile.h 2016-07-30 12:08:32.160505849 -0500
+@@ -27,8 +27,12 @@
+
+ namespace XCURL
+ {
+- typedef void CURL_HANDLE;
+- typedef void CURLM;
++ #define CURL CURL_HANDLE
++ #include <netdb.h>
++ #include <curl/curl.h>
++ #undef CURL
++ typedef struct XCURL::Curl_easy CURL_HANDLE;
++ typedef struct XCURL::Curl_multi CURLM;
+ struct curl_slist;
+ }
+
diff --git a/kodi-17a2-libdvd.patch b/kodi-17a2-libdvd.patch
new file mode 100644
index 0000000..2e652bc
--- /dev/null
+++ b/kodi-17a2-libdvd.patch
@@ -0,0 +1,21 @@
+--- a/Makefile.in 2016-06-30 14:18:13.000000000 -0500
++++ b/Makefile.in 2016-07-30 12:23:17.468082870 -0500
+@@ -10,8 +10,7 @@
+ tools/EventClients
+
+ DVDPCODECS_DIRS= \
+- lib \
+- lib/libdvd
++ lib
+
+ VideoPlayer_ARCHIVES=xbmc/cores/VideoPlayer/VideoPlayer.a \
+ xbmc/cores/VideoPlayer/DVDCodecs/DVDCodecs.a \
+@@ -343,7 +342,6 @@
+ $(MAKE) -C lib/addons/library.xbmc.pvr
+ $(MAKE) -C lib/addons/library.kodi.inputstream
+ dvdpcodecs: dllloader
+- $(MAKE) -C lib/libdvd
+
+ dvdpextcodecs:
+
+
diff --git a/kodi.spec b/kodi.spec
index 6282b24..27e165f 100644
--- a/kodi.spec
+++ b/kodi.spec
@@ -4,6 +4,7 @@
# use the line below for pre-releases
%global DIRVERSION %{version}%{PRERELEASE}
%global _hardened_build 1
+%global _with_dvd 0
Name: kodi
Version: 17.0
@@ -23,9 +24,23 @@ Source0: %{name}-%{DIRVERSION}-patched.tar.xz
# ./kodi-generate-tarball-xz.sh
Source1: kodi-generate-tarball-xz.sh
+%if 0%{?_with_dvd}
+# kodi uses modified libdvd{nav,read} source and downloads at build time
+# wget -O kodi-libdvdnav-master.tar.gz
https://github.com/xbmc/libdvdnav/archive/master.tar.gz
+Source2: kodi-libdvdnav-master.tar.gz
+# wget -O kodi-libdvdread-master.tar.gz
https://github.com/xbmc/libdvdread/archive/master.tar.gz
+Source3: kodi-libdvdread-master.tar.gz
+%endif
+
# Set program version parameters
Patch1: kodi-16.0-versioning.patch
+# Fix curl namespace definitions
+Patch2: kodi-17a2-curl.patch
+
+# Drop DVD library support
+Patch3: kodi-17a2-libdvd.patch
+
# Optional deps (not in EPEL)
%if 0%{?fedora}
# (libbluray in EPEL 6 is too old.)
@@ -100,7 +115,6 @@ BuildRequires: libcrystalhd-devel
%endif
BuildRequires: libcurl-devel
BuildRequires: libdca-devel
-BuildRequires: libdvdread-devel
%if 0%{?el6}
BuildRequires: libjpeg-devel
%else
@@ -234,7 +248,13 @@ library.
%prep
%setup -q -n %{name}-%{DIRVERSION}
-%patch1 -p1
+%patch1 -p1 -b.versioning
+%patch2 -p1 -b.curl
+%patch3 -p1 -b.libdvd
+%if 0%{?_with_dvd}
+cp -p %{SOURCE2} tools/depends/target/libdvdnav/libdvdnav-master.tar.gz
+cp -p %{SOURCE3} tools/depends/target/libdvdread/libdvdread-master.tar.gz
+%endif
%build
@@ -253,9 +273,7 @@ chmod +x bootstrap
%if 0%{?_with_wayland}
--enable-wayland \
%endif
---enable-goom \
--enable-pulse \
---enable-joystick \
%if 0%{?_with_libcec}
--enable-libcec \
%else
@@ -266,7 +284,7 @@ chmod +x bootstrap
%else
--disable-ssh \
%endif
---disable-dvdcss \
+--disable-optical-drive \
--disable-optimizations --disable-debug \
%ifnarch %{arm}
--enable-gl \
@@ -278,10 +296,6 @@ chmod +x bootstrap
--disable-vaapi \
%ifarch armv7hl \
--enable-tegra \
---disable-neon \
-%endif
-%ifarch armv7hnl
---enable-neon \
%endif
%endif
CFLAGS="$RPM_OPT_FLAGS -fPIC -I/usr/include/afpfs-ng/ -I/usr/include/samba-4.0/
-D__STDC_CONSTANT_MACROS" \