rpms/kodi/devel kodi-14.0-dvddemux-ffmpeg.patch, NONE, 1.1 kodi-14.0-hdhomerun.patch, NONE, 1.1 kodi-14.0-versioning.patch, NONE, 1.1 kodi-generate-tarball-xz.sh, NONE, 1.1 kodi.spec, NONE, 1.1 xbmc-13.0-dvdread.patch, NONE, 1.1 xbmc-13.0-libmysqlclient.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Michael Cronenworth mooninite at rpmfusion.org
Tue Dec 30 15:54:27 CET 2014


Author: mooninite

Update of /cvs/free/rpms/kodi/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv28023

Modified Files:
	.cvsignore sources 
Added Files:
	kodi-14.0-dvddemux-ffmpeg.patch kodi-14.0-hdhomerun.patch 
	kodi-14.0-versioning.patch kodi-generate-tarball-xz.sh 
	kodi.spec xbmc-13.0-dvdread.patch 
	xbmc-13.0-libmysqlclient.patch 
Log Message:
* Sun Dec 28 2014 Michael Cronenworth <mike at cchtml.com> - 14.0-1
- Update to 14.0 final


kodi-14.0-dvddemux-ffmpeg.patch:
 DVDDemuxFFmpeg.cpp |    4 ----
 1 file changed, 4 deletions(-)

--- NEW FILE kodi-14.0-dvddemux-ffmpeg.patch ---
--- xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp.orig	2014-08-01 11:18:24.000000000 -0500
+++ xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp	2014-08-24 15:36:34.844966866 -0500
@@ -519,10 +519,6 @@
 
 void CDVDDemuxFFmpeg::Flush()
 {
-  // naughty usage of an internal ffmpeg function
-  if (m_pFormatContext)
-    av_read_frame_flush(m_pFormatContext);
-
   m_currentPts = DVD_NOPTS_VALUE;
 
   m_pkt.result = -1;

kodi-14.0-hdhomerun.patch:
 Makefile.in                    |    5 --
 configure.in                   |    1 
 xbmc/filesystem/DllHDHomeRun.h |   79 ++++++++++++++++++++++++++---------------
 3 files changed, 53 insertions(+), 32 deletions(-)

--- NEW FILE kodi-14.0-hdhomerun.patch ---
>From 6c05d16be3bae96479363c2117c28c4261374ab4 Mon Sep 17 00:00:00 2001
From: Ken Dreyer <ktdreyer at ktdreyer.com>
Date: Fri, 24 Aug 2012 19:34:47 -0600
Subject: [PATCH 2/3] Fedora: use external hdhomerun

Original patch by Alex Lancaster <alexlan[AT]fedoraproject org>
(cherry picked from commit ef5c269992b32d67de7547e9f530b6c971381f45)
---
 Makefile.in                    |  5 +--
 configure.in                   |  1 -
 xbmc/filesystem/DllHDHomeRun.h | 78 ++++++++++++++++++++++++++++--------------
 3 files changed, 53 insertions(+), 31 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 8eda3c4..fbb19bd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -204,7 +204,6 @@
 LIB_DIRS=\
 	lib/cximage-6.0 \
 	lib/libexif \
-	lib/libhdhomerun \
 	lib/cpluff \
 	lib/xbmc-dll-symbols
 
@@ -425,8 +424,6 @@
 	$(MAKE) -C lib/libexif
 cmyth: dllloader
 	$(MAKE) -C lib/cmyth
-libhdhomerun: dllloader
-	$(MAKE) -C lib/libhdhomerun
 papcodecs: dllloader dvdpcodecs
 	test -d system/players/paplayer || mkdir system/players/paplayer
 	$(MAKE) -C lib/vgmstream
@@ -454,7 +451,7 @@
 
 codecs: papcodecs dvdpcodecs dvdpextcodecs
 
-libs: $(LIBSSE4) libhdhomerun imagelib libexif system/libcpluff- at ARCH@.so $(CMYTH)
+libs: $(LIBSSE4) imagelib libexif system/libcpluff- at ARCH@.so $(CMYTH)
 
 externals: codecs libs visualizations screensavers libaddon pvraddons
 
diff --git a/configure.in b/configure.in
index 343292e..2060e24 100644
--- a/configure.in
+++ b/configure.in
@@ -2544,7 +2544,6 @@ OUTPUT_FILES="Makefile \
     lib/libexif/Makefile \
     lib/libXDAAP/Makefile \
     lib/cmyth/Makefile \
-    lib/libhdhomerun/Makefile \
     lib/libsquish/Makefile \
     lib/cximage-6.0/Makefile \
     lib/libUPnP/Makefile \
diff --git a/xbmc/filesystem/DllHDHomeRun.h b/xbmc/filesystem/DllHDHomeRun.h
index 150b00f..57936be 100644
--- a/xbmc/filesystem/DllHDHomeRun.h
+++ b/xbmc/filesystem/DllHDHomeRun.h
@@ -20,7 +20,7 @@
  */
 
 #include "DynamicDll.h"
-#include "lib/libhdhomerun/hdhomerun.h"
+#include <hdhomerun/hdhomerun.h>
 
 class DllHdHomeRunInterface
 {
@@ -41,30 +41,56 @@ public:
 
 class DllHdHomeRun : public DllDynamic, public DllHdHomeRunInterface
 {
-  DECLARE_DLL_WRAPPER(DllHdHomeRun, DLL_PATH_LIBHDHOMERUN)
-  DEFINE_METHOD5(int, discover_find_devices_custom, (uint32_t p1, uint32_t p2, uint32_t p3, struct hdhomerun_discover_device_t p4[], int p5))
-  DEFINE_METHOD2(struct hdhomerun_device_t*, device_create_from_str, (const char* p1, struct hdhomerun_debug_t *p2))
-  DEFINE_METHOD1(void, device_destroy, (struct hdhomerun_device_t* p1))
-  DEFINE_METHOD1(int, device_stream_start, (struct hdhomerun_device_t* p1))
-  DEFINE_METHOD3(uint8_t*, device_stream_recv, (struct hdhomerun_device_t* p1, size_t p2, size_t* p3))
-  DEFINE_METHOD1(void, device_stream_stop, (struct hdhomerun_device_t* p1))
-  DEFINE_METHOD2(int, device_set_tuner_channel, (struct hdhomerun_device_t *p1, const char *p2))
-  DEFINE_METHOD2(int, device_set_tuner_program, (struct hdhomerun_device_t *p1, const char *p2))
-  DEFINE_METHOD2(int, device_set_tuner_from_str, (struct hdhomerun_device_t *p1, const char *p2))
-  DEFINE_METHOD2(void, device_set_tuner, (struct hdhomerun_device_t *p1, unsigned int p2))
-  DEFINE_METHOD3(int, device_get_tuner_status, (struct hdhomerun_device_t *p1, char **p2, struct hdhomerun_tuner_status_t *p3));
-  BEGIN_METHOD_RESOLVE()
-    RESOLVE_METHOD_RENAME(hdhomerun_discover_find_devices_custom, discover_find_devices_custom)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_create_from_str, device_create_from_str)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_destroy, device_destroy)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_stream_start, device_stream_start)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_stream_recv, device_stream_recv)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_stream_stop, device_stream_stop)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_channel, device_set_tuner_channel)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_program, device_set_tuner_program)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_from_str, device_set_tuner_from_str)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner, device_set_tuner)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_get_tuner_status, device_get_tuner_status)
-  END_METHOD_RESOLVE()
+public:
+  virtual ~DllHdHomeRun () {};
+
+  virtual int discover_find_devices_custom (uint32_t p1, uint32_t p2, uint32_t p3, struct hdhomerun_discover_device_t p4[], int p5)
+      { return ::hdhomerun_discover_find_devices_custom (p1, p2, p3, p4, p5); }
+
+  virtual struct hdhomerun_device_t *device_create_from_str (const char* p1, struct hdhomerun_debug_t *p2)
+      { return ::hdhomerun_device_create_from_str (p1, p2); }
+
+  virtual void device_destroy (struct hdhomerun_device_t* p1)
+      { ::hdhomerun_device_destroy (p1); }
+
+  virtual int device_stream_start (struct hdhomerun_device_t* p1)
+      { return ::hdhomerun_device_stream_start (p1); }
+
+
+  virtual uint8_t *device_stream_recv (struct hdhomerun_device_t* p1, size_t p2, size_t* p3)
+      { 
+        uint8_t *retval;
+
+        size_t tmp = *p3;
+        retval = ::hdhomerun_device_stream_recv (p1, p2, &tmp);
+        *p3 = tmp;
+
+        return retval;
+      }
+
+  virtual void device_stream_stop (struct hdhomerun_device_t* p1)
+      { ::hdhomerun_device_stream_stop (p1); }
+
+  virtual int device_set_tuner_channel (struct hdhomerun_device_t *p1, const char *p2)
+      { return ::hdhomerun_device_set_tuner_channel (p1, p2); }
+
+  virtual int device_set_tuner_program (struct hdhomerun_device_t *p1, const char *p2)
+      { return ::hdhomerun_device_set_tuner_program (p1, p2); }
+
+
+  virtual int device_set_tuner_from_str (struct hdhomerun_device_t *p1, const char *p2)
+      { return ::hdhomerun_device_set_tuner_from_str (p1, p2); }
+
+
+  virtual void device_set_tuner (struct hdhomerun_device_t *p1, unsigned int p2)
+      { ::hdhomerun_device_set_tuner (p1, p2); }
+
+  virtual int device_get_tuner_status (struct hdhomerun_device_t *p1, char **p2, struct hdhomerun_tuner_status_t *p3)
+      { return ::hdhomerun_device_get_tuner_status (p1, p2, p3); }
+
+  // DLL faking.
+  virtual bool ResolveExports() { return true; }
+  virtual bool Load() { return true; }
+  virtual void Unload() {}
 };
 
-- 
1.8.5.3


kodi-14.0-versioning.patch:
 Application.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE kodi-14.0-versioning.patch ---
--- a/xbmc/Application.cpp.orig	2014-09-02 23:33:50.772971473 -0500
+++ b/xbmc/Application.cpp	2014-09-02 23:36:52.579689432 -0500
@@ -690,7 +690,7 @@
   CProfilesManager::Get().Load();
 
   CLog::Log(LOGNOTICE, "-----------------------------------------------------------------------");
-  CLog::Log(LOGNOTICE, "Starting %s (%s). Platform: %s %s %d-bit", g_infoManager.GetAppName().c_str(), g_infoManager.GetVersion().c_str(),
+  CLog::Log(LOGNOTICE, "Starting %s from RPM Fusion (%s). Platform: %s %s %d-bit", g_infoManager.GetAppName().c_str(), g_infoManager.GetVersion().c_str(),
             g_sysinfo.GetBuildTargetPlatformName().c_str(), g_sysinfo.GetBuildTargetCpuFamily().c_str(), g_sysinfo.GetXbmcBitness());
 
   std::string buildType;


--- NEW FILE kodi-generate-tarball-xz.sh ---
#!/bin/sh

MAJORVERSION=14
MINORVERSION=0
#GITCOMMIT=e988513175fccca83f8b688bb77b932f6a403b96
#GITSHORT=ge988513
CODENAME=Helix

VERSION=${MAJORVERSION}.${MINORVERSION}${GITSHORT:+-${GITSHORT}}

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
    curl -o xbmc-$VERSION.zip -L $GITHUBURL
fi

# extract zipball
rm -rf xbmc-xbmc-*
unzip xbmc-$VERSION.zip

# Repair GitHub's odd auto-generated top-level directory...
mv xbmc-xbmc-* kodi-$VERSION

pushd kodi-$VERSION

# remove bundled libraries, saves space and forces using external versions
# grrr, *still* have to keep in ffmpeg for now (2011-12-28) since upstream
# seems to require files within that subdirectory <sigh>, filed
# http://trac.xbmc.org/ticket/12370
for i in  cximage-6.0/zlib libhdhomerun libmpeg2 ffmpeg
do
    rm -r lib/$i
done

# remove more bundled codecs
for i in libmpeg2
do
    rm -r kodi/cores/dvdplayer/DVDCodecs/Video/$i
done


# remove DVD stuff we can't ship, or is already in external libraries
for i in libdvdcss libdvdread includes
do
    rm -r lib/libdvd/$i
done

# remove all prebuilt binaries (e.g., Win32 DLLs)
find \( -type f -name '*.DLL' -o -name '*.dll' -o -name '*.lib' -o -name '*.obj' -o -name '*.exe' \) -print0 | xargs -0 rm -f

# remove all other packages that should be system-wide
# except for libass, cpluff (need to figure out how to
# remove these too)
# xbmc-dll-symbols seems to be XBMC-specific
for i in enca freetype libbluray libmicrohttpd libmodplug librtmp win32
do
    rm -r lib/$i
done

# TODO/FIXME: remove other unnecessary things under tools/
# also remove anything to do with win32
for i in win32buildtools
do
    rm -r tools/$i
done

popd

# repack
tar -cJvf kodi-$VERSION-patched.tar.xz kodi-$VERSION


--- NEW FILE kodi.spec ---
#global PRERELEASE rc3
%global DIRVERSION %{version}
#global GITCOMMIT Gotham_r2-ge988513
# use the line below for pre-releases
#global DIRVERSION %{version}%{PRERELEASE}
%global _hardened_build 1

Name: kodi
Version: 14.0
Release: 1%{?dist}
Summary: Media center

License: GPLv2+ and GPLv3+ and LGPLv2+ and BSD and MIT
# Main binary and all supporting files are GPLv2+/GPLv3+
# Some supporting libraries use the LGPL / BSD / MIT license
Group: Applications/Multimedia
URL: http://www.kodi.tv/
Source0: %{name}-%{DIRVERSION}-patched.tar.xz
# kodi contains code that we cannot ship, as well as redundant private
# copies of upstream libraries that we already distribute.  Therefore
# we use this script to remove the code before shipping it.
# Invoke this script while in the directory where the tarball is located:
# ./kodi-generate-tarball-xz.sh
Source1: kodi-generate-tarball-xz.sh

# filed ticket, but patch still needs work
# http://trac.xbmc.org/ticket/9658
Patch1: xbmc-13.0-dvdread.patch

# need to file trac ticket, this patch just forces external hdhomerun
# functionality, needs to be able fallback internal version
Patch2: kodi-14.0-hdhomerun.patch

# Avoid segfault during goom's configure
# https://bugzilla.redhat.com/1069079
Patch3: xbmc-13.0-libmysqlclient.patch

# Set program version parameters
Patch4: kodi-14.0-versioning.patch

# Remove call to internal ffmpeg function (misued anyway)
Patch5: kodi-14.0-dvddemux-ffmpeg.patch

# Kodi is the renamed XBMC project
Obsoletes: xbmc < 14.0-1
Provides: xbmc = %{version}

# Optional deps (not in EPEL)
%if 0%{?fedora}
# (libbluray in EPEL 6 is too old.)
%global _with_libbluray 1
%global _with_cwiid 1
%global _with_libssh 1
%global _with_libcec 1
%global _with_external_ffmpeg 1
%endif

%ifarch x86_64 i686
%global _with_crystalhd 1
%global _with_hdhomerun 1
%endif

# Upstream does not support ppc64
ExcludeArch: ppc64

BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: SDL_mixer-devel
BuildRequires: a52dec-devel
BuildRequires: afpfs-ng-devel
BuildRequires: avahi-devel
BuildRequires: bluez-libs-devel
BuildRequires: boost-devel
BuildRequires: bzip2-devel
BuildRequires: cmake
%if 0%{?_with_cwiid}
BuildRequires: cwiid-devel
%endif
BuildRequires: dbus-devel
BuildRequires: desktop-file-utils
BuildRequires: e2fsprogs-devel
BuildRequires: enca-devel
BuildRequires: expat-devel
BuildRequires: faad2-devel
%if 0%{?_with_external_ffmpeg}
BuildRequires: ffmpeg-devel
%endif
BuildRequires: flac-devel
BuildRequires: flex
BuildRequires: fontconfig-devel
BuildRequires: fontpackages-devel
BuildRequires: freetype-devel
BuildRequires: fribidi-devel
%if 0%{?el6}
BuildRequires: gettext-devel
%else
BuildRequires: gettext-autopoint
%endif
BuildRequires: glew-devel
BuildRequires: glib2-devel
BuildRequires: gperf
%if 0%{?_with_hdhomerun}
BuildRequires: hdhomerun-devel
%endif
BuildRequires: jasper-devel
BuildRequires: java-devel
BuildRequires: lame-devel
BuildRequires: libXinerama-devel
BuildRequires: libXmu-devel
BuildRequires: libXtst-devel
BuildRequires: libass-devel >= 0.9.7
%if 0%{?_with_libbluray}
BuildRequires: libbluray-devel
%endif
BuildRequires: libcap-devel
BuildRequires: libcdio-devel
%if 0%{?_with_libcec}
BuildRequires: libcec-devel >= 2.2.0
%endif
%if 0%{?_with_crystalhd}
BuildRequires: libcrystalhd-devel
%endif
BuildRequires: libcurl-devel
BuildRequires: libdca-devel
BuildRequires: libdvdread-devel
%if 0%{?el6}
BuildRequires: libjpeg-devel
%else
BuildRequires: libjpeg-turbo-devel
%endif
BuildRequires: libmad-devel
BuildRequires: libmicrohttpd-devel
BuildRequires: libmms-devel
BuildRequires: libmodplug-devel
BuildRequires: libmpcdec-devel
BuildRequires: libmpeg2-devel
BuildRequires: libogg-devel
# for AirPlay support
BuildRequires: libplist-devel
BuildRequires: libpng-devel
BuildRequires: librtmp-devel
BuildRequires: libsamplerate-devel
BuildRequires: libsmbclient-devel
%if 0%{?_with_libssh}
BuildRequires: libssh-devel
%endif
BuildRequires: libtiff-devel
BuildRequires: libtool
%ifnarch %{arm}
BuildRequires: libva-devel
BuildRequires: libvdpau-devel
%endif
BuildRequires: libvorbis-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: lzo-devel
BuildRequires: mariadb-devel
# ARM uses GLES
%ifarch %{arm}
BuildRequires: mesa-libEGL-devel
BuildRequires: mesa-libGLES-devel
%endif
BuildRequires: nasm
BuildRequires: pcre-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: python-devel
BuildRequires: python-pillow
BuildRequires: sqlite-devel
BuildRequires: swig
BuildRequires: systemd-devel
BuildRequires: taglib-devel >= 1.8
BuildRequires: tinyxml-devel
BuildRequires: tre-devel
BuildRequires: trousers-devel
BuildRequires: wavpack-devel
BuildRequires: yajl-devel
BuildRequires: zlib-devel

# nfs-utils-lib-devel package currently broken
#BuildRequires: nfs-utils-lib-devel

Requires: google-roboto-fonts
# need explicit requires for these packages
# as they are dynamically loaded via XBMC's arcane
# pseudo-DLL loading scheme (sigh)
%if 0%{?_with_libbluray}
Requires: libbluray%{?_isa}
%endif
%if 0%{?_with_libcec}
Requires: libcec%{?_isa} >= 2.2.0
%endif
%if 0%{?_with_crystalhd}
Requires: libcrystalhd%{?_isa}
%endif
Requires: libmad%{?_isa}
Requires: librtmp%{?_isa}

# needed when doing a minimal install, see
# https://bugzilla.rpmfusion.org/show_bug.cgi?id=1844
Requires: glx-utils
Requires: xorg-x11-utils

# This is just symlinked to, but needed both at build-time
# and for installation
Requires: python-pillow%{?_isa}


%description
Kodi is a free cross-platform media-player jukebox and entertainment hub.
Kodi can play a spectrum of of multimedia formats, and featuring playlist,
audio visualizations, slideshow, and weather forecast functions, together
third-party plugins.


%package devel
Summary: Development files needed to compile C programs against kodi
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
Kodi is a free cross-platform media-player jukebox and entertainment hub.
If you want to develop programs which use Kodi's libraries, you need to
install this package.


%package eventclients
Summary: Media center event client remotes

%description eventclients
This package contains support for using Kodi with the PS3 Remote, the Wii
Remote, a J2ME based remote and the command line xbmc-send utility.

%package eventclients-devel
Summary: Media center event client remotes development files
Requires:	%{name}-eventclients%{?_isa} = %{version}-%{release}
Requires:	%{name}-devel%{?_isa} = %{version}-%{release}
Obsoletes: xbmc-eventclients < 14.0-1
Provides:  xbmc-eventclients = %{version}

%description eventclients-devel
This package contains the development header files for the eventclients
library.


%prep
%setup -q -n %{name}-%{DIRVERSION}

%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p0

%if 0%{?_with_hdhomerun}
%else
  # Remove hdhomerun from the build.
  pushd xbmc/filesystem/
    rm HDHomeRunFile.cpp HDHomeRunFile.h
    rm HDHomeRunDirectory.cpp HDHomeRunDirectory.h
    sed -i Makefile.in -e '/HDHomeRunFile\.cpp/d'
    sed -i Makefile.in -e '/HDHomeRunDirectory\.cpp/d'
    sed -i DirectoryFactory.cpp -e '/HomeRun/d'
    sed -i FileFactory.cpp -e '/HomeRun/d'
  popd
%endif


%build
chmod +x bootstrap
./bootstrap
# Can't use export nor %%configure (implies using export), because
# the Makefile pile up *FLAGS in this case.

./configure \
--prefix=%{_prefix} --bindir=%{_bindir} --includedir=%{_includedir} \
--libdir=%{_libdir} --datadir=%{_datadir} \
--with-lirc-device=/var/run/lirc/lircd \
%if 0%{?_with_external_ffmpeg}
--with-ffmpeg=shared \
%endif
--enable-goom \
--enable-pulse \
%if 0%{?_with_libcec}
--enable-libcec \
%else
--disable-libcec \
%endif
%if 0%{?_with_libssh}
--enable-ssh \
%else
--disable-ssh \
%endif
--disable-dvdcss \
--disable-optimizations --disable-debug \
%ifnarch %{arm}
--enable-gl \
--disable-gles \
--enable-vdpau \
%else
--enable-gles \
--disable-vdpau \
--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" \
CXXFLAGS="$RPM_OPT_FLAGS -fPIC -I/usr/include/afpfs-ng/ -I/usr/include/samba-4.0/ -D__STDC_CONSTANT_MACROS" \
LDFLAGS="-fPIC" \
%if 0%{?_with_hdhomerun}
LIBS=" -lhdhomerun $LIBS" \
%endif
ASFLAGS=-fPIC

make %{?_smp_mflags} VERBOSE=1


%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
make -C tools/EventClients DESTDIR=$RPM_BUILD_ROOT install
# remove the doc files from unversioned /usr/share/doc/xbmc, they should be in versioned docdir
rm -r $RPM_BUILD_ROOT/%{_datadir}/doc/

desktop-file-install \
 --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
 $RPM_BUILD_ROOT%{_datadir}/applications/kodi.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
ln -s %{python_sitearch}/PIL $RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.module.pil/lib/PIL
#install -d $RPM_BUILD_ROOT%{_libdir}/xbmc/addons/script.module.pysqlite/lib
#ln -s %{python_sitearch}/pysqlite2 $RPM_BUILD_ROOT%{_libdir}/xbmc/addons/script.module.pysqlite/lib/pysqlite2

# Use external Roboto font files instead of bundled ones
ln -sf %{_fontbasedir}/google-roboto/Roboto-Regular.ttf ${RPM_BUILD_ROOT}%{_datadir}/kodi/addons/skin.confluence/fonts/
ln -sf %{_fontbasedir}/google-roboto/Roboto-Bold.ttf ${RPM_BUILD_ROOT}%{_datadir}/kodi/addons/skin.confluence/fonts/

# Move man-pages into system dir
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/
mv docs/manpages ${RPM_BUILD_ROOT}%{_mandir}/man1/

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :


%postun
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi


%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files
%license copying.txt LICENSE.GPL
%doc CONTRIBUTORS README.md docs
%{_bindir}/kodi
%{_bindir}/kodi-standalone
%{_bindir}/xbmc
%{_bindir}/xbmc-standalone
%{_libdir}/kodi
%{_libdir}/xbmc
%{_datadir}/kodi
%{_datadir}/xbmc
%{_datadir}/xsessions/kodi.desktop
%{_datadir}/xsessions/xbmc.desktop
%{_datadir}/applications/kodi.desktop
%{_datadir}/icons/hicolor/*/*/*.png
%{_mandir}/man1/kodi.1.gz
%{_mandir}/man1/kodi.bin.1.gz
%{_mandir}/man1/kodi-standalone.1.gz


%files devel
%{_includedir}/kodi
%{_includedir}/xbmc


%files eventclients
%license copying.txt LICENSE.GPL
%python_sitelib/kodi
%dir %{_datadir}/pixmaps/kodi
%{_datadir}/pixmaps/kodi/*.png
%{_bindir}/kodi-j2meremote
%{_bindir}/kodi-ps3d
%{_bindir}/kodi-ps3remote
%{_bindir}/kodi-send
%{_bindir}/kodi-wiiremote
%{_mandir}/man1/kodi-j2meremote.1.gz
%{_mandir}/man1/kodi-ps3remote.1.gz
%{_mandir}/man1/kodi-send.1.gz
%{_mandir}/man1/kodi-standalone.1.gz
%{_mandir}/man1/kodi-wiiremote.1.gz


%files eventclients-devel
%{_includedir}/kodi/xbmcclient.h


%changelog
* Sun Dec 28 2014 Michael Cronenworth <mike at cchtml.com> - 14.0-1
- Update to 14.0 final

* Tue Dec 09 2014 Michael Cronenworth <mike at cchtml.com> - 14.0-0.4.rc3
- Update to 14.0 RC3

* Sun Nov 09 2014 Michael Cronenworth <mike at cchtml.com> - 14.0-0.3.beta2
- Update to 14.0 beta 2

* Tue Sep 02 2014 Michael Cronenworth <mike at cchtml.com> - 14.0-0.2.alpha3
- Update to 14.0 alpha 3

* Sun Aug 24 2014 Michael Cronenworth <mike at cchtml.com> - 14.0-0.1.alpha2
- Update to 14.0 alpha 2
- Renamed XBMC to Kodi

xbmc-13.0-dvdread.patch:
 bootstrap.mk           |    5 -----
 configure.in           |   18 ------------------
 lib/libdvd/Makefile.in |   21 +++++++--------------
 3 files changed, 7 insertions(+), 37 deletions(-)

--- NEW FILE xbmc-13.0-dvdread.patch ---
>From 7bc0877dc9715e891159392abf669f970722dece Mon Sep 17 00:00:00 2001
From: Ken Dreyer <ktdreyer at ktdreyer.com>
Date: Mon, 6 May 2013 17:07:40 -0600
Subject: [PATCH 1/3] Fedora: use external dvdread

Original patch by Alex Lancaster <alexlan[AT]fedoraproject org>
(cherry picked from commit 9f9845af842a376d5bdf70742785e7727695fd03)
---
 bootstrap.mk           |  5 -----
 configure.in           | 19 -------------------
 lib/libdvd/Makefile.in | 20 +++++++-------------
 3 files changed, 7 insertions(+), 37 deletions(-)

diff --git a/bootstrap.mk b/bootstrap.mk
index 8bc4795..1fc31a4 100644
--- a/bootstrap.mk
+++ b/bootstrap.mk
@@ -8,7 +8,6 @@ ifneq ($(wildcard lib/libdvd/libdvdcss/configure.ac),)
 BOOTSTRAP_SUBDIRS += lib/libdvd/libdvdcss/configure.ac
 DVD_CSS=lib/libdvd/libdvdcss/configure
 endif
-BOOTSTRAP_SUBDIRS += lib/libdvd/libdvdread/configure.ac
 BOOTSTRAP_SUBDIRS += lib/libdvd/libdvdnav/configure.ac
 
 ifneq ($(wildcard pvr-addons/Makefile.am),)
@@ -18,10 +17,6 @@ endif
 BOOTSTRAP_TARGETS=$(basename $(BOOTSTRAP_SUBDIRS))
 all: $(BOOTSTRAP_TARGETS)
 
-#preserve order for libdvd. dvdcss (if present) -> dvdread -> dvdnav.
-lib/libdvd/libdvdread/configure: $(DVD_CSS)
-lib/libdvd/libdvdnav/configure: lib/libdvd/libdvdread/configure
-
 %: %.ac
 	autoreconf -vif $(@D)
 	- at rm -rf $(@D)/autom4te.cache
diff --git a/configure.in b/configure.in
index beb8aac..343292e 100644
--- a/configure.in
+++ b/configure.in
@@ -2860,27 +2860,9 @@
     --with-pic
 ], [$SKIP_CONFIG_DVDCSS])
 
-XB_CONFIG_MODULE([lib/libdvd/libdvdread], [
-  ./configure2 \
-    --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../libdvdcss/src $DROID_DVDLIB_SEEK64" \
-    --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
-    --host=$host_alias \
-    --build=$build_alias \
-    --target=$target_alias \      
-    --enable-static \
-    --disable-shared \
-    --disable-strip \
-    --disable-opts \
-    --cc="$CC" &&
-  mkdir -p `pwd`/../includes/dvdread
-  cp `pwd`/../libdvdread/src/*.h `pwd`/../includes/dvdread
-  cp `pwd`/../libdvdread/src/dvdread/*.h `pwd`/../includes/dvdread
-], [0])
-
 XB_CONFIG_MODULE([lib/libdvd/libdvdnav], [
   ./configure2 \
     --extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../includes $DROID_DVDLIB_SEEK64" \
-    --extra-ldflags="-L`pwd`/../libdvdread/obj" \
     --with-dvdread-config="`pwd`/../dvdread-config" \
     --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
     --host=$host_alias \
diff --git a/lib/libdvd/Makefile.in b/lib/libdvd/Makefile.in
index 69d2286..1f5eebb 100644
--- a/lib/libdvd/Makefile.in
+++ b/lib/libdvd/Makefile.in
@@ -5,8 +5,7 @@ CXX=@CXX@
 
 SYSDIR=@abs_top_srcdir@/system/players/dvdplayer
 SOS= libdvdnav-$(ARCH).so
-DIRS=	libdvdread \
-	libdvdnav
+DIRS=	libdvdnav
 
 WRAPPER=@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o
 WRAPPER_MACH_ALIAS=@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias
@@ -14,7 +13,7 @@ WRAPPER_MACH_ALIAS=@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_al
 ifeq ($(findstring osx,$(ARCH)),osx)
 LDFLAGS +=-bundle -undefined dynamic_lookup -read_only_relocs suppress
 else
-LDFLAGS += -shared -fPIC -rdynamic
+LDFLAGS += -shared -fPIC -rdynamic -ldvdread
 endif
 
 ifeq ($(ARCH), powerpc-osx)
@@ -35,8 +34,7 @@ SLIB=$(addprefix $(SYSDIR)/, $(SOS))
 
 DISTCLEAN_FILES=includes/dvdread/*.h \
 		includes/dvdcss/*.h \
-		libdvdnav/config.h \
-		libdvdread/config.h
+		libdvdnav/config.h
 
 .PHONY: $(DIRS) compile
 
@@ -48,9 +46,9 @@ $(SYSDIR)/libdvdcss-$(ARCH).so:  $($(WRAPPER)) libdvdcss/src/.libs/libdvdcss.a
 	$(CC) $(LDFLAGS) -Wl,-alias_list,$(WRAPPER_MACH_ALIAS) -o $@ \
 		$(WRAPPER) libdvdcss/src/*.o $(BUNDLE1_O)
 
-$(SYSDIR)/libdvdnav-$(ARCH).so: $($(WRAPPER)) $(DVDCSS_A) libdvdread/obj/libdvdread.a libdvdnav/obj/libdvdnav.a
+$(SYSDIR)/libdvdnav-$(ARCH).so: $($(WRAPPER)) $(DVDCSS_A) libdvdnav/obj/libdvdnav.a
 	$(CC) $(LDFLAGS) -Wl,-alias_list,$(WRAPPER_MACH_ALIAS) -o $@ \
-		$(WRAPPER) $(DVDCSS_O) libdvdread/obj/*.o libdvdnav/obj/*.o $(BUNDLE1_O)
+		$(WRAPPER) $(DVDCSS_O) libdvdnav/obj/*.o $(BUNDLE1_O)
 
 else
 
@@ -59,8 +57,8 @@ $(SYSDIR)/libdvdcss-$(ARCH).so: $(WRAPPER) libdvdcss/src/.libs/libdvdcss.a
 		libdvdcss/src/*.o -Wl,--unresolved-symbols=ignore-all -lm \
 		`cat $(WRAPPER:.o=.def)` $(WRAPPER)
 
-$(SYSDIR)/libdvdnav-$(ARCH).so: $(WRAPPER) $(DVDCSS_A) libdvdread/obj/libdvdread.a libdvdnav/obj/libdvdnav.a
-	$(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ $(DVDCSS_O) libdvdread/obj/*.o libdvdnav/obj/*.o -lm \
+$(SYSDIR)/libdvdnav-$(ARCH).so: $(WRAPPER) $(DVDCSS_A) libdvdnav/obj/libdvdnav.a
+	$(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ $(DVDCSS_O) libdvdnav/obj/*.o -lm \
 		-Wl,--unresolved-symbols=ignore-all \
 		`cat $(WRAPPER:.o=.def)` $(WRAPPER)
 
@@ -70,10 +68,6 @@ libdvdcss/src/.libs/libdvdcss.a: libdvdcss;
 libdvdcss: compile
 	$(MAKE) -C $@
 
-libdvdread/obj/libdvdread.a: libdvdread;
-libdvdread: compile
-	$(MAKE) -C $@
-
 libdvdnav/obj/libdvdnav.a: libdvdnav;
 libdvdnav: compile
 	$(MAKE) -C $@
-- 
1.8.5.3


xbmc-13.0-libmysqlclient.patch:
 configure.in |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE xbmc-13.0-libmysqlclient.patch ---
>From 72331ff10f1815cb0c1b64dd15a16aa9b14b1559 Mon Sep 17 00:00:00 2001
From: Ken Dreyer <ktdreyer at ktdreyer.com>
Date: Sat, 22 Feb 2014 13:46:01 -0700
Subject: [PATCH 3/3] Fedora: selectively avoid linking libmysqlclient

If libmysqlclient and libtspi are linked to the same binary, we get a
segfault. In XBMC, libavfilter pulls in libgnutls, which pulls in
libtspi.

See https://bugzilla.redhat.com/1069079
---
 configure.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure.in b/configure.in
index 2060e24..2a20339 100644
--- a/configure.in
+++ b/configure.in
@@ -2898,6 +2898,7 @@ XB_CONFIG_MODULE([xbmc/visualizations/Goom/goom2k4-0],[
   ./configure  \
     CFLAGS="$CFLAGS" \ 
     CXXFLAGS="$CXXFLAGS" \
+    LIBS="$(echo $LIBS | sed -e s/-lmysqlclient//g)" \
     --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
     --host=$host_alias \
     --build=$build_alias \
@@ -2924,6 +2925,7 @@ XB_CONFIG_MODULE([xbmc/screensavers/rsxs-0.9/], [
     CXX="$CXX" \
     CFLAGS="$TEMPCFLAGS" \ 
     CXXFLAGS="$CXXFLAGS" \
+    LIBS="$(echo $LIBS | sed -e s/-lmysqlclient//g)" \
     `if test "$host_vendor" = "apple"; then echo --with-png=${prefix} --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib; fi` \
     --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
     --host=$host_alias \
-- 
1.8.5.3



Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/kodi/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	30 Dec 2014 13:56:21 -0000	1.1
+++ .cvsignore	30 Dec 2014 14:54:26 -0000	1.2
@@ -0,0 +1 @@
+kodi-14.0-patched.tar.xz


Index: sources
===================================================================
RCS file: /cvs/free/rpms/kodi/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	30 Dec 2014 13:56:21 -0000	1.1
+++ sources	30 Dec 2014 14:54:27 -0000	1.2
@@ -0,0 +1 @@
+3534c37d3eeb917a5872818a253eee72  kodi-14.0-patched.tar.xz


More information about the rpmfusion-commits mailing list