All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/7] meta_oe_security_flags: Disable PIE for s3c64xx-gpio/s3c24xx-gpio/cpufrequtils
@ 2016-11-03  8:20 Khem Raj
  2016-11-03  8:20 ` [meta-oe][PATCH 2/7 V2] boinc: Add recipe for boinc-client Khem Raj
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Khem Raj @ 2016-11-03  8:20 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/conf/distro/include/meta_oe_security_flags.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-oe/conf/distro/include/meta_oe_security_flags.inc b/meta-oe/conf/distro/include/meta_oe_security_flags.inc
index b0d30a3..93f35e2 100644
--- a/meta-oe/conf/distro/include/meta_oe_security_flags.inc
+++ b/meta-oe/conf/distro/include/meta_oe_security_flags.inc
@@ -6,3 +6,6 @@ SECURITY_CFLAGS_pn-rrdtool = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-llvm3.3 = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-mozjs = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-openldap = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-s3c64xx-gpio = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-s3c24xx-gpio = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-cpufrequtils = "${SECURITY_NO_PIE_CFLAGS}"
-- 
2.10.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 2/7 V2] boinc: Add recipe for boinc-client
  2016-11-03  8:20 [meta-oe][PATCH 1/7] meta_oe_security_flags: Disable PIE for s3c64xx-gpio/s3c24xx-gpio/cpufrequtils Khem Raj
@ 2016-11-03  8:20 ` Khem Raj
  2016-11-03  8:20 ` [meta-oe][PATCH 3/7] libplist: Remove rpaths surgically Khem Raj
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2016-11-03  8:20 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- Document patches
- Fix build without X
- Add proper build time dependencies with/without X

 .../boinc/boinc-client/boinc-AM_CONDITIONAL.patch  | 24 ++++++
 .../boinc/boinc-client/cross-compile.patch         | 98 ++++++++++++++++++++++
 .../boinc/boinc-client/gtk-configure.patch         | 29 +++++++
 .../boinc/boinc-client/opengl_m4_check.patch       | 19 +++++
 .../recipes-extended/boinc/boinc-client_7.6.33.bb  | 77 +++++++++++++++++
 5 files changed, 247 insertions(+)
 create mode 100644 meta-oe/recipes-extended/boinc/boinc-client/boinc-AM_CONDITIONAL.patch
 create mode 100644 meta-oe/recipes-extended/boinc/boinc-client/cross-compile.patch
 create mode 100644 meta-oe/recipes-extended/boinc/boinc-client/gtk-configure.patch
 create mode 100644 meta-oe/recipes-extended/boinc/boinc-client/opengl_m4_check.patch
 create mode 100644 meta-oe/recipes-extended/boinc/boinc-client_7.6.33.bb

diff --git a/meta-oe/recipes-extended/boinc/boinc-client/boinc-AM_CONDITIONAL.patch b/meta-oe/recipes-extended/boinc/boinc-client/boinc-AM_CONDITIONAL.patch
new file mode 100644
index 0000000..7becb94
--- /dev/null
+++ b/meta-oe/recipes-extended/boinc/boinc-client/boinc-AM_CONDITIONAL.patch
@@ -0,0 +1,24 @@
+Add configure check for gtk2+ and objc++
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+--- A/configure.ac
++++ B/configure.ac
+@@ -39,6 +39,7 @@ AC_PROG_CC
+ AC_PROG_CXX
+ AC_PROG_F77
+ AC_PROG_CPP
++AC_PROG_OBJCXX
+ AC_PROG_MAKE_SET
+ SAH_LINKS
+ AC_LANG_PUSH(C)
+@@ -744,6 +745,8 @@ AM_CONDITIONAL(ENABLE_LIBRARIES, [test "
+ AM_CONDITIONAL(INSTALL_HEADERS, [test "${enable_install_headers}" = yes])
+ AM_CONDITIONAL(HAVE_CUDA_LIB, [test "${enable_client}" = yes -a -f ./coprocs/CUDA/posix/${boinc_platform}/libcudart.so])
+ 
++PKG_CHECK_MODULES([GTK2], [gtk+-2.0])
++
+ dnl ======================================================================
+ dnl some more vodoo required for building portable client-binary (client, clientgui)
+ dnl ======================================================================
diff --git a/meta-oe/recipes-extended/boinc/boinc-client/cross-compile.patch b/meta-oe/recipes-extended/boinc/boinc-client/cross-compile.patch
new file mode 100644
index 0000000..287391a
--- /dev/null
+++ b/meta-oe/recipes-extended/boinc/boinc-client/cross-compile.patch
@@ -0,0 +1,98 @@
+Remove rpath, its bad for cross compiling to encode
+build time rpaths
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: boinc-client_release-7.6-7.6.33/api/Makefile.am
+===================================================================
+--- boinc-client_release-7.6-7.6.33.orig/api/Makefile.am
++++ boinc-client_release-7.6-7.6.33/api/Makefile.am
+@@ -43,18 +43,18 @@ endif
+ 
+ lib_LTLIBRARIES = libboinc_api.la
+ libboinc_api_la_SOURCES = $(api_files)
+-libboinc_api_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION)
++libboinc_api_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
+ 
+ if BUILD_GRAPHICS_API
+ lib_LTLIBRARIES += libboinc_graphics2.la
+ libboinc_graphics2_la_SOURCES = $(graphics2_files)
+ libboinc_graphics2_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/samples/image_libs
+-libboinc_graphics2_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION) -ljpeg
++libboinc_graphics2_la_LDFLAGS = -version-number $(LIBBOINC_VERSION) -ljpeg
+ endif #BUILD_GRAPHICS_API
+ 
+ lib_LTLIBRARIES += libboinc_opencl.la
+ libboinc_opencl_la_SOURCES = $(opencl_files)
+-libboinc_opencl_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION)
++libboinc_opencl_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
+ 
+ if INSTALL_HEADERS
+ ## install only headers that are meant for exporting the API !!
+Index: boinc-client_release-7.6-7.6.33/lib/Makefile.am
+===================================================================
+--- boinc-client_release-7.6-7.6.33.orig/lib/Makefile.am
++++ boinc-client_release-7.6-7.6.33/lib/Makefile.am
+@@ -173,7 +173,7 @@ lib_LTLIBRARIES = libboinc.la
+ libboinc_la_SOURCES = $(generic_sources) $(mac_sources) $(win_sources)
+ libboinc_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
+ libboinc_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
+-libboinc_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -static -version-number $(LIBBOINC_VERSION)
++libboinc_la_LDFLAGS = -static -version-number $(LIBBOINC_VERSION)
+ libboinc_la_LIBADD =
+ 
+ if ENABLE_BOINCCRYPT
+@@ -181,7 +181,7 @@ lib_LTLIBRARIES += libboinc_crypt.la
+ libboinc_crypt_la_SOURCES = crypt.cpp
+ libboinc_crypt_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CFLAGS)
+ libboinc_crypt_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CXXFLAGS)
+-libboinc_crypt_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -static -version-number $(LIBBOINC_VERSION)
++libboinc_crypt_la_LDFLAGS = -static -version-number $(LIBBOINC_VERSION)
+ libboinc_crypt_la_LIBADD =
+ endif
+ 
+@@ -190,7 +190,7 @@ lib_LTLIBRARIES += libboinc_fcgi.la
+ libboinc_fcgi_la_SOURCES = $(libfcgi_sources) $(mac_sources) $(win_sources)
+ libboinc_fcgi_la_CFLAGS = -D_USING_FCGI_ $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
+ libboinc_fcgi_la_CXXFLAGS = -D_USING_FCGI_ $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
+-libboinc_fcgi_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION)
++libboinc_fcgi_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
+ libboinc_fcgi_la_LIBADD =
+ endif 
+ # end of "if ENABLE_FCGI"
+Index: boinc-client_release-7.6-7.6.33/sched/Makefile.am
+===================================================================
+--- boinc-client_release-7.6-7.6.33.orig/sched/Makefile.am
++++ boinc-client_release-7.6-7.6.33/sched/Makefile.am
+@@ -26,7 +26,7 @@ lib_LTLIBRARIES = libsched.la
+ libsched_la_SOURCES = $(libsched_sources)
+ libsched_la_CFLAGS = $(AM_CPPFLAGS)
+ libsched_la_CXXFLAGS = $(AM_CPPFLAGS)
+-libsched_la_LDFLAGS= -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION)
++libsched_la_LDFLAGS= -version-number $(LIBBOINC_VERSION)
+ libsched_la_LIBADD= $(SSL_LIBS)
+ 
+ ## install only headers that are meant for exporting the API !!
+@@ -48,7 +48,7 @@ lib_LTLIBRARIES += libsched_fcgi.la
+ libsched_fcgi_la_SOURCES = $(libsched_sources)
+ libsched_fcgi_la_CFLAGS = -D_USING_FCGI_ $(AM_CPPFLAGS)
+ libsched_fcgi_la_CXXFLAGS = -D_USING_FCGI_ $(AM_CPPFLAGS)
+-libsched_fcgi_la_LDFLAGS= -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION)
++libsched_fcgi_la_LDFLAGS= -version-number $(LIBBOINC_VERSION)
+ libsched_fcgi_la_LIBADD=
+ 
+ endif
+Index: boinc-client_release-7.6-7.6.33/zip/Makefile.am
+===================================================================
+--- boinc-client_release-7.6-7.6.33.orig/zip/Makefile.am
++++ boinc-client_release-7.6-7.6.33/zip/Makefile.am
+@@ -61,7 +61,7 @@ endif
+ 
+ lib_LTLIBRARIES = libboinc_zip.la
+ libboinc_zip_la_SOURCES = $(libboinc_zip_sources)
+-libboinc_zip_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION)
++libboinc_zip_la_LDFLAGS = -version-number $(LIBBOINC_VERSION)
+ libboinc_zip_la_LIBADD =
+ 
+ # Some OSs may not prefix libraries with lib.
diff --git a/meta-oe/recipes-extended/boinc/boinc-client/gtk-configure.patch b/meta-oe/recipes-extended/boinc/boinc-client/gtk-configure.patch
new file mode 100644
index 0000000..4ae8d58
--- /dev/null
+++ b/meta-oe/recipes-extended/boinc/boinc-client/gtk-configure.patch
@@ -0,0 +1,29 @@
+Check for gtk2+ only when manager is enabled
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: boinc-client_release-7.6-7.6.33/configure.ac
+===================================================================
+--- boinc-client_release-7.6-7.6.33.orig/configure.ac
++++ boinc-client_release-7.6-7.6.33/configure.ac
+@@ -1033,6 +1033,11 @@ else
+   AM_CONDITIONAL([GUI_GTK], false)
+ fi
+ 
++dnl ---------- GTK+2.0-----------------------------------------------------
++if test "X${no_x}" != "Xyes"; then
++  PKG_CHECK_MODULES([GTK2], [gtk+-2.0])
++fi
++
+ dnl ---------- libNotify --------------------------------------------------
+ if test "${enable_manager}" = yes ; then
+   PKG_CHECK_MODULES(LIBNOTIFY, [libnotify])
+@@ -1082,7 +1087,6 @@ AM_CONDITIONAL(ENABLE_BOINCCRYPT, [test
+ AM_CONDITIONAL(INSTALL_HEADERS, [test "${enable_install_headers}" = yes])
+ AM_CONDITIONAL(HAVE_CUDA_LIB, [test "${enable_client}" = yes -a -f ./coprocs/CUDA/posix/${boinc_platform}/libcudart.so])
+ 
+-PKG_CHECK_MODULES([GTK2], [gtk+-2.0])
+ 
+ dnl ======================================================================
+ dnl some more vodoo required for building portable client-binary (client, clientgui)
diff --git a/meta-oe/recipes-extended/boinc/boinc-client/opengl_m4_check.patch b/meta-oe/recipes-extended/boinc/boinc-client/opengl_m4_check.patch
new file mode 100644
index 0000000..0b057ea
--- /dev/null
+++ b/meta-oe/recipes-extended/boinc/boinc-client/opengl_m4_check.patch
@@ -0,0 +1,19 @@
+Do not add prefix/lib to library search path
+let sysroot take care of that
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate[Cross-compile specific]
+
+Index: boinc-client_release-7.6-7.6.33/m4/ax_check_gl.m4
+===================================================================
+--- boinc-client_release-7.6-7.6.33.orig/m4/ax_check_gl.m4
++++ boinc-client_release-7.6-7.6.33/m4/ax_check_gl.m4
+@@ -58,7 +58,7 @@ else
+     else
+       ax_try_lib="${ax_lib}"
+     fi
+-    LIBS="-L${prefix}/lib ${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
++    LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
+     AC_LINK_IFELSE(
+     [AC_LANG_PROGRAM([[
+ # if HAVE_WINDOWS_H && defined(_WIN32)
diff --git a/meta-oe/recipes-extended/boinc/boinc-client_7.6.33.bb b/meta-oe/recipes-extended/boinc/boinc-client_7.6.33.bb
new file mode 100644
index 0000000..ac5f755
--- /dev/null
+++ b/meta-oe/recipes-extended/boinc/boinc-client_7.6.33.bb
@@ -0,0 +1,77 @@
+# Copyright (C) 2016 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Open-source software for volunteer computing"
+DESCRIPTION = "The Berkeley Open Infrastructure for Network Computing (BOINC) is an open- \
+source software platform which supports distributed computing, primarily in \
+the form of volunteer computing and desktop Grid computing.  It is well \
+suited for problems which are often described as trivially parallel.  BOINC \
+is the underlying software used by projects such as SETI@home, Einstein@Home, \
+ClimatePrediciton.net, the World Community Grid, and many other distributed \
+computing projects. \
+This package installs the BOINC client software, which will allow your \
+computer to participate in one or more BOINC projects, using your spare \
+computer time to search for cures for diseases, model protein folding, study \
+global warming, discover sources of gravitational waves, and many other types \
+of scientific and mathematical research."
+
+HOMEPAGE = "http://boinc.berkeley.edu/"
+LICENSE = "LGPLv2+ & GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6"
+SECTION = "applications"
+DEPENDS = "curl \
+           jpeg \
+           openssl \
+           sqlite3 \
+           virtual/libgl \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libnotify', '', d)} \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+ libnotify xcb-util libxscrnsaver', '', d)} \
+           nettle \
+"
+
+SRC_URI = "https://github.com/BOINC/boinc/archive/client_release/7.6/${PV}.tar.gz \
+           file://boinc-AM_CONDITIONAL.patch \
+           file://opengl_m4_check.patch \
+           file://cross-compile.patch \
+           file://gtk-configure.patch \
+"
+SRC_URI[md5sum] = "437b4b98e384b4bda4ef7056e68166ac"
+SRC_URI[sha256sum] = "c4b1c29b9655013e0ac61dddf47ad7f30f38c46159f02a9d9dc8ab854e99aa6d"
+
+inherit gettext autotools-brokensep pkgconfig
+
+S = "${WORKDIR}/${BPN}_release-7.6-${PV}"
+
+EXTRA_OECONF += "\
+    --enable-libraries \
+    --enable-unicode \
+    --enable-shared \
+    --enable-dynamic-client-linkage \
+    --enable-client \
+    --disable-server \
+    --disable-static \
+    --disable-manager \
+    --with-ssl=${STAGING_EXECPREFIXDIR} \
+    --without-wxdir \
+    --without-x \
+    --with-boinc-platform=${TARGET_SYS} \
+"
+export PKG_CONFIG = "${STAGING_BINDIR_NATIVE}/pkg-config"
+
+do_configure_prepend () {
+	if "${@bb.utils.contains('DEPENDS', 'gtk+', '1', '0', d)}" = "0"
+	then
+		export GTK2_CFLAGS=""
+		export GTK2_LIBS=""
+	fi
+}
+
+do_compile_prepend () {
+	# Disable rpaths
+	sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${B}/${TARGET_SYS}-libtool
+	sed -i -e 's|^sys_lib_dlsearch_path_spec=.*|sys_lib_dlsearch_path_spec=""|g' ${B}/${TARGET_SYS}-libtool
+	sed -i -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${B}/${TARGET_SYS}-libtool
+}
+
+SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
-- 
2.10.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 3/7] libplist: Remove rpaths surgically
  2016-11-03  8:20 [meta-oe][PATCH 1/7] meta_oe_security_flags: Disable PIE for s3c64xx-gpio/s3c24xx-gpio/cpufrequtils Khem Raj
  2016-11-03  8:20 ` [meta-oe][PATCH 2/7 V2] boinc: Add recipe for boinc-client Khem Raj
@ 2016-11-03  8:20 ` Khem Raj
  2016-11-03  8:20 ` [meta-oe][PATCH 4/7] meta_oe_security_flags.inc: Add libcec, libmodplug, libcdio Khem Raj
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2016-11-03  8:20 UTC (permalink / raw)
  To: openembedded-devel

Fixes QA errors like below

  /usr/lib/python2.7/site-packages/plist/__init__.py
  /usr/lib/python2.7/site-packages/plist/_plist.so
  /usr/lib/python2.7/site-packages/plist/plist.py
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
libplist: 3 installed and not shipped files. [installed-vs-shipped]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-extended/libimobiledevice/libplist_1.8.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist_1.8.bb b/meta-oe/recipes-extended/libimobiledevice/libplist_1.8.bb
index 10d40fb..ae9351b 100644
--- a/meta-oe/recipes-extended/libimobiledevice/libplist_1.8.bb
+++ b/meta-oe/recipes-extended/libimobiledevice/libplist_1.8.bb
@@ -16,8 +16,14 @@ SRC_URI = "http://www.libimobiledevice.org/downloads/libplist-${PV}.tar.bz2 \
 SRC_URI[md5sum] = "2a9e0258847d50f9760dc3ece25f4dc6"
 SRC_URI[sha256sum] = "a418da3880308199b74766deef2a760a9b169b81a868a6a9032f7614e20500ec"
 
-PACKAGES =+ "${PN}-utils ${PN}++"
+do_install_append () {
+        chrpath -d ${D}${libdir}/python*/site-packages/plist/_plist.so
+}
+
+PACKAGES =+ "${PN}-utils ${PN}++ ${PN}-python"
 FILES_${PN} = "${libdir}/libplist${SOLIBS}"
 FILES_${PN}++ = "${libdir}/libplist++${SOLIBS}"
 FILES_${PN}-utils = "${bindir}/*"
+FILES_${PN}-python = "${libdir}/python*/site-packages/*"
+
 
-- 
2.10.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 4/7] meta_oe_security_flags.inc: Add libcec, libmodplug, libcdio
  2016-11-03  8:20 [meta-oe][PATCH 1/7] meta_oe_security_flags: Disable PIE for s3c64xx-gpio/s3c24xx-gpio/cpufrequtils Khem Raj
  2016-11-03  8:20 ` [meta-oe][PATCH 2/7 V2] boinc: Add recipe for boinc-client Khem Raj
  2016-11-03  8:20 ` [meta-oe][PATCH 3/7] libplist: Remove rpaths surgically Khem Raj
@ 2016-11-03  8:20 ` Khem Raj
  2016-11-03  8:20 ` [meta-multimedia][PATCH 5/7] dcadec, libsquish: Add new recipes Khem Raj
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2016-11-03  8:20 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/conf/distro/include/meta_oe_security_flags.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-oe/conf/distro/include/meta_oe_security_flags.inc b/meta-oe/conf/distro/include/meta_oe_security_flags.inc
index 93f35e2..2559948 100644
--- a/meta-oe/conf/distro/include/meta_oe_security_flags.inc
+++ b/meta-oe/conf/distro/include/meta_oe_security_flags.inc
@@ -9,3 +9,6 @@ SECURITY_CFLAGS_pn-openldap = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-s3c64xx-gpio = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-s3c24xx-gpio = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-cpufrequtils = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-libcec = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-libmodplug = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-libcdio = "${SECURITY_NO_PIE_CFLAGS}"
-- 
2.10.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-multimedia][PATCH 5/7] dcadec, libsquish: Add new recipes
  2016-11-03  8:20 [meta-oe][PATCH 1/7] meta_oe_security_flags: Disable PIE for s3c64xx-gpio/s3c24xx-gpio/cpufrequtils Khem Raj
                   ` (2 preceding siblings ...)
  2016-11-03  8:20 ` [meta-oe][PATCH 4/7] meta_oe_security_flags.inc: Add libcec, libmodplug, libcdio Khem Raj
@ 2016-11-03  8:20 ` Khem Raj
  2016-11-03  8:20 ` [meta-oe][PATCH 6/7] libcec: Update to 3.1.0+ Khem Raj
  2016-11-03  8:20 ` [meta-multimedia][PATCH 7/7] kodi: Update to krypton release ( 17.x ) Khem Raj
  5 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2016-11-03  8:20 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Koen Kooi

Transport from meta-dominion, to support
new kodi mediacenter

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-multimedia/dca/dcadec_0.2.0.bb            | 17 +++++++++++++++++
 .../recipes-multimedia/libsquish/libsquish_git.bb     | 19 +++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 meta-multimedia/recipes-multimedia/dca/dcadec_0.2.0.bb
 create mode 100644 meta-multimedia/recipes-multimedia/libsquish/libsquish_git.bb

diff --git a/meta-multimedia/recipes-multimedia/dca/dcadec_0.2.0.bb b/meta-multimedia/recipes-multimedia/dca/dcadec_0.2.0.bb
new file mode 100644
index 0000000..45b53c1
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/dca/dcadec_0.2.0.bb
@@ -0,0 +1,17 @@
+SUMMARY = "DTS Coherent Acoustics decoder with support for HD extensions"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c"
+
+SRCREV = "b93deed1a231dd6dd7e39b9fe7d2abe05aa00158"
+SRC_URI = "git://github.com/foo86/dcadec.git;protocol=http"
+
+S = "${WORKDIR}/git"
+
+inherit lib_package
+
+EXTRA_OEMAKE = "CONFIG_SHARED=1"
+
+do_install() {
+	oe_runmake install DESTDIR="${D}" PREFIX="${prefix}"
+}
diff --git a/meta-multimedia/recipes-multimedia/libsquish/libsquish_git.bb b/meta-multimedia/recipes-multimedia/libsquish/libsquish_git.bb
new file mode 100644
index 0000000..f060f1e
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/libsquish/libsquish_git.bb
@@ -0,0 +1,19 @@
+SUMMARY = "The squish library (abbreviated to libsquish) is an open source DXT compression library written in C++ "
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://alpha.cpp;beginline=3;endline=22;md5=6665e479f71feb92d590ea9ae9b9f6d5"
+
+PV = "1.10+git${SRCPV}"
+
+SRCREV = "52e7d93c5947f72380521116c05d97c528863ba8"
+SRC_URI = "git://github.com/OpenELEC/libsquish.git;protocol=https"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = "INSTALL_DIR=${D}${prefix}"
+
+do_install() {
+	install -d ${D}${includedir}
+	install -d ${D}${libdir}/pkgconfig
+	oe_runmake install 
+}
-- 
2.10.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-oe][PATCH 6/7] libcec: Update to 3.1.0+
  2016-11-03  8:20 [meta-oe][PATCH 1/7] meta_oe_security_flags: Disable PIE for s3c64xx-gpio/s3c24xx-gpio/cpufrequtils Khem Raj
                   ` (3 preceding siblings ...)
  2016-11-03  8:20 ` [meta-multimedia][PATCH 5/7] dcadec, libsquish: Add new recipes Khem Raj
@ 2016-11-03  8:20 ` Khem Raj
  2016-11-03  8:20 ` [meta-multimedia][PATCH 7/7] kodi: Update to krypton release ( 17.x ) Khem Raj
  5 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2016-11-03  8:20 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Koen Kooi

Depends on p8platform therefore add recipe for
p8platform

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-extended/libcec/libcec_git.bb         | 16 ++++++++++------
 meta-oe/recipes-extended/p8platform/p8platform_git.bb | 18 ++++++++++++++++++
 2 files changed, 28 insertions(+), 6 deletions(-)
 create mode 100644 meta-oe/recipes-extended/p8platform/p8platform_git.bb

diff --git a/meta-oe/recipes-extended/libcec/libcec_git.bb b/meta-oe/recipes-extended/libcec/libcec_git.bb
index 0f2a64e..ee49efb 100644
--- a/meta-oe/recipes-extended/libcec/libcec_git.bb
+++ b/meta-oe/recipes-extended/libcec/libcec_git.bb
@@ -2,18 +2,22 @@ SUMMARY = "USB CEC Adaptor communication Library"
 HOMEPAGE = "http://libcec.pulse-eight.com/"
 
 LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5e8e16396992369f73f3d28875f846da"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e61fd86f9c947b430126181da2c6c715"
 
-DEPENDS = "udev lockdev"
+DEPENDS = "p8platform udev lockdev"
 
-PV = "2.1.4"
+PV = "3.1.0+gitr${SRCPV}"
 
-SRCREV = "81e38211724bc6e8bd7a60f484433053ed682635"
-SRC_URI = "git://github.com/Pulse-Eight/libcec.git;branch=release"
+SRCREV = "6d68d21243aa92862592435e8396b4280ea46c3f"
+SRC_URI = "git://github.com/Pulse-Eight/libcec.git"
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+inherit cmake pkgconfig
+
+# Disable python wrapper, it doesn't have crosscompiles
+EXTRA_OECMAKE = "-DCMAKE_INSTALL_LIBDIR=${libdir} -DCMAKE_INSTALL_LIBDIR_NOARCH=${libdir} \
+                 -DSKIP_PYTHON_WRAPPER=1"
 
 # cec-client and xbmc need the .so present to work :(
 FILES_${PN} += "${libdir}/*.so"
diff --git a/meta-oe/recipes-extended/p8platform/p8platform_git.bb b/meta-oe/recipes-extended/p8platform/p8platform_git.bb
new file mode 100644
index 0000000..f6347c2
--- /dev/null
+++ b/meta-oe/recipes-extended/p8platform/p8platform_git.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Platform support library used by libCEC and binary add-ons for Kodi"
+HOMEPAGE = "http://libcec.pulse-eight.com/"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://src/os.h;md5=752555fa94e82005d45fd201fee5bd33"
+
+PV = "2.1.0"
+
+SRC_URI = "git://github.com/Pulse-Eight/platform.git"
+SRCREV = "d7bceb64541cb046421cbcd4c98d91e9bf24822f"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+EXTRA_OECMAKE += "-DCMAKE_INSTALL_LIBDIR=${libdir} -DCMAKE_INSTALL_LIBDIR_NOARCH=${libdir}"
+
+FILES_${PN}-dev += "${libdir}/p8-platform"
-- 
2.10.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-multimedia][PATCH 7/7] kodi: Update to krypton release ( 17.x )
  2016-11-03  8:20 [meta-oe][PATCH 1/7] meta_oe_security_flags: Disable PIE for s3c64xx-gpio/s3c24xx-gpio/cpufrequtils Khem Raj
                   ` (4 preceding siblings ...)
  2016-11-03  8:20 ` [meta-oe][PATCH 6/7] libcec: Update to 3.1.0+ Khem Raj
@ 2016-11-03  8:20 ` Khem Raj
  2016-11-03  8:26   ` Koen Kooi
  5 siblings, 1 reply; 9+ messages in thread
From: Khem Raj @ 2016-11-03  8:20 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Koen Kooi

remove obsoleted xbmc recipes
rename to recipes-mediacenter

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../kodi/jsonschemabuilder-native.bb               |  24 ++
 .../0001-Update-to-p8-platform.patch               | 427 +++++++++++++++++++++
 .../kodi/kodi-addon-pvr-hts_git.bb                 |  55 +++
 .../0001-Fix-build-after-platform-rename.patch     |  67 ++++
 .../0001-fix-cross-compile-badness.patch           |  40 ++
 .../kodi-platform-02_no-multi-lib.patch            |  12 +
 .../recipes-mediacenter/kodi/kodi-platform_git.bb  |  39 ++
 .../recipes-mediacenter/kodi/kodi-startup.bb       |  20 +
 .../kodi/kodi-startup/kodi.service                 |  14 +
 ...re-don-t-try-to-run-stuff-to-find-tinyxml.patch |  25 ++
 .../kodi/kodi/0002-handle-SIGTERM.patch            | 163 ++++++++
 ...-to-read-frequency-output-if-using-intel-.patch |  26 ++
 .../kodi/kodi/0004-Disable-DVD-support.patch       |  35 ++
 .../recipes-mediacenter/kodi/kodi_17.bb            | 177 +++++++++
 ...on-t-run-python-distutils-to-find-STAGING.patch |  31 --
 ...d-ios-Add-memory-barriers-to-atomic-Add-S.patch |  97 -----
 ...d-ios-Add-memory-barriers-to-cas-assembly.patch |  69 ----
 ...igure-cope-with-ld-is-gold-DISTRO_FEATURE.patch |  43 ---
 .../xbmc/configure.in-Avoid-running-code.patch     |  32 --
 .../recipes-mediacentre/xbmc/xbmc_git.bb           |  97 -----
 20 files changed, 1124 insertions(+), 369 deletions(-)
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch
 create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
 delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch
 delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch
 delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch
 delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch
 delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch
 delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb

diff --git a/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb b/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb
new file mode 100644
index 0000000..094ccff
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Kodi Media Center"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://JsonSchemaBuilder.cpp;beginline=2;endline=18;md5=1f67721215c03f66545390f6e45b99c7"
+
+SRCREV = "b587e98911fcedc4b800cd923a882c7aeeaa2146"
+
+PV = "16.0+gitr${SRCPV}"
+SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Jarvis"
+
+inherit autotools-brokensep gettext native
+
+S = "${WORKDIR}/git/tools/depends/native/JsonSchemaBuilder/src"
+
+do_compile_prepend() {
+    for i in $(find . -name "Makefile") ; do
+        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
+    done
+
+    for i in $(find . -name "*.mak*" -o    -name "Makefile") ; do
+        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
+    done
+}
+
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch
new file mode 100644
index 0000000..c4a6ae7
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch
@@ -0,0 +1,427 @@
+From 06a8224c99282ac1a606edd9e8ea3f591112942d Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Thu, 18 Feb 2016 14:04:31 +0100
+Subject: [PATCH] Update to p8-platform
+
+---
+ CMakeLists.txt                         |  6 +++---
+ pvr.hts/changelog.txt                  |  4 ++--
+ src/AutoRecordings.cpp                 |  2 +-
+ src/HTSPConnection.cpp                 |  8 +++----
+ src/HTSPDemuxer.cpp                    |  2 +-
+ src/HTSPVFS.cpp                        |  6 +++---
+ src/TimeRecordings.cpp                 |  2 +-
+ src/Tvheadend.cpp                      |  4 ++--
+ src/Tvheadend.h                        | 38 +++++++++++++++++-----------------
+ src/client.cpp                         |  4 ++--
+ src/client.h                           |  4 ++--
+ src/tvheadend/Subscription.cpp         |  2 +-
+ src/tvheadend/Subscription.h           |  4 ++--
+ src/tvheadend/utilities/AsyncState.cpp |  4 ++--
+ src/tvheadend/utilities/AsyncState.h   |  6 +++---
+ 15 files changed, 48 insertions(+), 48 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0842682..cb04942 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,10 +6,10 @@ enable_language(CXX)
+ 
+ find_package(kodi REQUIRED)
+ find_package(kodiplatform REQUIRED)
+-find_package(platform REQUIRED)
++find_package(p8-platform REQUIRED)
+ 
+ include_directories(${kodiplatform_INCLUDE_DIRS}
+-                    ${platform_INCLUDE_DIRS}
++                    ${p8-platform_INCLUDE_DIRS}
+                     ${KODI_INCLUDE_DIR}
+                     ${PROJECT_SOURCE_DIR}/lib)
+ 
+@@ -95,7 +95,7 @@ list(APPEND HTS_SOURCES
+ 
+ add_subdirectory(lib/libhts)
+ 
+-set(DEPLIBS ${platform_LIBRARIES} hts)
++set(DEPLIBS ${p8-platform_LIBRARIES} hts)
+ if(WIN32)
+   list(APPEND DEPLIBS ws2_32)
+ endif()
+diff --git a/pvr.hts/changelog.txt b/pvr.hts/changelog.txt
+index 9ffa33c..1e7fe30 100644
+--- a/pvr.hts/changelog.txt
++++ b/pvr.hts/changelog.txt
+@@ -49,7 +49,7 @@
+ - fixed: Autorec: Start and stop time handling.
+ - fixed: LocaltimeToUTC conversion (timer settings clock display incorrect).
+ - fixed: Several issues with predictive tuning.
+-- added: build: Automatically fill in platform and library name.
++- added: build: Automatically fill in p8-platform and library name.
+ - fixed: Use epg data only for creation of epg-based timers.
+ - improved: Do not try to reconnect to tvh while suspending or not fully awake again.
+ 
+@@ -97,7 +97,7 @@
+ - added: support for creating repeating timers, aka time schedules
+ - fixed: conditions for addon restart after settings changes
+ - internal: fixed build system regressions introduced with move to cmake
+-- internal: updated to use libplatform
++- internal: updated to use libp8-platform
+ 
+ 2.1.7
+ - added: support for radio channel groups
+diff --git a/src/AutoRecordings.cpp b/src/AutoRecordings.cpp
+index 5fa60a0..d9e5e1d 100644
+--- a/src/AutoRecordings.cpp
++++ b/src/AutoRecordings.cpp
+@@ -26,7 +26,7 @@
+ #include "tvheadend/utilities/Utilities.h"
+ #include "tvheadend/utilities/Logger.h"
+ 
+-using namespace PLATFORM;
++using namespace P8PLATFORM;
+ using namespace tvheadend;
+ using namespace tvheadend::entity;
+ using namespace tvheadend::utilities;
+diff --git a/src/HTSPConnection.cpp b/src/HTSPConnection.cpp
+index aec1296..86f5004 100644
+--- a/src/HTSPConnection.cpp
++++ b/src/HTSPConnection.cpp
+@@ -19,9 +19,9 @@
+  *
+  */
+ 
+-#include "platform/threads/mutex.h"
+-#include "platform/util/StringUtils.h"
+-#include "platform/sockets/tcp.h"
++#include "p8-platform/threads/mutex.h"
++#include "p8-platform/util/StringUtils.h"
++#include "p8-platform/sockets/tcp.h"
+ 
+ extern "C" {
+ #include "libhts/htsmsg_binary.h"
+@@ -33,7 +33,7 @@ extern "C" {
+ 
+ using namespace std;
+ using namespace ADDON;
+-using namespace PLATFORM;
++using namespace P8PLATFORM;
+ using namespace tvheadend;
+ using namespace tvheadend::utilities;
+ 
+diff --git a/src/HTSPDemuxer.cpp b/src/HTSPDemuxer.cpp
+index a6e1f12..7f45345 100644
+--- a/src/HTSPDemuxer.cpp
++++ b/src/HTSPDemuxer.cpp
+@@ -27,7 +27,7 @@
+ 
+ using namespace std;
+ using namespace ADDON;
+-using namespace PLATFORM;
++using namespace P8PLATFORM;
+ using namespace tvheadend;
+ using namespace tvheadend::utilities;
+ 
+diff --git a/src/HTSPVFS.cpp b/src/HTSPVFS.cpp
+index 0463f56..0404bab 100644
+--- a/src/HTSPVFS.cpp
++++ b/src/HTSPVFS.cpp
+@@ -19,8 +19,8 @@
+  *
+  */
+ 
+-#include "platform/threads/mutex.h"
+-#include "platform/util/StringUtils.h"
++#include "p8-platform/threads/mutex.h"
++#include "p8-platform/util/StringUtils.h"
+ #include "tvheadend/utilities/Logger.h"
+ 
+ extern "C" {
+@@ -30,7 +30,7 @@ extern "C" {
+ #include "Tvheadend.h"
+ 
+ using namespace std;
+-using namespace PLATFORM;
++using namespace P8PLATFORM;
+ using namespace tvheadend::utilities;
+ 
+ /*
+diff --git a/src/TimeRecordings.cpp b/src/TimeRecordings.cpp
+index 5d34938..97aae09 100644
+--- a/src/TimeRecordings.cpp
++++ b/src/TimeRecordings.cpp
+@@ -25,7 +25,7 @@
+ #include "tvheadend/utilities/Utilities.h"
+ #include "tvheadend/utilities/Logger.h"
+ 
+-using namespace PLATFORM;
++using namespace P8PLATFORM;
+ using namespace tvheadend;
+ using namespace tvheadend::entity;
+ using namespace tvheadend::utilities;
+diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp
+index 2057241..14c3bd4 100644
+--- a/src/Tvheadend.cpp
++++ b/src/Tvheadend.cpp
+@@ -23,7 +23,7 @@
+ #include <ctime>
+ #include <memory>
+ 
+-#include "platform/util/StringUtils.h"
++#include "p8-platform/util/StringUtils.h"
+ 
+ #include "Tvheadend.h"
+ #include "tvheadend/utilities/Utilities.h"
+@@ -31,7 +31,7 @@
+ 
+ using namespace std;
+ using namespace ADDON;
+-using namespace PLATFORM;
++using namespace P8PLATFORM;
+ using namespace tvheadend;
+ using namespace tvheadend::entity;
+ using namespace tvheadend::utilities;
+diff --git a/src/Tvheadend.h b/src/Tvheadend.h
+index 2ce4552..e794716 100644
+--- a/src/Tvheadend.h
++++ b/src/Tvheadend.h
+@@ -22,10 +22,10 @@
+  */
+ 
+ #include "client.h"
+-#include "platform/sockets/tcp.h"
+-#include "platform/threads/threads.h"
+-#include "platform/threads/mutex.h"
+-#include "platform/util/buffer.h"
++#include "p8-platform/sockets/tcp.h"
++#include "p8-platform/threads/threads.h"
++#include "p8-platform/threads/mutex.h"
++#include "p8-platform/util/buffer.h"
+ #include "kodi/xbmc_codec_types.h"
+ #include "kodi/xbmc_stream_utils.hpp"
+ #include "kodi/libXBMC_addon.h"
+@@ -88,7 +88,7 @@ class CHTSPMessage;
+ 
+ /* Typedefs */
+ typedef std::map<uint32_t,CHTSPResponse*> CHTSPResponseList;
+-typedef PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue;
++typedef P8PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue;
+ 
+ /*
+  * HTSP Response handler
+@@ -98,10 +98,10 @@ class CHTSPResponse
+ public:
+   CHTSPResponse();
+   ~CHTSPResponse();
+-  htsmsg_t *Get ( PLATFORM::CMutex &mutex, uint32_t timeout );
++  htsmsg_t *Get ( P8PLATFORM::CMutex &mutex, uint32_t timeout );
+   void      Set ( htsmsg_t *m );
+ private:
+-  PLATFORM::CCondition<volatile bool> m_cond;
++  P8PLATFORM::CCondition<volatile bool> m_cond;
+   bool                                m_flag;
+   htsmsg_t                           *m_msg;
+ };
+@@ -146,7 +146,7 @@ public:
+  * HTSP Connection registration thread
+  */
+ class CHTSPRegister
+-  : public PLATFORM::CThread
++  : public P8PLATFORM::CThread
+ {
+   friend class CHTSPConnection;
+ 
+@@ -163,7 +163,7 @@ private:
+  * HTSP Connection
+  */
+ class CHTSPConnection
+-  : public PLATFORM::CThread
++  : public P8PLATFORM::CThread
+ {
+   friend class CHTSPRegister;
+ 
+@@ -190,7 +190,7 @@ public:
+   inline bool IsConnected       ( void ) const { return m_ready; }
+   bool        WaitForConnection ( void );
+ 
+-  inline PLATFORM::CMutex& Mutex ( void ) { return m_mutex; }
++  inline P8PLATFORM::CMutex& Mutex ( void ) { return m_mutex; }
+ 
+   void        OnSleep ( void );
+   void        OnWake  ( void );
+@@ -202,10 +202,10 @@ private:
+   bool        SendHello        ( void );
+   bool        SendAuth         ( const std::string &u, const std::string &p );
+ 
+-  PLATFORM::CTcpSocket               *m_socket;
+-  PLATFORM::CMutex                    m_mutex;
++  P8PLATFORM::CTcpSocket               *m_socket;
++  P8PLATFORM::CMutex                    m_mutex;
+   CHTSPRegister                       m_regThread;
+-  PLATFORM::CCondition<volatile bool> m_regCond;
++  P8PLATFORM::CCondition<volatile bool> m_regCond;
+   bool                                m_ready;
+   uint32_t                            m_seq;
+   std::string                         m_serverName;
+@@ -273,13 +273,13 @@ public:
+   void SetStreamingProfile(const std::string &profile);
+ 
+ private:
+-  PLATFORM::CMutex                        m_mutex;
++  P8PLATFORM::CMutex                        m_mutex;
+   CHTSPConnection                        &m_conn;
+-  PLATFORM::SyncedBuffer<DemuxPacket*>    m_pktBuffer;
++  P8PLATFORM::SyncedBuffer<DemuxPacket*>    m_pktBuffer;
+   ADDON::XbmcStreamProperties             m_streams;
+   std::map<int,int>                       m_streamStat;
+   int64_t                                 m_seekTime;
+-  PLATFORM::CCondition<volatile int64_t>  m_seekCond;
++  P8PLATFORM::CCondition<volatile int64_t>  m_seekCond;
+   bool                                    m_seeking;
+   bool                                    m_speedChange;
+   tvheadend::status::SourceInfo           m_sourceInfo;
+@@ -350,7 +350,7 @@ private:
+  * Root object for Tvheadend connection
+  */
+ class CTvheadend
+-  : public PLATFORM::CThread
++  : public P8PLATFORM::CThread
+ {
+ public:
+   CTvheadend();
+@@ -422,7 +422,7 @@ private:
+    */
+   tvheadend::Profiles         m_profiles;
+ 
+-  PLATFORM::CMutex            m_mutex;
++  P8PLATFORM::CMutex            m_mutex;
+ 
+   CHTSPConnection             m_conn;
+ 
+@@ -519,7 +519,7 @@ public:
+    */
+   bool WaitForConnection ( void )
+   {
+-    PLATFORM::CLockObject lock(m_conn.Mutex());
++    P8PLATFORM::CLockObject lock(m_conn.Mutex());
+     return m_conn.WaitForConnection();
+   }
+   std::string GetServerName    ( void )
+diff --git a/src/client.cpp b/src/client.cpp
+index 94d2db9..3295914 100644
+--- a/src/client.cpp
++++ b/src/client.cpp
+@@ -22,14 +22,14 @@
+ #include "client.h"
+ #include "kodi/xbmc_pvr_dll.h"
+ #include "kodi/libKODI_guilib.h"
+-#include "platform/util/util.h"
++#include "p8-platform/util/util.h"
+ #include "Tvheadend.h"
+ #include "tvheadend/Settings.h"
+ #include "tvheadend/utilities/Logger.h"
+ 
+ using namespace std;
+ using namespace ADDON;
+-using namespace PLATFORM;
++using namespace P8PLATFORM;
+ using namespace tvheadend;
+ using namespace tvheadend::utilities;
+ 
+diff --git a/src/client.h b/src/client.h
+index 3a5f950..a10659b 100644
+--- a/src/client.h
++++ b/src/client.h
+@@ -20,8 +20,8 @@
+  *
+  */
+ 
+-#include "platform/os.h"
+-#include "platform/threads/mutex.h"
++#include "p8-platform/os.h"
++#include "p8-platform/threads/mutex.h"
+ #include "kodi/libXBMC_addon.h"
+ #include "kodi/libXBMC_pvr.h"
+ #include "kodi/libXBMC_codec.h"
+diff --git a/src/tvheadend/Subscription.cpp b/src/tvheadend/Subscription.cpp
+index 182ca7f..e18af1e 100644
+--- a/src/tvheadend/Subscription.cpp
++++ b/src/tvheadend/Subscription.cpp
+@@ -23,7 +23,7 @@
+ #include "utilities/Logger.h"
+ #include "../Tvheadend.h"
+ 
+-using namespace PLATFORM;
++using namespace P8PLATFORM;
+ using namespace tvheadend;
+ using namespace tvheadend::utilities;
+ 
+diff --git a/src/tvheadend/Subscription.h b/src/tvheadend/Subscription.h
+index b03bcce..363e5ef 100644
+--- a/src/tvheadend/Subscription.h
++++ b/src/tvheadend/Subscription.h
+@@ -22,7 +22,7 @@
+  */
+ 
+ #include <string>
+-#include "platform/threads/mutex.h"
++#include "p8-platform/threads/mutex.h"
+ 
+ extern "C"
+ {
+@@ -146,6 +146,6 @@ namespace tvheadend
+     std::string       m_profile;
+     CHTSPConnection   &m_conn;
+ 
+-    mutable PLATFORM::CMutex  m_mutex;
++    mutable P8PLATFORM::CMutex  m_mutex;
+   };
+ }
+diff --git a/src/tvheadend/utilities/AsyncState.cpp b/src/tvheadend/utilities/AsyncState.cpp
+index 0c30a93..1f4fdf3 100644
+--- a/src/tvheadend/utilities/AsyncState.cpp
++++ b/src/tvheadend/utilities/AsyncState.cpp
+@@ -22,7 +22,7 @@
+ #include "AsyncState.h"
+ 
+ using namespace tvheadend::utilities;
+-using namespace PLATFORM;
++using namespace P8PLATFORM;
+ 
+ struct Param {
+   eAsyncState state;
+@@ -37,7 +37,7 @@ AsyncState::AsyncState(int timeout)
+ 
+ eAsyncState AsyncState::GetState()
+ {
+-  PLATFORM::CLockObject lock(m_mutex);
++  P8PLATFORM::CLockObject lock(m_mutex);
+   return m_state;
+ }
+ 
+diff --git a/src/tvheadend/utilities/AsyncState.h b/src/tvheadend/utilities/AsyncState.h
+index 1d672da..0819cd8 100644
+--- a/src/tvheadend/utilities/AsyncState.h
++++ b/src/tvheadend/utilities/AsyncState.h
+@@ -22,7 +22,7 @@
+ #ifndef ASYNCSTATE_H
+ #define	ASYNCSTATE_H
+ 
+-#include "platform/threads/mutex.h"
++#include "p8-platform/threads/mutex.h"
+ 
+ namespace tvheadend {
+   namespace utilities {
+@@ -75,8 +75,8 @@ namespace tvheadend {
+       static bool PredicateCallback ( void *param );
+ 
+       eAsyncState m_state;
+-      PLATFORM::CMutex m_mutex;
+-      PLATFORM::CCondition<bool> m_condition;
++      P8PLATFORM::CMutex m_mutex;
++      P8PLATFORM::CCondition<bool> m_condition;
+       int m_timeout;
+ 
+     };
+-- 
+2.0.1
+
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb
new file mode 100644
index 0000000..1f33a8a
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Kodi Media Center PVR plugins"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://src/client.cpp;md5=c8f6b73c5bc1048a3d6506700a7a91d2"
+
+DEPENDS = " \
+            zip-native \
+            p8platform \
+            kodi-platform \
+          "
+
+SRCREV_pvrhts = "7f75b70527922aef953123ff97ebaa22d9fb7cb4"
+
+SRCREV_FORMAT = "pvrhts"
+
+PV = "2.2.13+gitr${SRCPV}"
+SRC_URI = "git://github.com/kodi-pvr/pvr.hts.git;branch=Jarvis;destsuffix=pvr.hts;name=pvrhts \
+           file://0001-Update-to-p8-platform.patch \
+          "
+
+inherit cmake pkgconfig gettext
+
+S = "${WORKDIR}/pvr.hts"
+
+EXTRA_OECMAKE = " \
+	  -DADDONS_TO_BUILD=pvr.hts \
+	  -DADDON_SRC_PREFIX=${WORKDIR}/git \
+	  -DCMAKE_BUILD_TYPE=Debug \
+	  -DCMAKE_INSTALL_PREFIX=${datadir}/kodi/addons \
+          -DCMAKE_MODULE_PATH=${STAGING_DIR_HOST}${libdir}/kodi \
+          -DCMAKE_PREFIX_PATH=${STAGING_DIR_HOST}${prefix} \
+          -DPACKAGE_ZIP=1 \
+        "
+
+do_compile_prepend() {
+	sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \
+	       -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \
+	          ${B}/CMakeFiles/*/flags.make
+	sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\
+	          ${B}/CMakeFiles/*/link.txt
+}
+
+# Make zip package for manual installation
+do_install_append() {
+	install -d ${D}${datadir}/kodi/addons/packages/
+	( cd ${D}${datadir}/kodi/addons
+	  zip -r ${D}${datadir}/kodi/addons/packages/pvr.hts-${PV}.zip pvr.hts -x '*.debug*' )
+}
+
+# Doesn't get added automagically, dlopen()?
+RDEPENDS_${PN} = "libkodiplatform"
+
+INSANE_SKIP_${PN} = "dev-so"
+FILES_${PN} += "${datadir}/kodi"
+FILES_${PN}-dbg += "${datadir}/kodi/addons/*/.debug/"
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch
new file mode 100644
index 0000000..35e5134
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch
@@ -0,0 +1,67 @@
+From 7cf366faa7a24c7146c745c8cd8dc3ae3d1cabea Mon Sep 17 00:00:00 2001
+From: Garrett Brown <themagnificentmrb@gmail.com>
+Date: Thu, 7 Jan 2016 15:55:22 -0800
+Subject: [PATCH] Fix build after platform rename
+
+update source code to use renamed platform pkg
+---
+ CMakeLists.txt      | 6 +++---
+ debian/control      | 2 +-
+ src/util/XMLUtils.h | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2ce8c0d..bf6b659 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,7 +8,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
+ find_package(kodi REQUIRED)
+ find_package(TinyXML REQUIRED)
+ find_package(Threads REQUIRED)
+-find_package(platform REQUIRED)
++find_package(p8-platform REQUIRED)
+ include(UseMultiArch.cmake)
+ include(CheckAtomic.cmake)
+ 
+@@ -36,10 +36,10 @@ endif()
+ 
+ set(SOURCES src/util/XMLUtils.cpp)
+ 
+-include_directories(${TINYXML_INCLUDE_DIR} ${KODI_INCLUDE_DIR} ${platform_INCLUDE_DIRS})
++include_directories(${TINYXML_INCLUDE_DIR} ${KODI_INCLUDE_DIR} ${p8-platform_INCLUDE_DIRS})
+ 
+ add_library(kodiplatform ${SOURCES} ${PLAT_SOURCES})
+-target_link_libraries(kodiplatform ${kodiplatform_LIBRARIES} ${platform_LIBRARIES})
++target_link_libraries(kodiplatform ${kodiplatform_LIBRARIES} ${p8-platform_LIBRARIES})
+ set_target_properties(kodiplatform PROPERTIES VERSION ${kodiplatform_VERSION_MAJOR}.${kodiplatform_VERSION_MINOR}.${kodiplatform_VERSION_PATCH}
+                                               SOVERSION ${kodiplatform_VERSION_MAJOR}.0)
+ 
+diff --git a/debian/control b/debian/control
+index 42cadb2..e40c982 100644
+--- a/debian/control
++++ b/debian/control
+@@ -1,7 +1,7 @@
+ Source: kodiplatform
+ Priority: extra
+ Maintainer: Arne Morten Kvarving <arne.morten.kvarving@sintef.no>
+-Build-Depends: debhelper (>= 8.0.0), cmake, libtinyxml-dev, kodi-addon-dev, libplatform-dev
++Build-Depends: debhelper (>= 8.0.0), cmake, libtinyxml-dev, kodi-addon-dev, libp8-platform-dev
+ Standards-Version: 3.9.2
+ Section: libs
+ 
+diff --git a/src/util/XMLUtils.h b/src/util/XMLUtils.h
+index f22fd07..a10d831 100644
+--- a/src/util/XMLUtils.h
++++ b/src/util/XMLUtils.h
+@@ -21,7 +21,7 @@
+  *
+  */
+ 
+-#include <platform/util/StdString.h>
++#include <p8-platform/util/StdString.h>
+ #include "tinyxml.h"
+ 
+ class XMLUtils
+-- 
+2.0.1
+
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch
new file mode 100644
index 0000000..27e9d21
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch
@@ -0,0 +1,40 @@
+From 3136317f096ea7fda4fb907e775a01952c4aae3d Mon Sep 17 00:00:00 2001
+From: Stefan Saraev <stefan@saraev.ca>
+Date: Fri, 19 Feb 2016 10:33:00 +0100
+Subject: [PATCH] fix cross compile badness
+
+From https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/mediacenter/kodi-platform/patches/kodi-platform-01_crosscompile-badness.patch
+---
+ CMakeLists.txt               | 2 +-
+ kodiplatform-config.cmake.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bf6b659..9abe773 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -22,7 +22,7 @@ if(NOT WIN32)
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+ endif()
+ 
+-set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX}/include/kodi")
++set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX_TOOLCHAIN}/include/kodi")
+ IF(WIN32)
+   LIST(APPEND kodiplatform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/kodi/windows")
+ ENDIF(WIN32)
+diff --git a/kodiplatform-config.cmake.in b/kodiplatform-config.cmake.in
+index 3fc5273..60bdf1b 100644
+--- a/kodiplatform-config.cmake.in
++++ b/kodiplatform-config.cmake.in
+@@ -10,7 +10,7 @@
+ #
+ # propagate these properties from one build system to the other
+ set (kodiplatform_VERSION "@kodiplatform_VERSION_MAJOR@.@kodiplatform_VERSION_MINOR@")
+-set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)
++set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX_TOOLCHAIN@/include)
+ set (kodiplatform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
+ set (kodiplatform_LINKER_FLAGS "@kodiplatform_LINKER_FLAGS@")
+ set (kodiplatform_CONFIG_VARS "@kodiplatform_CONFIG_VARS@")
+-- 
+2.0.1
+
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch
new file mode 100644
index 0000000..a13c53b
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9abe773..ae433fc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -9,7 +9,6 @@ find_package(kodi REQUIRED)
+ find_package(TinyXML REQUIRED)
+ find_package(Threads REQUIRED)
+ find_package(p8-platform REQUIRED)
+-include(UseMultiArch.cmake)
+ include(CheckAtomic.cmake)
+ 
+ set(kodiplatform_NAME kodiplatform)
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb
new file mode 100644
index 0000000..5077454
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Platform support library used by libCEC and binary add-ons for Kodi"
+HOMEPAGE = "http://libcec.pulse-eight.com/"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://src/util/XMLUtils.cpp;beginline=2;endline=18;md5=dae8e846500e70dd8ecee55f3f018c30"
+
+DEPENDS = "libtinyxml kodi"
+
+PV = "16.0.0"
+
+SRCREV = "15edaf78d6307eaa5e1d17028122d8bce9d55aa2"
+SRC_URI = "git://github.com/xbmc/kodi-platform.git \
+           file://0001-Fix-build-after-platform-rename.patch \
+           file://0001-fix-cross-compile-badness.patch \
+           file://kodi-platform-02_no-multi-lib.patch \
+          "
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX_TOOLCHAIN=${STAGING_DIR_TARGET} \
+                  -DCMAKE_INSTALL_LIBDIR=${libdir} \
+                  -DCMAKE_INSTALL_LIBDIR_NOARCH=${libdir} \
+                  -DKODI_INCLUDE_DIR=${STAGING_LIBDIR}/kodi \
+                  -DKODI_INCLUDE_DIR=${STAGING_INCDIR}/kodi \
+                "
+
+do_compile_prepend() {
+	sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \
+	       -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \
+	          ${B}/CMakeFiles/kodiplatform.dir/flags.make
+	sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\
+	          ${B}/CMakeFiles/kodiplatform.dir/link.txt
+}
+
+RPROVIDES_${PN} += "libkodiplatform"
+FILES_${PN}-dev += "${libdir}/*platform"
+
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb
new file mode 100644
index 0000000..955d02b
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Systemd service for kodi startup"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+
+PV = "1.0"
+
+SRC_URI = "file://kodi.service"
+
+inherit systemd
+
+do_install() {
+	install -d ${D}/lib/systemd/system
+	install -m 0644 ${WORKDIR}/kodi.service ${D}/lib/systemd/system/ 
+}
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "kodi.service"
+
+RDEPENDS_${PN} += "xinit kodi"
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service
new file mode 100644
index 0000000..29d0394
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Kodi media thing
+
+[Service]
+User=root
+Type=simple
+SuccessExitStatus=0 1
+IOSchedulingClass=realtime
+IOSchedulingPriority=0
+
+ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- /usr/bin/X :0 
+
+[Install]
+WantedBy=basic.target
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch
new file mode 100644
index 0000000..b3780db
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch
@@ -0,0 +1,25 @@
+From 53c7b1667a41b25775d1dc009d8ced61f383da0b Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Sat, 6 Feb 2016 15:43:01 +0100
+Subject: [PATCH 1/3] configure: don't try to run stuff to find tinyxml
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5a41fb4..243c7e5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1043,7 +1043,7 @@ fi
+ AC_LANG_PUSH([C++])
+ PKG_CHECK_MODULES([TINYXML], [tinyxml >= 2.6.2],
+   [INCLUDES="$INCLUDES $TINYXML_CFLAGS"; LIBS="$LIBS $TINYXML_LIBS"],
+-  [AC_RUN_IFELSE(
++  [AC_COMPILE_IFELSE(
+    [AC_LANG_SOURCE([[
+ #include <stdlib.h>
+ #include <tinyxml.h>
+-- 
+2.10.1
+
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch
new file mode 100644
index 0000000..b2af5de
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch
@@ -0,0 +1,163 @@
+From 1c1484303a055bfde655ffae3829554aaefc2e07 Mon Sep 17 00:00:00 2001
+From: Stefan Saraev <stefan@saraev.ca>
+Date: Wed, 2 Nov 2016 11:28:34 -0700
+Subject: [PATCH 2/3] handle SIGTERM
+
+0. CApplication::Stop cant be trusted. (deadlocks crashes and boo)
+
+so, when shutdown/reboot is requested:
+
+1. save an exit code (for CEC...)
+2. call CPowerManager::{Reboot,PowerDown}
+3. ... then systemd sends TERM and waits xx seconds before sending KILL
+4. CApplication::Stop has xx seconds to save guisettings.xml and boo
+5. CEC thread has xx seconds to switch off after it received OnQuit
+6. addons / pvrmanager / cec / everything else.. are free to deadlock / crash now, we dont care
+7. KILL
+
+Signed-off-by: Stefan Saraev <stefan@saraev.ca>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ xbmc/Application.cpp         | 17 ++++++++++++-----
+ xbmc/Application.h           |  1 +
+ xbmc/XBApplicationEx.cpp     |  1 +
+ xbmc/XBApplicationEx.h       |  1 +
+ xbmc/platform/posix/main.cpp | 15 +++++++++++++++
+ 5 files changed, 30 insertions(+), 5 deletions(-)
+
+diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
+index 4c118e0..58b151a 100644
+--- a/xbmc/Application.cpp
++++ b/xbmc/Application.cpp
+@@ -2428,12 +2428,12 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
+   switch (pMsg->dwMessage)
+   {
+   case TMSG_POWERDOWN:
+-    Stop(EXITCODE_POWERDOWN);
++    SetExitCode(EXITCODE_POWERDOWN);
+     g_powerManager.Powerdown();
+     break;
+ 
+   case TMSG_QUIT:
+-    Stop(EXITCODE_QUIT);
++    SetExitCode(EXITCODE_QUIT);
+     break;
+   
+   case TMSG_SHUTDOWN:
+@@ -2454,12 +2454,13 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
+ 
+   case TMSG_RESTART:
+   case TMSG_RESET:
+-    Stop(EXITCODE_REBOOT);
++    SetExitCode(EXITCODE_REBOOT);
+     g_powerManager.Reboot();
+     break;
+ 
+   case TMSG_RESTARTAPP:
+ #if defined(TARGET_WINDOWS) || defined(TARGET_LINUX)
++    SetExitCode(EXITCODE_RESTARTAPP);
+     Stop(EXITCODE_RESTARTAPP);
+ #endif
+     break;
+@@ -2883,6 +2884,13 @@ bool CApplication::Cleanup()
+   }
+ }
+ 
++void CApplication::SetExitCode(int exitCode)
++{
++  // save it for CEC
++  m_ExitCode = exitCode;
++  m_ExitCodeSet = true;
++}
++
+ void CApplication::Stop(int exitCode)
+ {
+   try
+@@ -2890,7 +2898,7 @@ void CApplication::Stop(int exitCode)
+     m_frameMoveGuard.unlock();
+ 
+     CVariant vExitCode(CVariant::VariantTypeObject);
+-    vExitCode["exitcode"] = exitCode;
++    vExitCode["exitcode"] = m_ExitCode;
+     CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnQuit", vExitCode);
+ 
+     // Abort any active screensaver
+@@ -2924,7 +2932,6 @@ void CApplication::Stop(int exitCode)
+ 
+     m_bStop = true;
+     m_AppFocused = false;
+-    m_ExitCode = exitCode;
+     CLog::Log(LOGNOTICE, "stop all");
+ 
+     // cancel any jobs from the jobmanager
+diff --git a/xbmc/Application.h b/xbmc/Application.h
+index 22aca81..9992677 100644
+--- a/xbmc/Application.h
++++ b/xbmc/Application.h
+@@ -160,6 +160,7 @@ public:
+   void StopPVRManager();
+   void ReinitPVRManager();
+   bool IsCurrentThread() const;
++  void SetExitCode(int exitCode);
+   void Stop(int exitCode);
+   void RestartApp();
+   void UnloadSkin(bool forReload = false);
+diff --git a/xbmc/XBApplicationEx.cpp b/xbmc/XBApplicationEx.cpp
+index 035aed2..34102f5 100644
+--- a/xbmc/XBApplicationEx.cpp
++++ b/xbmc/XBApplicationEx.cpp
+@@ -46,6 +46,7 @@ CXBApplicationEx::CXBApplicationEx()
+   m_bStop = false;
+   m_AppFocused = true;
+   m_ExitCode = EXITCODE_QUIT;
++  m_ExitCodeSet = false;
+   m_renderGUI = false;
+ }
+ 
+diff --git a/xbmc/XBApplicationEx.h b/xbmc/XBApplicationEx.h
+index 9bc14fa..f696b89 100644
+--- a/xbmc/XBApplicationEx.h
++++ b/xbmc/XBApplicationEx.h
+@@ -42,6 +42,7 @@ public:
+   // Variables for timing
+   bool m_bStop;
+   int  m_ExitCode;
++  bool m_ExitCodeSet;
+   bool m_AppFocused;
+   bool m_renderGUI;
+ 
+diff --git a/xbmc/platform/posix/main.cpp b/xbmc/platform/posix/main.cpp
+index a8b64e5..3d80032 100644
+--- a/xbmc/platform/posix/main.cpp
++++ b/xbmc/platform/posix/main.cpp
+@@ -41,12 +41,27 @@
+ #include "input/linux/LIRC.h"
+ #endif
+ #include "platform/XbmcContext.h"
++#include "Application.h"
++
++void xbmc_term_handler(int signum)
++{
++  CLog::Log(LOGINFO, "Received SIGTERM...");
++  if (!g_application.m_ExitCodeSet)
++    g_application.SetExitCode(EXITCODE_RESTARTAPP);
++  g_application.Stop(EXITCODE_RESTARTAPP);
++}
+ 
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+ int main(int argc, char* argv[])
+ {
++  // SIGTERM handler
++  struct sigaction action;
++  memset(&action, 0, sizeof(struct sigaction));
++  action.sa_handler = xbmc_term_handler;
++  sigaction(SIGTERM, &action, NULL);
++
+   // set up some xbmc specific relationships
+   XBMC::Context context;
+ 
+-- 
+2.10.1
+
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch
new file mode 100644
index 0000000..d638550
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch
@@ -0,0 +1,26 @@
+From 4ef1e9dab9193f1a5305d25c8eda97f8f06ea154 Mon Sep 17 00:00:00 2001
+From: Stephan Raue <stephan@openelec.tv>
+Date: Mon, 1 Sep 2014 03:16:37 +0200
+Subject: [PATCH 3/3] add support to read frequency output if using intel's
+ pstate driver
+
+---
+ xbmc/utils/CPUInfo.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp
+index 5e2ebbd..fd04d5a 100644
+--- a/xbmc/utils/CPUInfo.cpp
++++ b/xbmc/utils/CPUInfo.cpp
+@@ -274,6 +274,8 @@ CCPUInfo::CCPUInfo(void)
+     m_fProcTemperature = fopen("/sys/class/thermal/thermal_zone0/temp", "r");  // On Raspberry PIs
+ 
+   m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r");
++  if (m_fCPUFreq == NULL)
++    m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq", "r");
+   if (!m_fCPUFreq)
+   {
+     m_cpuInfoForFreq = true;
+-- 
+2.10.1
+
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch
new file mode 100644
index 0000000..6f5f9a2
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch
@@ -0,0 +1,35 @@
+From 191cf3f084b4d34846711034a7fe3078f8243c82 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 2 Nov 2016 12:39:20 -0700
+Subject: [PATCH 4/4] Disable DVD support
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.in | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 58b3a17..b7c3fce 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -10,8 +10,7 @@ EC_DIRS= \
+ 	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 @@ libaddon: exports
+ 	$(MAKE) -C lib/addons/library.xbmc.pvr
+ 	$(MAKE) -C lib/addons/library.kodi.inputstream
+ dvdpcodecs: dllloader
+-	$(MAKE) -C lib/libdvd
+ 
+ dvdpextcodecs:
+ 
+-- 
+2.10.1
+
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
new file mode 100644
index 0000000..807871f
--- /dev/null
+++ b/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
@@ -0,0 +1,177 @@
+SUMMARY = "Kodi Media Center"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=930e2a5f63425d8dd72dbd7391c43c46"
+
+DEPENDS = " \
+            cmake-native \
+            curl-native \
+            gperf-native \
+            jsonschemabuilder-native \
+            nasm-native \
+            swig-native \
+            yasm-native \
+            zip-native \
+            avahi \
+            boost \
+            bzip2 \
+            curl \
+            dcadec \
+            enca \
+            expat \
+            faad2 \
+            ffmpeg \
+            fontconfig \
+            fribidi \
+            giflib \
+            jasper \
+            libass \
+            libcdio \
+            libcec \
+            libmad \
+            libmicrohttpd \
+            libmms \
+            libmms \
+            libmodplug \
+            libpcre \
+            libplist \
+            libsamplerate0 \
+            libsdl-image \
+            libsdl-mixer \
+            libsquish \
+            libssh \
+            libtinyxml \
+            libusb1 \
+            libxslt \
+            lzo \
+            mpeg2dec \
+            python \
+            samba \
+            sqlite3 \
+            taglib \
+            virtual/egl \
+            virtual/libsdl \
+            wavpack \
+            yajl \
+            zlib \
+            ${@enable_glew(bb, d)} \
+          "
+
+PROVIDES = "xbmc"
+
+SRCREV = "32c7788e7cce711be5b7f3893c82dddd79658268"
+PV = "17.0+gitr${SRCPV}"
+SRC_URI = "git://github.com/xbmc/xbmc.git;branch=master \
+           file://0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch \
+           file://0002-handle-SIGTERM.patch \
+           file://0003-add-support-to-read-frequency-output-if-using-intel-.patch \
+           file://0004-Disable-DVD-support.patch \
+"
+
+inherit autotools-brokensep gettext pythonnative
+
+S = "${WORKDIR}/git"
+
+# breaks compilation
+ASNEEDED = ""
+
+ACCEL ?= ""
+ACCEL_x86 = "vaapi vdpau"
+ACCEL_x86-64 = "vaapi vdpau"
+
+PACKAGECONFIG ??= "${ACCEL}"
+PACKAGECONFIG_append += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)}"
+PACKAGECONFIG_append += "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' opengl', ' openglesv2', d)}"
+
+PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles,"
+PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,virtual/egl"
+PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
+PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
+PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxinerama libxmu libxrandr libxtst"
+PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
+
+EXTRA_OECONF_append_rpi = " --enable-openmax --enable-player=omxplayer --with-platform=raspberry-pi2"
+#LDFLAGS_append_rpi = " -lEGL -lGLESv2 -lbcm_host -lvcos -lvchiq_arm -lvchostif -lmmal -lmmal_core -lmmal_util "
+LDFLAGS_append_rpi = " -lvchostif "
+EXTRA_OECONF = " \
+    --disable-debug \
+    --disable-libcap \
+    --disable-ccache \
+    --disable-mid \
+    --enable-libusb \
+    --enable-airplay \
+    --disable-optical-drive \
+    --with-ffmpeg=shared \
+    --enable-texturepacker=no \
+"
+
+FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
+FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
+BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
+
+# for python modules
+export HOST_SYS
+export BUILD_SYS
+export STAGING_LIBDIR
+export STAGING_INCDIR
+export PYTHON_DIR
+
+def enable_glew(bb, d):
+    if bb.utils.contains('PACKAGECONFIG', 'x11', True, False, d) and bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
+        return "glew"
+    return ""
+
+do_configure() {
+    ( for i in $(find ${S} -name "configure.*" ) ; do
+       cd $(dirname $i) && gnu-configize --force || true
+    done )
+    make -C tools/depends/target/crossguid PREFIX=${STAGING_DIR_HOST}${prefix}
+
+    BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
+    BOOTSTRAP_STANDALONE=1 make -f codegenerator.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
+    oe_runconf
+}
+
+do_compile_prepend() {
+    for i in $(find . -name "Makefile") ; do
+        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
+    done
+
+    for i in $(find . -name "*.mak*" -o    -name "Makefile") ; do
+        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
+    done
+}
+
+INSANE_SKIP_${PN} = "rpaths"
+
+FILES_${PN} += "${datadir}/xsessions ${datadir}/icons ${libdir}/xbmc ${datadir}/xbmc"
+FILES_${PN}-dbg += "${libdir}/kodi/.debug ${libdir}/kodi/*/.debug ${libdir}/kodi/*/*/.debug ${libdir}/kodi/*/*/*/.debug"
+
+# kodi uses some kind of dlopen() method for libcec so we need to add it manually
+# OpenGL builds need glxinfo, that's in mesa-demos
+RRECOMMENDS_${PN}_append = " libcec \
+                             python \
+                             python-lang \
+                             python-re \
+                             python-netclient \
+                             python-html \
+                             python-difflib \
+                             python-json \
+                             python-zlib \
+                             python-shell \
+                             python-sqlite3 \
+                             python-compression \
+                             libcurl \
+                             ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr xdpyinfo', '', d)} \
+"
+RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 \
+                                        glibc-gconv-ibm850 \
+					glibc-gconv-unicode \
+                                        glibc-gconv-utf-32 \
+					glibc-charmap-utf-8 \
+					glibc-localedata-en-us \
+                                      "
+
+RPROVIDES_${PN} += "xbmc"
+
diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch
deleted file mode 100644
index dfc3959..0000000
--- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 0dce5a2abd9f42876616c35772a4d71c5399543c Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Sat, 17 Dec 2011 11:38:15 +0100
-Subject: [PATCH 1/4] configure: don't run python distutils to find STAGING_INCDIR/python, it is not safe for per-machine sysroots
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
- m4/ax_python_devel.m4 |    7 +------
- 1 files changed, 1 insertions(+), 6 deletions(-)
-
-diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4
-index adbd207..dee70f6 100644
---- a/m4/ax_python_devel.m4
-+++ b/m4/ax_python_devel.m4
-@@ -151,12 +151,7 @@ $ac_distutils_result])
- 	#
- 	AC_MSG_CHECKING([for Python include path])
- 	if test -z "$PYTHON_CPPFLAGS"; then
--		python_path=`$PYTHON -c "import distutils.sysconfig; \
--			print (distutils.sysconfig.get_python_inc ());"`
--		if test -n "${python_path}"; then
--			python_path="-I$python_path"
--		fi
--		PYTHON_CPPFLAGS=$python_path
-+		PYTHON_CPPFLAGS="-I${STAGING_INCDIR}/${PYTHON_DIR}"
- 	fi
- 	AC_MSG_RESULT([$PYTHON_CPPFLAGS])
- 	AC_SUBST([PYTHON_CPPFLAGS])
--- 
-1.7.2.5
-
diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch
deleted file mode 100644
index e0a4037..0000000
--- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 7b2a8a7869d257cba35f53f6d877877c29cdac27 Mon Sep 17 00:00:00 2001
-From: Paul Menzel <paulepanter@users.sourceforge.net>
-Date: Sun, 14 Aug 2011 21:53:47 +0200
-Subject: [PATCH 2/4] Revert "fixed:[ios] Add memory barriers to atomic Add/Subtract and Increment/Decrement functions to ensure synchronized accesses."
-
-This reverts commit 9a10c48710df79118e39e9b3bb0a15bf1fe694d1.
-
-The build (OpenEmbedded `angstrom-2010.x` for `MACHINE = "beagleboard") fails with the following error.
-
-        make -C xbmc/threads
-        make[1]: Entering directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+9a10c48710df79118e39e9b3bb0a15bf1fe694d1/git/xbmc/threads'
-        CPP     Atomics.o
-        /tmp/ccIzTm3L.s: Assembler messages:
-        /tmp/ccIzTm3L.s:40: Error: garbage following instruction -- `dmb ish'
-        /tmp/ccIzTm3L.s:48: Error: garbage following instruction -- `dmb ish'
-        /tmp/ccIzTm3L.s:76: Error: garbage following instruction -- `dmb ish'
-        /tmp/ccIzTm3L.s:83: Error: garbage following instruction -- `dmb ish'
-        /tmp/ccIzTm3L.s:111: Error: garbage following instruction -- `dmb ish'
-        /tmp/ccIzTm3L.s:118: Error: garbage following instruction -- `dmb ish'
-        /tmp/ccIzTm3L.s:145: Error: garbage following instruction -- `dmb ish'
-        /tmp/ccIzTm3L.s:152: Error: garbage following instruction -- `dmb ish'
-        /tmp/ccIzTm3L.s:180: Error: garbage following instruction -- `dmb ish'
-        /tmp/ccIzTm3L.s:187: Error: garbage following instruction -- `dmb ish'
-        make[1]: *** [Atomics.o] Error 1
-        make[1]: Leaving directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+9a10c48710df79118e39e9b3bb0a15bf1fe694d1/git/xbmc/threads'
-        make: *** [xbmc/threads/threads.a] Error 2
----
- xbmc/threads/Atomics.cpp |    8 --------
- 1 files changed, 0 insertions(+), 8 deletions(-)
-
-diff --git a/xbmc/threads/Atomics.cpp b/xbmc/threads/Atomics.cpp
-index 5b09f18..0a98a7e 100644
---- a/xbmc/threads/Atomics.cpp
-+++ b/xbmc/threads/Atomics.cpp
-@@ -194,14 +194,12 @@ long AtomicIncrement(volatile long* pAddr)
- {
-   register long val;
-   asm volatile (
--                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
-                 "1:                     \n" 
-                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
-                 "add     %0,  #1        \n" // (val += 1)
-                 "strex   r1,  %0, [%1]	\n"
-                 "cmp     r1,   #0       \n"
-                 "bne     1b             \n"
--                "dmb     ish            \n" // Memory barrier.
-                 : "=&r" (val)
-                 : "r"(pAddr)
-                 : "r1"
-@@ -273,14 +271,12 @@ long AtomicAdd(volatile long* pAddr, long amount)
- {
-   register long val;
-   asm volatile (
--                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
-                 "1:                     \n" 
-                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
-                 "add     %0,  %2        \n" // (val += amount)
-                 "strex   r1,  %0, [%1]	\n"
-                 "cmp     r1,   #0       \n"
-                 "bne     1b             \n"
--                "dmb     ish            \n" // Memory barrier.
-                 : "=&r" (val)
-                 : "r"(pAddr), "r"(amount)
-                 : "r1"
-@@ -351,14 +347,12 @@ long AtomicDecrement(volatile long* pAddr)
- {
-   register long val;
-   asm volatile (
--                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
-                 "1:                     \n" 
-                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
-                 "sub     %0,  #1        \n" // (val -= 1)
-                 "strex   r1,  %0, [%1]	\n"
-                 "cmp     r1,   #0       \n"
-                 "bne     1b             \n"
--                "dmb     ish            \n" // Memory barrier.
-                 : "=&r" (val)
-                 : "r"(pAddr)
-                 : "r1"
-@@ -431,14 +425,12 @@ long AtomicSubtract(volatile long* pAddr, long amount)
- {
-   register long val;
-   asm volatile (
--                "dmb     ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
-                 "1:                     \n" 
-                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
-                 "sub     %0,  %2        \n" // (val -= amount)
-                 "strex   r1,  %0, [%1]	\n"
-                 "cmp     r1,   #0       \n"
-                 "bne     1b             \n"
--                "dmb     ish            \n" // Memory barrier.
-                 : "=&r" (val)
-                 : "r"(pAddr), "r"(amount)
-                 : "r1"
--- 
-1.7.2.5
-
diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch
deleted file mode 100644
index 629017b..0000000
--- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From aaae1616a09d359b52e929f944ca0ceb4bb7f831 Mon Sep 17 00:00:00 2001
-From: Paul Menzel <paulepanter@users.sourceforge.net>
-Date: Sun, 14 Aug 2011 21:55:09 +0200
-Subject: [PATCH 3/4] Revert "fixed:[ios] Add memory barriers to cas() assembly to ensure alignment of memory accesses."
-
-This reverts commit 92bab651e2253d172879995b50985645b77fecd2.
-
-The build (OpenEmbedded `angstrom-2010.x` for `MACHINE = "beagleboard") fails with the following error.
-
-        CPP     Atomics.o
-        make[1]: Entering directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+92bab651e2253d172879995b50985645b77fecd2/git/xbmc/windows'
-        CPP     GUIMediaWindow.o
-        /tmp/ccrsywuV.s: Assembler messages:
-        /tmp/ccrsywuV.s:40: Error: garbage following instruction -- `dmb ish'
-        /tmp/ccrsywuV.s:48: Error: garbage following instruction -- `dmb ish'
-        make[1]: *** [Atomics.o] Error 1
-        make[1]: Leaving directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+92bab651e2253d172879995b50985645b77fecd2/git/xbmc/threads'
-        make: *** [xbmc/threads/threads.a] Error 2
----
- xbmc/threads/Atomics.cpp |   33 ++++++++++++++++-----------------
- 1 files changed, 16 insertions(+), 17 deletions(-)
-
-diff --git a/xbmc/threads/Atomics.cpp b/xbmc/threads/Atomics.cpp
-index 0a98a7e..0967eb2 100644
---- a/xbmc/threads/Atomics.cpp
-+++ b/xbmc/threads/Atomics.cpp
-@@ -49,23 +49,22 @@ long cas(volatile long *pAddr, long expectedVal, long swapVal)
- #elif defined(__arm__)
- long cas(volatile long* pAddr, long expectedVal, long swapVal)
- {
--  register long prev;
--  asm volatile (
--                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
--                "1:                      \n"
--                "ldrex    %0, [%1]       \n" // Load the current value of *pAddr(%1) into prev (%0) and lock pAddr,
--                "cmp      %0,  %2        \n" // Verify that the current value (%0) == old value (%2)
--                "bne      2f             \n" // Bail if the two values are not equal [not as expected]
--                "strex    r1,  %3, [%1]  \n"
--                "cmp      r1,  #0        \n"
--                "bne      1b             \n"
--                "dmb      ish            \n" // Memory barrier.
--                "2:                      \n"
--                : "=&r" (prev)
--                : "r"(pAddr), "r"(expectedVal),"r"(swapVal)
--                : "r1"
--                );
--  return prev;
-+  return(__sync_val_compare_and_swap(pAddr, expectedVal, swapVal));
-+//  register long prev;
-+//  asm volatile (
-+//                "1:                      \n"
-+//                "ldrex    %0, [%1]       \n" /* Load the current value of *pAddr(%1) into prev (%0) and lock pAddr,  */
-+//                "cmp      %0,  %2        \n" /* Verify that the current value (%0) == old value (%2) */
-+//                "bne      2f             \n" /* Bail if the two values are not equal [not as expected] */
-+//                "strex    r1,  %3, [%1]  \n"
-+//                "cmp      r1,  #0        \n"                
-+//                "bne      1b             \n"
-+//                "2:                        "
-+//                : "=&r" (prev)
-+//                : "r"(pAddr), "r"(expectedVal),"r"(swapVal)
-+//                : "r1"
-+//                );
-+//  return prev;
- }
- 
- #elif defined(__mips__)
--- 
-1.7.2.5
-
diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch
deleted file mode 100644
index 345e20e..0000000
--- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From fd8f73826240aae543a41a2bfeea0056e2fe594d Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Mon, 11 Mar 2013 11:04:29 +0100
-Subject: [PATCH] configure: cope with ld-is-gold DISTRO_FEATURE
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
-
-Upstream-Stature: backport
-
- configure.in |   12 +++++++-----
- 1 files changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index ef94683..c8b459b 100755
---- a/configure.in
-+++ b/configure.in
-@@ -18,9 +18,14 @@ tolower(){
- # check for library basenames
- AC_DEFUN([XB_FIND_SONAME],
- [
-+  #set -x
-   if [[ "$host_vendor" != "apple" ]]; then
-     AC_MSG_CHECKING([for lib$2 soname])
-     $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}')
-+    if [[ -z $$1_FILENAME ]]; then
-+      #try gold linker syntax
-+      $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-t 3>&1 1>&2 2>&3 | grep "$2")
-+    fi
-     if [[ ! -z $$1_FILENAME ]]; then
-       $1_SONAME=$(objdump -p $$1_FILENAME | grep "SONAME.*$2" | awk '{V=2; print $V}')
-     fi
-@@ -55,6 +60,7 @@ AC_DEFUN([XB_FIND_SONAME],
-     AC_MSG_RESULT([$$1_SONAME])
-     AC_SUBST($1_SONAME)
-   fi
-+  #set +x
- ])
- 
- # Function to push and pop libs and includes for a command
--- 
-1.7.7.6
-
diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch
deleted file mode 100644
index 5c14059..0000000
--- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From cfd851660a594801a591e80dc820c65cb7bd7836 Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Sat, 6 Oct 2012 06:40:03 -0300
-Subject: [PATCH] configure.in: Avoid running code or we break cross-compile
-
-Upstream-Status: Backport [similar change done for 12.0]
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
----
- configure.in |    6 +-----
- 1 files changed, 1 insertions(+), 5 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index ef94683..d7efcb0 100755
---- a/configure.in
-+++ b/configure.in
-@@ -1246,11 +1246,7 @@ if test "$use_external_ffmpeg" = "yes"; then
-   AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
- 
-   # Disable vdpau support if external libavcodec doesn't have it
--  AC_RUN_IFELSE(
--    AC_LANG_PROGRAM([[#include <libavcodec/avcodec.h>]],
--      [[avcodec_register_all();
--        AVCodec *codec = avcodec_find_decoder_by_name("vc1_vdpau");
--        return (codec) ? 0 : 1;]]),,
-+  AC_CHECK_LIB([avcodec], [ff_vdpau_vc1_decode_picture],,
-     [if test "x$use_vdpau" = "xyes"; then
-       AC_MSG_ERROR($ffmpeg_vdpau_not_supported)
-     else
--- 
-1.7.2.5
-
diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb b/meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb
deleted file mode 100644
index 0d8dd5c..0000000
--- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb
+++ /dev/null
@@ -1,97 +0,0 @@
-SUMMARY = "XBMC Media Center"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=6eb631b6da7fdb01508a80213ffc35ff"
-
-DEPENDS = "libusb1 libcec libplist expat yajl gperf-native libxmu fribidi mpeg2dec ffmpeg samba fontconfig curl python libass libmodplug libmicrohttpd wavpack libmms cmake-native libsdl-image libsdl-mixer virtual/egl mysql5 sqlite3 libmms faad2 libcdio libpcre boost lzo enca avahi libsamplerate0 libxinerama libxrandr libxtst bzip2 virtual/libsdl jasper zip-native zlib libtinyxml libmad"
-#require recipes/egl/egl.inc
-
-
-SRCREV = "82388d55dae79cbb2e486e307e23202e76a43efa"
-
-# multiple issues
-PNBLACKLIST[xbmc] ?= "/usr/include/c++/ctime:70:11: error: '::gmtime' has not been declared"
-
-PV = "11.0+gitr${SRCPV}"
-PR = "r14"
-SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Eden \
-           file://0001-configure-don-t-run-python-distutils-to-find-STAGING.patch \
-           file://0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch \
-           file://0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch \
-           file://0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch \
-           file://configure.in-Avoid-running-code.patch \
-"
-
-inherit autotools gettext python-dir
-
-S = "${WORKDIR}/git"
-
-# breaks compilation
-CCACHE = ""
-
-CACHED_CONFIGUREVARS += " \
-    ac_cv_path_PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python" \
-"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', 'openglesv2', d)}"
-PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles,glew"
-PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,"
-
-EXTRA_OECONF = " \
-    --disable-rpath \
-    --enable-libusb \
-    --enable-airplay \
-    --disable-optical-drive \
-    --enable-external-libraries \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '--enable-gl', '--enable-gles', d)} \
-"
-
-FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
-BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
-
-EXTRA_OECONF_append_armv7a = "--cpu=cortex-a8"
-
-# for python modules
-export STAGING_LIBDIR
-export STAGING_INCDIR
-export PYTHON_DIR
-
-do_configure() {
-    sh bootstrap
-    oe_runconf
-}
-
-PARALLEL_MAKE = ""
-
-do_compile_prepend() {
-    for i in $(find . -name "Makefile") ; do
-        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
-    done
-
-    for i in $(find . -name "*.mak*" -o    -name "Makefile") ; do
-        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
-    done
-}
-
-INSANE_SKIP_${PN} = "rpaths"
-
-# on ARM architectures xbmc will use GLES which will make the regular wrapper fail, so start it directly
-do_install_append_arm() {
-    sed -i -e 's:Exec=xbmc:Exec=${libdir}/xbmc/xbmc.bin:g' ${D}${datadir}/applications/xbmc.desktop
-}
-
-FILES_${PN} += "${datadir}/xsessions ${datadir}/icons"
-FILES_${PN}-dbg += "${libdir}/xbmc/.debug ${libdir}/xbmc/*/.debug ${libdir}/xbmc/*/*/.debug ${libdir}/xbmc/*/*/*/.debug"
-
-# xbmc uses some kind of dlopen() method for libcec so we need to add it manually
-# OpenGL builds need glxinfo, that's in mesa-demos
-RRECOMMENDS_${PN}_append = " libcec \
-                             python \
-                             python-lang \
-                             python-re \
-                             python-netclient \
-                             libcurl \
-                             xdpyinfo \
-                             ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-demos', '', d)} \
-"
-RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 glibc-gconv-ibm850"
-- 
2.10.2



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [meta-multimedia][PATCH 7/7] kodi: Update to krypton release ( 17.x )
  2016-11-03  8:20 ` [meta-multimedia][PATCH 7/7] kodi: Update to krypton release ( 17.x ) Khem Raj
@ 2016-11-03  8:26   ` Koen Kooi
  2016-11-03  8:32     ` Khem Raj
  0 siblings, 1 reply; 9+ messages in thread
From: Koen Kooi @ 2016-11-03  8:26 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-devel

Since 17 hasn’t been released yet, I think adding 16.1 first would be a better idea. That one is known working on the 4 archs I test it on (armv7a, aarch64, x86 and x86_64), version 17 is still in flux.

Regardless of that, thanks for taking the time to ‘port’ this all back to meta-oe.

> Op 3 nov. 2016, om 09:20 heeft Khem Raj <raj.khem@gmail.com> het volgende geschreven:
> 
> remove obsoleted xbmc recipes
> rename to recipes-mediacenter
> 
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> .../kodi/jsonschemabuilder-native.bb               |  24 ++
> .../0001-Update-to-p8-platform.patch               | 427 +++++++++++++++++++++
> .../kodi/kodi-addon-pvr-hts_git.bb                 |  55 +++
> .../0001-Fix-build-after-platform-rename.patch     |  67 ++++
> .../0001-fix-cross-compile-badness.patch           |  40 ++
> .../kodi-platform-02_no-multi-lib.patch            |  12 +
> .../recipes-mediacenter/kodi/kodi-platform_git.bb  |  39 ++
> .../recipes-mediacenter/kodi/kodi-startup.bb       |  20 +
> .../kodi/kodi-startup/kodi.service                 |  14 +
> ...re-don-t-try-to-run-stuff-to-find-tinyxml.patch |  25 ++
> .../kodi/kodi/0002-handle-SIGTERM.patch            | 163 ++++++++
> ...-to-read-frequency-output-if-using-intel-.patch |  26 ++
> .../kodi/kodi/0004-Disable-DVD-support.patch       |  35 ++
> .../recipes-mediacenter/kodi/kodi_17.bb            | 177 +++++++++
> ...on-t-run-python-distutils-to-find-STAGING.patch |  31 --
> ...d-ios-Add-memory-barriers-to-atomic-Add-S.patch |  97 -----
> ...d-ios-Add-memory-barriers-to-cas-assembly.patch |  69 ----
> ...igure-cope-with-ld-is-gold-DISTRO_FEATURE.patch |  43 ---
> .../xbmc/configure.in-Avoid-running-code.patch     |  32 --
> .../recipes-mediacentre/xbmc/xbmc_git.bb           |  97 -----
> 20 files changed, 1124 insertions(+), 369 deletions(-)
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch
> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch
> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch
> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch
> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch
> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch
> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb
> 
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb b/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb
> new file mode 100644
> index 0000000..094ccff
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb
> @@ -0,0 +1,24 @@
> +SUMMARY = "Kodi Media Center"
> +
> +LICENSE = "GPLv2+"
> +LIC_FILES_CHKSUM = "file://JsonSchemaBuilder.cpp;beginline=2;endline=18;md5=1f67721215c03f66545390f6e45b99c7"
> +
> +SRCREV = "b587e98911fcedc4b800cd923a882c7aeeaa2146"
> +
> +PV = "16.0+gitr${SRCPV}"
> +SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Jarvis"
> +
> +inherit autotools-brokensep gettext native
> +
> +S = "${WORKDIR}/git/tools/depends/native/JsonSchemaBuilder/src"
> +
> +do_compile_prepend() {
> +    for i in $(find . -name "Makefile") ; do
> +        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
> +    done
> +
> +    for i in $(find . -name "*.mak*" -o    -name "Makefile") ; do
> +        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
> +    done
> +}
> +
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch
> new file mode 100644
> index 0000000..c4a6ae7
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch
> @@ -0,0 +1,427 @@
> +From 06a8224c99282ac1a606edd9e8ea3f591112942d Mon Sep 17 00:00:00 2001
> +From: Koen Kooi <koen@dominion.thruhere.net>
> +Date: Thu, 18 Feb 2016 14:04:31 +0100
> +Subject: [PATCH] Update to p8-platform
> +
> +---
> + CMakeLists.txt                         |  6 +++---
> + pvr.hts/changelog.txt                  |  4 ++--
> + src/AutoRecordings.cpp                 |  2 +-
> + src/HTSPConnection.cpp                 |  8 +++----
> + src/HTSPDemuxer.cpp                    |  2 +-
> + src/HTSPVFS.cpp                        |  6 +++---
> + src/TimeRecordings.cpp                 |  2 +-
> + src/Tvheadend.cpp                      |  4 ++--
> + src/Tvheadend.h                        | 38 +++++++++++++++++-----------------
> + src/client.cpp                         |  4 ++--
> + src/client.h                           |  4 ++--
> + src/tvheadend/Subscription.cpp         |  2 +-
> + src/tvheadend/Subscription.h           |  4 ++--
> + src/tvheadend/utilities/AsyncState.cpp |  4 ++--
> + src/tvheadend/utilities/AsyncState.h   |  6 +++---
> + 15 files changed, 48 insertions(+), 48 deletions(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 0842682..cb04942 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -6,10 +6,10 @@ enable_language(CXX)
> + 
> + find_package(kodi REQUIRED)
> + find_package(kodiplatform REQUIRED)
> +-find_package(platform REQUIRED)
> ++find_package(p8-platform REQUIRED)
> + 
> + include_directories(${kodiplatform_INCLUDE_DIRS}
> +-                    ${platform_INCLUDE_DIRS}
> ++                    ${p8-platform_INCLUDE_DIRS}
> +                     ${KODI_INCLUDE_DIR}
> +                     ${PROJECT_SOURCE_DIR}/lib)
> + 
> +@@ -95,7 +95,7 @@ list(APPEND HTS_SOURCES
> + 
> + add_subdirectory(lib/libhts)
> + 
> +-set(DEPLIBS ${platform_LIBRARIES} hts)
> ++set(DEPLIBS ${p8-platform_LIBRARIES} hts)
> + if(WIN32)
> +   list(APPEND DEPLIBS ws2_32)
> + endif()
> +diff --git a/pvr.hts/changelog.txt b/pvr.hts/changelog.txt
> +index 9ffa33c..1e7fe30 100644
> +--- a/pvr.hts/changelog.txt
> ++++ b/pvr.hts/changelog.txt
> +@@ -49,7 +49,7 @@
> + - fixed: Autorec: Start and stop time handling.
> + - fixed: LocaltimeToUTC conversion (timer settings clock display incorrect).
> + - fixed: Several issues with predictive tuning.
> +-- added: build: Automatically fill in platform and library name.
> ++- added: build: Automatically fill in p8-platform and library name.
> + - fixed: Use epg data only for creation of epg-based timers.
> + - improved: Do not try to reconnect to tvh while suspending or not fully awake again.
> + 
> +@@ -97,7 +97,7 @@
> + - added: support for creating repeating timers, aka time schedules
> + - fixed: conditions for addon restart after settings changes
> + - internal: fixed build system regressions introduced with move to cmake
> +-- internal: updated to use libplatform
> ++- internal: updated to use libp8-platform
> + 
> + 2.1.7
> + - added: support for radio channel groups
> +diff --git a/src/AutoRecordings.cpp b/src/AutoRecordings.cpp
> +index 5fa60a0..d9e5e1d 100644
> +--- a/src/AutoRecordings.cpp
> ++++ b/src/AutoRecordings.cpp
> +@@ -26,7 +26,7 @@
> + #include "tvheadend/utilities/Utilities.h"
> + #include "tvheadend/utilities/Logger.h"
> + 
> +-using namespace PLATFORM;
> ++using namespace P8PLATFORM;
> + using namespace tvheadend;
> + using namespace tvheadend::entity;
> + using namespace tvheadend::utilities;
> +diff --git a/src/HTSPConnection.cpp b/src/HTSPConnection.cpp
> +index aec1296..86f5004 100644
> +--- a/src/HTSPConnection.cpp
> ++++ b/src/HTSPConnection.cpp
> +@@ -19,9 +19,9 @@
> +  *
> +  */
> + 
> +-#include "platform/threads/mutex.h"
> +-#include "platform/util/StringUtils.h"
> +-#include "platform/sockets/tcp.h"
> ++#include "p8-platform/threads/mutex.h"
> ++#include "p8-platform/util/StringUtils.h"
> ++#include "p8-platform/sockets/tcp.h"
> + 
> + extern "C" {
> + #include "libhts/htsmsg_binary.h"
> +@@ -33,7 +33,7 @@ extern "C" {
> + 
> + using namespace std;
> + using namespace ADDON;
> +-using namespace PLATFORM;
> ++using namespace P8PLATFORM;
> + using namespace tvheadend;
> + using namespace tvheadend::utilities;
> + 
> +diff --git a/src/HTSPDemuxer.cpp b/src/HTSPDemuxer.cpp
> +index a6e1f12..7f45345 100644
> +--- a/src/HTSPDemuxer.cpp
> ++++ b/src/HTSPDemuxer.cpp
> +@@ -27,7 +27,7 @@
> + 
> + using namespace std;
> + using namespace ADDON;
> +-using namespace PLATFORM;
> ++using namespace P8PLATFORM;
> + using namespace tvheadend;
> + using namespace tvheadend::utilities;
> + 
> +diff --git a/src/HTSPVFS.cpp b/src/HTSPVFS.cpp
> +index 0463f56..0404bab 100644
> +--- a/src/HTSPVFS.cpp
> ++++ b/src/HTSPVFS.cpp
> +@@ -19,8 +19,8 @@
> +  *
> +  */
> + 
> +-#include "platform/threads/mutex.h"
> +-#include "platform/util/StringUtils.h"
> ++#include "p8-platform/threads/mutex.h"
> ++#include "p8-platform/util/StringUtils.h"
> + #include "tvheadend/utilities/Logger.h"
> + 
> + extern "C" {
> +@@ -30,7 +30,7 @@ extern "C" {
> + #include "Tvheadend.h"
> + 
> + using namespace std;
> +-using namespace PLATFORM;
> ++using namespace P8PLATFORM;
> + using namespace tvheadend::utilities;
> + 
> + /*
> +diff --git a/src/TimeRecordings.cpp b/src/TimeRecordings.cpp
> +index 5d34938..97aae09 100644
> +--- a/src/TimeRecordings.cpp
> ++++ b/src/TimeRecordings.cpp
> +@@ -25,7 +25,7 @@
> + #include "tvheadend/utilities/Utilities.h"
> + #include "tvheadend/utilities/Logger.h"
> + 
> +-using namespace PLATFORM;
> ++using namespace P8PLATFORM;
> + using namespace tvheadend;
> + using namespace tvheadend::entity;
> + using namespace tvheadend::utilities;
> +diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp
> +index 2057241..14c3bd4 100644
> +--- a/src/Tvheadend.cpp
> ++++ b/src/Tvheadend.cpp
> +@@ -23,7 +23,7 @@
> + #include <ctime>
> + #include <memory>
> + 
> +-#include "platform/util/StringUtils.h"
> ++#include "p8-platform/util/StringUtils.h"
> + 
> + #include "Tvheadend.h"
> + #include "tvheadend/utilities/Utilities.h"
> +@@ -31,7 +31,7 @@
> + 
> + using namespace std;
> + using namespace ADDON;
> +-using namespace PLATFORM;
> ++using namespace P8PLATFORM;
> + using namespace tvheadend;
> + using namespace tvheadend::entity;
> + using namespace tvheadend::utilities;
> +diff --git a/src/Tvheadend.h b/src/Tvheadend.h
> +index 2ce4552..e794716 100644
> +--- a/src/Tvheadend.h
> ++++ b/src/Tvheadend.h
> +@@ -22,10 +22,10 @@
> +  */
> + 
> + #include "client.h"
> +-#include "platform/sockets/tcp.h"
> +-#include "platform/threads/threads.h"
> +-#include "platform/threads/mutex.h"
> +-#include "platform/util/buffer.h"
> ++#include "p8-platform/sockets/tcp.h"
> ++#include "p8-platform/threads/threads.h"
> ++#include "p8-platform/threads/mutex.h"
> ++#include "p8-platform/util/buffer.h"
> + #include "kodi/xbmc_codec_types.h"
> + #include "kodi/xbmc_stream_utils.hpp"
> + #include "kodi/libXBMC_addon.h"
> +@@ -88,7 +88,7 @@ class CHTSPMessage;
> + 
> + /* Typedefs */
> + typedef std::map<uint32_t,CHTSPResponse*> CHTSPResponseList;
> +-typedef PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue;
> ++typedef P8PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue;
> + 
> + /*
> +  * HTSP Response handler
> +@@ -98,10 +98,10 @@ class CHTSPResponse
> + public:
> +   CHTSPResponse();
> +   ~CHTSPResponse();
> +-  htsmsg_t *Get ( PLATFORM::CMutex &mutex, uint32_t timeout );
> ++  htsmsg_t *Get ( P8PLATFORM::CMutex &mutex, uint32_t timeout );
> +   void      Set ( htsmsg_t *m );
> + private:
> +-  PLATFORM::CCondition<volatile bool> m_cond;
> ++  P8PLATFORM::CCondition<volatile bool> m_cond;
> +   bool                                m_flag;
> +   htsmsg_t                           *m_msg;
> + };
> +@@ -146,7 +146,7 @@ public:
> +  * HTSP Connection registration thread
> +  */
> + class CHTSPRegister
> +-  : public PLATFORM::CThread
> ++  : public P8PLATFORM::CThread
> + {
> +   friend class CHTSPConnection;
> + 
> +@@ -163,7 +163,7 @@ private:
> +  * HTSP Connection
> +  */
> + class CHTSPConnection
> +-  : public PLATFORM::CThread
> ++  : public P8PLATFORM::CThread
> + {
> +   friend class CHTSPRegister;
> + 
> +@@ -190,7 +190,7 @@ public:
> +   inline bool IsConnected       ( void ) const { return m_ready; }
> +   bool        WaitForConnection ( void );
> + 
> +-  inline PLATFORM::CMutex& Mutex ( void ) { return m_mutex; }
> ++  inline P8PLATFORM::CMutex& Mutex ( void ) { return m_mutex; }
> + 
> +   void        OnSleep ( void );
> +   void        OnWake  ( void );
> +@@ -202,10 +202,10 @@ private:
> +   bool        SendHello        ( void );
> +   bool        SendAuth         ( const std::string &u, const std::string &p );
> + 
> +-  PLATFORM::CTcpSocket               *m_socket;
> +-  PLATFORM::CMutex                    m_mutex;
> ++  P8PLATFORM::CTcpSocket               *m_socket;
> ++  P8PLATFORM::CMutex                    m_mutex;
> +   CHTSPRegister                       m_regThread;
> +-  PLATFORM::CCondition<volatile bool> m_regCond;
> ++  P8PLATFORM::CCondition<volatile bool> m_regCond;
> +   bool                                m_ready;
> +   uint32_t                            m_seq;
> +   std::string                         m_serverName;
> +@@ -273,13 +273,13 @@ public:
> +   void SetStreamingProfile(const std::string &profile);
> + 
> + private:
> +-  PLATFORM::CMutex                        m_mutex;
> ++  P8PLATFORM::CMutex                        m_mutex;
> +   CHTSPConnection                        &m_conn;
> +-  PLATFORM::SyncedBuffer<DemuxPacket*>    m_pktBuffer;
> ++  P8PLATFORM::SyncedBuffer<DemuxPacket*>    m_pktBuffer;
> +   ADDON::XbmcStreamProperties             m_streams;
> +   std::map<int,int>                       m_streamStat;
> +   int64_t                                 m_seekTime;
> +-  PLATFORM::CCondition<volatile int64_t>  m_seekCond;
> ++  P8PLATFORM::CCondition<volatile int64_t>  m_seekCond;
> +   bool                                    m_seeking;
> +   bool                                    m_speedChange;
> +   tvheadend::status::SourceInfo           m_sourceInfo;
> +@@ -350,7 +350,7 @@ private:
> +  * Root object for Tvheadend connection
> +  */
> + class CTvheadend
> +-  : public PLATFORM::CThread
> ++  : public P8PLATFORM::CThread
> + {
> + public:
> +   CTvheadend();
> +@@ -422,7 +422,7 @@ private:
> +    */
> +   tvheadend::Profiles         m_profiles;
> + 
> +-  PLATFORM::CMutex            m_mutex;
> ++  P8PLATFORM::CMutex            m_mutex;
> + 
> +   CHTSPConnection             m_conn;
> + 
> +@@ -519,7 +519,7 @@ public:
> +    */
> +   bool WaitForConnection ( void )
> +   {
> +-    PLATFORM::CLockObject lock(m_conn.Mutex());
> ++    P8PLATFORM::CLockObject lock(m_conn.Mutex());
> +     return m_conn.WaitForConnection();
> +   }
> +   std::string GetServerName    ( void )
> +diff --git a/src/client.cpp b/src/client.cpp
> +index 94d2db9..3295914 100644
> +--- a/src/client.cpp
> ++++ b/src/client.cpp
> +@@ -22,14 +22,14 @@
> + #include "client.h"
> + #include "kodi/xbmc_pvr_dll.h"
> + #include "kodi/libKODI_guilib.h"
> +-#include "platform/util/util.h"
> ++#include "p8-platform/util/util.h"
> + #include "Tvheadend.h"
> + #include "tvheadend/Settings.h"
> + #include "tvheadend/utilities/Logger.h"
> + 
> + using namespace std;
> + using namespace ADDON;
> +-using namespace PLATFORM;
> ++using namespace P8PLATFORM;
> + using namespace tvheadend;
> + using namespace tvheadend::utilities;
> + 
> +diff --git a/src/client.h b/src/client.h
> +index 3a5f950..a10659b 100644
> +--- a/src/client.h
> ++++ b/src/client.h
> +@@ -20,8 +20,8 @@
> +  *
> +  */
> + 
> +-#include "platform/os.h"
> +-#include "platform/threads/mutex.h"
> ++#include "p8-platform/os.h"
> ++#include "p8-platform/threads/mutex.h"
> + #include "kodi/libXBMC_addon.h"
> + #include "kodi/libXBMC_pvr.h"
> + #include "kodi/libXBMC_codec.h"
> +diff --git a/src/tvheadend/Subscription.cpp b/src/tvheadend/Subscription.cpp
> +index 182ca7f..e18af1e 100644
> +--- a/src/tvheadend/Subscription.cpp
> ++++ b/src/tvheadend/Subscription.cpp
> +@@ -23,7 +23,7 @@
> + #include "utilities/Logger.h"
> + #include "../Tvheadend.h"
> + 
> +-using namespace PLATFORM;
> ++using namespace P8PLATFORM;
> + using namespace tvheadend;
> + using namespace tvheadend::utilities;
> + 
> +diff --git a/src/tvheadend/Subscription.h b/src/tvheadend/Subscription.h
> +index b03bcce..363e5ef 100644
> +--- a/src/tvheadend/Subscription.h
> ++++ b/src/tvheadend/Subscription.h
> +@@ -22,7 +22,7 @@
> +  */
> + 
> + #include <string>
> +-#include "platform/threads/mutex.h"
> ++#include "p8-platform/threads/mutex.h"
> + 
> + extern "C"
> + {
> +@@ -146,6 +146,6 @@ namespace tvheadend
> +     std::string       m_profile;
> +     CHTSPConnection   &m_conn;
> + 
> +-    mutable PLATFORM::CMutex  m_mutex;
> ++    mutable P8PLATFORM::CMutex  m_mutex;
> +   };
> + }
> +diff --git a/src/tvheadend/utilities/AsyncState.cpp b/src/tvheadend/utilities/AsyncState.cpp
> +index 0c30a93..1f4fdf3 100644
> +--- a/src/tvheadend/utilities/AsyncState.cpp
> ++++ b/src/tvheadend/utilities/AsyncState.cpp
> +@@ -22,7 +22,7 @@
> + #include "AsyncState.h"
> + 
> + using namespace tvheadend::utilities;
> +-using namespace PLATFORM;
> ++using namespace P8PLATFORM;
> + 
> + struct Param {
> +   eAsyncState state;
> +@@ -37,7 +37,7 @@ AsyncState::AsyncState(int timeout)
> + 
> + eAsyncState AsyncState::GetState()
> + {
> +-  PLATFORM::CLockObject lock(m_mutex);
> ++  P8PLATFORM::CLockObject lock(m_mutex);
> +   return m_state;
> + }
> + 
> +diff --git a/src/tvheadend/utilities/AsyncState.h b/src/tvheadend/utilities/AsyncState.h
> +index 1d672da..0819cd8 100644
> +--- a/src/tvheadend/utilities/AsyncState.h
> ++++ b/src/tvheadend/utilities/AsyncState.h
> +@@ -22,7 +22,7 @@
> + #ifndef ASYNCSTATE_H
> + #define	ASYNCSTATE_H
> + 
> +-#include "platform/threads/mutex.h"
> ++#include "p8-platform/threads/mutex.h"
> + 
> + namespace tvheadend {
> +   namespace utilities {
> +@@ -75,8 +75,8 @@ namespace tvheadend {
> +       static bool PredicateCallback ( void *param );
> + 
> +       eAsyncState m_state;
> +-      PLATFORM::CMutex m_mutex;
> +-      PLATFORM::CCondition<bool> m_condition;
> ++      P8PLATFORM::CMutex m_mutex;
> ++      P8PLATFORM::CCondition<bool> m_condition;
> +       int m_timeout;
> + 
> +     };
> +-- 
> +2.0.1
> +
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb
> new file mode 100644
> index 0000000..1f33a8a
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb
> @@ -0,0 +1,55 @@
> +SUMMARY = "Kodi Media Center PVR plugins"
> +
> +LICENSE = "GPLv2+"
> +LIC_FILES_CHKSUM = "file://src/client.cpp;md5=c8f6b73c5bc1048a3d6506700a7a91d2"
> +
> +DEPENDS = " \
> +            zip-native \
> +            p8platform \
> +            kodi-platform \
> +          "
> +
> +SRCREV_pvrhts = "7f75b70527922aef953123ff97ebaa22d9fb7cb4"
> +
> +SRCREV_FORMAT = "pvrhts"
> +
> +PV = "2.2.13+gitr${SRCPV}"
> +SRC_URI = "git://github.com/kodi-pvr/pvr.hts.git;branch=Jarvis;destsuffix=pvr.hts;name=pvrhts \
> +           file://0001-Update-to-p8-platform.patch \
> +          "
> +
> +inherit cmake pkgconfig gettext
> +
> +S = "${WORKDIR}/pvr.hts"
> +
> +EXTRA_OECMAKE = " \
> +	  -DADDONS_TO_BUILD=pvr.hts \
> +	  -DADDON_SRC_PREFIX=${WORKDIR}/git \
> +	  -DCMAKE_BUILD_TYPE=Debug \
> +	  -DCMAKE_INSTALL_PREFIX=${datadir}/kodi/addons \
> +          -DCMAKE_MODULE_PATH=${STAGING_DIR_HOST}${libdir}/kodi \
> +          -DCMAKE_PREFIX_PATH=${STAGING_DIR_HOST}${prefix} \
> +          -DPACKAGE_ZIP=1 \
> +        "
> +
> +do_compile_prepend() {
> +	sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \
> +	       -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \
> +	          ${B}/CMakeFiles/*/flags.make
> +	sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\
> +	          ${B}/CMakeFiles/*/link.txt
> +}
> +
> +# Make zip package for manual installation
> +do_install_append() {
> +	install -d ${D}${datadir}/kodi/addons/packages/
> +	( cd ${D}${datadir}/kodi/addons
> +	  zip -r ${D}${datadir}/kodi/addons/packages/pvr.hts-${PV}.zip pvr.hts -x '*.debug*' )
> +}
> +
> +# Doesn't get added automagically, dlopen()?
> +RDEPENDS_${PN} = "libkodiplatform"
> +
> +INSANE_SKIP_${PN} = "dev-so"
> +FILES_${PN} += "${datadir}/kodi"
> +FILES_${PN}-dbg += "${datadir}/kodi/addons/*/.debug/"
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch
> new file mode 100644
> index 0000000..35e5134
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch
> @@ -0,0 +1,67 @@
> +From 7cf366faa7a24c7146c745c8cd8dc3ae3d1cabea Mon Sep 17 00:00:00 2001
> +From: Garrett Brown <themagnificentmrb@gmail.com>
> +Date: Thu, 7 Jan 2016 15:55:22 -0800
> +Subject: [PATCH] Fix build after platform rename
> +
> +update source code to use renamed platform pkg
> +---
> + CMakeLists.txt      | 6 +++---
> + debian/control      | 2 +-
> + src/util/XMLUtils.h | 2 +-
> + 3 files changed, 5 insertions(+), 5 deletions(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 2ce8c0d..bf6b659 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -8,7 +8,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
> + find_package(kodi REQUIRED)
> + find_package(TinyXML REQUIRED)
> + find_package(Threads REQUIRED)
> +-find_package(platform REQUIRED)
> ++find_package(p8-platform REQUIRED)
> + include(UseMultiArch.cmake)
> + include(CheckAtomic.cmake)
> + 
> +@@ -36,10 +36,10 @@ endif()
> + 
> + set(SOURCES src/util/XMLUtils.cpp)
> + 
> +-include_directories(${TINYXML_INCLUDE_DIR} ${KODI_INCLUDE_DIR} ${platform_INCLUDE_DIRS})
> ++include_directories(${TINYXML_INCLUDE_DIR} ${KODI_INCLUDE_DIR} ${p8-platform_INCLUDE_DIRS})
> + 
> + add_library(kodiplatform ${SOURCES} ${PLAT_SOURCES})
> +-target_link_libraries(kodiplatform ${kodiplatform_LIBRARIES} ${platform_LIBRARIES})
> ++target_link_libraries(kodiplatform ${kodiplatform_LIBRARIES} ${p8-platform_LIBRARIES})
> + set_target_properties(kodiplatform PROPERTIES VERSION ${kodiplatform_VERSION_MAJOR}.${kodiplatform_VERSION_MINOR}.${kodiplatform_VERSION_PATCH}
> +                                               SOVERSION ${kodiplatform_VERSION_MAJOR}.0)
> + 
> +diff --git a/debian/control b/debian/control
> +index 42cadb2..e40c982 100644
> +--- a/debian/control
> ++++ b/debian/control
> +@@ -1,7 +1,7 @@
> + Source: kodiplatform
> + Priority: extra
> + Maintainer: Arne Morten Kvarving <arne.morten.kvarving@sintef.no>
> +-Build-Depends: debhelper (>= 8.0.0), cmake, libtinyxml-dev, kodi-addon-dev, libplatform-dev
> ++Build-Depends: debhelper (>= 8.0.0), cmake, libtinyxml-dev, kodi-addon-dev, libp8-platform-dev
> + Standards-Version: 3.9.2
> + Section: libs
> + 
> +diff --git a/src/util/XMLUtils.h b/src/util/XMLUtils.h
> +index f22fd07..a10d831 100644
> +--- a/src/util/XMLUtils.h
> ++++ b/src/util/XMLUtils.h
> +@@ -21,7 +21,7 @@
> +  *
> +  */
> + 
> +-#include <platform/util/StdString.h>
> ++#include <p8-platform/util/StdString.h>
> + #include "tinyxml.h"
> + 
> + class XMLUtils
> +-- 
> +2.0.1
> +
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch
> new file mode 100644
> index 0000000..27e9d21
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch
> @@ -0,0 +1,40 @@
> +From 3136317f096ea7fda4fb907e775a01952c4aae3d Mon Sep 17 00:00:00 2001
> +From: Stefan Saraev <stefan@saraev.ca>
> +Date: Fri, 19 Feb 2016 10:33:00 +0100
> +Subject: [PATCH] fix cross compile badness
> +
> +From https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/mediacenter/kodi-platform/patches/kodi-platform-01_crosscompile-badness.patch
> +---
> + CMakeLists.txt               | 2 +-
> + kodiplatform-config.cmake.in | 2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index bf6b659..9abe773 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -22,7 +22,7 @@ if(NOT WIN32)
> +   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
> + endif()
> + 
> +-set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX}/include/kodi")
> ++set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX_TOOLCHAIN}/include/kodi")
> + IF(WIN32)
> +   LIST(APPEND kodiplatform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/kodi/windows")
> + ENDIF(WIN32)
> +diff --git a/kodiplatform-config.cmake.in b/kodiplatform-config.cmake.in
> +index 3fc5273..60bdf1b 100644
> +--- a/kodiplatform-config.cmake.in
> ++++ b/kodiplatform-config.cmake.in
> +@@ -10,7 +10,7 @@
> + #
> + # propagate these properties from one build system to the other
> + set (kodiplatform_VERSION "@kodiplatform_VERSION_MAJOR@.@kodiplatform_VERSION_MINOR@")
> +-set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)
> ++set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX_TOOLCHAIN@/include)
> + set (kodiplatform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
> + set (kodiplatform_LINKER_FLAGS "@kodiplatform_LINKER_FLAGS@")
> + set (kodiplatform_CONFIG_VARS "@kodiplatform_CONFIG_VARS@")
> +-- 
> +2.0.1
> +
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch
> new file mode 100644
> index 0000000..a13c53b
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch
> @@ -0,0 +1,12 @@
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 9abe773..ae433fc 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -9,7 +9,6 @@ find_package(kodi REQUIRED)
> + find_package(TinyXML REQUIRED)
> + find_package(Threads REQUIRED)
> + find_package(p8-platform REQUIRED)
> +-include(UseMultiArch.cmake)
> + include(CheckAtomic.cmake)
> + 
> + set(kodiplatform_NAME kodiplatform)
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb
> new file mode 100644
> index 0000000..5077454
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb
> @@ -0,0 +1,39 @@
> +SUMMARY = "Platform support library used by libCEC and binary add-ons for Kodi"
> +HOMEPAGE = "http://libcec.pulse-eight.com/"
> +
> +LICENSE = "GPLv2+"
> +LIC_FILES_CHKSUM = "file://src/util/XMLUtils.cpp;beginline=2;endline=18;md5=dae8e846500e70dd8ecee55f3f018c30"
> +
> +DEPENDS = "libtinyxml kodi"
> +
> +PV = "16.0.0"
> +
> +SRCREV = "15edaf78d6307eaa5e1d17028122d8bce9d55aa2"
> +SRC_URI = "git://github.com/xbmc/kodi-platform.git \
> +           file://0001-Fix-build-after-platform-rename.patch \
> +           file://0001-fix-cross-compile-badness.patch \
> +           file://kodi-platform-02_no-multi-lib.patch \
> +          "
> +
> +S = "${WORKDIR}/git"
> +
> +inherit cmake pkgconfig
> +
> +EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX_TOOLCHAIN=${STAGING_DIR_TARGET} \
> +                  -DCMAKE_INSTALL_LIBDIR=${libdir} \
> +                  -DCMAKE_INSTALL_LIBDIR_NOARCH=${libdir} \
> +                  -DKODI_INCLUDE_DIR=${STAGING_LIBDIR}/kodi \
> +                  -DKODI_INCLUDE_DIR=${STAGING_INCDIR}/kodi \
> +                "
> +
> +do_compile_prepend() {
> +	sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \
> +	       -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \
> +	          ${B}/CMakeFiles/kodiplatform.dir/flags.make
> +	sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\
> +	          ${B}/CMakeFiles/kodiplatform.dir/link.txt
> +}
> +
> +RPROVIDES_${PN} += "libkodiplatform"
> +FILES_${PN}-dev += "${libdir}/*platform"
> +
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb
> new file mode 100644
> index 0000000..955d02b
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb
> @@ -0,0 +1,20 @@
> +SUMMARY = "Systemd service for kodi startup"
> +
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
> +
> +PV = "1.0"
> +
> +SRC_URI = "file://kodi.service"
> +
> +inherit systemd
> +
> +do_install() {
> +	install -d ${D}/lib/systemd/system
> +	install -m 0644 ${WORKDIR}/kodi.service ${D}/lib/systemd/system/ 
> +}
> +
> +SYSTEMD_PACKAGES = "${PN}"
> +SYSTEMD_SERVICE_${PN} = "kodi.service"
> +
> +RDEPENDS_${PN} += "xinit kodi"
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service
> new file mode 100644
> index 0000000..29d0394
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service
> @@ -0,0 +1,14 @@
> +[Unit]
> +Description=Kodi media thing
> +
> +[Service]
> +User=root
> +Type=simple
> +SuccessExitStatus=0 1
> +IOSchedulingClass=realtime
> +IOSchedulingPriority=0
> +
> +ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- /usr/bin/X :0 
> +
> +[Install]
> +WantedBy=basic.target
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch
> new file mode 100644
> index 0000000..b3780db
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch
> @@ -0,0 +1,25 @@
> +From 53c7b1667a41b25775d1dc009d8ced61f383da0b Mon Sep 17 00:00:00 2001
> +From: Koen Kooi <koen@dominion.thruhere.net>
> +Date: Sat, 6 Feb 2016 15:43:01 +0100
> +Subject: [PATCH 1/3] configure: don't try to run stuff to find tinyxml
> +
> +---
> + configure.ac | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 5a41fb4..243c7e5 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -1043,7 +1043,7 @@ fi
> + AC_LANG_PUSH([C++])
> + PKG_CHECK_MODULES([TINYXML], [tinyxml >= 2.6.2],
> +   [INCLUDES="$INCLUDES $TINYXML_CFLAGS"; LIBS="$LIBS $TINYXML_LIBS"],
> +-  [AC_RUN_IFELSE(
> ++  [AC_COMPILE_IFELSE(
> +    [AC_LANG_SOURCE([[
> + #include <stdlib.h>
> + #include <tinyxml.h>
> +-- 
> +2.10.1
> +
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch
> new file mode 100644
> index 0000000..b2af5de
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch
> @@ -0,0 +1,163 @@
> +From 1c1484303a055bfde655ffae3829554aaefc2e07 Mon Sep 17 00:00:00 2001
> +From: Stefan Saraev <stefan@saraev.ca>
> +Date: Wed, 2 Nov 2016 11:28:34 -0700
> +Subject: [PATCH 2/3] handle SIGTERM
> +
> +0. CApplication::Stop cant be trusted. (deadlocks crashes and boo)
> +
> +so, when shutdown/reboot is requested:
> +
> +1. save an exit code (for CEC...)
> +2. call CPowerManager::{Reboot,PowerDown}
> +3. ... then systemd sends TERM and waits xx seconds before sending KILL
> +4. CApplication::Stop has xx seconds to save guisettings.xml and boo
> +5. CEC thread has xx seconds to switch off after it received OnQuit
> +6. addons / pvrmanager / cec / everything else.. are free to deadlock / crash now, we dont care
> +7. KILL
> +
> +Signed-off-by: Stefan Saraev <stefan@saraev.ca>
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + xbmc/Application.cpp         | 17 ++++++++++++-----
> + xbmc/Application.h           |  1 +
> + xbmc/XBApplicationEx.cpp     |  1 +
> + xbmc/XBApplicationEx.h       |  1 +
> + xbmc/platform/posix/main.cpp | 15 +++++++++++++++
> + 5 files changed, 30 insertions(+), 5 deletions(-)
> +
> +diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
> +index 4c118e0..58b151a 100644
> +--- a/xbmc/Application.cpp
> ++++ b/xbmc/Application.cpp
> +@@ -2428,12 +2428,12 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
> +   switch (pMsg->dwMessage)
> +   {
> +   case TMSG_POWERDOWN:
> +-    Stop(EXITCODE_POWERDOWN);
> ++    SetExitCode(EXITCODE_POWERDOWN);
> +     g_powerManager.Powerdown();
> +     break;
> + 
> +   case TMSG_QUIT:
> +-    Stop(EXITCODE_QUIT);
> ++    SetExitCode(EXITCODE_QUIT);
> +     break;
> +   
> +   case TMSG_SHUTDOWN:
> +@@ -2454,12 +2454,13 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
> + 
> +   case TMSG_RESTART:
> +   case TMSG_RESET:
> +-    Stop(EXITCODE_REBOOT);
> ++    SetExitCode(EXITCODE_REBOOT);
> +     g_powerManager.Reboot();
> +     break;
> + 
> +   case TMSG_RESTARTAPP:
> + #if defined(TARGET_WINDOWS) || defined(TARGET_LINUX)
> ++    SetExitCode(EXITCODE_RESTARTAPP);
> +     Stop(EXITCODE_RESTARTAPP);
> + #endif
> +     break;
> +@@ -2883,6 +2884,13 @@ bool CApplication::Cleanup()
> +   }
> + }
> + 
> ++void CApplication::SetExitCode(int exitCode)
> ++{
> ++  // save it for CEC
> ++  m_ExitCode = exitCode;
> ++  m_ExitCodeSet = true;
> ++}
> ++
> + void CApplication::Stop(int exitCode)
> + {
> +   try
> +@@ -2890,7 +2898,7 @@ void CApplication::Stop(int exitCode)
> +     m_frameMoveGuard.unlock();
> + 
> +     CVariant vExitCode(CVariant::VariantTypeObject);
> +-    vExitCode["exitcode"] = exitCode;
> ++    vExitCode["exitcode"] = m_ExitCode;
> +     CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnQuit", vExitCode);
> + 
> +     // Abort any active screensaver
> +@@ -2924,7 +2932,6 @@ void CApplication::Stop(int exitCode)
> + 
> +     m_bStop = true;
> +     m_AppFocused = false;
> +-    m_ExitCode = exitCode;
> +     CLog::Log(LOGNOTICE, "stop all");
> + 
> +     // cancel any jobs from the jobmanager
> +diff --git a/xbmc/Application.h b/xbmc/Application.h
> +index 22aca81..9992677 100644
> +--- a/xbmc/Application.h
> ++++ b/xbmc/Application.h
> +@@ -160,6 +160,7 @@ public:
> +   void StopPVRManager();
> +   void ReinitPVRManager();
> +   bool IsCurrentThread() const;
> ++  void SetExitCode(int exitCode);
> +   void Stop(int exitCode);
> +   void RestartApp();
> +   void UnloadSkin(bool forReload = false);
> +diff --git a/xbmc/XBApplicationEx.cpp b/xbmc/XBApplicationEx.cpp
> +index 035aed2..34102f5 100644
> +--- a/xbmc/XBApplicationEx.cpp
> ++++ b/xbmc/XBApplicationEx.cpp
> +@@ -46,6 +46,7 @@ CXBApplicationEx::CXBApplicationEx()
> +   m_bStop = false;
> +   m_AppFocused = true;
> +   m_ExitCode = EXITCODE_QUIT;
> ++  m_ExitCodeSet = false;
> +   m_renderGUI = false;
> + }
> + 
> +diff --git a/xbmc/XBApplicationEx.h b/xbmc/XBApplicationEx.h
> +index 9bc14fa..f696b89 100644
> +--- a/xbmc/XBApplicationEx.h
> ++++ b/xbmc/XBApplicationEx.h
> +@@ -42,6 +42,7 @@ public:
> +   // Variables for timing
> +   bool m_bStop;
> +   int  m_ExitCode;
> ++  bool m_ExitCodeSet;
> +   bool m_AppFocused;
> +   bool m_renderGUI;
> + 
> +diff --git a/xbmc/platform/posix/main.cpp b/xbmc/platform/posix/main.cpp
> +index a8b64e5..3d80032 100644
> +--- a/xbmc/platform/posix/main.cpp
> ++++ b/xbmc/platform/posix/main.cpp
> +@@ -41,12 +41,27 @@
> + #include "input/linux/LIRC.h"
> + #endif
> + #include "platform/XbmcContext.h"
> ++#include "Application.h"
> ++
> ++void xbmc_term_handler(int signum)
> ++{
> ++  CLog::Log(LOGINFO, "Received SIGTERM...");
> ++  if (!g_application.m_ExitCodeSet)
> ++    g_application.SetExitCode(EXITCODE_RESTARTAPP);
> ++  g_application.Stop(EXITCODE_RESTARTAPP);
> ++}
> + 
> + #ifdef __cplusplus
> + extern "C"
> + #endif
> + int main(int argc, char* argv[])
> + {
> ++  // SIGTERM handler
> ++  struct sigaction action;
> ++  memset(&action, 0, sizeof(struct sigaction));
> ++  action.sa_handler = xbmc_term_handler;
> ++  sigaction(SIGTERM, &action, NULL);
> ++
> +   // set up some xbmc specific relationships
> +   XBMC::Context context;
> + 
> +-- 
> +2.10.1
> +
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch
> new file mode 100644
> index 0000000..d638550
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch
> @@ -0,0 +1,26 @@
> +From 4ef1e9dab9193f1a5305d25c8eda97f8f06ea154 Mon Sep 17 00:00:00 2001
> +From: Stephan Raue <stephan@openelec.tv>
> +Date: Mon, 1 Sep 2014 03:16:37 +0200
> +Subject: [PATCH 3/3] add support to read frequency output if using intel's
> + pstate driver
> +
> +---
> + xbmc/utils/CPUInfo.cpp | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp
> +index 5e2ebbd..fd04d5a 100644
> +--- a/xbmc/utils/CPUInfo.cpp
> ++++ b/xbmc/utils/CPUInfo.cpp
> +@@ -274,6 +274,8 @@ CCPUInfo::CCPUInfo(void)
> +     m_fProcTemperature = fopen("/sys/class/thermal/thermal_zone0/temp", "r");  // On Raspberry PIs
> + 
> +   m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r");
> ++  if (m_fCPUFreq == NULL)
> ++    m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq", "r");
> +   if (!m_fCPUFreq)
> +   {
> +     m_cpuInfoForFreq = true;
> +-- 
> +2.10.1
> +
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch
> new file mode 100644
> index 0000000..6f5f9a2
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch
> @@ -0,0 +1,35 @@
> +From 191cf3f084b4d34846711034a7fe3078f8243c82 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Wed, 2 Nov 2016 12:39:20 -0700
> +Subject: [PATCH 4/4] Disable DVD support
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + Makefile.in | 4 +---
> + 1 file changed, 1 insertion(+), 3 deletions(-)
> +
> +diff --git a/Makefile.in b/Makefile.in
> +index 58b3a17..b7c3fce 100644
> +--- a/Makefile.in
> ++++ b/Makefile.in
> +@@ -10,8 +10,7 @@ EC_DIRS= \
> + 	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 @@ libaddon: exports
> + 	$(MAKE) -C lib/addons/library.xbmc.pvr
> + 	$(MAKE) -C lib/addons/library.kodi.inputstream
> + dvdpcodecs: dllloader
> +-	$(MAKE) -C lib/libdvd
> + 
> + dvdpextcodecs:
> + 
> +-- 
> +2.10.1
> +
> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
> new file mode 100644
> index 0000000..807871f
> --- /dev/null
> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
> @@ -0,0 +1,177 @@
> +SUMMARY = "Kodi Media Center"
> +
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=930e2a5f63425d8dd72dbd7391c43c46"
> +
> +DEPENDS = " \
> +            cmake-native \
> +            curl-native \
> +            gperf-native \
> +            jsonschemabuilder-native \
> +            nasm-native \
> +            swig-native \
> +            yasm-native \
> +            zip-native \
> +            avahi \
> +            boost \
> +            bzip2 \
> +            curl \
> +            dcadec \
> +            enca \
> +            expat \
> +            faad2 \
> +            ffmpeg \
> +            fontconfig \
> +            fribidi \
> +            giflib \
> +            jasper \
> +            libass \
> +            libcdio \
> +            libcec \
> +            libmad \
> +            libmicrohttpd \
> +            libmms \
> +            libmms \
> +            libmodplug \
> +            libpcre \
> +            libplist \
> +            libsamplerate0 \
> +            libsdl-image \
> +            libsdl-mixer \
> +            libsquish \
> +            libssh \
> +            libtinyxml \
> +            libusb1 \
> +            libxslt \
> +            lzo \
> +            mpeg2dec \
> +            python \
> +            samba \
> +            sqlite3 \
> +            taglib \
> +            virtual/egl \
> +            virtual/libsdl \
> +            wavpack \
> +            yajl \
> +            zlib \
> +            ${@enable_glew(bb, d)} \
> +          "
> +
> +PROVIDES = "xbmc"
> +
> +SRCREV = "32c7788e7cce711be5b7f3893c82dddd79658268"
> +PV = "17.0+gitr${SRCPV}"
> +SRC_URI = "git://github.com/xbmc/xbmc.git;branch=master \
> +           file://0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch \
> +           file://0002-handle-SIGTERM.patch \
> +           file://0003-add-support-to-read-frequency-output-if-using-intel-.patch \
> +           file://0004-Disable-DVD-support.patch \
> +"
> +
> +inherit autotools-brokensep gettext pythonnative
> +
> +S = "${WORKDIR}/git"
> +
> +# breaks compilation
> +ASNEEDED = ""
> +
> +ACCEL ?= ""
> +ACCEL_x86 = "vaapi vdpau"
> +ACCEL_x86-64 = "vaapi vdpau"
> +
> +PACKAGECONFIG ??= "${ACCEL}"
> +PACKAGECONFIG_append += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)}"
> +PACKAGECONFIG_append += "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' opengl', ' openglesv2', d)}"
> +
> +PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles,"
> +PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,virtual/egl"
> +PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
> +PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
> +PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5"
> +PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxinerama libxmu libxrandr libxtst"
> +PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
> +
> +EXTRA_OECONF_append_rpi = " --enable-openmax --enable-player=omxplayer --with-platform=raspberry-pi2"
> +#LDFLAGS_append_rpi = " -lEGL -lGLESv2 -lbcm_host -lvcos -lvchiq_arm -lvchostif -lmmal -lmmal_core -lmmal_util "
> +LDFLAGS_append_rpi = " -lvchostif "
> +EXTRA_OECONF = " \
> +    --disable-debug \
> +    --disable-libcap \
> +    --disable-ccache \
> +    --disable-mid \
> +    --enable-libusb \
> +    --enable-airplay \
> +    --disable-optical-drive \
> +    --with-ffmpeg=shared \
> +    --enable-texturepacker=no \
> +"
> +
> +FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
> +FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
> +BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
> +
> +# for python modules
> +export HOST_SYS
> +export BUILD_SYS
> +export STAGING_LIBDIR
> +export STAGING_INCDIR
> +export PYTHON_DIR
> +
> +def enable_glew(bb, d):
> +    if bb.utils.contains('PACKAGECONFIG', 'x11', True, False, d) and bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
> +        return "glew"
> +    return ""
> +
> +do_configure() {
> +    ( for i in $(find ${S} -name "configure.*" ) ; do
> +       cd $(dirname $i) && gnu-configize --force || true
> +    done )
> +    make -C tools/depends/target/crossguid PREFIX=${STAGING_DIR_HOST}${prefix}
> +
> +    BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
> +    BOOTSTRAP_STANDALONE=1 make -f codegenerator.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
> +    oe_runconf
> +}
> +
> +do_compile_prepend() {
> +    for i in $(find . -name "Makefile") ; do
> +        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
> +    done
> +
> +    for i in $(find . -name "*.mak*" -o    -name "Makefile") ; do
> +        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
> +    done
> +}
> +
> +INSANE_SKIP_${PN} = "rpaths"
> +
> +FILES_${PN} += "${datadir}/xsessions ${datadir}/icons ${libdir}/xbmc ${datadir}/xbmc"
> +FILES_${PN}-dbg += "${libdir}/kodi/.debug ${libdir}/kodi/*/.debug ${libdir}/kodi/*/*/.debug ${libdir}/kodi/*/*/*/.debug"
> +
> +# kodi uses some kind of dlopen() method for libcec so we need to add it manually
> +# OpenGL builds need glxinfo, that's in mesa-demos
> +RRECOMMENDS_${PN}_append = " libcec \
> +                             python \
> +                             python-lang \
> +                             python-re \
> +                             python-netclient \
> +                             python-html \
> +                             python-difflib \
> +                             python-json \
> +                             python-zlib \
> +                             python-shell \
> +                             python-sqlite3 \
> +                             python-compression \
> +                             libcurl \
> +                             ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr xdpyinfo', '', d)} \
> +"
> +RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 \
> +                                        glibc-gconv-ibm850 \
> +					glibc-gconv-unicode \
> +                                        glibc-gconv-utf-32 \
> +					glibc-charmap-utf-8 \
> +					glibc-localedata-en-us \
> +                                      "
> +
> +RPROVIDES_${PN} += "xbmc"
> +
> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch
> deleted file mode 100644
> index dfc3959..0000000
> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -From 0dce5a2abd9f42876616c35772a4d71c5399543c Mon Sep 17 00:00:00 2001
> -From: Koen Kooi <koen@dominion.thruhere.net>
> -Date: Sat, 17 Dec 2011 11:38:15 +0100
> -Subject: [PATCH 1/4] configure: don't run python distutils to find STAGING_INCDIR/python, it is not safe for per-machine sysroots
> -
> -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ----
> - m4/ax_python_devel.m4 |    7 +------
> - 1 files changed, 1 insertions(+), 6 deletions(-)
> -
> -diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4
> -index adbd207..dee70f6 100644
> ---- a/m4/ax_python_devel.m4
> -+++ b/m4/ax_python_devel.m4
> -@@ -151,12 +151,7 @@ $ac_distutils_result])
> - 	#
> - 	AC_MSG_CHECKING([for Python include path])
> - 	if test -z "$PYTHON_CPPFLAGS"; then
> --		python_path=`$PYTHON -c "import distutils.sysconfig; \
> --			print (distutils.sysconfig.get_python_inc ());"`
> --		if test -n "${python_path}"; then
> --			python_path="-I$python_path"
> --		fi
> --		PYTHON_CPPFLAGS=$python_path
> -+		PYTHON_CPPFLAGS="-I${STAGING_INCDIR}/${PYTHON_DIR}"
> - 	fi
> - 	AC_MSG_RESULT([$PYTHON_CPPFLAGS])
> - 	AC_SUBST([PYTHON_CPPFLAGS])
> --- 
> -1.7.2.5
> -
> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch
> deleted file mode 100644
> index e0a4037..0000000
> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch
> +++ /dev/null
> @@ -1,97 +0,0 @@
> -From 7b2a8a7869d257cba35f53f6d877877c29cdac27 Mon Sep 17 00:00:00 2001
> -From: Paul Menzel <paulepanter@users.sourceforge.net>
> -Date: Sun, 14 Aug 2011 21:53:47 +0200
> -Subject: [PATCH 2/4] Revert "fixed:[ios] Add memory barriers to atomic Add/Subtract and Increment/Decrement functions to ensure synchronized accesses."
> -
> -This reverts commit 9a10c48710df79118e39e9b3bb0a15bf1fe694d1.
> -
> -The build (OpenEmbedded `angstrom-2010.x` for `MACHINE = "beagleboard") fails with the following error.
> -
> -        make -C xbmc/threads
> -        make[1]: Entering directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+9a10c48710df79118e39e9b3bb0a15bf1fe694d1/git/xbmc/threads'
> -        CPP     Atomics.o
> -        /tmp/ccIzTm3L.s: Assembler messages:
> -        /tmp/ccIzTm3L.s:40: Error: garbage following instruction -- `dmb ish'
> -        /tmp/ccIzTm3L.s:48: Error: garbage following instruction -- `dmb ish'
> -        /tmp/ccIzTm3L.s:76: Error: garbage following instruction -- `dmb ish'
> -        /tmp/ccIzTm3L.s:83: Error: garbage following instruction -- `dmb ish'
> -        /tmp/ccIzTm3L.s:111: Error: garbage following instruction -- `dmb ish'
> -        /tmp/ccIzTm3L.s:118: Error: garbage following instruction -- `dmb ish'
> -        /tmp/ccIzTm3L.s:145: Error: garbage following instruction -- `dmb ish'
> -        /tmp/ccIzTm3L.s:152: Error: garbage following instruction -- `dmb ish'
> -        /tmp/ccIzTm3L.s:180: Error: garbage following instruction -- `dmb ish'
> -        /tmp/ccIzTm3L.s:187: Error: garbage following instruction -- `dmb ish'
> -        make[1]: *** [Atomics.o] Error 1
> -        make[1]: Leaving directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+9a10c48710df79118e39e9b3bb0a15bf1fe694d1/git/xbmc/threads'
> -        make: *** [xbmc/threads/threads.a] Error 2
> ----
> - xbmc/threads/Atomics.cpp |    8 --------
> - 1 files changed, 0 insertions(+), 8 deletions(-)
> -
> -diff --git a/xbmc/threads/Atomics.cpp b/xbmc/threads/Atomics.cpp
> -index 5b09f18..0a98a7e 100644
> ---- a/xbmc/threads/Atomics.cpp
> -+++ b/xbmc/threads/Atomics.cpp
> -@@ -194,14 +194,12 @@ long AtomicIncrement(volatile long* pAddr)
> - {
> -   register long val;
> -   asm volatile (
> --                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
> -                 "1:                     \n" 
> -                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
> -                 "add     %0,  #1        \n" // (val += 1)
> -                 "strex   r1,  %0, [%1]	\n"
> -                 "cmp     r1,   #0       \n"
> -                 "bne     1b             \n"
> --                "dmb     ish            \n" // Memory barrier.
> -                 : "=&r" (val)
> -                 : "r"(pAddr)
> -                 : "r1"
> -@@ -273,14 +271,12 @@ long AtomicAdd(volatile long* pAddr, long amount)
> - {
> -   register long val;
> -   asm volatile (
> --                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
> -                 "1:                     \n" 
> -                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
> -                 "add     %0,  %2        \n" // (val += amount)
> -                 "strex   r1,  %0, [%1]	\n"
> -                 "cmp     r1,   #0       \n"
> -                 "bne     1b             \n"
> --                "dmb     ish            \n" // Memory barrier.
> -                 : "=&r" (val)
> -                 : "r"(pAddr), "r"(amount)
> -                 : "r1"
> -@@ -351,14 +347,12 @@ long AtomicDecrement(volatile long* pAddr)
> - {
> -   register long val;
> -   asm volatile (
> --                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
> -                 "1:                     \n" 
> -                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
> -                 "sub     %0,  #1        \n" // (val -= 1)
> -                 "strex   r1,  %0, [%1]	\n"
> -                 "cmp     r1,   #0       \n"
> -                 "bne     1b             \n"
> --                "dmb     ish            \n" // Memory barrier.
> -                 : "=&r" (val)
> -                 : "r"(pAddr)
> -                 : "r1"
> -@@ -431,14 +425,12 @@ long AtomicSubtract(volatile long* pAddr, long amount)
> - {
> -   register long val;
> -   asm volatile (
> --                "dmb     ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
> -                 "1:                     \n" 
> -                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
> -                 "sub     %0,  %2        \n" // (val -= amount)
> -                 "strex   r1,  %0, [%1]	\n"
> -                 "cmp     r1,   #0       \n"
> -                 "bne     1b             \n"
> --                "dmb     ish            \n" // Memory barrier.
> -                 : "=&r" (val)
> -                 : "r"(pAddr), "r"(amount)
> -                 : "r1"
> --- 
> -1.7.2.5
> -
> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch
> deleted file mode 100644
> index 629017b..0000000
> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch
> +++ /dev/null
> @@ -1,69 +0,0 @@
> -From aaae1616a09d359b52e929f944ca0ceb4bb7f831 Mon Sep 17 00:00:00 2001
> -From: Paul Menzel <paulepanter@users.sourceforge.net>
> -Date: Sun, 14 Aug 2011 21:55:09 +0200
> -Subject: [PATCH 3/4] Revert "fixed:[ios] Add memory barriers to cas() assembly to ensure alignment of memory accesses."
> -
> -This reverts commit 92bab651e2253d172879995b50985645b77fecd2.
> -
> -The build (OpenEmbedded `angstrom-2010.x` for `MACHINE = "beagleboard") fails with the following error.
> -
> -        CPP     Atomics.o
> -        make[1]: Entering directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+92bab651e2253d172879995b50985645b77fecd2/git/xbmc/windows'
> -        CPP     GUIMediaWindow.o
> -        /tmp/ccrsywuV.s: Assembler messages:
> -        /tmp/ccrsywuV.s:40: Error: garbage following instruction -- `dmb ish'
> -        /tmp/ccrsywuV.s:48: Error: garbage following instruction -- `dmb ish'
> -        make[1]: *** [Atomics.o] Error 1
> -        make[1]: Leaving directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+92bab651e2253d172879995b50985645b77fecd2/git/xbmc/threads'
> -        make: *** [xbmc/threads/threads.a] Error 2
> ----
> - xbmc/threads/Atomics.cpp |   33 ++++++++++++++++-----------------
> - 1 files changed, 16 insertions(+), 17 deletions(-)
> -
> -diff --git a/xbmc/threads/Atomics.cpp b/xbmc/threads/Atomics.cpp
> -index 0a98a7e..0967eb2 100644
> ---- a/xbmc/threads/Atomics.cpp
> -+++ b/xbmc/threads/Atomics.cpp
> -@@ -49,23 +49,22 @@ long cas(volatile long *pAddr, long expectedVal, long swapVal)
> - #elif defined(__arm__)
> - long cas(volatile long* pAddr, long expectedVal, long swapVal)
> - {
> --  register long prev;
> --  asm volatile (
> --                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
> --                "1:                      \n"
> --                "ldrex    %0, [%1]       \n" // Load the current value of *pAddr(%1) into prev (%0) and lock pAddr,
> --                "cmp      %0,  %2        \n" // Verify that the current value (%0) == old value (%2)
> --                "bne      2f             \n" // Bail if the two values are not equal [not as expected]
> --                "strex    r1,  %3, [%1]  \n"
> --                "cmp      r1,  #0        \n"
> --                "bne      1b             \n"
> --                "dmb      ish            \n" // Memory barrier.
> --                "2:                      \n"
> --                : "=&r" (prev)
> --                : "r"(pAddr), "r"(expectedVal),"r"(swapVal)
> --                : "r1"
> --                );
> --  return prev;
> -+  return(__sync_val_compare_and_swap(pAddr, expectedVal, swapVal));
> -+//  register long prev;
> -+//  asm volatile (
> -+//                "1:                      \n"
> -+//                "ldrex    %0, [%1]       \n" /* Load the current value of *pAddr(%1) into prev (%0) and lock pAddr,  */
> -+//                "cmp      %0,  %2        \n" /* Verify that the current value (%0) == old value (%2) */
> -+//                "bne      2f             \n" /* Bail if the two values are not equal [not as expected] */
> -+//                "strex    r1,  %3, [%1]  \n"
> -+//                "cmp      r1,  #0        \n"                
> -+//                "bne      1b             \n"
> -+//                "2:                        "
> -+//                : "=&r" (prev)
> -+//                : "r"(pAddr), "r"(expectedVal),"r"(swapVal)
> -+//                : "r1"
> -+//                );
> -+//  return prev;
> - }
> - 
> - #elif defined(__mips__)
> --- 
> -1.7.2.5
> -
> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch
> deleted file mode 100644
> index 345e20e..0000000
> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch
> +++ /dev/null
> @@ -1,43 +0,0 @@
> -From fd8f73826240aae543a41a2bfeea0056e2fe594d Mon Sep 17 00:00:00 2001
> -From: Koen Kooi <koen@dominion.thruhere.net>
> -Date: Mon, 11 Mar 2013 11:04:29 +0100
> -Subject: [PATCH] configure: cope with ld-is-gold DISTRO_FEATURE
> -
> -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ----
> -
> -Upstream-Stature: backport
> -
> - configure.in |   12 +++++++-----
> - 1 files changed, 7 insertions(+), 5 deletions(-)
> -
> -diff --git a/configure.in b/configure.in
> -index ef94683..c8b459b 100755
> ---- a/configure.in
> -+++ b/configure.in
> -@@ -18,9 +18,14 @@ tolower(){
> - # check for library basenames
> - AC_DEFUN([XB_FIND_SONAME],
> - [
> -+  #set -x
> -   if [[ "$host_vendor" != "apple" ]]; then
> -     AC_MSG_CHECKING([for lib$2 soname])
> -     $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}')
> -+    if [[ -z $$1_FILENAME ]]; then
> -+      #try gold linker syntax
> -+      $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-t 3>&1 1>&2 2>&3 | grep "$2")
> -+    fi
> -     if [[ ! -z $$1_FILENAME ]]; then
> -       $1_SONAME=$(objdump -p $$1_FILENAME | grep "SONAME.*$2" | awk '{V=2; print $V}')
> -     fi
> -@@ -55,6 +60,7 @@ AC_DEFUN([XB_FIND_SONAME],
> -     AC_MSG_RESULT([$$1_SONAME])
> -     AC_SUBST($1_SONAME)
> -   fi
> -+  #set +x
> - ])
> - 
> - # Function to push and pop libs and includes for a command
> --- 
> -1.7.7.6
> -
> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch
> deleted file mode 100644
> index 5c14059..0000000
> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -From cfd851660a594801a591e80dc820c65cb7bd7836 Mon Sep 17 00:00:00 2001
> -From: Otavio Salvador <otavio@ossystems.com.br>
> -Date: Sat, 6 Oct 2012 06:40:03 -0300
> -Subject: [PATCH] configure.in: Avoid running code or we break cross-compile
> -
> -Upstream-Status: Backport [similar change done for 12.0]
> -
> -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ----
> - configure.in |    6 +-----
> - 1 files changed, 1 insertions(+), 5 deletions(-)
> -
> -diff --git a/configure.in b/configure.in
> -index ef94683..d7efcb0 100755
> ---- a/configure.in
> -+++ b/configure.in
> -@@ -1246,11 +1246,7 @@ if test "$use_external_ffmpeg" = "yes"; then
> -   AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
> - 
> -   # Disable vdpau support if external libavcodec doesn't have it
> --  AC_RUN_IFELSE(
> --    AC_LANG_PROGRAM([[#include <libavcodec/avcodec.h>]],
> --      [[avcodec_register_all();
> --        AVCodec *codec = avcodec_find_decoder_by_name("vc1_vdpau");
> --        return (codec) ? 0 : 1;]]),,
> -+  AC_CHECK_LIB([avcodec], [ff_vdpau_vc1_decode_picture],,
> -     [if test "x$use_vdpau" = "xyes"; then
> -       AC_MSG_ERROR($ffmpeg_vdpau_not_supported)
> -     else
> --- 
> -1.7.2.5
> -
> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb b/meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb
> deleted file mode 100644
> index 0d8dd5c..0000000
> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb
> +++ /dev/null
> @@ -1,97 +0,0 @@
> -SUMMARY = "XBMC Media Center"
> -
> -LICENSE = "GPLv2"
> -LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=6eb631b6da7fdb01508a80213ffc35ff"
> -
> -DEPENDS = "libusb1 libcec libplist expat yajl gperf-native libxmu fribidi mpeg2dec ffmpeg samba fontconfig curl python libass libmodplug libmicrohttpd wavpack libmms cmake-native libsdl-image libsdl-mixer virtual/egl mysql5 sqlite3 libmms faad2 libcdio libpcre boost lzo enca avahi libsamplerate0 libxinerama libxrandr libxtst bzip2 virtual/libsdl jasper zip-native zlib libtinyxml libmad"
> -#require recipes/egl/egl.inc
> -
> -
> -SRCREV = "82388d55dae79cbb2e486e307e23202e76a43efa"
> -
> -# multiple issues
> -PNBLACKLIST[xbmc] ?= "/usr/include/c++/ctime:70:11: error: '::gmtime' has not been declared"
> -
> -PV = "11.0+gitr${SRCPV}"
> -PR = "r14"
> -SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Eden \
> -           file://0001-configure-don-t-run-python-distutils-to-find-STAGING.patch \
> -           file://0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch \
> -           file://0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch \
> -           file://0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch \
> -           file://configure.in-Avoid-running-code.patch \
> -"
> -
> -inherit autotools gettext python-dir
> -
> -S = "${WORKDIR}/git"
> -
> -# breaks compilation
> -CCACHE = ""
> -
> -CACHED_CONFIGUREVARS += " \
> -    ac_cv_path_PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python" \
> -"
> -
> -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', 'openglesv2', d)}"
> -PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles,glew"
> -PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,"
> -
> -EXTRA_OECONF = " \
> -    --disable-rpath \
> -    --enable-libusb \
> -    --enable-airplay \
> -    --disable-optical-drive \
> -    --enable-external-libraries \
> -    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '--enable-gl', '--enable-gles', d)} \
> -"
> -
> -FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
> -BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
> -
> -EXTRA_OECONF_append_armv7a = "--cpu=cortex-a8"
> -
> -# for python modules
> -export STAGING_LIBDIR
> -export STAGING_INCDIR
> -export PYTHON_DIR
> -
> -do_configure() {
> -    sh bootstrap
> -    oe_runconf
> -}
> -
> -PARALLEL_MAKE = ""
> -
> -do_compile_prepend() {
> -    for i in $(find . -name "Makefile") ; do
> -        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
> -    done
> -
> -    for i in $(find . -name "*.mak*" -o    -name "Makefile") ; do
> -        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
> -    done
> -}
> -
> -INSANE_SKIP_${PN} = "rpaths"
> -
> -# on ARM architectures xbmc will use GLES which will make the regular wrapper fail, so start it directly
> -do_install_append_arm() {
> -    sed -i -e 's:Exec=xbmc:Exec=${libdir}/xbmc/xbmc.bin:g' ${D}${datadir}/applications/xbmc.desktop
> -}
> -
> -FILES_${PN} += "${datadir}/xsessions ${datadir}/icons"
> -FILES_${PN}-dbg += "${libdir}/xbmc/.debug ${libdir}/xbmc/*/.debug ${libdir}/xbmc/*/*/.debug ${libdir}/xbmc/*/*/*/.debug"
> -
> -# xbmc uses some kind of dlopen() method for libcec so we need to add it manually
> -# OpenGL builds need glxinfo, that's in mesa-demos
> -RRECOMMENDS_${PN}_append = " libcec \
> -                             python \
> -                             python-lang \
> -                             python-re \
> -                             python-netclient \
> -                             libcurl \
> -                             xdpyinfo \
> -                             ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-demos', '', d)} \
> -"
> -RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 glibc-gconv-ibm850"
> -- 
> 2.10.2
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-multimedia][PATCH 7/7] kodi: Update to krypton release ( 17.x )
  2016-11-03  8:26   ` Koen Kooi
@ 2016-11-03  8:32     ` Khem Raj
  0 siblings, 0 replies; 9+ messages in thread
From: Khem Raj @ 2016-11-03  8:32 UTC (permalink / raw)
  To: Koen Kooi; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 69442 bytes --]


> On Nov 3, 2016, at 1:26 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> 
> Since 17 hasn’t been released yet, I think adding 16.1 first would be a better idea. That one is known working on the 4 archs I test it on (armv7a, aarch64, x86 and x86_64), version 17 is still in flux.

17.0-beta5 has been working quite well on RPI3 here as well as x86

> 
> Regardless of that, thanks for taking the time to ‘port’ this all back to meta-oe.
> 
>> Op 3 nov. 2016, om 09:20 heeft Khem Raj <raj.khem@gmail.com> het volgende geschreven:
>> 
>> remove obsoleted xbmc recipes
>> rename to recipes-mediacenter
>> 
>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>> .../kodi/jsonschemabuilder-native.bb               |  24 ++
>> .../0001-Update-to-p8-platform.patch               | 427 +++++++++++++++++++++
>> .../kodi/kodi-addon-pvr-hts_git.bb                 |  55 +++
>> .../0001-Fix-build-after-platform-rename.patch     |  67 ++++
>> .../0001-fix-cross-compile-badness.patch           |  40 ++
>> .../kodi-platform-02_no-multi-lib.patch            |  12 +
>> .../recipes-mediacenter/kodi/kodi-platform_git.bb  |  39 ++
>> .../recipes-mediacenter/kodi/kodi-startup.bb       |  20 +
>> .../kodi/kodi-startup/kodi.service                 |  14 +
>> ...re-don-t-try-to-run-stuff-to-find-tinyxml.patch |  25 ++
>> .../kodi/kodi/0002-handle-SIGTERM.patch            | 163 ++++++++
>> ...-to-read-frequency-output-if-using-intel-.patch |  26 ++
>> .../kodi/kodi/0004-Disable-DVD-support.patch       |  35 ++
>> .../recipes-mediacenter/kodi/kodi_17.bb            | 177 +++++++++
>> ...on-t-run-python-distutils-to-find-STAGING.patch |  31 --
>> ...d-ios-Add-memory-barriers-to-atomic-Add-S.patch |  97 -----
>> ...d-ios-Add-memory-barriers-to-cas-assembly.patch |  69 ----
>> ...igure-cope-with-ld-is-gold-DISTRO_FEATURE.patch |  43 ---
>> .../xbmc/configure.in-Avoid-running-code.patch     |  32 --
>> .../recipes-mediacentre/xbmc/xbmc_git.bb           |  97 -----
>> 20 files changed, 1124 insertions(+), 369 deletions(-)
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch
>> create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
>> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch
>> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch
>> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch
>> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch
>> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch
>> delete mode 100644 meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb
>> 
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb b/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb
>> new file mode 100644
>> index 0000000..094ccff
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb
>> @@ -0,0 +1,24 @@
>> +SUMMARY = "Kodi Media Center"
>> +
>> +LICENSE = "GPLv2+"
>> +LIC_FILES_CHKSUM = "file://JsonSchemaBuilder.cpp;beginline=2;endline=18;md5=1f67721215c03f66545390f6e45b99c7"
>> +
>> +SRCREV = "b587e98911fcedc4b800cd923a882c7aeeaa2146"
>> +
>> +PV = "16.0+gitr${SRCPV}"
>> +SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Jarvis"
>> +
>> +inherit autotools-brokensep gettext native
>> +
>> +S = "${WORKDIR}/git/tools/depends/native/JsonSchemaBuilder/src"
>> +
>> +do_compile_prepend() {
>> +    for i in $(find . -name "Makefile") ; do
>> +        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
>> +    done
>> +
>> +    for i in $(find . -name "*.mak*" -o    -name "Makefile") ; do
>> +        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
>> +    done
>> +}
>> +
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch
>> new file mode 100644
>> index 0000000..c4a6ae7
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch
>> @@ -0,0 +1,427 @@
>> +From 06a8224c99282ac1a606edd9e8ea3f591112942d Mon Sep 17 00:00:00 2001
>> +From: Koen Kooi <koen@dominion.thruhere.net>
>> +Date: Thu, 18 Feb 2016 14:04:31 +0100
>> +Subject: [PATCH] Update to p8-platform
>> +
>> +---
>> + CMakeLists.txt                         |  6 +++---
>> + pvr.hts/changelog.txt                  |  4 ++--
>> + src/AutoRecordings.cpp                 |  2 +-
>> + src/HTSPConnection.cpp                 |  8 +++----
>> + src/HTSPDemuxer.cpp                    |  2 +-
>> + src/HTSPVFS.cpp                        |  6 +++---
>> + src/TimeRecordings.cpp                 |  2 +-
>> + src/Tvheadend.cpp                      |  4 ++--
>> + src/Tvheadend.h                        | 38 +++++++++++++++++-----------------
>> + src/client.cpp                         |  4 ++--
>> + src/client.h                           |  4 ++--
>> + src/tvheadend/Subscription.cpp         |  2 +-
>> + src/tvheadend/Subscription.h           |  4 ++--
>> + src/tvheadend/utilities/AsyncState.cpp |  4 ++--
>> + src/tvheadend/utilities/AsyncState.h   |  6 +++---
>> + 15 files changed, 48 insertions(+), 48 deletions(-)
>> +
>> +diff --git a/CMakeLists.txt b/CMakeLists.txt
>> +index 0842682..cb04942 100644
>> +--- a/CMakeLists.txt
>> ++++ b/CMakeLists.txt
>> +@@ -6,10 +6,10 @@ enable_language(CXX)
>> +
>> + find_package(kodi REQUIRED)
>> + find_package(kodiplatform REQUIRED)
>> +-find_package(platform REQUIRED)
>> ++find_package(p8-platform REQUIRED)
>> +
>> + include_directories(${kodiplatform_INCLUDE_DIRS}
>> +-                    ${platform_INCLUDE_DIRS}
>> ++                    ${p8-platform_INCLUDE_DIRS}
>> +                     ${KODI_INCLUDE_DIR}
>> +                     ${PROJECT_SOURCE_DIR}/lib)
>> +
>> +@@ -95,7 +95,7 @@ list(APPEND HTS_SOURCES
>> +
>> + add_subdirectory(lib/libhts)
>> +
>> +-set(DEPLIBS ${platform_LIBRARIES} hts)
>> ++set(DEPLIBS ${p8-platform_LIBRARIES} hts)
>> + if(WIN32)
>> +   list(APPEND DEPLIBS ws2_32)
>> + endif()
>> +diff --git a/pvr.hts/changelog.txt b/pvr.hts/changelog.txt
>> +index 9ffa33c..1e7fe30 100644
>> +--- a/pvr.hts/changelog.txt
>> ++++ b/pvr.hts/changelog.txt
>> +@@ -49,7 +49,7 @@
>> + - fixed: Autorec: Start and stop time handling.
>> + - fixed: LocaltimeToUTC conversion (timer settings clock display incorrect).
>> + - fixed: Several issues with predictive tuning.
>> +-- added: build: Automatically fill in platform and library name.
>> ++- added: build: Automatically fill in p8-platform and library name.
>> + - fixed: Use epg data only for creation of epg-based timers.
>> + - improved: Do not try to reconnect to tvh while suspending or not fully awake again.
>> +
>> +@@ -97,7 +97,7 @@
>> + - added: support for creating repeating timers, aka time schedules
>> + - fixed: conditions for addon restart after settings changes
>> + - internal: fixed build system regressions introduced with move to cmake
>> +-- internal: updated to use libplatform
>> ++- internal: updated to use libp8-platform
>> +
>> + 2.1.7
>> + - added: support for radio channel groups
>> +diff --git a/src/AutoRecordings.cpp b/src/AutoRecordings.cpp
>> +index 5fa60a0..d9e5e1d 100644
>> +--- a/src/AutoRecordings.cpp
>> ++++ b/src/AutoRecordings.cpp
>> +@@ -26,7 +26,7 @@
>> + #include "tvheadend/utilities/Utilities.h"
>> + #include "tvheadend/utilities/Logger.h"
>> +
>> +-using namespace PLATFORM;
>> ++using namespace P8PLATFORM;
>> + using namespace tvheadend;
>> + using namespace tvheadend::entity;
>> + using namespace tvheadend::utilities;
>> +diff --git a/src/HTSPConnection.cpp b/src/HTSPConnection.cpp
>> +index aec1296..86f5004 100644
>> +--- a/src/HTSPConnection.cpp
>> ++++ b/src/HTSPConnection.cpp
>> +@@ -19,9 +19,9 @@
>> +  *
>> +  */
>> +
>> +-#include "platform/threads/mutex.h"
>> +-#include "platform/util/StringUtils.h"
>> +-#include "platform/sockets/tcp.h"
>> ++#include "p8-platform/threads/mutex.h"
>> ++#include "p8-platform/util/StringUtils.h"
>> ++#include "p8-platform/sockets/tcp.h"
>> +
>> + extern "C" {
>> + #include "libhts/htsmsg_binary.h"
>> +@@ -33,7 +33,7 @@ extern "C" {
>> +
>> + using namespace std;
>> + using namespace ADDON;
>> +-using namespace PLATFORM;
>> ++using namespace P8PLATFORM;
>> + using namespace tvheadend;
>> + using namespace tvheadend::utilities;
>> +
>> +diff --git a/src/HTSPDemuxer.cpp b/src/HTSPDemuxer.cpp
>> +index a6e1f12..7f45345 100644
>> +--- a/src/HTSPDemuxer.cpp
>> ++++ b/src/HTSPDemuxer.cpp
>> +@@ -27,7 +27,7 @@
>> +
>> + using namespace std;
>> + using namespace ADDON;
>> +-using namespace PLATFORM;
>> ++using namespace P8PLATFORM;
>> + using namespace tvheadend;
>> + using namespace tvheadend::utilities;
>> +
>> +diff --git a/src/HTSPVFS.cpp b/src/HTSPVFS.cpp
>> +index 0463f56..0404bab 100644
>> +--- a/src/HTSPVFS.cpp
>> ++++ b/src/HTSPVFS.cpp
>> +@@ -19,8 +19,8 @@
>> +  *
>> +  */
>> +
>> +-#include "platform/threads/mutex.h"
>> +-#include "platform/util/StringUtils.h"
>> ++#include "p8-platform/threads/mutex.h"
>> ++#include "p8-platform/util/StringUtils.h"
>> + #include "tvheadend/utilities/Logger.h"
>> +
>> + extern "C" {
>> +@@ -30,7 +30,7 @@ extern "C" {
>> + #include "Tvheadend.h"
>> +
>> + using namespace std;
>> +-using namespace PLATFORM;
>> ++using namespace P8PLATFORM;
>> + using namespace tvheadend::utilities;
>> +
>> + /*
>> +diff --git a/src/TimeRecordings.cpp b/src/TimeRecordings.cpp
>> +index 5d34938..97aae09 100644
>> +--- a/src/TimeRecordings.cpp
>> ++++ b/src/TimeRecordings.cpp
>> +@@ -25,7 +25,7 @@
>> + #include "tvheadend/utilities/Utilities.h"
>> + #include "tvheadend/utilities/Logger.h"
>> +
>> +-using namespace PLATFORM;
>> ++using namespace P8PLATFORM;
>> + using namespace tvheadend;
>> + using namespace tvheadend::entity;
>> + using namespace tvheadend::utilities;
>> +diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp
>> +index 2057241..14c3bd4 100644
>> +--- a/src/Tvheadend.cpp
>> ++++ b/src/Tvheadend.cpp
>> +@@ -23,7 +23,7 @@
>> + #include <ctime>
>> + #include <memory>
>> +
>> +-#include "platform/util/StringUtils.h"
>> ++#include "p8-platform/util/StringUtils.h"
>> +
>> + #include "Tvheadend.h"
>> + #include "tvheadend/utilities/Utilities.h"
>> +@@ -31,7 +31,7 @@
>> +
>> + using namespace std;
>> + using namespace ADDON;
>> +-using namespace PLATFORM;
>> ++using namespace P8PLATFORM;
>> + using namespace tvheadend;
>> + using namespace tvheadend::entity;
>> + using namespace tvheadend::utilities;
>> +diff --git a/src/Tvheadend.h b/src/Tvheadend.h
>> +index 2ce4552..e794716 100644
>> +--- a/src/Tvheadend.h
>> ++++ b/src/Tvheadend.h
>> +@@ -22,10 +22,10 @@
>> +  */
>> +
>> + #include "client.h"
>> +-#include "platform/sockets/tcp.h"
>> +-#include "platform/threads/threads.h"
>> +-#include "platform/threads/mutex.h"
>> +-#include "platform/util/buffer.h"
>> ++#include "p8-platform/sockets/tcp.h"
>> ++#include "p8-platform/threads/threads.h"
>> ++#include "p8-platform/threads/mutex.h"
>> ++#include "p8-platform/util/buffer.h"
>> + #include "kodi/xbmc_codec_types.h"
>> + #include "kodi/xbmc_stream_utils.hpp"
>> + #include "kodi/libXBMC_addon.h"
>> +@@ -88,7 +88,7 @@ class CHTSPMessage;
>> +
>> + /* Typedefs */
>> + typedef std::map<uint32_t,CHTSPResponse*> CHTSPResponseList;
>> +-typedef PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue;
>> ++typedef P8PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue;
>> +
>> + /*
>> +  * HTSP Response handler
>> +@@ -98,10 +98,10 @@ class CHTSPResponse
>> + public:
>> +   CHTSPResponse();
>> +   ~CHTSPResponse();
>> +-  htsmsg_t *Get ( PLATFORM::CMutex &mutex, uint32_t timeout );
>> ++  htsmsg_t *Get ( P8PLATFORM::CMutex &mutex, uint32_t timeout );
>> +   void      Set ( htsmsg_t *m );
>> + private:
>> +-  PLATFORM::CCondition<volatile bool> m_cond;
>> ++  P8PLATFORM::CCondition<volatile bool> m_cond;
>> +   bool                                m_flag;
>> +   htsmsg_t                           *m_msg;
>> + };
>> +@@ -146,7 +146,7 @@ public:
>> +  * HTSP Connection registration thread
>> +  */
>> + class CHTSPRegister
>> +-  : public PLATFORM::CThread
>> ++  : public P8PLATFORM::CThread
>> + {
>> +   friend class CHTSPConnection;
>> +
>> +@@ -163,7 +163,7 @@ private:
>> +  * HTSP Connection
>> +  */
>> + class CHTSPConnection
>> +-  : public PLATFORM::CThread
>> ++  : public P8PLATFORM::CThread
>> + {
>> +   friend class CHTSPRegister;
>> +
>> +@@ -190,7 +190,7 @@ public:
>> +   inline bool IsConnected       ( void ) const { return m_ready; }
>> +   bool        WaitForConnection ( void );
>> +
>> +-  inline PLATFORM::CMutex& Mutex ( void ) { return m_mutex; }
>> ++  inline P8PLATFORM::CMutex& Mutex ( void ) { return m_mutex; }
>> +
>> +   void        OnSleep ( void );
>> +   void        OnWake  ( void );
>> +@@ -202,10 +202,10 @@ private:
>> +   bool        SendHello        ( void );
>> +   bool        SendAuth         ( const std::string &u, const std::string &p );
>> +
>> +-  PLATFORM::CTcpSocket               *m_socket;
>> +-  PLATFORM::CMutex                    m_mutex;
>> ++  P8PLATFORM::CTcpSocket               *m_socket;
>> ++  P8PLATFORM::CMutex                    m_mutex;
>> +   CHTSPRegister                       m_regThread;
>> +-  PLATFORM::CCondition<volatile bool> m_regCond;
>> ++  P8PLATFORM::CCondition<volatile bool> m_regCond;
>> +   bool                                m_ready;
>> +   uint32_t                            m_seq;
>> +   std::string                         m_serverName;
>> +@@ -273,13 +273,13 @@ public:
>> +   void SetStreamingProfile(const std::string &profile);
>> +
>> + private:
>> +-  PLATFORM::CMutex                        m_mutex;
>> ++  P8PLATFORM::CMutex                        m_mutex;
>> +   CHTSPConnection                        &m_conn;
>> +-  PLATFORM::SyncedBuffer<DemuxPacket*>    m_pktBuffer;
>> ++  P8PLATFORM::SyncedBuffer<DemuxPacket*>    m_pktBuffer;
>> +   ADDON::XbmcStreamProperties             m_streams;
>> +   std::map<int,int>                       m_streamStat;
>> +   int64_t                                 m_seekTime;
>> +-  PLATFORM::CCondition<volatile int64_t>  m_seekCond;
>> ++  P8PLATFORM::CCondition<volatile int64_t>  m_seekCond;
>> +   bool                                    m_seeking;
>> +   bool                                    m_speedChange;
>> +   tvheadend::status::SourceInfo           m_sourceInfo;
>> +@@ -350,7 +350,7 @@ private:
>> +  * Root object for Tvheadend connection
>> +  */
>> + class CTvheadend
>> +-  : public PLATFORM::CThread
>> ++  : public P8PLATFORM::CThread
>> + {
>> + public:
>> +   CTvheadend();
>> +@@ -422,7 +422,7 @@ private:
>> +    */
>> +   tvheadend::Profiles         m_profiles;
>> +
>> +-  PLATFORM::CMutex            m_mutex;
>> ++  P8PLATFORM::CMutex            m_mutex;
>> +
>> +   CHTSPConnection             m_conn;
>> +
>> +@@ -519,7 +519,7 @@ public:
>> +    */
>> +   bool WaitForConnection ( void )
>> +   {
>> +-    PLATFORM::CLockObject lock(m_conn.Mutex());
>> ++    P8PLATFORM::CLockObject lock(m_conn.Mutex());
>> +     return m_conn.WaitForConnection();
>> +   }
>> +   std::string GetServerName    ( void )
>> +diff --git a/src/client.cpp b/src/client.cpp
>> +index 94d2db9..3295914 100644
>> +--- a/src/client.cpp
>> ++++ b/src/client.cpp
>> +@@ -22,14 +22,14 @@
>> + #include "client.h"
>> + #include "kodi/xbmc_pvr_dll.h"
>> + #include "kodi/libKODI_guilib.h"
>> +-#include "platform/util/util.h"
>> ++#include "p8-platform/util/util.h"
>> + #include "Tvheadend.h"
>> + #include "tvheadend/Settings.h"
>> + #include "tvheadend/utilities/Logger.h"
>> +
>> + using namespace std;
>> + using namespace ADDON;
>> +-using namespace PLATFORM;
>> ++using namespace P8PLATFORM;
>> + using namespace tvheadend;
>> + using namespace tvheadend::utilities;
>> +
>> +diff --git a/src/client.h b/src/client.h
>> +index 3a5f950..a10659b 100644
>> +--- a/src/client.h
>> ++++ b/src/client.h
>> +@@ -20,8 +20,8 @@
>> +  *
>> +  */
>> +
>> +-#include "platform/os.h"
>> +-#include "platform/threads/mutex.h"
>> ++#include "p8-platform/os.h"
>> ++#include "p8-platform/threads/mutex.h"
>> + #include "kodi/libXBMC_addon.h"
>> + #include "kodi/libXBMC_pvr.h"
>> + #include "kodi/libXBMC_codec.h"
>> +diff --git a/src/tvheadend/Subscription.cpp b/src/tvheadend/Subscription.cpp
>> +index 182ca7f..e18af1e 100644
>> +--- a/src/tvheadend/Subscription.cpp
>> ++++ b/src/tvheadend/Subscription.cpp
>> +@@ -23,7 +23,7 @@
>> + #include "utilities/Logger.h"
>> + #include "../Tvheadend.h"
>> +
>> +-using namespace PLATFORM;
>> ++using namespace P8PLATFORM;
>> + using namespace tvheadend;
>> + using namespace tvheadend::utilities;
>> +
>> +diff --git a/src/tvheadend/Subscription.h b/src/tvheadend/Subscription.h
>> +index b03bcce..363e5ef 100644
>> +--- a/src/tvheadend/Subscription.h
>> ++++ b/src/tvheadend/Subscription.h
>> +@@ -22,7 +22,7 @@
>> +  */
>> +
>> + #include <string>
>> +-#include "platform/threads/mutex.h"
>> ++#include "p8-platform/threads/mutex.h"
>> +
>> + extern "C"
>> + {
>> +@@ -146,6 +146,6 @@ namespace tvheadend
>> +     std::string       m_profile;
>> +     CHTSPConnection   &m_conn;
>> +
>> +-    mutable PLATFORM::CMutex  m_mutex;
>> ++    mutable P8PLATFORM::CMutex  m_mutex;
>> +   };
>> + }
>> +diff --git a/src/tvheadend/utilities/AsyncState.cpp b/src/tvheadend/utilities/AsyncState.cpp
>> +index 0c30a93..1f4fdf3 100644
>> +--- a/src/tvheadend/utilities/AsyncState.cpp
>> ++++ b/src/tvheadend/utilities/AsyncState.cpp
>> +@@ -22,7 +22,7 @@
>> + #include "AsyncState.h"
>> +
>> + using namespace tvheadend::utilities;
>> +-using namespace PLATFORM;
>> ++using namespace P8PLATFORM;
>> +
>> + struct Param {
>> +   eAsyncState state;
>> +@@ -37,7 +37,7 @@ AsyncState::AsyncState(int timeout)
>> +
>> + eAsyncState AsyncState::GetState()
>> + {
>> +-  PLATFORM::CLockObject lock(m_mutex);
>> ++  P8PLATFORM::CLockObject lock(m_mutex);
>> +   return m_state;
>> + }
>> +
>> +diff --git a/src/tvheadend/utilities/AsyncState.h b/src/tvheadend/utilities/AsyncState.h
>> +index 1d672da..0819cd8 100644
>> +--- a/src/tvheadend/utilities/AsyncState.h
>> ++++ b/src/tvheadend/utilities/AsyncState.h
>> +@@ -22,7 +22,7 @@
>> + #ifndef ASYNCSTATE_H
>> + #define	ASYNCSTATE_H
>> +
>> +-#include "platform/threads/mutex.h"
>> ++#include "p8-platform/threads/mutex.h"
>> +
>> + namespace tvheadend {
>> +   namespace utilities {
>> +@@ -75,8 +75,8 @@ namespace tvheadend {
>> +       static bool PredicateCallback ( void *param );
>> +
>> +       eAsyncState m_state;
>> +-      PLATFORM::CMutex m_mutex;
>> +-      PLATFORM::CCondition<bool> m_condition;
>> ++      P8PLATFORM::CMutex m_mutex;
>> ++      P8PLATFORM::CCondition<bool> m_condition;
>> +       int m_timeout;
>> +
>> +     };
>> +--
>> +2.0.1
>> +
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb
>> new file mode 100644
>> index 0000000..1f33a8a
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb
>> @@ -0,0 +1,55 @@
>> +SUMMARY = "Kodi Media Center PVR plugins"
>> +
>> +LICENSE = "GPLv2+"
>> +LIC_FILES_CHKSUM = "file://src/client.cpp;md5=c8f6b73c5bc1048a3d6506700a7a91d2"
>> +
>> +DEPENDS = " \
>> +            zip-native \
>> +            p8platform \
>> +            kodi-platform \
>> +          "
>> +
>> +SRCREV_pvrhts = "7f75b70527922aef953123ff97ebaa22d9fb7cb4"
>> +
>> +SRCREV_FORMAT = "pvrhts"
>> +
>> +PV = "2.2.13+gitr${SRCPV}"
>> +SRC_URI = "git://github.com/kodi-pvr/pvr.hts.git;branch=Jarvis;destsuffix=pvr.hts;name=pvrhts \
>> +           file://0001-Update-to-p8-platform.patch \
>> +          "
>> +
>> +inherit cmake pkgconfig gettext
>> +
>> +S = "${WORKDIR}/pvr.hts"
>> +
>> +EXTRA_OECMAKE = " \
>> +	  -DADDONS_TO_BUILD=pvr.hts \
>> +	  -DADDON_SRC_PREFIX=${WORKDIR}/git \
>> +	  -DCMAKE_BUILD_TYPE=Debug \
>> +	  -DCMAKE_INSTALL_PREFIX=${datadir}/kodi/addons \
>> +          -DCMAKE_MODULE_PATH=${STAGING_DIR_HOST}${libdir}/kodi \
>> +          -DCMAKE_PREFIX_PATH=${STAGING_DIR_HOST}${prefix} \
>> +          -DPACKAGE_ZIP=1 \
>> +        "
>> +
>> +do_compile_prepend() {
>> +	sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \
>> +	       -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \
>> +	          ${B}/CMakeFiles/*/flags.make
>> +	sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\
>> +	          ${B}/CMakeFiles/*/link.txt
>> +}
>> +
>> +# Make zip package for manual installation
>> +do_install_append() {
>> +	install -d ${D}${datadir}/kodi/addons/packages/
>> +	( cd ${D}${datadir}/kodi/addons
>> +	  zip -r ${D}${datadir}/kodi/addons/packages/pvr.hts-${PV}.zip pvr.hts -x '*.debug*' )
>> +}
>> +
>> +# Doesn't get added automagically, dlopen()?
>> +RDEPENDS_${PN} = "libkodiplatform"
>> +
>> +INSANE_SKIP_${PN} = "dev-so"
>> +FILES_${PN} += "${datadir}/kodi"
>> +FILES_${PN}-dbg += "${datadir}/kodi/addons/*/.debug/"
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch
>> new file mode 100644
>> index 0000000..35e5134
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch
>> @@ -0,0 +1,67 @@
>> +From 7cf366faa7a24c7146c745c8cd8dc3ae3d1cabea Mon Sep 17 00:00:00 2001
>> +From: Garrett Brown <themagnificentmrb@gmail.com>
>> +Date: Thu, 7 Jan 2016 15:55:22 -0800
>> +Subject: [PATCH] Fix build after platform rename
>> +
>> +update source code to use renamed platform pkg
>> +---
>> + CMakeLists.txt      | 6 +++---
>> + debian/control      | 2 +-
>> + src/util/XMLUtils.h | 2 +-
>> + 3 files changed, 5 insertions(+), 5 deletions(-)
>> +
>> +diff --git a/CMakeLists.txt b/CMakeLists.txt
>> +index 2ce8c0d..bf6b659 100644
>> +--- a/CMakeLists.txt
>> ++++ b/CMakeLists.txt
>> +@@ -8,7 +8,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
>> + find_package(kodi REQUIRED)
>> + find_package(TinyXML REQUIRED)
>> + find_package(Threads REQUIRED)
>> +-find_package(platform REQUIRED)
>> ++find_package(p8-platform REQUIRED)
>> + include(UseMultiArch.cmake)
>> + include(CheckAtomic.cmake)
>> +
>> +@@ -36,10 +36,10 @@ endif()
>> +
>> + set(SOURCES src/util/XMLUtils.cpp)
>> +
>> +-include_directories(${TINYXML_INCLUDE_DIR} ${KODI_INCLUDE_DIR} ${platform_INCLUDE_DIRS})
>> ++include_directories(${TINYXML_INCLUDE_DIR} ${KODI_INCLUDE_DIR} ${p8-platform_INCLUDE_DIRS})
>> +
>> + add_library(kodiplatform ${SOURCES} ${PLAT_SOURCES})
>> +-target_link_libraries(kodiplatform ${kodiplatform_LIBRARIES} ${platform_LIBRARIES})
>> ++target_link_libraries(kodiplatform ${kodiplatform_LIBRARIES} ${p8-platform_LIBRARIES})
>> + set_target_properties(kodiplatform PROPERTIES VERSION ${kodiplatform_VERSION_MAJOR}.${kodiplatform_VERSION_MINOR}.${kodiplatform_VERSION_PATCH}
>> +                                               SOVERSION ${kodiplatform_VERSION_MAJOR}.0)
>> +
>> +diff --git a/debian/control b/debian/control
>> +index 42cadb2..e40c982 100644
>> +--- a/debian/control
>> ++++ b/debian/control
>> +@@ -1,7 +1,7 @@
>> + Source: kodiplatform
>> + Priority: extra
>> + Maintainer: Arne Morten Kvarving <arne.morten.kvarving@sintef.no>
>> +-Build-Depends: debhelper (>= 8.0.0), cmake, libtinyxml-dev, kodi-addon-dev, libplatform-dev
>> ++Build-Depends: debhelper (>= 8.0.0), cmake, libtinyxml-dev, kodi-addon-dev, libp8-platform-dev
>> + Standards-Version: 3.9.2
>> + Section: libs
>> +
>> +diff --git a/src/util/XMLUtils.h b/src/util/XMLUtils.h
>> +index f22fd07..a10d831 100644
>> +--- a/src/util/XMLUtils.h
>> ++++ b/src/util/XMLUtils.h
>> +@@ -21,7 +21,7 @@
>> +  *
>> +  */
>> +
>> +-#include <platform/util/StdString.h>
>> ++#include <p8-platform/util/StdString.h>
>> + #include "tinyxml.h"
>> +
>> + class XMLUtils
>> +--
>> +2.0.1
>> +
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch
>> new file mode 100644
>> index 0000000..27e9d21
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch
>> @@ -0,0 +1,40 @@
>> +From 3136317f096ea7fda4fb907e775a01952c4aae3d Mon Sep 17 00:00:00 2001
>> +From: Stefan Saraev <stefan@saraev.ca>
>> +Date: Fri, 19 Feb 2016 10:33:00 +0100
>> +Subject: [PATCH] fix cross compile badness
>> +
>> +From https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/mediacenter/kodi-platform/patches/kodi-platform-01_crosscompile-badness.patch
>> +---
>> + CMakeLists.txt               | 2 +-
>> + kodiplatform-config.cmake.in | 2 +-
>> + 2 files changed, 2 insertions(+), 2 deletions(-)
>> +
>> +diff --git a/CMakeLists.txt b/CMakeLists.txt
>> +index bf6b659..9abe773 100644
>> +--- a/CMakeLists.txt
>> ++++ b/CMakeLists.txt
>> +@@ -22,7 +22,7 @@ if(NOT WIN32)
>> +   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
>> + endif()
>> +
>> +-set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX}/include/kodi")
>> ++set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX_TOOLCHAIN}/include/kodi")
>> + IF(WIN32)
>> +   LIST(APPEND kodiplatform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/kodi/windows")
>> + ENDIF(WIN32)
>> +diff --git a/kodiplatform-config.cmake.in b/kodiplatform-config.cmake.in
>> +index 3fc5273..60bdf1b 100644
>> +--- a/kodiplatform-config.cmake.in
>> ++++ b/kodiplatform-config.cmake.in
>> +@@ -10,7 +10,7 @@
>> + #
>> + # propagate these properties from one build system to the other
>> + set (kodiplatform_VERSION "@kodiplatform_VERSION_MAJOR@.@kodiplatform_VERSION_MINOR@")
>> +-set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)
>> ++set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX_TOOLCHAIN@/include)
>> + set (kodiplatform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
>> + set (kodiplatform_LINKER_FLAGS "@kodiplatform_LINKER_FLAGS@")
>> + set (kodiplatform_CONFIG_VARS "@kodiplatform_CONFIG_VARS@")
>> +--
>> +2.0.1
>> +
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch
>> new file mode 100644
>> index 0000000..a13c53b
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch
>> @@ -0,0 +1,12 @@
>> +diff --git a/CMakeLists.txt b/CMakeLists.txt
>> +index 9abe773..ae433fc 100644
>> +--- a/CMakeLists.txt
>> ++++ b/CMakeLists.txt
>> +@@ -9,7 +9,6 @@ find_package(kodi REQUIRED)
>> + find_package(TinyXML REQUIRED)
>> + find_package(Threads REQUIRED)
>> + find_package(p8-platform REQUIRED)
>> +-include(UseMultiArch.cmake)
>> + include(CheckAtomic.cmake)
>> +
>> + set(kodiplatform_NAME kodiplatform)
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb
>> new file mode 100644
>> index 0000000..5077454
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb
>> @@ -0,0 +1,39 @@
>> +SUMMARY = "Platform support library used by libCEC and binary add-ons for Kodi"
>> +HOMEPAGE = "http://libcec.pulse-eight.com/"
>> +
>> +LICENSE = "GPLv2+"
>> +LIC_FILES_CHKSUM = "file://src/util/XMLUtils.cpp;beginline=2;endline=18;md5=dae8e846500e70dd8ecee55f3f018c30"
>> +
>> +DEPENDS = "libtinyxml kodi"
>> +
>> +PV = "16.0.0"
>> +
>> +SRCREV = "15edaf78d6307eaa5e1d17028122d8bce9d55aa2"
>> +SRC_URI = "git://github.com/xbmc/kodi-platform.git \
>> +           file://0001-Fix-build-after-platform-rename.patch \
>> +           file://0001-fix-cross-compile-badness.patch \
>> +           file://kodi-platform-02_no-multi-lib.patch \
>> +          "
>> +
>> +S = "${WORKDIR}/git"
>> +
>> +inherit cmake pkgconfig
>> +
>> +EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX_TOOLCHAIN=${STAGING_DIR_TARGET} \
>> +                  -DCMAKE_INSTALL_LIBDIR=${libdir} \
>> +                  -DCMAKE_INSTALL_LIBDIR_NOARCH=${libdir} \
>> +                  -DKODI_INCLUDE_DIR=${STAGING_LIBDIR}/kodi \
>> +                  -DKODI_INCLUDE_DIR=${STAGING_INCDIR}/kodi \
>> +                "
>> +
>> +do_compile_prepend() {
>> +	sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \
>> +	       -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \
>> +	          ${B}/CMakeFiles/kodiplatform.dir/flags.make
>> +	sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\
>> +	          ${B}/CMakeFiles/kodiplatform.dir/link.txt
>> +}
>> +
>> +RPROVIDES_${PN} += "libkodiplatform"
>> +FILES_${PN}-dev += "${libdir}/*platform"
>> +
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb
>> new file mode 100644
>> index 0000000..955d02b
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb
>> @@ -0,0 +1,20 @@
>> +SUMMARY = "Systemd service for kodi startup"
>> +
>> +LICENSE = "MIT"
>> +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
>> +
>> +PV = "1.0"
>> +
>> +SRC_URI = "file://kodi.service"
>> +
>> +inherit systemd
>> +
>> +do_install() {
>> +	install -d ${D}/lib/systemd/system
>> +	install -m 0644 ${WORKDIR}/kodi.service ${D}/lib/systemd/system/
>> +}
>> +
>> +SYSTEMD_PACKAGES = "${PN}"
>> +SYSTEMD_SERVICE_${PN} = "kodi.service"
>> +
>> +RDEPENDS_${PN} += "xinit kodi"
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service
>> new file mode 100644
>> index 0000000..29d0394
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service
>> @@ -0,0 +1,14 @@
>> +[Unit]
>> +Description=Kodi media thing
>> +
>> +[Service]
>> +User=root
>> +Type=simple
>> +SuccessExitStatus=0 1
>> +IOSchedulingClass=realtime
>> +IOSchedulingPriority=0
>> +
>> +ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- /usr/bin/X :0
>> +
>> +[Install]
>> +WantedBy=basic.target
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch
>> new file mode 100644
>> index 0000000..b3780db
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch
>> @@ -0,0 +1,25 @@
>> +From 53c7b1667a41b25775d1dc009d8ced61f383da0b Mon Sep 17 00:00:00 2001
>> +From: Koen Kooi <koen@dominion.thruhere.net>
>> +Date: Sat, 6 Feb 2016 15:43:01 +0100
>> +Subject: [PATCH 1/3] configure: don't try to run stuff to find tinyxml
>> +
>> +---
>> + configure.ac | 2 +-
>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>> +
>> +diff --git a/configure.ac b/configure.ac
>> +index 5a41fb4..243c7e5 100644
>> +--- a/configure.ac
>> ++++ b/configure.ac
>> +@@ -1043,7 +1043,7 @@ fi
>> + AC_LANG_PUSH([C++])
>> + PKG_CHECK_MODULES([TINYXML], [tinyxml >= 2.6.2],
>> +   [INCLUDES="$INCLUDES $TINYXML_CFLAGS"; LIBS="$LIBS $TINYXML_LIBS"],
>> +-  [AC_RUN_IFELSE(
>> ++  [AC_COMPILE_IFELSE(
>> +    [AC_LANG_SOURCE([[
>> + #include <stdlib.h>
>> + #include <tinyxml.h>
>> +--
>> +2.10.1
>> +
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch
>> new file mode 100644
>> index 0000000..b2af5de
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0002-handle-SIGTERM.patch
>> @@ -0,0 +1,163 @@
>> +From 1c1484303a055bfde655ffae3829554aaefc2e07 Mon Sep 17 00:00:00 2001
>> +From: Stefan Saraev <stefan@saraev.ca>
>> +Date: Wed, 2 Nov 2016 11:28:34 -0700
>> +Subject: [PATCH 2/3] handle SIGTERM
>> +
>> +0. CApplication::Stop cant be trusted. (deadlocks crashes and boo)
>> +
>> +so, when shutdown/reboot is requested:
>> +
>> +1. save an exit code (for CEC...)
>> +2. call CPowerManager::{Reboot,PowerDown}
>> +3. ... then systemd sends TERM and waits xx seconds before sending KILL
>> +4. CApplication::Stop has xx seconds to save guisettings.xml and boo
>> +5. CEC thread has xx seconds to switch off after it received OnQuit
>> +6. addons / pvrmanager / cec / everything else.. are free to deadlock / crash now, we dont care
>> +7. KILL
>> +
>> +Signed-off-by: Stefan Saraev <stefan@saraev.ca>
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +---
>> + xbmc/Application.cpp         | 17 ++++++++++++-----
>> + xbmc/Application.h           |  1 +
>> + xbmc/XBApplicationEx.cpp     |  1 +
>> + xbmc/XBApplicationEx.h       |  1 +
>> + xbmc/platform/posix/main.cpp | 15 +++++++++++++++
>> + 5 files changed, 30 insertions(+), 5 deletions(-)
>> +
>> +diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
>> +index 4c118e0..58b151a 100644
>> +--- a/xbmc/Application.cpp
>> ++++ b/xbmc/Application.cpp
>> +@@ -2428,12 +2428,12 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
>> +   switch (pMsg->dwMessage)
>> +   {
>> +   case TMSG_POWERDOWN:
>> +-    Stop(EXITCODE_POWERDOWN);
>> ++    SetExitCode(EXITCODE_POWERDOWN);
>> +     g_powerManager.Powerdown();
>> +     break;
>> +
>> +   case TMSG_QUIT:
>> +-    Stop(EXITCODE_QUIT);
>> ++    SetExitCode(EXITCODE_QUIT);
>> +     break;
>> +
>> +   case TMSG_SHUTDOWN:
>> +@@ -2454,12 +2454,13 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg)
>> +
>> +   case TMSG_RESTART:
>> +   case TMSG_RESET:
>> +-    Stop(EXITCODE_REBOOT);
>> ++    SetExitCode(EXITCODE_REBOOT);
>> +     g_powerManager.Reboot();
>> +     break;
>> +
>> +   case TMSG_RESTARTAPP:
>> + #if defined(TARGET_WINDOWS) || defined(TARGET_LINUX)
>> ++    SetExitCode(EXITCODE_RESTARTAPP);
>> +     Stop(EXITCODE_RESTARTAPP);
>> + #endif
>> +     break;
>> +@@ -2883,6 +2884,13 @@ bool CApplication::Cleanup()
>> +   }
>> + }
>> +
>> ++void CApplication::SetExitCode(int exitCode)
>> ++{
>> ++  // save it for CEC
>> ++  m_ExitCode = exitCode;
>> ++  m_ExitCodeSet = true;
>> ++}
>> ++
>> + void CApplication::Stop(int exitCode)
>> + {
>> +   try
>> +@@ -2890,7 +2898,7 @@ void CApplication::Stop(int exitCode)
>> +     m_frameMoveGuard.unlock();
>> +
>> +     CVariant vExitCode(CVariant::VariantTypeObject);
>> +-    vExitCode["exitcode"] = exitCode;
>> ++    vExitCode["exitcode"] = m_ExitCode;
>> +     CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnQuit", vExitCode);
>> +
>> +     // Abort any active screensaver
>> +@@ -2924,7 +2932,6 @@ void CApplication::Stop(int exitCode)
>> +
>> +     m_bStop = true;
>> +     m_AppFocused = false;
>> +-    m_ExitCode = exitCode;
>> +     CLog::Log(LOGNOTICE, "stop all");
>> +
>> +     // cancel any jobs from the jobmanager
>> +diff --git a/xbmc/Application.h b/xbmc/Application.h
>> +index 22aca81..9992677 100644
>> +--- a/xbmc/Application.h
>> ++++ b/xbmc/Application.h
>> +@@ -160,6 +160,7 @@ public:
>> +   void StopPVRManager();
>> +   void ReinitPVRManager();
>> +   bool IsCurrentThread() const;
>> ++  void SetExitCode(int exitCode);
>> +   void Stop(int exitCode);
>> +   void RestartApp();
>> +   void UnloadSkin(bool forReload = false);
>> +diff --git a/xbmc/XBApplicationEx.cpp b/xbmc/XBApplicationEx.cpp
>> +index 035aed2..34102f5 100644
>> +--- a/xbmc/XBApplicationEx.cpp
>> ++++ b/xbmc/XBApplicationEx.cpp
>> +@@ -46,6 +46,7 @@ CXBApplicationEx::CXBApplicationEx()
>> +   m_bStop = false;
>> +   m_AppFocused = true;
>> +   m_ExitCode = EXITCODE_QUIT;
>> ++  m_ExitCodeSet = false;
>> +   m_renderGUI = false;
>> + }
>> +
>> +diff --git a/xbmc/XBApplicationEx.h b/xbmc/XBApplicationEx.h
>> +index 9bc14fa..f696b89 100644
>> +--- a/xbmc/XBApplicationEx.h
>> ++++ b/xbmc/XBApplicationEx.h
>> +@@ -42,6 +42,7 @@ public:
>> +   // Variables for timing
>> +   bool m_bStop;
>> +   int  m_ExitCode;
>> ++  bool m_ExitCodeSet;
>> +   bool m_AppFocused;
>> +   bool m_renderGUI;
>> +
>> +diff --git a/xbmc/platform/posix/main.cpp b/xbmc/platform/posix/main.cpp
>> +index a8b64e5..3d80032 100644
>> +--- a/xbmc/platform/posix/main.cpp
>> ++++ b/xbmc/platform/posix/main.cpp
>> +@@ -41,12 +41,27 @@
>> + #include "input/linux/LIRC.h"
>> + #endif
>> + #include "platform/XbmcContext.h"
>> ++#include "Application.h"
>> ++
>> ++void xbmc_term_handler(int signum)
>> ++{
>> ++  CLog::Log(LOGINFO, "Received SIGTERM...");
>> ++  if (!g_application.m_ExitCodeSet)
>> ++    g_application.SetExitCode(EXITCODE_RESTARTAPP);
>> ++  g_application.Stop(EXITCODE_RESTARTAPP);
>> ++}
>> +
>> + #ifdef __cplusplus
>> + extern "C"
>> + #endif
>> + int main(int argc, char* argv[])
>> + {
>> ++  // SIGTERM handler
>> ++  struct sigaction action;
>> ++  memset(&action, 0, sizeof(struct sigaction));
>> ++  action.sa_handler = xbmc_term_handler;
>> ++  sigaction(SIGTERM, &action, NULL);
>> ++
>> +   // set up some xbmc specific relationships
>> +   XBMC::Context context;
>> +
>> +--
>> +2.10.1
>> +
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch
>> new file mode 100644
>> index 0000000..d638550
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0003-add-support-to-read-frequency-output-if-using-intel-.patch
>> @@ -0,0 +1,26 @@
>> +From 4ef1e9dab9193f1a5305d25c8eda97f8f06ea154 Mon Sep 17 00:00:00 2001
>> +From: Stephan Raue <stephan@openelec.tv>
>> +Date: Mon, 1 Sep 2014 03:16:37 +0200
>> +Subject: [PATCH 3/3] add support to read frequency output if using intel's
>> + pstate driver
>> +
>> +---
>> + xbmc/utils/CPUInfo.cpp | 2 ++
>> + 1 file changed, 2 insertions(+)
>> +
>> +diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp
>> +index 5e2ebbd..fd04d5a 100644
>> +--- a/xbmc/utils/CPUInfo.cpp
>> ++++ b/xbmc/utils/CPUInfo.cpp
>> +@@ -274,6 +274,8 @@ CCPUInfo::CCPUInfo(void)
>> +     m_fProcTemperature = fopen("/sys/class/thermal/thermal_zone0/temp", "r");  // On Raspberry PIs
>> +
>> +   m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r");
>> ++  if (m_fCPUFreq == NULL)
>> ++    m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq", "r");
>> +   if (!m_fCPUFreq)
>> +   {
>> +     m_cpuInfoForFreq = true;
>> +--
>> +2.10.1
>> +
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch
>> new file mode 100644
>> index 0000000..6f5f9a2
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi/0004-Disable-DVD-support.patch
>> @@ -0,0 +1,35 @@
>> +From 191cf3f084b4d34846711034a7fe3078f8243c82 Mon Sep 17 00:00:00 2001
>> +From: Khem Raj <raj.khem@gmail.com>
>> +Date: Wed, 2 Nov 2016 12:39:20 -0700
>> +Subject: [PATCH 4/4] Disable DVD support
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +---
>> + Makefile.in | 4 +---
>> + 1 file changed, 1 insertion(+), 3 deletions(-)
>> +
>> +diff --git a/Makefile.in b/Makefile.in
>> +index 58b3a17..b7c3fce 100644
>> +--- a/Makefile.in
>> ++++ b/Makefile.in
>> +@@ -10,8 +10,7 @@ EC_DIRS= \
>> + 	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 @@ libaddon: exports
>> + 	$(MAKE) -C lib/addons/library.xbmc.pvr
>> + 	$(MAKE) -C lib/addons/library.kodi.inputstream
>> + dvdpcodecs: dllloader
>> +-	$(MAKE) -C lib/libdvd
>> +
>> + dvdpextcodecs:
>> +
>> +--
>> +2.10.1
>> +
>> diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
>> new file mode 100644
>> index 0000000..807871f
>> --- /dev/null
>> +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb
>> @@ -0,0 +1,177 @@
>> +SUMMARY = "Kodi Media Center"
>> +
>> +LICENSE = "GPLv2"
>> +LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=930e2a5f63425d8dd72dbd7391c43c46"
>> +
>> +DEPENDS = " \
>> +            cmake-native \
>> +            curl-native \
>> +            gperf-native \
>> +            jsonschemabuilder-native \
>> +            nasm-native \
>> +            swig-native \
>> +            yasm-native \
>> +            zip-native \
>> +            avahi \
>> +            boost \
>> +            bzip2 \
>> +            curl \
>> +            dcadec \
>> +            enca \
>> +            expat \
>> +            faad2 \
>> +            ffmpeg \
>> +            fontconfig \
>> +            fribidi \
>> +            giflib \
>> +            jasper \
>> +            libass \
>> +            libcdio \
>> +            libcec \
>> +            libmad \
>> +            libmicrohttpd \
>> +            libmms \
>> +            libmms \
>> +            libmodplug \
>> +            libpcre \
>> +            libplist \
>> +            libsamplerate0 \
>> +            libsdl-image \
>> +            libsdl-mixer \
>> +            libsquish \
>> +            libssh \
>> +            libtinyxml \
>> +            libusb1 \
>> +            libxslt \
>> +            lzo \
>> +            mpeg2dec \
>> +            python \
>> +            samba \
>> +            sqlite3 \
>> +            taglib \
>> +            virtual/egl \
>> +            virtual/libsdl \
>> +            wavpack \
>> +            yajl \
>> +            zlib \
>> +            ${@enable_glew(bb, d)} \
>> +          "
>> +
>> +PROVIDES = "xbmc"
>> +
>> +SRCREV = "32c7788e7cce711be5b7f3893c82dddd79658268"
>> +PV = "17.0+gitr${SRCPV}"
>> +SRC_URI = "git://github.com/xbmc/xbmc.git;branch=master \
>> +           file://0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch \
>> +           file://0002-handle-SIGTERM.patch \
>> +           file://0003-add-support-to-read-frequency-output-if-using-intel-.patch \
>> +           file://0004-Disable-DVD-support.patch \
>> +"
>> +
>> +inherit autotools-brokensep gettext pythonnative
>> +
>> +S = "${WORKDIR}/git"
>> +
>> +# breaks compilation
>> +ASNEEDED = ""
>> +
>> +ACCEL ?= ""
>> +ACCEL_x86 = "vaapi vdpau"
>> +ACCEL_x86-64 = "vaapi vdpau"
>> +
>> +PACKAGECONFIG ??= "${ACCEL}"
>> +PACKAGECONFIG_append += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)}"
>> +PACKAGECONFIG_append += "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' opengl', ' openglesv2', d)}"
>> +
>> +PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles,"
>> +PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,virtual/egl"
>> +PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
>> +PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
>> +PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5"
>> +PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxinerama libxmu libxrandr libxtst"
>> +PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
>> +
>> +EXTRA_OECONF_append_rpi = " --enable-openmax --enable-player=omxplayer --with-platform=raspberry-pi2"
>> +#LDFLAGS_append_rpi = " -lEGL -lGLESv2 -lbcm_host -lvcos -lvchiq_arm -lvchostif -lmmal -lmmal_core -lmmal_util "
>> +LDFLAGS_append_rpi = " -lvchostif "
>> +EXTRA_OECONF = " \
>> +    --disable-debug \
>> +    --disable-libcap \
>> +    --disable-ccache \
>> +    --disable-mid \
>> +    --enable-libusb \
>> +    --enable-airplay \
>> +    --disable-optical-drive \
>> +    --with-ffmpeg=shared \
>> +    --enable-texturepacker=no \
>> +"
>> +
>> +FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
>> +FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
>> +BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
>> +
>> +# for python modules
>> +export HOST_SYS
>> +export BUILD_SYS
>> +export STAGING_LIBDIR
>> +export STAGING_INCDIR
>> +export PYTHON_DIR
>> +
>> +def enable_glew(bb, d):
>> +    if bb.utils.contains('PACKAGECONFIG', 'x11', True, False, d) and bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
>> +        return "glew"
>> +    return ""
>> +
>> +do_configure() {
>> +    ( for i in $(find ${S} -name "configure.*" ) ; do
>> +       cd $(dirname $i) && gnu-configize --force || true
>> +    done )
>> +    make -C tools/depends/target/crossguid PREFIX=${STAGING_DIR_HOST}${prefix}
>> +
>> +    BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
>> +    BOOTSTRAP_STANDALONE=1 make -f codegenerator.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
>> +    oe_runconf
>> +}
>> +
>> +do_compile_prepend() {
>> +    for i in $(find . -name "Makefile") ; do
>> +        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
>> +    done
>> +
>> +    for i in $(find . -name "*.mak*" -o    -name "Makefile") ; do
>> +        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
>> +    done
>> +}
>> +
>> +INSANE_SKIP_${PN} = "rpaths"
>> +
>> +FILES_${PN} += "${datadir}/xsessions ${datadir}/icons ${libdir}/xbmc ${datadir}/xbmc"
>> +FILES_${PN}-dbg += "${libdir}/kodi/.debug ${libdir}/kodi/*/.debug ${libdir}/kodi/*/*/.debug ${libdir}/kodi/*/*/*/.debug"
>> +
>> +# kodi uses some kind of dlopen() method for libcec so we need to add it manually
>> +# OpenGL builds need glxinfo, that's in mesa-demos
>> +RRECOMMENDS_${PN}_append = " libcec \
>> +                             python \
>> +                             python-lang \
>> +                             python-re \
>> +                             python-netclient \
>> +                             python-html \
>> +                             python-difflib \
>> +                             python-json \
>> +                             python-zlib \
>> +                             python-shell \
>> +                             python-sqlite3 \
>> +                             python-compression \
>> +                             libcurl \
>> +                             ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr xdpyinfo', '', d)} \
>> +"
>> +RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 \
>> +                                        glibc-gconv-ibm850 \
>> +					glibc-gconv-unicode \
>> +                                        glibc-gconv-utf-32 \
>> +					glibc-charmap-utf-8 \
>> +					glibc-localedata-en-us \
>> +                                      "
>> +
>> +RPROVIDES_${PN} += "xbmc"
>> +
>> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch
>> deleted file mode 100644
>> index dfc3959..0000000
>> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0001-configure-don-t-run-python-distutils-to-find-STAGING.patch
>> +++ /dev/null
>> @@ -1,31 +0,0 @@
>> -From 0dce5a2abd9f42876616c35772a4d71c5399543c Mon Sep 17 00:00:00 2001
>> -From: Koen Kooi <koen@dominion.thruhere.net>
>> -Date: Sat, 17 Dec 2011 11:38:15 +0100
>> -Subject: [PATCH 1/4] configure: don't run python distutils to find STAGING_INCDIR/python, it is not safe for per-machine sysroots
>> -
>> -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>> ----
>> - m4/ax_python_devel.m4 |    7 +------
>> - 1 files changed, 1 insertions(+), 6 deletions(-)
>> -
>> -diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4
>> -index adbd207..dee70f6 100644
>> ---- a/m4/ax_python_devel.m4
>> -+++ b/m4/ax_python_devel.m4
>> -@@ -151,12 +151,7 @@ $ac_distutils_result])
>> - 	#
>> - 	AC_MSG_CHECKING([for Python include path])
>> - 	if test -z "$PYTHON_CPPFLAGS"; then
>> --		python_path=`$PYTHON -c "import distutils.sysconfig; \
>> --			print (distutils.sysconfig.get_python_inc ());"`
>> --		if test -n "${python_path}"; then
>> --			python_path="-I$python_path"
>> --		fi
>> --		PYTHON_CPPFLAGS=$python_path
>> -+		PYTHON_CPPFLAGS="-I${STAGING_INCDIR}/${PYTHON_DIR}"
>> - 	fi
>> - 	AC_MSG_RESULT([$PYTHON_CPPFLAGS])
>> - 	AC_SUBST([PYTHON_CPPFLAGS])
>> ---
>> -1.7.2.5
>> -
>> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch
>> deleted file mode 100644
>> index e0a4037..0000000
>> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch
>> +++ /dev/null
>> @@ -1,97 +0,0 @@
>> -From 7b2a8a7869d257cba35f53f6d877877c29cdac27 Mon Sep 17 00:00:00 2001
>> -From: Paul Menzel <paulepanter@users.sourceforge.net>
>> -Date: Sun, 14 Aug 2011 21:53:47 +0200
>> -Subject: [PATCH 2/4] Revert "fixed:[ios] Add memory barriers to atomic Add/Subtract and Increment/Decrement functions to ensure synchronized accesses."
>> -
>> -This reverts commit 9a10c48710df79118e39e9b3bb0a15bf1fe694d1.
>> -
>> -The build (OpenEmbedded `angstrom-2010.x` for `MACHINE = "beagleboard") fails with the following error.
>> -
>> -        make -C xbmc/threads
>> -        make[1]: Entering directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+9a10c48710df79118e39e9b3bb0a15bf1fe694d1/git/xbmc/threads'
>> -        CPP     Atomics.o
>> -        /tmp/ccIzTm3L.s: Assembler messages:
>> -        /tmp/ccIzTm3L.s:40: Error: garbage following instruction -- `dmb ish'
>> -        /tmp/ccIzTm3L.s:48: Error: garbage following instruction -- `dmb ish'
>> -        /tmp/ccIzTm3L.s:76: Error: garbage following instruction -- `dmb ish'
>> -        /tmp/ccIzTm3L.s:83: Error: garbage following instruction -- `dmb ish'
>> -        /tmp/ccIzTm3L.s:111: Error: garbage following instruction -- `dmb ish'
>> -        /tmp/ccIzTm3L.s:118: Error: garbage following instruction -- `dmb ish'
>> -        /tmp/ccIzTm3L.s:145: Error: garbage following instruction -- `dmb ish'
>> -        /tmp/ccIzTm3L.s:152: Error: garbage following instruction -- `dmb ish'
>> -        /tmp/ccIzTm3L.s:180: Error: garbage following instruction -- `dmb ish'
>> -        /tmp/ccIzTm3L.s:187: Error: garbage following instruction -- `dmb ish'
>> -        make[1]: *** [Atomics.o] Error 1
>> -        make[1]: Leaving directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+9a10c48710df79118e39e9b3bb0a15bf1fe694d1/git/xbmc/threads'
>> -        make: *** [xbmc/threads/threads.a] Error 2
>> ----
>> - xbmc/threads/Atomics.cpp |    8 --------
>> - 1 files changed, 0 insertions(+), 8 deletions(-)
>> -
>> -diff --git a/xbmc/threads/Atomics.cpp b/xbmc/threads/Atomics.cpp
>> -index 5b09f18..0a98a7e 100644
>> ---- a/xbmc/threads/Atomics.cpp
>> -+++ b/xbmc/threads/Atomics.cpp
>> -@@ -194,14 +194,12 @@ long AtomicIncrement(volatile long* pAddr)
>> - {
>> -   register long val;
>> -   asm volatile (
>> --                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
>> -                 "1:                     \n"
>> -                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
>> -                 "add     %0,  #1        \n" // (val += 1)
>> -                 "strex   r1,  %0, [%1]	\n"
>> -                 "cmp     r1,   #0       \n"
>> -                 "bne     1b             \n"
>> --                "dmb     ish            \n" // Memory barrier.
>> -                 : "=&r" (val)
>> -                 : "r"(pAddr)
>> -                 : "r1"
>> -@@ -273,14 +271,12 @@ long AtomicAdd(volatile long* pAddr, long amount)
>> - {
>> -   register long val;
>> -   asm volatile (
>> --                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
>> -                 "1:                     \n"
>> -                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
>> -                 "add     %0,  %2        \n" // (val += amount)
>> -                 "strex   r1,  %0, [%1]	\n"
>> -                 "cmp     r1,   #0       \n"
>> -                 "bne     1b             \n"
>> --                "dmb     ish            \n" // Memory barrier.
>> -                 : "=&r" (val)
>> -                 : "r"(pAddr), "r"(amount)
>> -                 : "r1"
>> -@@ -351,14 +347,12 @@ long AtomicDecrement(volatile long* pAddr)
>> - {
>> -   register long val;
>> -   asm volatile (
>> --                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
>> -                 "1:                     \n"
>> -                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
>> -                 "sub     %0,  #1        \n" // (val -= 1)
>> -                 "strex   r1,  %0, [%1]	\n"
>> -                 "cmp     r1,   #0       \n"
>> -                 "bne     1b             \n"
>> --                "dmb     ish            \n" // Memory barrier.
>> -                 : "=&r" (val)
>> -                 : "r"(pAddr)
>> -                 : "r1"
>> -@@ -431,14 +425,12 @@ long AtomicSubtract(volatile long* pAddr, long amount)
>> - {
>> -   register long val;
>> -   asm volatile (
>> --                "dmb     ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
>> -                 "1:                     \n"
>> -                 "ldrex   %0, [%1]       \n" // (val = *pAddr)
>> -                 "sub     %0,  %2        \n" // (val -= amount)
>> -                 "strex   r1,  %0, [%1]	\n"
>> -                 "cmp     r1,   #0       \n"
>> -                 "bne     1b             \n"
>> --                "dmb     ish            \n" // Memory barrier.
>> -                 : "=&r" (val)
>> -                 : "r"(pAddr), "r"(amount)
>> -                 : "r1"
>> ---
>> -1.7.2.5
>> -
>> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch
>> deleted file mode 100644
>> index 629017b..0000000
>> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch
>> +++ /dev/null
>> @@ -1,69 +0,0 @@
>> -From aaae1616a09d359b52e929f944ca0ceb4bb7f831 Mon Sep 17 00:00:00 2001
>> -From: Paul Menzel <paulepanter@users.sourceforge.net>
>> -Date: Sun, 14 Aug 2011 21:55:09 +0200
>> -Subject: [PATCH 3/4] Revert "fixed:[ios] Add memory barriers to cas() assembly to ensure alignment of memory accesses."
>> -
>> -This reverts commit 92bab651e2253d172879995b50985645b77fecd2.
>> -
>> -The build (OpenEmbedded `angstrom-2010.x` for `MACHINE = "beagleboard") fails with the following error.
>> -
>> -        CPP     Atomics.o
>> -        make[1]: Entering directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+92bab651e2253d172879995b50985645b77fecd2/git/xbmc/windows'
>> -        CPP     GUIMediaWindow.o
>> -        /tmp/ccrsywuV.s: Assembler messages:
>> -        /tmp/ccrsywuV.s:40: Error: garbage following instruction -- `dmb ish'
>> -        /tmp/ccrsywuV.s:48: Error: garbage following instruction -- `dmb ish'
>> -        make[1]: *** [Atomics.o] Error 1
>> -        make[1]: Leaving directory `/oe/build-angstrom-next/angstrom-dev/work/armv7a-angstrom-linux-gnueabi/xbmc-10.05-r11+gitr0+92bab651e2253d172879995b50985645b77fecd2/git/xbmc/threads'
>> -        make: *** [xbmc/threads/threads.a] Error 2
>> ----
>> - xbmc/threads/Atomics.cpp |   33 ++++++++++++++++-----------------
>> - 1 files changed, 16 insertions(+), 17 deletions(-)
>> -
>> -diff --git a/xbmc/threads/Atomics.cpp b/xbmc/threads/Atomics.cpp
>> -index 0a98a7e..0967eb2 100644
>> ---- a/xbmc/threads/Atomics.cpp
>> -+++ b/xbmc/threads/Atomics.cpp
>> -@@ -49,23 +49,22 @@ long cas(volatile long *pAddr, long expectedVal, long swapVal)
>> - #elif defined(__arm__)
>> - long cas(volatile long* pAddr, long expectedVal, long swapVal)
>> - {
>> --  register long prev;
>> --  asm volatile (
>> --                "dmb      ish            \n" // Memory barrier. Make sure all memory accesses appearing before this complete before any that appear after
>> --                "1:                      \n"
>> --                "ldrex    %0, [%1]       \n" // Load the current value of *pAddr(%1) into prev (%0) and lock pAddr,
>> --                "cmp      %0,  %2        \n" // Verify that the current value (%0) == old value (%2)
>> --                "bne      2f             \n" // Bail if the two values are not equal [not as expected]
>> --                "strex    r1,  %3, [%1]  \n"
>> --                "cmp      r1,  #0        \n"
>> --                "bne      1b             \n"
>> --                "dmb      ish            \n" // Memory barrier.
>> --                "2:                      \n"
>> --                : "=&r" (prev)
>> --                : "r"(pAddr), "r"(expectedVal),"r"(swapVal)
>> --                : "r1"
>> --                );
>> --  return prev;
>> -+  return(__sync_val_compare_and_swap(pAddr, expectedVal, swapVal));
>> -+//  register long prev;
>> -+//  asm volatile (
>> -+//                "1:                      \n"
>> -+//                "ldrex    %0, [%1]       \n" /* Load the current value of *pAddr(%1) into prev (%0) and lock pAddr,  */
>> -+//                "cmp      %0,  %2        \n" /* Verify that the current value (%0) == old value (%2) */
>> -+//                "bne      2f             \n" /* Bail if the two values are not equal [not as expected] */
>> -+//                "strex    r1,  %3, [%1]  \n"
>> -+//                "cmp      r1,  #0        \n"
>> -+//                "bne      1b             \n"
>> -+//                "2:                        "
>> -+//                : "=&r" (prev)
>> -+//                : "r"(pAddr), "r"(expectedVal),"r"(swapVal)
>> -+//                : "r1"
>> -+//                );
>> -+//  return prev;
>> - }
>> -
>> - #elif defined(__mips__)
>> ---
>> -1.7.2.5
>> -
>> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch
>> deleted file mode 100644
>> index 345e20e..0000000
>> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch
>> +++ /dev/null
>> @@ -1,43 +0,0 @@
>> -From fd8f73826240aae543a41a2bfeea0056e2fe594d Mon Sep 17 00:00:00 2001
>> -From: Koen Kooi <koen@dominion.thruhere.net>
>> -Date: Mon, 11 Mar 2013 11:04:29 +0100
>> -Subject: [PATCH] configure: cope with ld-is-gold DISTRO_FEATURE
>> -
>> -Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>> ----
>> -
>> -Upstream-Stature: backport
>> -
>> - configure.in |   12 +++++++-----
>> - 1 files changed, 7 insertions(+), 5 deletions(-)
>> -
>> -diff --git a/configure.in b/configure.in
>> -index ef94683..c8b459b 100755
>> ---- a/configure.in
>> -+++ b/configure.in
>> -@@ -18,9 +18,14 @@ tolower(){
>> - # check for library basenames
>> - AC_DEFUN([XB_FIND_SONAME],
>> - [
>> -+  #set -x
>> -   if [[ "$host_vendor" != "apple" ]]; then
>> -     AC_MSG_CHECKING([for lib$2 soname])
>> -     $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}')
>> -+    if [[ -z $$1_FILENAME ]]; then
>> -+      #try gold linker syntax
>> -+      $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-t 3>&1 1>&2 2>&3 | grep "$2")
>> -+    fi
>> -     if [[ ! -z $$1_FILENAME ]]; then
>> -       $1_SONAME=$(objdump -p $$1_FILENAME | grep "SONAME.*$2" | awk '{V=2; print $V}')
>> -     fi
>> -@@ -55,6 +60,7 @@ AC_DEFUN([XB_FIND_SONAME],
>> -     AC_MSG_RESULT([$$1_SONAME])
>> -     AC_SUBST($1_SONAME)
>> -   fi
>> -+  #set +x
>> - ])
>> -
>> - # Function to push and pop libs and includes for a command
>> ---
>> -1.7.7.6
>> -
>> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch b/meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch
>> deleted file mode 100644
>> index 5c14059..0000000
>> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc/configure.in-Avoid-running-code.patch
>> +++ /dev/null
>> @@ -1,32 +0,0 @@
>> -From cfd851660a594801a591e80dc820c65cb7bd7836 Mon Sep 17 00:00:00 2001
>> -From: Otavio Salvador <otavio@ossystems.com.br>
>> -Date: Sat, 6 Oct 2012 06:40:03 -0300
>> -Subject: [PATCH] configure.in: Avoid running code or we break cross-compile
>> -
>> -Upstream-Status: Backport [similar change done for 12.0]
>> -
>> -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ----
>> - configure.in |    6 +-----
>> - 1 files changed, 1 insertions(+), 5 deletions(-)
>> -
>> -diff --git a/configure.in b/configure.in
>> -index ef94683..d7efcb0 100755
>> ---- a/configure.in
>> -+++ b/configure.in
>> -@@ -1246,11 +1246,7 @@ if test "$use_external_ffmpeg" = "yes"; then
>> -   AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
>> -
>> -   # Disable vdpau support if external libavcodec doesn't have it
>> --  AC_RUN_IFELSE(
>> --    AC_LANG_PROGRAM([[#include <libavcodec/avcodec.h>]],
>> --      [[avcodec_register_all();
>> --        AVCodec *codec = avcodec_find_decoder_by_name("vc1_vdpau");
>> --        return (codec) ? 0 : 1;]]),,
>> -+  AC_CHECK_LIB([avcodec], [ff_vdpau_vc1_decode_picture],,
>> -     [if test "x$use_vdpau" = "xyes"; then
>> -       AC_MSG_ERROR($ffmpeg_vdpau_not_supported)
>> -     else
>> ---
>> -1.7.2.5
>> -
>> diff --git a/meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb b/meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb
>> deleted file mode 100644
>> index 0d8dd5c..0000000
>> --- a/meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb
>> +++ /dev/null
>> @@ -1,97 +0,0 @@
>> -SUMMARY = "XBMC Media Center"
>> -
>> -LICENSE = "GPLv2"
>> -LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=6eb631b6da7fdb01508a80213ffc35ff"
>> -
>> -DEPENDS = "libusb1 libcec libplist expat yajl gperf-native libxmu fribidi mpeg2dec ffmpeg samba fontconfig curl python libass libmodplug libmicrohttpd wavpack libmms cmake-native libsdl-image libsdl-mixer virtual/egl mysql5 sqlite3 libmms faad2 libcdio libpcre boost lzo enca avahi libsamplerate0 libxinerama libxrandr libxtst bzip2 virtual/libsdl jasper zip-native zlib libtinyxml libmad"
>> -#require recipes/egl/egl.inc
>> -
>> -
>> -SRCREV = "82388d55dae79cbb2e486e307e23202e76a43efa"
>> -
>> -# multiple issues
>> -PNBLACKLIST[xbmc] ?= "/usr/include/c++/ctime:70:11: error: '::gmtime' has not been declared"
>> -
>> -PV = "11.0+gitr${SRCPV}"
>> -PR = "r14"
>> -SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Eden \
>> -           file://0001-configure-don-t-run-python-distutils-to-find-STAGING.patch \
>> -           file://0002-Revert-fixed-ios-Add-memory-barriers-to-atomic-Add-S.patch \
>> -           file://0003-Revert-fixed-ios-Add-memory-barriers-to-cas-assembly.patch \
>> -           file://0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch \
>> -           file://configure.in-Avoid-running-code.patch \
>> -"
>> -
>> -inherit autotools gettext python-dir
>> -
>> -S = "${WORKDIR}/git"
>> -
>> -# breaks compilation
>> -CCACHE = ""
>> -
>> -CACHED_CONFIGUREVARS += " \
>> -    ac_cv_path_PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python" \
>> -"
>> -
>> -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', 'openglesv2', d)}"
>> -PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles,glew"
>> -PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,"
>> -
>> -EXTRA_OECONF = " \
>> -    --disable-rpath \
>> -    --enable-libusb \
>> -    --enable-airplay \
>> -    --disable-optical-drive \
>> -    --enable-external-libraries \
>> -    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '--enable-gl', '--enable-gles', d)} \
>> -"
>> -
>> -FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
>> -BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
>> -
>> -EXTRA_OECONF_append_armv7a = "--cpu=cortex-a8"
>> -
>> -# for python modules
>> -export STAGING_LIBDIR
>> -export STAGING_INCDIR
>> -export PYTHON_DIR
>> -
>> -do_configure() {
>> -    sh bootstrap
>> -    oe_runconf
>> -}
>> -
>> -PARALLEL_MAKE = ""
>> -
>> -do_compile_prepend() {
>> -    for i in $(find . -name "Makefile") ; do
>> -        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
>> -    done
>> -
>> -    for i in $(find . -name "*.mak*" -o    -name "Makefile") ; do
>> -        sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
>> -    done
>> -}
>> -
>> -INSANE_SKIP_${PN} = "rpaths"
>> -
>> -# on ARM architectures xbmc will use GLES which will make the regular wrapper fail, so start it directly
>> -do_install_append_arm() {
>> -    sed -i -e 's:Exec=xbmc:Exec=${libdir}/xbmc/xbmc.bin:g' ${D}${datadir}/applications/xbmc.desktop
>> -}
>> -
>> -FILES_${PN} += "${datadir}/xsessions ${datadir}/icons"
>> -FILES_${PN}-dbg += "${libdir}/xbmc/.debug ${libdir}/xbmc/*/.debug ${libdir}/xbmc/*/*/.debug ${libdir}/xbmc/*/*/*/.debug"
>> -
>> -# xbmc uses some kind of dlopen() method for libcec so we need to add it manually
>> -# OpenGL builds need glxinfo, that's in mesa-demos
>> -RRECOMMENDS_${PN}_append = " libcec \
>> -                             python \
>> -                             python-lang \
>> -                             python-re \
>> -                             python-netclient \
>> -                             libcurl \
>> -                             xdpyinfo \
>> -                             ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-demos', '', d)} \
>> -"
>> -RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 glibc-gconv-ibm850"
>> --
>> 2.10.2
>> 
> 


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-11-03  8:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-03  8:20 [meta-oe][PATCH 1/7] meta_oe_security_flags: Disable PIE for s3c64xx-gpio/s3c24xx-gpio/cpufrequtils Khem Raj
2016-11-03  8:20 ` [meta-oe][PATCH 2/7 V2] boinc: Add recipe for boinc-client Khem Raj
2016-11-03  8:20 ` [meta-oe][PATCH 3/7] libplist: Remove rpaths surgically Khem Raj
2016-11-03  8:20 ` [meta-oe][PATCH 4/7] meta_oe_security_flags.inc: Add libcec, libmodplug, libcdio Khem Raj
2016-11-03  8:20 ` [meta-multimedia][PATCH 5/7] dcadec, libsquish: Add new recipes Khem Raj
2016-11-03  8:20 ` [meta-oe][PATCH 6/7] libcec: Update to 3.1.0+ Khem Raj
2016-11-03  8:20 ` [meta-multimedia][PATCH 7/7] kodi: Update to krypton release ( 17.x ) Khem Raj
2016-11-03  8:26   ` Koen Kooi
2016-11-03  8:32     ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.