summaryrefslogtreecommitdiff
path: root/media-tv/xbmc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-08-11 00:33:31 +0100
committerV3n3RiX <venerix@rogentos.ro>2016-08-11 00:33:31 +0100
commitff5dd7b3704b9e8f9f606d4929f95694ec84ddf3 (patch)
tree393b3bd8a65eb3ec464babab42da8d9ec88851c3 /media-tv/xbmc
parent4c05e04608db666140daaa94499f5f90521a2cc4 (diff)
cleanup
Diffstat (limited to 'media-tv/xbmc')
-rw-r--r--media-tv/xbmc/Manifest6
-rwxr-xr-xmedia-tv/xbmc/files/generate.sh16
-rw-r--r--media-tv/xbmc/files/xbmc-10.0-python-2.7.patch768
-rw-r--r--media-tv/xbmc/files/xbmc-10.1-gcc-4.6.patch100
-rw-r--r--media-tv/xbmc/files/xbmc-10.1-headers.patch10
-rw-r--r--media-tv/xbmc/files/xbmc-10.1-libpng-1.5.patch596
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-ffmpeg-0.10.2.patch41
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch46
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-libav-r1.patch71
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-libav.patch72
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-libpng-1.5.patch605
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-nfs-limits.patch28
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-no-arm-flags.patch16
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-no-exec-stack.patch30
-rw-r--r--media-tv/xbmc/files/xbmc-11.0-nomythtv.patch206
-rw-r--r--media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5-fix-plt-trn-get.patch51
-rw-r--r--media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5-headers.patch12
-rw-r--r--media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5.patch596
-rw-r--r--media-tv/xbmc/files/xbmc-12.1-nomythtv.patch68
-rw-r--r--media-tv/xbmc/files/xbmc-12.3-no-sse2.patch185
-rw-r--r--media-tv/xbmc/files/xbmc-9.11-TexturePacker-parallel-build.patch13
-rw-r--r--media-tv/xbmc/files/xbmc-9.11-jpeg-speedup.patch18
-rw-r--r--media-tv/xbmc/files/xbmc-9.11-libpng14.patch92
-rw-r--r--media-tv/xbmc/files/xbmc-9.11-shader-upscalers.patch887
-rw-r--r--media-tv/xbmc/files/xbmc-9.11-use-cdio-system-headers-on-non-win32.patch129
-rw-r--r--media-tv/xbmc/files/xbmc-9.11-wavpack.patch44
-rw-r--r--media-tv/xbmc/files/xbmc-9999-arm-kill-softfp.patch15
-rw-r--r--media-tv/xbmc/files/xbmc-9999-libpng-1.5-fix-plt-trn-get.patch47
-rw-r--r--media-tv/xbmc/files/xbmc-9999-no-arm-flags.patch16
-rw-r--r--media-tv/xbmc/files/xbmc-9999-no-exec-stack.patch28
-rw-r--r--media-tv/xbmc/files/xbmc-9999-nomythtv.patch67
-rw-r--r--media-tv/xbmc/metadata.xml21
-rw-r--r--media-tv/xbmc/xbmc-10.1.ebuild225
-rw-r--r--media-tv/xbmc/xbmc-11.0.ebuild232
-rw-r--r--media-tv/xbmc/xbmc-12.0.ebuild237
-rw-r--r--media-tv/xbmc/xbmc-12.2-r1.ebuild262
-rw-r--r--media-tv/xbmc/xbmc-12.3.ebuild264
-rw-r--r--media-tv/xbmc/xbmc-13.2.ebuild296
38 files changed, 0 insertions, 6416 deletions
diff --git a/media-tv/xbmc/Manifest b/media-tv/xbmc/Manifest
deleted file mode 100644
index 618a0b56..00000000
--- a/media-tv/xbmc/Manifest
+++ /dev/null
@@ -1,6 +0,0 @@
-DIST xbmc-12.2.tar.gz 67663000 SHA256 b2330634fc513d27a44b131bbbe4ca6b61d60a1fe6c7ca27a7dc749df0bcea1c SHA512 d6812886b4d1a5c28c8150b164d714f8855ccb1ac4e74811c9eb03d09e12a6f05bedd3c034132ae79e0bff66efd54ced9c2c1140da6b4ad7b82dbb90fa3d1c39 WHIRLPOOL c3fc97e5f45a38a259bca06af0b171630ac16832034410e45174d900358b1d16b72940b29475dcad72a2198d8722859a229152379ab7784a7d61f961eb261ddb
-DIST xbmc-12.3-generated-addons.tar.xz 52228 SHA256 477f789dea36969149fe118ecac1c4f3d8c3414772cc6c569be4aefb7e3f221e SHA512 2107271445c0cdcc14b348d011e12ffaaee75bbec506496798f64218256ab9e86cc0ada5edc1e70e509ac1ab366695fae4c15e90bd47fa57ccfe723d7e406b85 WHIRLPOOL 3963577539dee04f33dc4b988944f906688d77864d5e6a6b403e4578c9a91f2b77c256e6b4ed234a9722524c1c3acc626a28ff44c6376c09d93f24008abf54cd
-DIST xbmc-12.3.tar.gz 64615159 SHA256 3e15c960d034efdea5f92a7b74716cb48094842d077b076025fd8640754ede73 SHA512 abe5333f940460a2d40b04a4821f932b44c7605e0d4954e48781317aa25ee04e102b051165842094c5804024c637ca30506773dc3319aba7ab6dbfbe1973ccaa WHIRLPOOL 035cf5792c3c9785eb0a5227406c66298591bafc1251889d4e4a2742ffd715c374c0b6e092f5705db181412de9cae6d1eb3e9c370f3390858b4651f4c135fda1
-DIST xbmc-13.2-generated-addons.tar.xz 55008 SHA256 26d72e282f0458acb48b283edc27f7b71fc3f285344b8d4df6835a2520ae5650 SHA512 7b77bc22e0c665b74d90276cfa8b827222b22930f4d3bf335191dd5a8123f8bd74367de123199e124b02c7075aa81536058ace38926f4c03d0449ea55fd83254 WHIRLPOOL 449fe73e5ca7f5d973fb1d49e4e84f47955bced804bfea93a5bda67481af096dfa10581435fd84a26d59cb30f4b0eedd7096c905d5b1749286f85b042f90b626
-DIST xbmc-13.2.tar.gz 65900491 SHA256 acbf5dffa3034a3406240ee3cf81e721386cd383d23d056ddde1f769e050e585 SHA512 83a514410748b05da4c626caff34fec7b6b26a8bdea9f158e1c75721d3a47d36eb1f97ed4c162f6c2472a97f658e3b5285c1e0b144bfb4f654932586eee4d1c8 WHIRLPOOL 54e8551fa8393b9fd1076572e87b4d5a7e1b52acaa0443d14cfc8ed08e69a2efb86e3bb2cbe97d8894989ad7f892f512649165089e3d1035307f8cc820772e6f
-DIST xbmc_backports-12-1.tar.bz2 5010 SHA256 a222c32f5a4a0a8690b1544674cfbfeddf81943e85b6ea716768b83c9eba5fa8 SHA512 19b29808f7a3a7b0642f8463bdd229041588d2f42952fe55a17ab69b5b259cde249eb763598893463218d0ab6c747bf3c81e045bdbf5655f9f5f2d2067cb35d2 WHIRLPOOL cc6870dabca8b53a1a6055a4218a8f9bbb2c031ab3b928040325fb121ea75ae6db431542660d28c3bc6900a904e2c0949d69651b2f63faffe8bc7f670d519f06
diff --git a/media-tv/xbmc/files/generate.sh b/media-tv/xbmc/files/generate.sh
deleted file mode 100755
index 1e610a7a..00000000
--- a/media-tv/xbmc/files/generate.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-set -eux
-
-PV=$1
-PN=xbmc
-P="${PN}-${PV}"
-DISTDIR="/usr/portage/distfiles"
-
-rm -rf ${PN}-*/
-tar xf ${DISTDIR}/${P}.tar.gz
-cd ${PN}-*/
-make codegenerated -f codegenerator.mk -j
-cd ..
-tar cf - ${PN}-*/xbmc/interfaces/python/generated/*.cpp | xz > ${DISTDIR}/${P}-generated-addons.tar.xz
-rm -rf ${PN}-*/
diff --git a/media-tv/xbmc/files/xbmc-10.0-python-2.7.patch b/media-tv/xbmc/files/xbmc-10.0-python-2.7.patch
deleted file mode 100644
index e3d17a5e..00000000
--- a/media-tv/xbmc/files/xbmc-10.0-python-2.7.patch
+++ /dev/null
@@ -1,768 +0,0 @@
-patch from upstream
-
-https://bugs.gentoo.org/350098
-
-From ab0f816c6307f38d7248d0469379c981f94b816d Mon Sep 17 00:00:00 2001
-From: ceros7 <ceros7@568bbfeb-2a22-0410-94d2-cc84cf5bfa90>
-Date: Mon, 30 Aug 2010 16:46:50 +0000
-Subject: [PATCH] Support external python2.7.
-
-git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/python2.7@33342 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
----
- configure.in | 10 ++++++-
- xbmc/lib/libPython/XBPyThread.cpp | 5 +++-
- xbmc/lib/libPython/XBPyThread.h | 4 ++-
- xbmc/lib/libPython/XBPython.cpp | 24 +++++++++++++++-----
- xbmc/lib/libPython/XBPythonDll.cpp | 4 ++-
- xbmc/lib/libPython/XBPythonDllFuncs.S | 4 ++-
- xbmc/lib/libPython/linux/Makefile.in | 5 +++-
- xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/PythonAddon.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/PythonPlayer.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/action.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/control.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/controlbutton.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/controlcheckmark.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/controlfadelabel.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/controlgroup.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/controlimage.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/controllabel.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/controllist.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/controlprogress.cpp | 4 ++-
- .../libPython/xbmcmodule/controlradiobutton.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/controlslider.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/controlspin.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/controltextbox.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/dialog.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/dialog.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/infotagmusic.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/infotagvideo.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/keyboard.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/listitem.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/listitem.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/player.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/pyplaylist.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/pyplaylist.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/pyutil.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/window.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/winxml.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/winxml.h | 4 ++-
- xbmc/lib/libPython/xbmcmodule/winxmldialog.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/xbmcaddonmodule.cpp | 4 ++-
- xbmc/lib/libPython/xbmcmodule/xbmcguimodule.cpp | 5 +++-
- xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp | 4 ++-
- 42 files changed, 149 insertions(+), 48 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 4c0b1b7..cd3429e 100644
---- a/configure.in
-+++ b/configure.in
-@@ -901,7 +901,11 @@ fi
-
- # External Python
- if test "$use_external_python" = "yes"; then
-- AC_CHECK_LIB([python2.6], [main],
-+ AC_CHECK_LIB([python2.7], [main],
-+ [AC_DEFINE([HAVE_LIBPYTHON2_7], [1],
-+ [Define to 1 if you have the 'python2.7' library.])
-+ USE_PYTHON2_7=1],
-+ [AC_CHECK_LIB([python2.6], [main],
- [AC_DEFINE([HAVE_LIBPYTHON2_6], [1],
- [Define to 1 if you have the 'python2.6' library.])
- USE_PYTHON2_6=1],
-@@ -913,9 +917,10 @@ if test "$use_external_python" = "yes"; then
- [AC_DEFINE([HAVE_LIBPYTHON2_4], [1],
- [Define to 1 if you have the 'python2.4' library.])
- USE_PYTHON2_4=1],
-- [AC_MSG_ERROR($missing_library)] )] )] )
-+ [AC_MSG_ERROR($missing_library)] )] )] )] )
-
- AC_MSG_NOTICE($external_python_enabled)
-+ test "$USE_PYTHON2_7" && AC_MSG_NOTICE([Using Python 2.7])
- test "$USE_PYTHON2_6" && AC_MSG_NOTICE([Using Python 2.6])
- test "$USE_PYTHON2_5" && AC_MSG_NOTICE([Using Python 2.5])
- test "$USE_PYTHON2_4" && AC_MSG_NOTICE([Using Python 2.4])
-@@ -1471,6 +1476,7 @@ AC_SUBST(USE_INTERNAL_LIBDTS)
- AC_SUBST(USE_EXTERNAL_LIBMPEG2)
- AC_SUBST(USE_EXTERNAL_LIBWAVPACK)
- AC_SUBST(USE_EXTERNAL_PYTHON)
-+AC_SUBST(USE_PYTHON2_7)
- AC_SUBST(USE_PYTHON2_6)
- AC_SUBST(USE_PYTHON2_5)
- AC_SUBST(USE_PYTHON2_4)
-diff --git a/xbmc/lib/libPython/XBPyThread.cpp b/xbmc/lib/libPython/XBPyThread.cpp
-index 3a6f34e..71b4b9a 100644
---- a/xbmc/lib/libPython/XBPyThread.cpp
-+++ b/xbmc/lib/libPython/XBPyThread.cpp
-@@ -24,7 +24,10 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #include <python2.7/osdefs.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #include <python2.6/osdefs.h>
- #elif (defined HAVE_LIBPYTHON2_5)
-diff --git a/xbmc/lib/libPython/XBPyThread.h b/xbmc/lib/libPython/XBPyThread.h
-index c3da337..eea7fea 100644
---- a/xbmc/lib/libPython/XBPyThread.h
-+++ b/xbmc/lib/libPython/XBPyThread.h
-@@ -26,7 +26,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/XBPython.cpp b/xbmc/lib/libPython/XBPython.cpp
-index e52cdfb..defcf14 100644
---- a/xbmc/lib/libPython/XBPython.cpp
-+++ b/xbmc/lib/libPython/XBPython.cpp
-@@ -24,7 +24,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-@@ -61,7 +63,9 @@ XBPython g_pythonParser;
- #define PYTHON_DLL "special://xbmcbin/system/python/python24-x86-osx.so"
- #endif
- #elif defined(__x86_64__)
--#if (defined HAVE_LIBPYTHON2_6)
-+#if (defined HAVE_LIBPYTHON2_7)
-+#define PYTHON_DLL "special://xbmcbin/system/python/python27-x86_64-linux.so"
-+#elif (defined HAVE_LIBPYTHON2_6)
- #define PYTHON_DLL "special://xbmcbin/system/python/python26-x86_64-linux.so"
- #elif (defined HAVE_LIBPYTHON2_5)
- #define PYTHON_DLL "special://xbmcbin/system/python/python25-x86_64-linux.so"
-@@ -69,7 +73,9 @@ XBPython g_pythonParser;
- #define PYTHON_DLL "special://xbmcbin/system/python/python24-x86_64-linux.so"
- #endif
- #elif defined(_POWERPC)
--#if (defined HAVE_LIBPYTHON2_6)
-+#if (defined HAVE_LIBPYTHON2_7)
-+#define PYTHON_DLL "special://xbmcbin/system/python/python27-powerpc-linux.so"
-+#elif (defined HAVE_LIBPYTHON2_6)
- #define PYTHON_DLL "special://xbmcbin/system/python/python26-powerpc-linux.so"
- #elif (defined HAVE_LIBPYTHON2_5)
- #define PYTHON_DLL "special://xbmcbin/system/python/python25-powerpc-linux.so"
-@@ -77,7 +83,9 @@ XBPython g_pythonParser;
- #define PYTHON_DLL "special://xbmcbin/system/python/python24-powerpc-linux.so"
- #endif
- #elif defined(_POWERPC64)
--#if (defined HAVE_LIBPYTHON2_6)
-+#if (defined HAVE_LIBPYTHON2_7)
-+#define PYTHON_DLL "special://xbmcbin/system/python/python27-powerpc64-linux.so"
-+#elif (defined HAVE_LIBPYTHON2_6)
- #define PYTHON_DLL "special://xbmcbin/system/python/python26-powerpc64-linux.so"
- #elif (defined HAVE_LIBPYTHON2_5)
- #define PYTHON_DLL "special://xbmcbin/system/python/python25-powerpc64-linux.so"
-@@ -85,7 +93,9 @@ XBPython g_pythonParser;
- #define PYTHON_DLL "special://xbmcbin/system/python/python24-powerpc64-linux.so"
- #endif
- #elif defined(_ARMEL)
--#if (defined HAVE_LIBPYTHON2_6)
-+#if (defined HAVE_LIBPYTHON2_7)
-+#define PYTHON_DLL "special://xbmc/system/python/python27-arm.so"
-+#elif (defined HAVE_LIBPYTHON2_6)
- #define PYTHON_DLL "special://xbmc/system/python/python26-arm.so"
- #elif (defined HAVE_LIBPYTHON2_5)
- #define PYTHON_DLL "special://xbmc/system/python/python25-arm.so"
-@@ -93,7 +103,9 @@ XBPython g_pythonParser;
- #define PYTHON_DLL "special://xbmc/system/python/python24-arm.so"
- #endif
- #else /* !__x86_64__ && !__powerpc__ */
--#if (defined HAVE_LIBPYTHON2_6)
-+#if (defined HAVE_LIBPYTHON2_7)
-+#define PYTHON_DLL "special://xbmcbin/system/python/python27-i486-linux.so"
-+#elif (defined HAVE_LIBPYTHON2_6)
- #define PYTHON_DLL "special://xbmcbin/system/python/python26-i486-linux.so"
- #elif (defined HAVE_LIBPYTHON2_5)
- #define PYTHON_DLL "special://xbmcbin/system/python/python25-i486-linux.so"
-diff --git a/xbmc/lib/libPython/XBPythonDll.cpp b/xbmc/lib/libPython/XBPythonDll.cpp
-index bc9d827..87ac7d7 100644
---- a/xbmc/lib/libPython/XBPythonDll.cpp
-+++ b/xbmc/lib/libPython/XBPythonDll.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/pyconfig.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/pyconfig.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/pyconfig.h>
-diff --git a/xbmc/lib/libPython/XBPythonDllFuncs.S b/xbmc/lib/libPython/XBPythonDllFuncs.S
-index 6b7a6c3..f59b192 100644
---- a/xbmc/lib/libPython/XBPythonDllFuncs.S
-+++ b/xbmc/lib/libPython/XBPythonDllFuncs.S
-@@ -2,7 +2,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/pyconfig.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/pyconfig.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/pyconfig.h>
-diff --git a/xbmc/lib/libPython/linux/Makefile.in b/xbmc/lib/libPython/linux/Makefile.in
-index 7011434..0786937 100644
---- a/xbmc/lib/libPython/linux/Makefile.in
-+++ b/xbmc/lib/libPython/linux/Makefile.in
-@@ -5,7 +5,10 @@ LDFLAGS=@LDFLAGS@
- SHELL=/bin/bash
- SYSDIR=../../../../system/python
-
--ifeq (@USE_PYTHON2_6@,1)
-+ifeq (@USE_PYTHON2_7@,1)
-+ PYVERSION=python2.7
-+ SO=python27-$(ARCH).so
-+else ifeq (@USE_PYTHON2_6@,1)
- PYVERSION=python2.6
- SO=python26-$(ARCH).so
- else ifeq (@USE_PYTHON2_5@,1)
-diff --git a/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.h b/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.h
-index 620d9bd..06fa146 100644
---- a/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.h
-+++ b/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.h
-@@ -26,7 +26,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/PythonAddon.h b/xbmc/lib/libPython/xbmcmodule/PythonAddon.h
-index ec7ed28..41eb8ea 100644
---- a/xbmc/lib/libPython/xbmcmodule/PythonAddon.h
-+++ b/xbmc/lib/libPython/xbmcmodule/PythonAddon.h
-@@ -25,7 +25,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/PythonPlayer.h b/xbmc/lib/libPython/xbmcmodule/PythonPlayer.h
-index ecee993..24a1c87 100644
---- a/xbmc/lib/libPython/xbmcmodule/PythonPlayer.h
-+++ b/xbmc/lib/libPython/xbmcmodule/PythonPlayer.h
-@@ -25,7 +25,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/action.h b/xbmc/lib/libPython/xbmcmodule/action.h
-index 0e20000..7f8b1bc 100644
---- a/xbmc/lib/libPython/xbmcmodule/action.h
-+++ b/xbmc/lib/libPython/xbmcmodule/action.h
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/control.h b/xbmc/lib/libPython/xbmcmodule/control.h
-index c76b37c..a9ec63d 100644
---- a/xbmc/lib/libPython/xbmcmodule/control.h
-+++ b/xbmc/lib/libPython/xbmcmodule/control.h
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controlbutton.cpp b/xbmc/lib/libPython/xbmcmodule/controlbutton.cpp
-index b24ccce..7455ca7 100644
---- a/xbmc/lib/libPython/xbmcmodule/controlbutton.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controlbutton.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controlcheckmark.cpp b/xbmc/lib/libPython/xbmcmodule/controlcheckmark.cpp
-index 96e4743..86a7d8b 100644
---- a/xbmc/lib/libPython/xbmcmodule/controlcheckmark.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controlcheckmark.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controlfadelabel.cpp b/xbmc/lib/libPython/xbmcmodule/controlfadelabel.cpp
-index 68442d8..c6eb052 100644
---- a/xbmc/lib/libPython/xbmcmodule/controlfadelabel.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controlfadelabel.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controlgroup.cpp b/xbmc/lib/libPython/xbmcmodule/controlgroup.cpp
-index aadfc17..8275324 100644
---- a/xbmc/lib/libPython/xbmcmodule/controlgroup.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controlgroup.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controlimage.cpp b/xbmc/lib/libPython/xbmcmodule/controlimage.cpp
-index 79835d6..f106e90 100644
---- a/xbmc/lib/libPython/xbmcmodule/controlimage.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controlimage.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controllabel.cpp b/xbmc/lib/libPython/xbmcmodule/controllabel.cpp
-index aca22e4..38a9c07 100644
---- a/xbmc/lib/libPython/xbmcmodule/controllabel.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controllabel.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controllist.cpp b/xbmc/lib/libPython/xbmcmodule/controllist.cpp
-index 0c67b5c..bb57776 100644
---- a/xbmc/lib/libPython/xbmcmodule/controllist.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controllist.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controlprogress.cpp b/xbmc/lib/libPython/xbmcmodule/controlprogress.cpp
-index a21e462..b460a2a 100644
---- a/xbmc/lib/libPython/xbmcmodule/controlprogress.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controlprogress.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controlradiobutton.cpp b/xbmc/lib/libPython/xbmcmodule/controlradiobutton.cpp
-index ec54efd..b966a17 100644
---- a/xbmc/lib/libPython/xbmcmodule/controlradiobutton.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controlradiobutton.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controlslider.cpp b/xbmc/lib/libPython/xbmcmodule/controlslider.cpp
-index 21ea5e7..c5f65b3 100644
---- a/xbmc/lib/libPython/xbmcmodule/controlslider.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controlslider.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controlspin.cpp b/xbmc/lib/libPython/xbmcmodule/controlspin.cpp
-index 4e24e14..feead3c 100644
---- a/xbmc/lib/libPython/xbmcmodule/controlspin.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controlspin.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/controltextbox.cpp b/xbmc/lib/libPython/xbmcmodule/controltextbox.cpp
-index b4c44d5..4a7c688 100644
---- a/xbmc/lib/libPython/xbmcmodule/controltextbox.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/controltextbox.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/dialog.cpp b/xbmc/lib/libPython/xbmcmodule/dialog.cpp
-index caa8986..cffe485 100644
---- a/xbmc/lib/libPython/xbmcmodule/dialog.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/dialog.cpp
-@@ -24,7 +24,9 @@
- #endif
- #include "dialog.h"
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/dialog.h b/xbmc/lib/libPython/xbmcmodule/dialog.h
-index edcae41..a61c4b1 100644
---- a/xbmc/lib/libPython/xbmcmodule/dialog.h
-+++ b/xbmc/lib/libPython/xbmcmodule/dialog.h
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/infotagmusic.h b/xbmc/lib/libPython/xbmcmodule/infotagmusic.h
-index d202e48..590b858 100644
---- a/xbmc/lib/libPython/xbmcmodule/infotagmusic.h
-+++ b/xbmc/lib/libPython/xbmcmodule/infotagmusic.h
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/infotagvideo.h b/xbmc/lib/libPython/xbmcmodule/infotagvideo.h
-index f2bb300..e808573 100644
---- a/xbmc/lib/libPython/xbmcmodule/infotagvideo.h
-+++ b/xbmc/lib/libPython/xbmcmodule/infotagvideo.h
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/keyboard.h b/xbmc/lib/libPython/xbmcmodule/keyboard.h
-index e5c817f..0f069e3 100644
---- a/xbmc/lib/libPython/xbmcmodule/keyboard.h
-+++ b/xbmc/lib/libPython/xbmcmodule/keyboard.h
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/listitem.cpp b/xbmc/lib/libPython/xbmcmodule/listitem.cpp
-index 137436e..20105ef 100644
---- a/xbmc/lib/libPython/xbmcmodule/listitem.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/listitem.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/listitem.h b/xbmc/lib/libPython/xbmcmodule/listitem.h
-index 7ebcd6c..3d4a6c8 100644
---- a/xbmc/lib/libPython/xbmcmodule/listitem.h
-+++ b/xbmc/lib/libPython/xbmcmodule/listitem.h
-@@ -25,7 +25,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/player.h b/xbmc/lib/libPython/xbmcmodule/player.h
-index 48dc9c7..34a102d 100644
---- a/xbmc/lib/libPython/xbmcmodule/player.h
-+++ b/xbmc/lib/libPython/xbmcmodule/player.h
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/pyplaylist.cpp b/xbmc/lib/libPython/xbmcmodule/pyplaylist.cpp
-index c7e7f62..6df8548 100644
---- a/xbmc/lib/libPython/xbmcmodule/pyplaylist.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/pyplaylist.cpp
-@@ -26,7 +26,9 @@
- #include "Util.h"
- #include "pyplaylist.h"
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/pyplaylist.h b/xbmc/lib/libPython/xbmcmodule/pyplaylist.h
-index f2334bb..2410314 100644
---- a/xbmc/lib/libPython/xbmcmodule/pyplaylist.h
-+++ b/xbmc/lib/libPython/xbmcmodule/pyplaylist.h
-@@ -25,7 +25,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/pyutil.h b/xbmc/lib/libPython/xbmcmodule/pyutil.h
-index 4acf6e5..1a156f8 100644
---- a/xbmc/lib/libPython/xbmcmodule/pyutil.h
-+++ b/xbmc/lib/libPython/xbmcmodule/pyutil.h
-@@ -25,7 +25,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/window.h b/xbmc/lib/libPython/xbmcmodule/window.h
-index 6ce8e72..40304ff 100644
---- a/xbmc/lib/libPython/xbmcmodule/window.h
-+++ b/xbmc/lib/libPython/xbmcmodule/window.h
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/winxml.cpp b/xbmc/lib/libPython/xbmcmodule/winxml.cpp
-index d3b703f..3e1b3c8 100644
---- a/xbmc/lib/libPython/xbmcmodule/winxml.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/winxml.cpp
-@@ -24,7 +24,9 @@
- #endif
- #include "winxml.h"
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/winxml.h b/xbmc/lib/libPython/xbmcmodule/winxml.h
-index 6e6489e..f3a8dd8 100644
---- a/xbmc/lib/libPython/xbmcmodule/winxml.h
-+++ b/xbmc/lib/libPython/xbmcmodule/winxml.h
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/winxmldialog.cpp b/xbmc/lib/libPython/xbmcmodule/winxmldialog.cpp
-index b021501..92d9903 100644
---- a/xbmc/lib/libPython/xbmcmodule/winxmldialog.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/winxmldialog.cpp
-@@ -24,7 +24,9 @@
- #endif
- #include "winxml.h"
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/xbmcaddonmodule.cpp b/xbmc/lib/libPython/xbmcmodule/xbmcaddonmodule.cpp
-index b8bc0a3..c65aded 100644
---- a/xbmc/lib/libPython/xbmcmodule/xbmcaddonmodule.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/xbmcaddonmodule.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
-diff --git a/xbmc/lib/libPython/xbmcmodule/xbmcguimodule.cpp b/xbmc/lib/libPython/xbmcmodule/xbmcguimodule.cpp
-index 87c0ead..9941769 100644
---- a/xbmc/lib/libPython/xbmcmodule/xbmcguimodule.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/xbmcguimodule.cpp
-@@ -23,7 +23,10 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #include <python2.7/structmember.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #include <python2.6/structmember.h>
- #elif (defined HAVE_LIBPYTHON2_5)
-diff --git a/xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp b/xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp
-index 3bab5a9..1e2c480 100644
---- a/xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp
-+++ b/xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp
-@@ -23,7 +23,9 @@
- #include "config.h"
- #endif
- #if (defined USE_EXTERNAL_PYTHON)
-- #if (defined HAVE_LIBPYTHON2_6)
-+ #if (defined HAVE_LIBPYTHON2_7)
-+ #include <python2.7/Python.h>
-+ #elif (defined HAVE_LIBPYTHON2_6)
- #include <python2.6/Python.h>
- #elif (defined HAVE_LIBPYTHON2_5)
- #include <python2.5/Python.h>
---
-1.7.3.1
-
diff --git a/media-tv/xbmc/files/xbmc-10.1-gcc-4.6.patch b/media-tv/xbmc/files/xbmc-10.1-gcc-4.6.patch
deleted file mode 100644
index b3e8c7c2..00000000
--- a/media-tv/xbmc/files/xbmc-10.1-gcc-4.6.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-http://trac.xbmc.org/ticket/11383
-http://bugs.gentoo.org/367261
-
-From c66099c4d8e6b2d748ca3ddc31ee90b731d0f620 Mon Sep 17 00:00:00 2001
-From: Stephan Raue <stephan@openelec.tv>
-Date: Wed, 30 Mar 2011 14:57:28 +0200
-Subject: [PATCH] dvdplayer: fix build with gcc-4.6. Flags to the Linker must be passed via -Wl,. This fixes ticket #11383
-
-Signed-off-by: Stephan Raue <stephan@openelec.tv>
----
- xbmc/cores/dvdplayer/Codecs/Makefile.in | 18 +++++++++---------
- xbmc/cores/dvdplayer/Codecs/libdvd/Makefile.in | 4 ++--
- 2 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/xbmc/cores/dvdplayer/Codecs/Makefile.in b/xbmc/cores/dvdplayer/Codecs/Makefile.in
-index a7ef1a0..308664a 100644
---- a/xbmc/cores/dvdplayer/Codecs/Makefile.in
-+++ b/xbmc/cores/dvdplayer/Codecs/Makefile.in
-@@ -148,32 +148,32 @@ liba52:
- else
-
- $(SYSDIR)/avutil-50-$(ARCH).so: ffmpeg/libavutil/libavutil.so
-- $(CC) -o $@ $(LDFLAGS) --soname,$@ -Wl,-Bsymbolic \
-+ $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ -Wl,-Bsymbolic \
- ffmpeg/libavutil/*.o `cat $(WRAPPER:.o=.def)` $(WRAPPER)
-
- $(SYSDIR)/avcodec-52-$(ARCH).so: $(WRAPPER) ffmpeg/libavcodec/libavcodec.so
-- $(CC) -o $@ $(LDFLAGS) --soname,$@ -Wl,-Bsymbolic \
-+ $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ -Wl,-Bsymbolic \
- ffmpeg/libavcodec/*.o ffmpeg/libavcodec/$(ARCH_DIR)/*.o \
- `cat $(WRAPPER:.o=.def)` $(WRAPPER)
-
- $(SYSDIR)/avformat-52-$(ARCH).so: $(WRAPPER) ffmpeg/libavformat/libavformat.so
-- $(CC) -o $@ $(LDFLAGS) --soname,$@ -Wl,-Bsymbolic \
-+ $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ -Wl,-Bsymbolic \
- ffmpeg/libavformat/*.o `cat $(WRAPPER:.o=.def)` $(WRAPPER)
-
- ifneq ($(ARCH), arm)
- $(SYSDIR)/swscale-0.6.1-$(ARCH).so: $(WRAPPER) ffmpeg/libswscale/libswscale.so
-- $(CC) -o $@ $(LDFLAGS) --soname,$@ -Wl,-Bsymbolic \
-+ $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ -Wl,-Bsymbolic \
- ffmpeg/libswscale/*.o ffmpeg/libswscale/$(ARCH_DIR)/*.o \
- `cat $(WRAPPER:.o=.def)` $(WRAPPER)
- else # No ARM version of swscale available yet.
- $(SYSDIR)/swscale-0.6.1-$(ARCH).so: $(WRAPPER) ffmpeg/libswscale/libswscale.so
-- $(CC) -o $@ $(LDFLAGS) --soname,$@ -Wl,-Bsymbolic \
-+ $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ -Wl,-Bsymbolic \
- ffmpeg/libswscale/*.o \
- `cat $(WRAPPER:.o=.def)` $(WRAPPER)
- endif
-
- $(SYSDIR)/postproc-51-$(ARCH).so: $(WRAPPER) ffmpeg/libpostproc/libpostproc.so
-- $(CC) -o $@ $(LDFLAGS) --soname,$@ -Wl,-Bsymbolic \
-+ $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ -Wl,-Bsymbolic \
- ffmpeg/libpostproc/*.o `cat $(WRAPPER:.o=.def)` $(WRAPPER)
-
- ffmpeg/libavutil/libavutil.so : ffmpeg;
-@@ -185,17 +185,17 @@ ffmpeg:
- $(MAKE) -C $@
-
- $(SYSDIR)/libdts-$(ARCH).so: $(WRAPPER) libdts/libdts/libdts.a
-- $(CC) -o $@ $(LDFLAGS) --soname,$@ \
-+ $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ \
- libdts/libdts/bitstream.o \
- libdts/libdts/downmix.o libdts/libdts/parse.o \
- `cat $(WRAPPER:.o=.def)` $(WRAPPER)
-
- $(SYSDIR)/liba52-$(ARCH).so: $(WRAPPER) liba52/liba52/liba52.la
-- $(CC) -o $@ $(LDFLAGS) --soname,$@ liba52/liba52/.libs/*.o \
-+ $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ liba52/liba52/.libs/*.o \
- -Wl`cat $(WRAPPER:.o=.def)` $(WRAPPER)
-
- $(SYSDIR)/libao-$(ARCH).so: $(WRAPPER) liba52/libao/libao.a
-- $(CC) -o $@ $(LDFLAGS) --soname,$@ liba52/libao/libao.a \
-+ $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ liba52/libao/libao.a \
- -Wl`cat $(WRAPPER:.o=.def)` $(WRAPPER)
-
- libdts/libdts/libdts.a : libdts;
-diff --git a/xbmc/cores/dvdplayer/Codecs/libdvd/Makefile.in b/xbmc/cores/dvdplayer/Codecs/libdvd/Makefile.in
-index 3c487e9..6d4abd4 100644
---- a/xbmc/cores/dvdplayer/Codecs/libdvd/Makefile.in
-+++ b/xbmc/cores/dvdplayer/Codecs/libdvd/Makefile.in
-@@ -49,12 +49,12 @@ $(SYSDIR)/libdvdnav-$(ARCH).so: $(WRAPPER_OSX) $(DVDCSS_A) libdvdread/obj/libdvd
- else
-
- $(SYSDIR)/libdvdcss-$(ARCH).so: $(WRAPPER) libdvdcss/src/.libs/libdvdcss.a
-- $(CC) -o $@ $(LDFLAGS) --soname,$@ \
-+ $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ \
- libdvdcss/src/*.o \
- `cat $(WRAPPER:.o=.def)` $(WRAPPER)
-
- $(SYSDIR)/libdvdnav-$(ARCH).so: $(WRAPPER) $(DVDCSS_A) libdvdread/obj/libdvdread.a libdvdnav/obj/libdvdnav.a
-- $(CC) -o $@ $(LDFLAGS) --soname,$@ $(DVDCSS_O) libdvdread/obj/*.o libdvdnav/obj/*.o \
-+ $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ $(DVDCSS_O) libdvdread/obj/*.o libdvdnav/obj/*.o \
- `cat $(WRAPPER:.o=.def)` $(WRAPPER)
-
- endif
---
-1.7.0.2
-
diff --git a/media-tv/xbmc/files/xbmc-10.1-headers.patch b/media-tv/xbmc/files/xbmc-10.1-headers.patch
deleted file mode 100644
index 8c23db86..00000000
--- a/media-tv/xbmc/files/xbmc-10.1-headers.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/tools/TexturePacker/XBTFWriter.cpp
-+++ b/tools/TexturePacker/XBTFWriter.cpp
-@@ -28,6 +28,7 @@
- #include "EndianSwap.h"
- #define __STDC_FORMAT_MACROS
- #include <inttypes.h>
-+#include <unistd.h> /* for unlink() prototype */
-
- #define TEMP_FILE "temp.xbt"
- #define TEMP_SIZE (10*1024*1024)
diff --git a/media-tv/xbmc/files/xbmc-10.1-libpng-1.5.patch b/media-tv/xbmc/files/xbmc-10.1-libpng-1.5.patch
deleted file mode 100644
index 4d992275..00000000
--- a/media-tv/xbmc/files/xbmc-10.1-libpng-1.5.patch
+++ /dev/null
@@ -1,596 +0,0 @@
-fix building with newer libpng. patch by Ian Stakenvicius.
-
-https://bugs.gentoo.org/380127
-
---- a/xbmc/lib/cximage-6.0/CxImage/ximapng.h
-+++ b/xbmc/lib/cximage-6.0/CxImage/ximapng.h
-@@ -69,8 +69,13 @@
-
- static void PNGAPI user_error_fn(png_structp png_ptr,png_const_charp error_msg)
- {
-+#if PNG_LIBPNG_VER > 10399
-+ strncpy((char*)png_get_error_ptr(png_ptr),error_msg,255);
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- strncpy((char*)png_ptr->error_ptr,error_msg,255);
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
- };
-
---- a/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp
-+++ b/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp
-@@ -15,7 +15,11 @@
- void CxImagePNG::ima_png_error(png_struct *png_ptr, char *message)
- {
- strcpy(info.szLastError,message);
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
- ////////////////////////////////////////////////////////////////////////////////
- #if CXIMAGE_SUPPORT_DECODE
-@@ -62,7 +66,11 @@
- /* Set error handling if you are using the setjmp/longjmp method (this is
- * the normal method of doing things with libpng). REQUIRED unless you
- * set up your own error handlers in the png_create_read_struct() earlier. */
-+#if PNG_LIBPNG_VER > 10399
-+ if (setjmp(png_jmpbuf(png_ptr))) {
-+#else
- if (setjmp(png_ptr->jmpbuf)) {
-+#endif
- /* Free all of the memory associated with the png_ptr and info_ptr */
- delete [] row_pointers;
- png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
-@@ -70,16 +78,35 @@
- /* read the file information */
- png_read_info(png_ptr, info_ptr);
-
-+ png_uint_32 _width,_height;
-+ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type;
-+#if PNG_LIBPNG_VER > 10399
-+ png_get_IHDR(png_ptr,info_ptr,&_width,&_height,&_bit_depth,&_color_type,
-+ &_interlace_type,&_compression_type,&_filter_type);
-+#else
-+ _width=info_ptr->width;
-+ _height=info_ptr->height;
-+ _bit_depth=info_ptr->bit_depth;
-+ _color_type=info_ptr->color_type;
-+ _interlace_type=info_ptr->interlace_type;
-+ _compression_type=info_ptr->compression_type;
-+ _filter_type=info_ptr->filter_type;
-+#endif
-+
- if (info.nEscape == -1){
-- head.biWidth = info_ptr->width;
-- head.biHeight= info_ptr->height;
-+ head.biWidth = _width;
-+ head.biHeight= _height;
- info.dwType = CXIMAGE_FORMAT_PNG;
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
-
- /* calculate new number of channels */
- int channels=0;
-- switch(info_ptr->color_type){
-+ switch(_color_type){
- case PNG_COLOR_TYPE_GRAY:
- case PNG_COLOR_TYPE_PALETTE:
- channels = 1;
-@@ -101,71 +128,108 @@
- break;
- default:
- strcpy(info.szLastError,"unknown PNG color type");
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
-
- //find the right pixel depth used for cximage
-+#if PNG_LIBPNG_VER > 10399
-+ int pixel_depth = _bit_depth * png_get_channels(png_ptr,info_ptr);
-+#else
- int pixel_depth = info_ptr->pixel_depth;
-+#endif
- if (channels == 1 && pixel_depth>8) pixel_depth=8;
- if (channels == 2) pixel_depth=8;
- if (channels >= 3) pixel_depth=24;
-
-- if (!Create(info_ptr->width, info_ptr->height, pixel_depth, CXIMAGE_FORMAT_PNG)){
-+ if (!Create(_width, _height, pixel_depth, CXIMAGE_FORMAT_PNG)){
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
-
- /* get metrics */
-- switch (info_ptr->phys_unit_type)
-+ png_uint_32 _x_pixels_per_unit,_y_pixels_per_unit;
-+ int _phys_unit_type;
-+#if PNG_LIBPNG_VER > 10399
-+ png_get_pHYs(png_ptr,info_ptr,&_x_pixels_per_unit,&_y_pixels_per_unit,&_phys_unit_type);
-+#else
-+ _x_pixels_per_unit=info_ptr->x_pixels_per_unit;
-+ _y_pixels_per_unit=info_ptr->y_pixels_per_unit;
-+ _phys_unit_type=info_ptr->phys_unit_type;
-+#endif
-+ switch (_phys_unit_type)
- {
- case PNG_RESOLUTION_UNKNOWN:
-- SetXDPI(info_ptr->x_pixels_per_unit);
-- SetYDPI(info_ptr->y_pixels_per_unit);
-+ SetXDPI(_x_pixels_per_unit);
-+ SetYDPI(_y_pixels_per_unit);
- break;
- case PNG_RESOLUTION_METER:
-- SetXDPI((long)floor(info_ptr->x_pixels_per_unit * 254.0 / 10000.0 + 0.5));
-- SetYDPI((long)floor(info_ptr->y_pixels_per_unit * 254.0 / 10000.0 + 0.5));
-+ SetXDPI((long)floor(_x_pixels_per_unit * 254.0 / 10000.0 + 0.5));
-+ SetYDPI((long)floor(_y_pixels_per_unit * 254.0 / 10000.0 + 0.5));
- break;
- }
-
-- if (info_ptr->num_palette>0){
-- SetPalette((rgb_color*)info_ptr->palette,info_ptr->num_palette);
-- SetClrImportant(info_ptr->num_palette);
-- } else if (info_ptr->bit_depth ==2) { //<DP> needed for 2 bpp grayscale PNGs
-+ int _num_palette;
-+ png_colorp _palette;
-+#if PNG_LIBPNG_VER > 10399
-+ png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette);
-+#else
-+ _num_palette=info_ptr->num_palette;
-+ _palette=info_ptr->palette;
-+#endif
-+ if (_num_palette>0){
-+ SetPalette((rgb_color*)_palette,_num_palette);
-+ SetClrImportant(_num_palette);
-+ } else if (_bit_depth ==2) { //<DP> needed for 2 bpp grayscale PNGs
- SetPaletteColor(0,0,0,0);
- SetPaletteColor(1,85,85,85);
- SetPaletteColor(2,170,170,170);
- SetPaletteColor(3,255,255,255);
- } else SetGrayPalette(); //<DP> needed for grayscale PNGs
-
-- int nshift = max(0,(info_ptr->bit_depth>>3)-1)<<3;
-+ int nshift = max(0,(_bit_depth>>3)-1)<<3;
-
-- if (info_ptr->num_trans!=0){ //palette transparency
-- if (info_ptr->num_trans==1){
-- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE){
-+ png_bytep _trans_alpha;
-+ int _num_trans;
-+ png_color_16p _trans_color;
-+#if PNG_LIBPNG_VER > 10399
-+ png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color);
-+#else
-+ _num_trans=info_ptr->num_trans;
-+#endif
-+ if (_num_trans!=0){ //palette transparency
-+ if (_num_trans==1){
-+ if (_color_type == PNG_COLOR_TYPE_PALETTE){
- #if PNG_LIBPNG_VER > 10399
-- info.nBkgndIndex = info_ptr->trans_color.index;
-+ info.nBkgndIndex = _trans_color->index;
- #else
- info.nBkgndIndex = info_ptr->trans_values.index;
- #endif
- } else{
- #if PNG_LIBPNG_VER > 10399
-- info.nBkgndIndex = info_ptr->trans_color.gray>>nshift;
-+ info.nBkgndIndex = _trans_color->gray>>nshift;
- #else
- info.nBkgndIndex = info_ptr->trans_values.gray>>nshift;
- #endif
- }
- }
-- if (info_ptr->num_trans>1){
-+ if (_num_trans>1){
- RGBQUAD* pal=GetPalette();
- if (pal){
- DWORD ip;
-- for (ip=0;ip<min(head.biClrUsed,(unsigned long)info_ptr->num_trans);ip++)
-+ for (ip=0;ip<min(head.biClrUsed,(unsigned long)_num_trans);ip++)
- #if PNG_LIBPNG_VER > 10399
-- pal[ip].rgbReserved=info_ptr->trans_alpha[ip];
-+ pal[ip].rgbReserved=_trans_alpha[ip];
- #else
- pal[ip].rgbReserved=info_ptr->trans[ip];
- #endif
-- for (ip=info_ptr->num_trans;ip<head.biClrUsed;ip++){
-+ for (ip=_num_trans;ip<head.biClrUsed;ip++){
- pal[ip].rgbReserved=255;
- }
- info.bAlphaPaletteEnabled=true;
-@@ -174,14 +238,12 @@
- }
-
- if (channels == 3){ //check RGB binary transparency
-- png_bytep trans;
-- int num_trans;
-- png_color_16 *image_background;
-- if (png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &image_background)){
--#if PNG_LIBPNG_VER > 10399
-- info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_color.red>>nshift);
-- info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_color.green>>nshift);
-- info.nBkgndColor.rgbBlue = (BYTE)(info_ptr->trans_color.blue>>nshift);
-+ /* seems unnecessary to call again, but the conditional must be important so... */
-+ if (png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color)){
-+#if PNG_LIBPNG_VER > 10399
-+ info.nBkgndColor.rgbRed = (BYTE)(_trans_color->red>>nshift);
-+ info.nBkgndColor.rgbGreen = (BYTE)(_trans_color->green>>nshift);
-+ info.nBkgndColor.rgbBlue = (BYTE)(_trans_color->blue>>nshift);
- #else
- info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_values.red>>nshift);
- info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_values.green>>nshift);
-@@ -202,15 +264,24 @@
- }
-
- // <vho> - flip the RGB pixels to BGR (or RGBA to BGRA)
-- if (info_ptr->color_type & PNG_COLOR_MASK_COLOR){
-+ if (_color_type & PNG_COLOR_MASK_COLOR){
- png_set_bgr(png_ptr);
- }
-
- // <vho> - handle cancel
-- if (info.nEscape) longjmp(png_ptr->jmpbuf, 1);
-+ if (info.nEscape)
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
-+ longjmp(png_ptr->jmpbuf, 1);
-+#endif
-
- // row_bytes is the width x number of channels x (bit-depth / 8)
-+#if PNG_LIBPNG_VER > 10399
-+ row_pointers = new BYTE[png_get_rowbytes(png_ptr,info_ptr) + 8];
-+#else
- row_pointers = new BYTE[info_ptr->rowbytes + 8];
-+#endif
-
- // turn on interlace handling
- int number_passes = png_set_interlace_handling(png_ptr);
-@@ -221,8 +292,12 @@
- SetCodecOption(0);
- }
-
-- int chan_offset = info_ptr->bit_depth >> 3;
-+ int chan_offset = _bit_depth >> 3;
-+#if PNG_LIBPNG_VER > 10399
-+ int pixel_offset = (_bit_depth * png_get_channels(png_ptr,info_ptr)) >> 3;
-+#else
- int pixel_offset = info_ptr->pixel_depth >> 3;
-+#endif
-
- for (int pass=0; pass < number_passes; pass++) {
- iter.Upset();
-@@ -230,7 +305,12 @@
- do {
-
- // <vho> - handle cancel
-- if (info.nEscape) longjmp(png_ptr->jmpbuf, 1);
-+ if (info.nEscape)
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
-+ longjmp(png_ptr->jmpbuf, 1);
-+#endif
-
- #if CXIMAGE_SUPPORT_ALPHA // <vho>
- if (AlphaIsValid()) {
-@@ -241,7 +321,7 @@
- BYTE* prow= iter.GetRow(ay);
-
- //recover data from previous scan
-- if (info_ptr->interlace_type && pass>0 && pass!=7){
-+ if (_interlace_type && pass>0 && pass!=7){
- for(ax=0;ax<head.biWidth;ax++){
- long px = ax * pixel_offset;
- if (channels == 2){
-@@ -278,10 +358,14 @@
- #endif // CXIMAGE_SUPPORT_ALPHA // vho
- {
- //recover data from previous scan
-- if (info_ptr->interlace_type && pass>0){
-+ if (_interlace_type && pass>0){
-+#if PNG_LIBPNG_VER > 10399
-+ iter.GetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr));
-+#else
- iter.GetRow(row_pointers, info_ptr->rowbytes);
-+#endif
- //re-expand buffer for images with bit depth > 8
-- if (info_ptr->bit_depth > 8){
-+ if (_bit_depth > 8){
- for(long ax=(head.biWidth*channels-1);ax>=0;ax--)
- row_pointers[ax*chan_offset] = row_pointers[ax];
- }
-@@ -291,15 +375,19 @@
- png_read_row(png_ptr, row_pointers, NULL);
-
- //shrink 16 bit depth images down to 8 bits
-- if (info_ptr->bit_depth > 8){
-+ if (_bit_depth > 8){
- for(long ax=0;ax<(head.biWidth*channels);ax++)
- row_pointers[ax] = row_pointers[ax*chan_offset];
- }
-
- //copy the pixels
-+#if PNG_LIBPNG_VER > 10399
-+ iter.SetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr));
-+#else
- iter.SetRow(row_pointers, info_ptr->rowbytes);
-+#endif
- //<DP> expand 2 bpp images only in the last pass
-- if (info_ptr->bit_depth==2 && pass==(number_passes-1))
-+ if (_bit_depth==2 && pass==(number_passes-1))
- expand2to4bpp(iter.GetRow());
-
- //go on
-@@ -361,9 +449,13 @@
- /* Set error handling. REQUIRED if you aren't supplying your own
- * error hadnling functions in the png_create_write_struct() call.
- */
-+#if PNG_LIBPNG_VER > 10399
-+ if (setjmp(png_jmpbuf(png_ptr))){
-+#else
- if (setjmp(png_ptr->jmpbuf)){
- /* If we get here, we had a problem reading the file */
- if (info_ptr->palette) free(info_ptr->palette);
-+#endif
- png_destroy_write_struct(&png_ptr, (png_infopp)&info_ptr);
- cx_throw("Error saving PNG file");
- }
-@@ -372,9 +464,23 @@
- //png_init_io(png_ptr, hFile);
-
- // use custom I/O functions
-- png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data);
-+ png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data);
-
- /* set the file information here */
-+#if PNG_LIBPNG_VER > 10399
-+ /* use variables to hold the values so it isnt necessary to png_get them later */
-+ png_uint_32 _width,_height;
-+ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type;
-+ png_byte _channels,_pixel_depth;
-+
-+ _width = GetWidth();
-+ _height = GetHeight();
-+ _pixel_depth = (BYTE)GetBpp();
-+ _channels = (GetBpp()>8) ? (BYTE)3: (BYTE)1;
-+ _bit_depth = (BYTE)(GetBpp()/_channels);
-+ _compression_type = PNG_COMPRESSION_TYPE_DEFAULT;
-+ _filter_type = PNG_FILTER_TYPE_DEFAULT;
-+#else
- info_ptr->width = GetWidth();
- info_ptr->height = GetHeight();
- info_ptr->pixel_depth = (BYTE)GetBpp();
-@@ -382,13 +488,22 @@
- info_ptr->bit_depth = (BYTE)(GetBpp()/info_ptr->channels);
- info_ptr->compression_type = info_ptr->filter_type = 0;
- info_ptr->valid = 0;
-+#endif
-
- switch(GetCodecOption(CXIMAGE_FORMAT_PNG)){
- case 1:
-+#if PNG_LIBPNG_VER > 10399
-+ _interlace_type = PNG_INTERLACE_ADAM7;
-+#else
- info_ptr->interlace_type = PNG_INTERLACE_ADAM7;
-+#endif
- break;
- default:
-+#if PNG_LIBPNG_VER > 10399
-+ _interlace_type = PNG_INTERLACE_NONE;
-+#else
- info_ptr->interlace_type = PNG_INTERLACE_NONE;
-+#endif
- }
-
- /* set compression level */
-@@ -398,22 +513,47 @@
-
- if (GetNumColors()){
- if (bGrayScale){
-+#if PNG_LIBPNG_VER > 10399
-+ _color_type = PNG_COLOR_TYPE_GRAY;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
-+#endif
- } else {
-+#if PNG_LIBPNG_VER > 10399
-+ _color_type = PNG_COLOR_TYPE_PALETTE;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
-+#endif
- }
- } else {
-+#if PNG_LIBPNG_VER > 10399
-+ _color_type = PNG_COLOR_TYPE_RGB;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
-+#endif
- }
- #if CXIMAGE_SUPPORT_ALPHA
- if (AlphaIsValid()){
-+#if PNG_LIBPNG_VER > 10399
-+ _color_type |= PNG_COLOR_MASK_ALPHA;
-+ _channels++;
-+ _bit_depth = 8;
-+ _pixel_depth += 8;
-+#else
- info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
- info_ptr->channels++;
- info_ptr->bit_depth = 8;
- info_ptr->pixel_depth += 8;
-+#endif
- }
- #endif
-
-+#if PNG_LIBPNG_VER > 10399
-+ /* set the header here, since we're done modifying these values */
-+ png_set_IHDR(png_ptr,info_ptr,_width,_height,_bit_depth,_color_type,_interlace_type,
-+ _compression_type,_filter_type);
-+#endif
-+
- /* set background */
- png_color_16 image_background={ 0, 255, 255, 255, 0 };
- RGBQUAD tc = GetTransColor();
-@@ -427,22 +567,24 @@
- /* set metrics */
- png_set_pHYs(png_ptr, info_ptr, head.biXPelsPerMeter, head.biYPelsPerMeter, PNG_RESOLUTION_METER);
-
-+#if PNG_LIBPNG_VER <= 10399
- png_set_IHDR(png_ptr, info_ptr, info_ptr->width, info_ptr->height, info_ptr->bit_depth,
- info_ptr->color_type, info_ptr->interlace_type,
- PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
-+#endif
-
- //<DP> simple transparency
- if (info.nBkgndIndex >= 0){
-- info_ptr->num_trans = 1;
-- info_ptr->valid |= PNG_INFO_tRNS;
- #if PNG_LIBPNG_VER > 10399
-- info_ptr->trans_alpha = trans;
-- info_ptr->trans_color.index = (BYTE)info.nBkgndIndex;
-- info_ptr->trans_color.red = tc.rgbRed;
-- info_ptr->trans_color.green = tc.rgbGreen;
-- info_ptr->trans_color.blue = tc.rgbBlue;
-- info_ptr->trans_color.gray = info_ptr->trans_color.index;
-+ png_color_16 _trans_color;
-+ _trans_color.index = (BYTE)info.nBkgndIndex;
-+ _trans_color.red = tc.rgbRed;
-+ _trans_color.green = tc.rgbGreen;
-+ _trans_color.blue = tc.rgbBlue;
-+ _trans_color.gray = _trans_color.index;
- #else
-+ info_ptr->num_trans = 1;
-+ info_ptr->valid |= PNG_INFO_tRNS;
- info_ptr->trans = trans;
- info_ptr->trans_values.index = (BYTE)info.nBkgndIndex;
- info_ptr->trans_values.red = tc.rgbRed;
-@@ -454,34 +596,53 @@
- // the transparency indexes start from 0 for non grayscale palette
- if (!bGrayScale && head.biClrUsed && info.nBkgndIndex)
- SwapIndex(0,(BYTE)info.nBkgndIndex);
-+
-+#if PNG_LIBPNG_VER > 10399
-+ png_set_tRNS(png_ptr,info_ptr,(png_bytep)trans,1,&_trans_color);
-+#endif
- }
-
- /* set the palette if there is one */
-+#if PNG_LIBPNG_VER > 10399
-+ png_colorp _palette;
-+#endif
- if (GetPalette()){
-+#if PNG_LIBPNG_VER <= 10399
- if (!bGrayScale){
- info_ptr->valid |= PNG_INFO_PLTE;
- }
-+#endif
-
- int nc = GetClrImportant();
- if (nc==0) nc = GetNumColors();
-
-+ // copy the palette colors
-+#if PNG_LIBPNG_VER > 10399
-+ _palette = new png_color[nc];
-+#else
-+ info_ptr->palette = new png_color[nc];
-+ info_ptr->num_palette = (png_uint_16) nc;
-+#endif
-+ for (int i=0; i<nc; i++)
-+#if PNG_LIBPNG_VER > 10399
-+ GetPaletteColor(i, &_palette[i].red, &_palette[i].green, &_palette[i].blue);
-+
-+ png_set_PLTE(png_ptr,info_ptr,_palette,nc);
-+#else
-+ GetPaletteColor(i, &info_ptr->palette[i].red, &info_ptr->palette[i].green, &info_ptr->palette[i].blue);
-+#endif
-+
- if (info.bAlphaPaletteEnabled){
- for(WORD ip=0; ip<nc;ip++)
- trans[ip]=GetPaletteColor((BYTE)ip).rgbReserved;
-- info_ptr->num_trans = (WORD)nc;
-- info_ptr->valid |= PNG_INFO_tRNS;
- #if PNG_LIBPNG_VER > 10399
-- info_ptr->trans_alpha = trans;
-+ png_set_tRNS(png_ptr,info_ptr,(png_bytep)trans,nc,NULL);
- #else
-+ info_ptr->num_trans = (WORD)nc;
-+ info_ptr->valid |= PNG_INFO_tRNS;
- info_ptr->trans = trans;
- #endif
- }
--
-- // copy the palette colors
-- info_ptr->palette = new png_color[nc];
-- info_ptr->num_palette = (png_uint_16) nc;
-- for (int i=0; i<nc; i++)
-- GetPaletteColor(i, &info_ptr->palette[i].red, &info_ptr->palette[i].green, &info_ptr->palette[i].blue);
- }
-
- #if CXIMAGE_SUPPORT_ALPHA // <vho>
-@@ -495,8 +656,12 @@
- } } }
- #endif // CXIMAGE_SUPPORT_ALPHA // <vho>
-
-+#if PNG_LIBPNG_VER > 10399
-+ int row_size = max(info.dwEffWidth, (_width * _channels * _bit_depth / 8));
-+#else
- int row_size = max(info.dwEffWidth, info_ptr->width*info_ptr->channels*(info_ptr->bit_depth/8));
- info_ptr->rowbytes = row_size;
-+#endif
- BYTE *row_pointers = new BYTE[row_size];
-
- /* write the file information */
-@@ -514,7 +679,11 @@
- if (AlphaIsValid()){
- for (long ax=head.biWidth-1; ax>=0;ax--){
- c = BlindGetPixelColor(ax,ay);
-+#if PNG_LIBPNG_VER > 10399
-+ int px = ax * _channels;
-+#else
- int px = ax * info_ptr->channels;
-+#endif
- if (!bGrayScale){
- row_pointers[px++]=c.rgbRed;
- row_pointers[px++]=c.rgbGreen;
-@@ -529,7 +698,11 @@
- #endif //CXIMAGE_SUPPORT_ALPHA // <vho>
- {
- iter.GetRow(row_pointers, row_size);
-+#if PNG_LIBPNG_VER > 10399
-+ if (_color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP
-+#else
- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP
-+#endif
- RGBtoBGR(row_pointers, row_size);
- png_write_row(png_ptr, row_pointers);
- }
-@@ -546,9 +719,14 @@
- png_write_end(png_ptr, info_ptr);
-
- /* if you malloced the palette, free it here */
-+#if PNG_LIBPNG_VER > 10399
-+ if (_palette){
-+ delete [] (_palette);
-+#else
- if (info_ptr->palette){
- delete [] (info_ptr->palette);
- info_ptr->palette = NULL;
-+#endif
- }
-
- /* clean up after the write, and free any memory allocated */
diff --git a/media-tv/xbmc/files/xbmc-11.0-ffmpeg-0.10.2.patch b/media-tv/xbmc/files/xbmc-11.0-ffmpeg-0.10.2.patch
deleted file mode 100644
index b6a2d731..00000000
--- a/media-tv/xbmc/files/xbmc-11.0-ffmpeg-0.10.2.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 4d74bd14c0fa158c5a2bcf18192f418fafc3a053 Mon Sep 17 00:00:00 2001
-From: Tomas Chvatal <tchvatal@suse.cz>
-Date: Fri, 23 Mar 2012 11:59:02 +0100
-Subject: [PATCH 1/2] Add support for new ffmpeg-10/11 api.
-
----
- configure.in | 3 +++
- lib/DllAvUtil.h | 3 +++
- 2 files changed, 6 insertions(+), 0 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index bca9239..bea66ac 100755
---- a/configure.in
-+++ b/configure.in
-@@ -1225,6 +1225,9 @@ if test "$use_external_ffmpeg" = "yes"; then
- # old FFmpeg have this in libavcodec/opt.h instead:
- AC_CHECK_HEADERS([libavutil/opt.h])
-
-+ # new FFmpeg have math headers
-+ AC_CHECK_HEADERS([libavutil/mathematics.h],,)
-+
- # We'll support the use of rgb2rgb.h if it exists.
- AC_CHECK_HEADERS([libswscale/rgb2rgb.h],,)
- AC_CHECK_HEADERS([ffmpeg/rgb2rgb.h],,)
-diff --git a/lib/DllAvUtil.h b/lib/DllAvUtil.h
-index e882cac..e3b8a02 100644
---- a/lib/DllAvUtil.h
-+++ b/lib/DllAvUtil.h
-@@ -59,6 +59,9 @@ extern "C" {
- #else
- #include <ffmpeg/mem.h>
- #endif
-+ #if (defined HAVE_LIBAVUTIL_MATHEMATICS_H)
-+ #include <libavutil/mathematics.h>
-+ #endif
- #else
- #include "libavutil/avutil.h"
- #include "libavutil/crc.h"
---
-1.7.3.4
-
diff --git a/media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch b/media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch
deleted file mode 100644
index 51372fdc..00000000
--- a/media-tv/xbmc/files/xbmc-11.0-ffmpeg.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-https://bugs.gentoo.org/406215
-
-From 97212837ec81c3869ba60e0690f26c09b9428747 Mon Sep 17 00:00:00 2001
-From: Tomas Chvatal <tchvatal@suse.cz>
-Date: Fri, 30 Mar 2012 10:00:46 +0200
-Subject: [PATCH] Ensure we include proper header on ffmpeg.
-
----
- configure.in | 3 +++
- lib/DllAvFilter.h | 6 +++++-
- 2 files changed, 8 insertions(+), 1 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index bca9239..d209f80 100755
---- a/configure.in
-+++ b/configure.in
-@@ -1229,6 +1229,9 @@ if test "$use_external_ffmpeg" = "yes"; then
- AC_CHECK_HEADERS([libswscale/rgb2rgb.h],,)
- AC_CHECK_HEADERS([ffmpeg/rgb2rgb.h],,)
-
-+ # check for avcodec header as it is not present on libav
-+ AC_CHECK_HEADERS([libavfilter/avcodec.h],,)
-+
- # Check if AVFilterBufferRefVideoProps AVRational member is named
- # 'pixel_aspect' or 'sample_aspect_ratio'.
- AC_CHECK_MEMBER([AVFilterBufferRefVideoProps.sample_aspect_ratio],
-diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h
-index 827746e..d47623b 100644
---- a/lib/DllAvFilter.h
-+++ b/lib/DllAvFilter.h
-@@ -48,7 +48,11 @@ extern "C" {
- #endif
- /* for av_vsrc_buffer_add_frame */
- #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,8,0)
-- #include <libavfilter/vsrc_buffer.h>
-+ #if defined(HAVE_LIBAVFILTER_AVCODEC_H)
-+ #include <libavfilter/avcodec.h>
-+ #else
-+ #include <libavfilter/vsrc_buffer.h>
-+ #endif
- #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
- int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
- AVFrame *frame);
---
-1.7.3.4
-
diff --git a/media-tv/xbmc/files/xbmc-11.0-libav-r1.patch b/media-tv/xbmc/files/xbmc-11.0-libav-r1.patch
deleted file mode 100644
index 84a215a7..00000000
--- a/media-tv/xbmc/files/xbmc-11.0-libav-r1.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Patch rebased to current patches backported from upstream by Alexis Ballier.
-Based on the previous patch, submitted upstream but not merged it seems:
-
-https://bugs.gentoo.org/406215
-
-From c74abc298e2075f431d9fa700fcfc5e1bbbddf22 Mon Sep 17 00:00:00 2001
-From: Tomas Chvatal <tchvatal@suse.cz>
-Date: Fri, 23 Mar 2012 12:08:53 +0100
-Subject: [PATCH 2/2] Add support for libav api as it sligthly differ.
-
-The libav use micro version as 0
-The ffmpeg use the micro version as 100+
-
-Simply check if the variable is defined then it is not libav.
-Index: xbmc-11.0/lib/DllAvFilter.h
-===================================================================
---- xbmc-11.0.orig/lib/DllAvFilter.h
-+++ xbmc-11.0/lib/DllAvFilter.h
-@@ -45,7 +45,11 @@ extern "C" {
- #if (defined HAVE_LIBAVFILTER_AVFILTER_H)
- #include <libavfilter/avfiltergraph.h>
- #include <libavfilter/buffersink.h>
-- #include <libavfilter/avcodec.h>
-+ #if LIBAVFILTER_VERSION_MICRO < 50 // Libav
-+ #include <libavfilter/vsrc_buffer.h>
-+ #else
-+ #include <libavfilter/avcodec.h>
-+ #endif
- #elif (defined HAVE_FFMPEG_AVFILTER_H)
- #include <ffmpeg/avfiltergraph.h>
- #include <ffmpeg/buffersink.h>
-@@ -75,7 +79,11 @@ public:
- virtual int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, AVFilterInOut **inputs, AVFilterInOut **outputs, void *log_ctx)=0;
- virtual int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)=0;
- #if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
-+#if LIBAVFILTER_VERSION_MICRO < 50 // Libav
-+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect)=0;
-+#else
- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
-+#endif
- #else
- virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
- #endif
-@@ -135,7 +143,11 @@ public:
- return ::avfilter_graph_config(graphctx, log_ctx);
- }
- #if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
-+#if LIBAVFILTER_VERSION_MICRO < 50 // Libav
-+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, pts, pixel_aspect); }
-+#else
- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); }
-+#endif
- #else
- virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame* frame, int flags) { return ::av_buffersrc_add_frame(buffer_filter, frame, flags); }
- #endif
-Index: xbmc-11.0/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-===================================================================
---- xbmc-11.0.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-+++ xbmc-11.0/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-@@ -833,7 +833,11 @@ int CDVDVideoCodecFFmpeg::FilterProcess(
- if (frame)
- {
- #if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
-+#if LIBAVFILTER_VERSION_MICRO < 50 // Libav
-+ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio);
-+#else
- result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0);
-+#endif
- #else
- result = m_dllAvFilter.av_buffersrc_add_frame(m_pFilterIn, frame, 0);
- #endif
diff --git a/media-tv/xbmc/files/xbmc-11.0-libav.patch b/media-tv/xbmc/files/xbmc-11.0-libav.patch
deleted file mode 100644
index 0aaa1ce4..00000000
--- a/media-tv/xbmc/files/xbmc-11.0-libav.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-https://bugs.gentoo.org/406215
-
-From c74abc298e2075f431d9fa700fcfc5e1bbbddf22 Mon Sep 17 00:00:00 2001
-From: Tomas Chvatal <tchvatal@suse.cz>
-Date: Fri, 23 Mar 2012 12:08:53 +0100
-Subject: [PATCH 2/2] Add support for libav api as it sligthly differ.
-
-The libav use micro version as 0
-The ffmpeg use the micro version as 100+
-
-Simply check if the variable is defined then it is not libav.
----
- lib/DllAvFilter.h | 10 +++++++++-
- .../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 4 ++++
- 2 files changed, 13 insertions(+), 1 deletions(-)
-
-diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h
-index 302e35c..827746e 100644
---- a/lib/DllAvFilter.h
-+++ b/lib/DllAvFilter.h
-@@ -48,7 +48,7 @@ extern "C" {
- #endif
- /* for av_vsrc_buffer_add_frame */
- #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,8,0)
-- #include <libavfilter/avcodec.h>
-+ #include <libavfilter/vsrc_buffer.h>
- #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
- int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter,
- AVFrame *frame);
-@@ -83,7 +83,11 @@ public:
- virtual int avfilter_poll_frame(AVFilterLink *link)=0;
- virtual int avfilter_request_frame(AVFilterLink *link)=0;
- #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0)
-+#if LIBAVFILTER_VERSION_MICRO
- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
-+#else
-+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect)=0;
-+#endif
- #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame)=0;
- #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0)
-@@ -172,7 +176,11 @@ public:
- virtual int avfilter_poll_frame(AVFilterLink *link) { return ::avfilter_poll_frame(link); }
- virtual int avfilter_request_frame(AVFilterLink *link) { return ::avfilter_request_frame(link); }
- #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0)
-+#if LIBAVFILTER_VERSION_MICRO
- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); }
-+#else
-+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, pts, pixel_aspect); }
-+#endif
- #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame); }
- #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0)
-diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-index b4e1451..4e5eedf 100644
---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
-@@ -814,7 +814,11 @@ int CDVDVideoCodecFFmpeg::FilterProcess(AVFrame* frame)
- if (frame)
- {
- #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0)
-+#if LIBAVFILTER_VERSION_MICRO
- result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0);
-+#else
-+ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio);
-+#endif
- #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0)
- result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame);
- #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0)
---
-1.7.3.4
-
diff --git a/media-tv/xbmc/files/xbmc-11.0-libpng-1.5.patch b/media-tv/xbmc/files/xbmc-11.0-libpng-1.5.patch
deleted file mode 100644
index 18c589a1..00000000
--- a/media-tv/xbmc/files/xbmc-11.0-libpng-1.5.patch
+++ /dev/null
@@ -1,605 +0,0 @@
-fix building with newer libpng. patch by Ian Stakenvicius.
-
-https://bugs.gentoo.org/380127
-
---- a/lib/cximage-6.0/CxImage/ximapng.cpp
-+++ b/lib/cximage-6.0/CxImage/ximapng.cpp
-@@ -15,7 +15,11 @@
- void CxImagePNG::ima_png_error(png_struct *png_ptr, char *message)
- {
- strcpy(info.szLastError,message);
-+#if PNG_LIBPNG_VER > 10499
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
- ////////////////////////////////////////////////////////////////////////////////
- #if CXIMAGE_SUPPORT_DECODE
-@@ -62,7 +66,11 @@ bool CxImagePNG::Decode(CxFile *hFile)
- /* Set error handling if you are using the setjmp/longjmp method (this is
- * the normal method of doing things with libpng). REQUIRED unless you
- * set up your own error handlers in the png_create_read_struct() earlier. */
-+#if PNG_LIBPNG_VER > 10499
-+ if (setjmp(png_jmpbuf(png_ptr))) {
-+#else
- if (setjmp(png_ptr->jmpbuf)) {
-+#endif
- /* Free all of the memory associated with the png_ptr and info_ptr */
- delete [] row_pointers;
- png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
-@@ -76,16 +84,34 @@ bool CxImagePNG::Decode(CxFile *hFile)
- /* read the file information */
- png_read_info(png_ptr, info_ptr);
-
-+#if PNG_LIBPNG_VER > 10499
-+ png_uint_32 _width,_height;
-+ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type;
-+ png_get_IHDR(png_ptr,info_ptr,&_width,&_height,&_bit_depth,&_color_type,
-+ &_interlace_type,&_compression_type,&_filter_type);
-+
-+ if (info.nEscape == -1){
-+ head.biWidth = _width;
-+ head.biHeight= _height;
-+ info.dwType = CXIMAGE_FORMAT_PNG;
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+ }
-+#else
- if (info.nEscape == -1){
- head.biWidth = info_ptr->width;
- head.biHeight= info_ptr->height;
- info.dwType = CXIMAGE_FORMAT_PNG;
- longjmp(png_ptr->jmpbuf, 1);
- }
-+#endif
-
- /* calculate new number of channels */
- int channels=0;
-+#if PNG_LIBPNG_VER > 10499
-+ switch(_color_type){
-+#else
- switch(info_ptr->color_type){
-+#endif
- case PNG_COLOR_TYPE_GRAY:
- case PNG_COLOR_TYPE_PALETTE:
- channels = 1;
-@@ -101,20 +127,49 @@ bool CxImagePNG::Decode(CxFile *hFile)
- break;
- default:
- strcpy(info.szLastError,"unknown PNG color type");
-+#if PNG_LIBPNG_VER > 10499
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
-
- //find the right pixel depth used for cximage
-+#if PNG_LIBPNG_VER > 10499
-+ int pixel_depth = _bit_depth * png_get_channels(png_ptr,info_ptr);
-+#else
- int pixel_depth = info_ptr->pixel_depth;
-+#endif
- if (channels == 1 && pixel_depth>8) pixel_depth=8;
- if (channels == 2) pixel_depth=8;
- if (channels >= 3) pixel_depth=24;
-
-+#if PNG_LIBPNG_VER > 10499
-+ if (!Create(_width, _height, pixel_depth, CXIMAGE_FORMAT_PNG)){
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- if (!Create(info_ptr->width, info_ptr->height, pixel_depth, CXIMAGE_FORMAT_PNG)){
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
-
- /* get metrics */
-+#if PNG_LIBPNG_VER > 10499
-+ png_uint_32 _x_pixels_per_unit,_y_pixels_per_unit;
-+ int _phys_unit_type;
-+ png_get_pHYs(png_ptr,info_ptr,&_x_pixels_per_unit,&_y_pixels_per_unit,&_phys_unit_type);
-+ switch (_phys_unit_type)
-+ {
-+ case PNG_RESOLUTION_UNKNOWN:
-+ SetXDPI(_x_pixels_per_unit);
-+ SetYDPI(_y_pixels_per_unit);
-+ break;
-+ case PNG_RESOLUTION_METER:
-+ SetXDPI((long)floor(_x_pixels_per_unit * 254.0 / 10000.0 + 0.5));
-+ SetYDPI((long)floor(_y_pixels_per_unit * 254.0 / 10000.0 + 0.5));
-+ break;
-+ }
-+#else
- switch (info_ptr->phys_unit_type)
- {
- case PNG_RESOLUTION_UNKNOWN:
-@@ -126,46 +181,94 @@ bool CxImagePNG::Decode(CxFile *hFile)
- SetYDPI((long)floor(info_ptr->y_pixels_per_unit * 254.0 / 10000.0 + 0.5));
- break;
- }
-+#endif
-
-+#if PNG_LIBPNG_VER > 10499
-+ int _num_palette;
-+ png_colorp _palette;
-+ png_uint_32 _palette_ret;
-+ _palette_ret = png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette);
-+ if (_palette_ret && _num_palette>0){
-+ SetPalette((rgb_color*)_palette,_num_palette);
-+ SetClrImportant(_num_palette);
-+ } else if (_bit_depth ==2) { //<DP> needed for 2 bpp grayscale PNGs
-+#else
- if (info_ptr->num_palette>0){
- SetPalette((rgb_color*)info_ptr->palette,info_ptr->num_palette);
- SetClrImportant(info_ptr->num_palette);
- } else if (info_ptr->bit_depth ==2) { //<DP> needed for 2 bpp grayscale PNGs
-+#endif
- SetPaletteColor(0,0,0,0);
- SetPaletteColor(1,85,85,85);
- SetPaletteColor(2,170,170,170);
- SetPaletteColor(3,255,255,255);
- } else SetGrayPalette(); //<DP> needed for grayscale PNGs
-
-+#if PNG_LIBPNG_VER > 10499
-+ int nshift = max(0,(_bit_depth>>3)-1)<<3;
-+#else
- int nshift = max(0,(info_ptr->bit_depth>>3)-1)<<3;
-+#endif
-
-+#if PNG_LIBPNG_VER > 10499
-+ png_bytep _trans_alpha;
-+ int _num_trans;
-+ png_color_16p _trans_color;
-+ png_uint_32 _trans_ret;
-+ _trans_ret = png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color);
-+ if (_trans_ret && _num_trans!=0){ //palette transparency
-+ if (_num_trans==1){
-+ if (_color_type == PNG_COLOR_TYPE_PALETTE){
-+#else
- if (info_ptr->num_trans!=0){ //palette transparency
- if (info_ptr->num_trans==1){
- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE){
-+#endif
-+#if PNG_LIBPNG_VER > 10499
-+ info.nBkgndIndex = _trans_color->index;
-+#else
- #if PNG_LIBPNG_VER > 10399
- info.nBkgndIndex = info_ptr->trans_color.index;
- #else
- info.nBkgndIndex = info_ptr->trans_values.index;
- #endif
-+#endif
- } else{
-+#if PNG_LIBPNG_VER > 10499
-+ info.nBkgndIndex = _trans_color->gray>>nshift;
-+#else
- #if PNG_LIBPNG_VER > 10399
- info.nBkgndIndex = info_ptr->trans_color.gray>>nshift;
- #else
- info.nBkgndIndex = info_ptr->trans_values.gray>>nshift;
- #endif
-+#endif
- }
- }
-+#if PNG_LIBPNG_VER > 10499
-+ if (_num_trans>1 && _trans_alpha!=NULL){
-+#else
- if (info_ptr->num_trans>1){
-+#endif
- RGBQUAD* pal=GetPalette();
- if (pal){
- DWORD ip;
-+#if PNG_LIBPNG_VER > 10499
-+ for (ip=0;ip<min(head.biClrUsed,(unsigned long)_num_trans);ip++)
-+ pal[ip].rgbReserved=_trans_alpha[ip];
-+#else
- for (ip=0;ip<min(head.biClrUsed,(unsigned long)info_ptr->num_trans);ip++)
- #if PNG_LIBPNG_VER > 10399
- pal[ip].rgbReserved=info_ptr->trans_alpha[ip];
- #else
- pal[ip].rgbReserved=info_ptr->trans[ip];
- #endif
-+#endif
-+#if PNG_LIBPNG_VER > 10499
-+ for (ip=_num_trans;ip<head.biClrUsed;ip++){
-+#else
- for (ip=info_ptr->num_trans;ip<head.biClrUsed;ip++){
-+#endif
- pal[ip].rgbReserved=255;
- }
- info.bAlphaPaletteEnabled=true;
-@@ -178,6 +281,11 @@ bool CxImagePNG::Decode(CxFile *hFile)
- int num_trans;
- png_color_16 *image_background;
- if (png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &image_background)){
-+#if PNG_LIBPNG_VER > 10499
-+ info.nBkgndColor.rgbRed = (BYTE)(_trans_color->red>>nshift);
-+ info.nBkgndColor.rgbGreen = (BYTE)(_trans_color->green>>nshift);
-+ info.nBkgndColor.rgbBlue = (BYTE)(_trans_color->blue>>nshift);
-+#else
- #if PNG_LIBPNG_VER > 10399
- info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_color.red>>nshift);
- info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_color.green>>nshift);
-@@ -187,6 +295,7 @@ bool CxImagePNG::Decode(CxFile *hFile)
- info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_values.green>>nshift);
- info.nBkgndColor.rgbBlue = (BYTE)(info_ptr->trans_values.blue>>nshift);
- #endif
-+#endif
- info.nBkgndColor.rgbReserved = 0;
- info.nBkgndIndex = 0;
- }
-@@ -202,15 +311,27 @@ bool CxImagePNG::Decode(CxFile *hFile)
- }
-
- // <vho> - flip the RGB pixels to BGR (or RGBA to BGRA)
-+#if PNG_LIBPNG_VER > 10499
-+ if (_color_type & PNG_COLOR_MASK_COLOR){
-+#else
- if (info_ptr->color_type & PNG_COLOR_MASK_COLOR){
-+#endif
- png_set_bgr(png_ptr);
- }
-
- // <vho> - handle cancel
-+#if PNG_LIBPNG_VER > 10499
-+ if (info.nEscape) longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- if (info.nEscape) longjmp(png_ptr->jmpbuf, 1);
-+#endif
-
- // row_bytes is the width x number of channels x (bit-depth / 8)
-+#if PNG_LIBPNG_VER > 10499
-+ row_pointers = new BYTE[png_get_rowbytes(png_ptr,info_ptr) + 8];
-+#else
- row_pointers = new BYTE[info_ptr->rowbytes + 8];
-+#endif
-
- // turn on interlace handling
- int number_passes = png_set_interlace_handling(png_ptr);
-@@ -221,8 +342,16 @@ bool CxImagePNG::Decode(CxFile *hFile)
- SetCodecOption(0);
- }
-
-+#if PNG_LIBPNG_VER > 10499
-+ int chan_offset = _bit_depth >> 3;
-+#else
- int chan_offset = info_ptr->bit_depth >> 3;
-+#endif
-+#if PNG_LIBPNG_VER > 10499
-+ int pixel_offset = (_bit_depth * png_get_channels(png_ptr,info_ptr)) >> 3;
-+#else
- int pixel_offset = info_ptr->pixel_depth >> 3;
-+#endif
-
- for (int pass=0; pass < number_passes; pass++) {
- iter.Upset();
-@@ -230,7 +359,11 @@ bool CxImagePNG::Decode(CxFile *hFile)
- do {
-
- // <vho> - handle cancel
-+#if PNG_LIBPNG_VER > 10499
-+ if (info.nEscape) longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- if (info.nEscape) longjmp(png_ptr->jmpbuf, 1);
-+#endif
-
- #if CXIMAGE_SUPPORT_ALPHA // <vho>
- if (AlphaIsValid()) {
-@@ -241,7 +374,11 @@ bool CxImagePNG::Decode(CxFile *hFile)
- BYTE* prow= iter.GetRow(ay);
-
- //recover data from previous scan
-+#if PNG_LIBPNG_VER > 10499
-+ if (_interlace_type && pass>0 && pass!=7){
-+#else
- if (info_ptr->interlace_type && pass>0 && pass!=7){
-+#endif
- for(ax=0;ax<head.biWidth;ax++){
- long px = ax * pixel_offset;
- if (channels == 2){
-@@ -278,10 +415,17 @@ bool CxImagePNG::Decode(CxFile *hFile)
- #endif // CXIMAGE_SUPPORT_ALPHA // vho
- {
- //recover data from previous scan
-+#if PNG_LIBPNG_VER > 10499
-+ if (_interlace_type && pass>0){
-+ iter.GetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr));
-+ //re-expand buffer for images with bit depth > 8
-+ if (_bit_depth > 8){
-+#else
- if (info_ptr->interlace_type && pass>0){
- iter.GetRow(row_pointers, info_ptr->rowbytes);
- //re-expand buffer for images with bit depth > 8
- if (info_ptr->bit_depth > 8){
-+#endif
- for(long ax=(head.biWidth*channels-1);ax>=0;ax--)
- row_pointers[ax*chan_offset] = row_pointers[ax];
- }
-@@ -291,15 +435,27 @@ bool CxImagePNG::Decode(CxFile *hFile)
- png_read_row(png_ptr, row_pointers, NULL);
-
- //shrink 16 bit depth images down to 8 bits
-+#if PNG_LIBPNG_VER > 10499
-+ if (_bit_depth > 8){
-+#else
- if (info_ptr->bit_depth > 8){
-+#endif
- for(long ax=0;ax<(head.biWidth*channels);ax++)
- row_pointers[ax] = row_pointers[ax*chan_offset];
- }
-
- //copy the pixels
-+#if PNG_LIBPNG_VER > 10499
-+ iter.SetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr));
-+#else
- iter.SetRow(row_pointers, info_ptr->rowbytes);
-+#endif
- //<DP> expand 2 bpp images only in the last pass
-+#if PNG_LIBPNG_VER > 10499
-+ if (_bit_depth==2 && pass==(number_passes-1))
-+#else
- if (info_ptr->bit_depth==2 && pass==(number_passes-1))
-+#endif
- expand2to4bpp(iter.GetRow());
-
- //go on
-@@ -361,9 +517,13 @@ bool CxImagePNG::Encode(CxFile *hFile)
- /* Set error handling. REQUIRED if you aren't supplying your own
- * error hadnling functions in the png_create_write_struct() call.
- */
-+#if PNG_LIBPNG_VER > 10499
-+ if (setjmp(png_jmpbuf(png_ptr))){
-+#else
- if (setjmp(png_ptr->jmpbuf)){
- /* If we get here, we had a problem reading the file */
- if (info_ptr->palette) free(info_ptr->palette);
-+#endif
- png_destroy_write_struct(&png_ptr, (png_infopp)&info_ptr);
- cx_throw("Error saving PNG file");
- }
-@@ -372,9 +532,23 @@ bool CxImagePNG::Encode(CxFile *hFile)
- //png_init_io(png_ptr, hFile);
-
- // use custom I/O functions
-- png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data);
-+ png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data);
-
- /* set the file information here */
-+#if PNG_LIBPNG_VER > 10499
-+ /* use variables to hold the values so it isnt necessary to png_get them later */
-+ png_uint_32 _width,_height;
-+ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type;
-+ png_byte _channels,_pixel_depth;
-+
-+ _width = GetWidth();
-+ _height = GetHeight();
-+ _pixel_depth = (BYTE)GetBpp();
-+ _channels = (GetBpp()>8) ? (BYTE)3: (BYTE)1;
-+ _bit_depth = (BYTE)(GetBpp()/_channels);
-+ _compression_type = PNG_COMPRESSION_TYPE_DEFAULT;
-+ _filter_type = PNG_FILTER_TYPE_DEFAULT;
-+#else
- info_ptr->width = GetWidth();
- info_ptr->height = GetHeight();
- info_ptr->pixel_depth = (BYTE)GetBpp();
-@@ -382,13 +556,22 @@ bool CxImagePNG::Encode(CxFile *hFile)
- info_ptr->bit_depth = (BYTE)(GetBpp()/info_ptr->channels);
- info_ptr->compression_type = info_ptr->filter_type = 0;
- info_ptr->valid = 0;
-+#endif
-
- switch(GetCodecOption(CXIMAGE_FORMAT_PNG)){
- case 1:
-+#if PNG_LIBPNG_VER > 10499
-+ _interlace_type = PNG_INTERLACE_ADAM7;
-+#else
- info_ptr->interlace_type = PNG_INTERLACE_ADAM7;
-+#endif
- break;
- default:
-+#if PNG_LIBPNG_VER > 10499
-+ _interlace_type = PNG_INTERLACE_NONE;
-+#else
- info_ptr->interlace_type = PNG_INTERLACE_NONE;
-+#endif
- }
-
- /* set compression level */
-@@ -398,19 +581,38 @@ bool CxImagePNG::Encode(CxFile *hFile)
-
- if (GetNumColors()){
- if (bGrayScale){
-+#if PNG_LIBPNG_VER > 10499
-+ _color_type = PNG_COLOR_TYPE_GRAY;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
-+#endif
- } else {
-+#if PNG_LIBPNG_VER > 10499
-+ _color_type = PNG_COLOR_TYPE_PALETTE;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
-+#endif
- }
- } else {
-+#if PNG_LIBPNG_VER > 10499
-+ _color_type = PNG_COLOR_TYPE_RGB;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
-+#endif
- }
- #if CXIMAGE_SUPPORT_ALPHA
- if (AlphaIsValid()){
-+#if PNG_LIBPNG_VER > 10499
-+ _color_type |= PNG_COLOR_MASK_ALPHA;
-+ _channels++;
-+ _bit_depth = 8;
-+ _pixel_depth += 8;
-+#else
- info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
- info_ptr->channels++;
- info_ptr->bit_depth = 8;
- info_ptr->pixel_depth += 8;
-+#endif
- }
- #endif
-
-@@ -427,14 +629,30 @@ bool CxImagePNG::Encode(CxFile *hFile)
- /* set metrics */
- png_set_pHYs(png_ptr, info_ptr, head.biXPelsPerMeter, head.biYPelsPerMeter, PNG_RESOLUTION_METER);
-
-+#if PNG_LIBPNG_VER > 10499
-+ png_set_IHDR(png_ptr,info_ptr,_width,_height,_bit_depth,_color_type,_interlace_type,
-+ _compression_type,_filter_type);
-+#else
- png_set_IHDR(png_ptr, info_ptr, info_ptr->width, info_ptr->height, info_ptr->bit_depth,
- info_ptr->color_type, info_ptr->interlace_type,
- PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
-+#endif
-
- //<DP> simple transparency
- if (info.nBkgndIndex >= 0){
-+#if PNG_LIBPNG_VER <= 10499
- info_ptr->num_trans = 1;
- info_ptr->valid |= PNG_INFO_tRNS;
-+#endif
-+#if PNG_LIBPNG_VER > 10499
-+ png_color_16 _trans_color;
-+ _trans_color.index = (BYTE)info.nBkgndIndex;
-+ _trans_color.red = tc.rgbRed;
-+ _trans_color.green = tc.rgbGreen;
-+ _trans_color.blue = tc.rgbBlue;
-+ _trans_color.gray = _trans_color.index;
-+ png_set_tRNS(png_ptr,info_ptr,(png_bytep)trans,1,&_trans_color);
-+#else
- #if PNG_LIBPNG_VER > 10399
- info_ptr->trans_alpha = trans;
- info_ptr->trans_color.index = (BYTE)info.nBkgndIndex;
-@@ -450,6 +668,7 @@ bool CxImagePNG::Encode(CxFile *hFile)
- info_ptr->trans_values.blue = tc.rgbBlue;
- info_ptr->trans_values.gray = info_ptr->trans_values.index;
- #endif
-+#endif
-
- // the transparency indexes start from 0 for non grayscale palette
- if (!bGrayScale && head.biClrUsed && info.nBkgndIndex)
-@@ -457,10 +676,16 @@ bool CxImagePNG::Encode(CxFile *hFile)
- }
-
- /* set the palette if there is one */
-+#if PNG_LIBPNG_VER > 10499
-+ png_colorp _palette = NULL;
-+ if (GetPalette()){
-+ /* png_set_PLTE() will be called once the palette is ready */
-+#else
- if (GetPalette()){
- if (!bGrayScale){
- info_ptr->valid |= PNG_INFO_PLTE;
- }
-+#endif
-
- int nc = GetClrImportant();
- if (nc==0) nc = GetNumColors();
-@@ -468,20 +693,34 @@ bool CxImagePNG::Encode(CxFile *hFile)
- if (info.bAlphaPaletteEnabled){
- for(WORD ip=0; ip<nc;ip++)
- trans[ip]=GetPaletteColor((BYTE)ip).rgbReserved;
-+#if PNG_LIBPNG_VER <= 10499
- info_ptr->num_trans = (WORD)nc;
- info_ptr->valid |= PNG_INFO_tRNS;
-+#endif
-+#if PNG_LIBPNG_VER > 10499
-+ png_set_tRNS(png_ptr,info_ptr,(png_bytep)trans,nc,NULL);
-+#else
- #if PNG_LIBPNG_VER > 10399
- info_ptr->trans_alpha = trans;
- #else
- info_ptr->trans = trans;
- #endif
-+#endif
- }
-
- // copy the palette colors
-+#if PNG_LIBPNG_VER > 10499
-+ _palette = new png_color[nc];
-+ for (int i=0; i<nc; i++)
-+ GetPaletteColor(i, &_palette[i].red, &_palette[i].green, &_palette[i].blue);
-+
-+ png_set_PLTE(png_ptr,info_ptr,_palette,nc);
-+#else
- info_ptr->palette = new png_color[nc];
- info_ptr->num_palette = (png_uint_16) nc;
- for (int i=0; i<nc; i++)
- GetPaletteColor(i, &info_ptr->palette[i].red, &info_ptr->palette[i].green, &info_ptr->palette[i].blue);
-+#endif
- }
-
- #if CXIMAGE_SUPPORT_ALPHA // <vho>
-@@ -495,8 +734,12 @@ bool CxImagePNG::Encode(CxFile *hFile)
- } } }
- #endif // CXIMAGE_SUPPORT_ALPHA // <vho>
-
-+#if PNG_LIBPNG_VER > 10499
-+ int row_size = max(info.dwEffWidth, (_width * _channels * _bit_depth / 8));
-+#else
- int row_size = max(info.dwEffWidth, info_ptr->width*info_ptr->channels*(info_ptr->bit_depth/8));
- info_ptr->rowbytes = row_size;
-+#endif
- BYTE *row_pointers = new BYTE[row_size];
-
- /* write the file information */
-@@ -514,7 +757,11 @@ bool CxImagePNG::Encode(CxFile *hFile)
- if (AlphaIsValid()){
- for (long ax=head.biWidth-1; ax>=0;ax--){
- c = BlindGetPixelColor(ax,ay);
-+#if PNG_LIBPNG_VER > 10499
-+ int px = ax * _channels;
-+#else
- int px = ax * info_ptr->channels;
-+#endif
- if (!bGrayScale){
- row_pointers[px++]=c.rgbRed;
- row_pointers[px++]=c.rgbGreen;
-@@ -529,7 +776,11 @@ bool CxImagePNG::Encode(CxFile *hFile)
- #endif //CXIMAGE_SUPPORT_ALPHA // <vho>
- {
- iter.GetRow(row_pointers, row_size);
-+#if PNG_LIBPNG_VER > 10499
-+ if (_color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP
-+#else
- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP
-+#endif
- RGBtoBGR(row_pointers, row_size);
- png_write_row(png_ptr, row_pointers);
- }
-@@ -546,9 +797,14 @@ bool CxImagePNG::Encode(CxFile *hFile)
- png_write_end(png_ptr, info_ptr);
-
- /* if you malloced the palette, free it here */
-+#if PNG_LIBPNG_VER > 10499
-+ if (_palette){
-+ delete [] (_palette);
-+#else
- if (info_ptr->palette){
- delete [] (info_ptr->palette);
- info_ptr->palette = NULL;
-+#endif
- }
-
- /* clean up after the write, and free any memory allocated */
---- a/lib/cximage-6.0/CxImage/ximapng.h
-+++ b/lib/cximage-6.0/CxImage/ximapng.h
-@@ -69,8 +69,13 @@ class CxImagePNG: public CxImage
-
- static void PNGAPI user_error_fn(png_structp png_ptr,png_const_charp error_msg)
- {
-+#if PNG_LIBPNG_VER > 10499
-+ strncpy((char*)png_get_error_ptr(png_ptr),error_msg,255);
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- strncpy((char*)png_ptr->error_ptr,error_msg,255);
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
- };
-
diff --git a/media-tv/xbmc/files/xbmc-11.0-nfs-limits.patch b/media-tv/xbmc/files/xbmc-11.0-nfs-limits.patch
deleted file mode 100644
index ebee2d06..00000000
--- a/media-tv/xbmc/files/xbmc-11.0-nfs-limits.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-https://bugs.gentoo.org/445174
-
-fix from upstream
-
-From 6ffd1cb4e2cba40888c24ff84afd04a5a07a22e9 Mon Sep 17 00:00:00 2001
-From: Torsten Kurbad <github@tk-webart.de>
-Date: Wed, 28 Nov 2012 21:29:29 +0100
-Subject: [PATCH] NFSDirectory.cpp must include limits.h
-
----
- xbmc/filesystem/NFSDirectory.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/xbmc/filesystem/NFSDirectory.cpp b/xbmc/filesystem/NFSDirectory.cpp
-index 4dc0f31..d306331 100644
---- a/xbmc/filesystem/NFSDirectory.cpp
-+++ b/xbmc/filesystem/NFSDirectory.cpp
-@@ -35,6 +35,7 @@
- #include "threads/SingleLock.h"
- using namespace XFILE;
- using namespace std;
-+#include <limits.h>
- #include <nfsc/libnfs-raw-mount.h>
- #include <nfsc/libnfs-raw-nfs.h>
-
---
-1.8.0
-
diff --git a/media-tv/xbmc/files/xbmc-11.0-no-arm-flags.patch b/media-tv/xbmc/files/xbmc-11.0-no-arm-flags.patch
deleted file mode 100644
index 179697a8..00000000
--- a/media-tv/xbmc/files/xbmc-11.0-no-arm-flags.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-http://bugs.gentoo.org/400617
-
-do not force any particular ABI or FPU or SIMD compiler flags for arm
-targets. let the toolchain and user CFLAGS control that.
-
---- a/configure.in
-+++ b/configure.in
-@@ -571,7 +571,7 @@
- LIBS="$LIBS -framework DiskArbitration"
- LIBS="$LIBS -framework ApplicationServices"
- fi
--elif test "$use_arch" = "arm"; then
-+elif false; then
- CFLAGS="$CFLAGS -mfloat-abi=softfp -mno-apcs-stack-check"
- CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp -mno-apcs-stack-check"
- FFMPEG_EXTRACFLAGS="-mfloat-abi=softfp"
diff --git a/media-tv/xbmc/files/xbmc-11.0-no-exec-stack.patch b/media-tv/xbmc/files/xbmc-11.0-no-exec-stack.patch
deleted file mode 100644
index 35ff747d..00000000
--- a/media-tv/xbmc/files/xbmc-11.0-no-exec-stack.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-http://trac.xbmc.org/ticket/12735
-
-merged upstream already
-
-From f0e33eefa4b5d46f26811db2f5e943dcd7f2870e Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Thu, 1 Mar 2012 00:04:49 -0500
-Subject: [PATCH] mark stack as non-executable
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- xbmc/utils/fastmemcpy-arm.S | 5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/xbmc/utils/fastmemcpy-arm.S b/xbmc/utils/fastmemcpy-arm.S
-index 0e810a7..3d77c68 100644
---- a/xbmc/utils/fastmemcpy-arm.S
-+++ b/xbmc/utils/fastmemcpy-arm.S
-@@ -527,3 +527,8 @@ copy_last_3_and_return:
-
- #endif /* __ARM_ARCH__ < 7 */
- #endif
-+
-+#if defined(__linux__) && defined(__ELF__)
-+/* we don't need an executable stack */
-+.section .note.GNU-stack,"",%progbits
-+#endif
---
-1.7.8.4
-
diff --git a/media-tv/xbmc/files/xbmc-11.0-nomythtv.patch b/media-tv/xbmc/files/xbmc-11.0-nomythtv.patch
deleted file mode 100644
index 09286dba..00000000
--- a/media-tv/xbmc/files/xbmc-11.0-nomythtv.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-http://trac.xbmc.org/ticket/11775
-
-make mysql/mythtv support optional
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -127,13 +127,17 @@ endif
- LIB_DIRS=\
- lib/cximage-6.0 \
- lib/libexif \
-- lib/cmyth \
- lib/libhdhomerun \
- lib/libid3tag \
- lib/libapetag \
- lib/cpluff \
- lib/xbmc-dll-symbols
-
-+ifeq (@BUILD_MYTHTV@,1)
-+LIB_DIRS+=\
-+ lib/cmyth
-+endif
-+
- SS_DIRS=
- ifeq (@USE_OPENGL@,1)
- SS_DIRS+= xbmc/screensavers/rsxs-0.9/xbmc
-@@ -418,7 +422,10 @@ imagelib: dllloader
- $(MAKE) -C lib/cximage-6.0
-
- codecs: papcodecs dvdpcodecs
--libs: cmyth libhdhomerun libid3tag imagelib libexif system/libcpluff-@ARCH@.so
-+libs: libhdhomerun libid3tag imagelib libexif system/libcpluff-@ARCH@.so
-+ifeq (@BUILD_MYTHTV@,1)
-+libs: cmyth
-+endif
- externals: codecs libs visualizations screensavers
-
- xcode_depends: \
---- a/configure.in
-+++ b/configure.in
-@@ -68,6 +68,9 @@ goom_enabled="== GOOM enabled. =="
- goom_disabled="== GOOM disabled. =="
- pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
- pulse_disabled="== PulseAudio support manually disabled. =="
-+mysql_not_found="Could not find libmysqlclient. MySQL (and MythTV) support disabled. =="
-+mysql_disabled="== MySQL support disabled. =="
-+mythtv_disabled="== MythTV support disabled. =="
- dvdcss_enabled="== DVDCSS support enabled. =="
- dvdcss_disabled="== DVDCSS support disabled. =="
- hal_not_found="== Could not find hal. HAL support disabled. =="
-@@ -238,6 +241,18 @@ AC_ARG_ENABLE([ffmpeg_libvorbis],
- [use_ffmpeg_libvorbis=$enableval],
- [use_ffmpeg_libvorbis=no])
-
-+AC_ARG_ENABLE([mysql],
-+ [AS_HELP_STRING([--enable-mysql],
-+ [enable MySQL support (default is auto)])],
-+ [use_mysql=$enableval],
-+ [use_mysql=auto])
-+
-+AC_ARG_ENABLE([mythtv],
-+ [AS_HELP_STRING([--enable-mythtv],
-+ [enable MythTV support (default is auto)])],
-+ [use_mythtv=$enableval],
-+ [use_mythtv=auto])
-+
- AC_ARG_ENABLE([dvdcss],
- [AS_HELP_STRING([--enable-dvdcss],
- [enable DVDCSS support (default is yes)])],
-@@ -563,14 +578,31 @@ else
- fi
-
- # platform common libraries
--AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, "yes", "no")
--if test $MYSQL_CONFIG = "yes"; then
-- INCLUDES="$INCLUDES `mysql_config --include`"
-- MYSQL_LIBS=`mysql_config --libs`
-- LIBS="$LIBS $MYSQL_LIBS"
-- AC_SUBST(MYSQL_LIBS)
--else
-- AC_MSG_ERROR($missing_program)
-+have_mysql=no
-+if test "$use_mysql" != "no"; then
-+ AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, "yes", "no")
-+ if test $MYSQL_CONFIG = "yes"; then
-+ INCLUDES="$INCLUDES `mysql_config --include`"
-+ MYSQL_LIBS=`mysql_config --libs`
-+ LIBS="$LIBS $MYSQL_LIBS"
-+ AC_SUBST(MYSQL_LIBS)
-+ AC_CHECK_LIB([mysqlclient], [main], have_mysql=yes)
-+ fi
-+fi
-+if test "$have_mysql" = "yes"; then
-+ BUILD_MYTHTV=1
-+ AC_DEFINE([BUILD_MYSQL], [1], [Define to 1 to build MySQL.])
-+ if test "$use_mysql" != "no"; then
-+ AC_DEFINE([BUILD_MYTHTV], [1], [Define to 1 to build mythtv.])
-+ fi
-+elif test "$use_mysql" = "yes" || test "$use_mythtv" = "yes"; then
-+ AC_MSG_ERROR([$mysql_not_found])
-+else
-+ BUILD_MYTHTV=0
-+ use_mysql=no
-+ AC_MSG_NOTICE($mysql_disabled)
-+ use_mythtv=no
-+ AC_MSG_NOTICE($mythtv_disabled)
- fi
- AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library))
- AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library))
-@@ -594,7 +625,6 @@ AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library))
- AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
- AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
- AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library))
--AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library))
- AC_CHECK_LIB([ssh], [sftp_tell64],, AC_MSG_RESULT([Could not find suitable version of libssh]))
- AC_CHECK_LIB([smbclient], [main],, AC_MSG_ERROR($missing_library))
- AC_CHECK_LIB([bluetooth], [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth]))
-@@ -1319,6 +1349,18 @@ else
- final_message="$final_message\n HAL Support:\tNo"
- fi
-
-+if test "$use_mysql" = "yes"; then
-+ final_message="$final_message\n MySQL:\tYes"
-+else
-+ final_message="$final_message\n MySQL:\tNo"
-+fi
-+
-+if test "$use_mythtv" = "yes"; then
-+ final_message="$final_message\n MythTV:\tYes"
-+else
-+ final_message="$final_message\n MythTV:\tNo"
-+fi
-+
- # DVDCSS
- if test "$use_dvdcss" = "yes"; then
- AC_MSG_NOTICE($dvdcss_enabled)
-@@ -1490,6 +1532,8 @@ AC_SUBST(USE_EXTERNAL_FFMPEG)
- AC_SUBST(PYTHON_VERSION)
- AC_SUBST(OUTPUT_FILES)
- AC_SUBST(HAVE_XBMC_NONFREE)
-+AC_SUBST(BUILD_MYSQL)
-+AC_SUBST(BUILD_MYTHTV)
- AC_SUBST(USE_ASAP_CODEC)
- AC_SUBST(LIBCURL_BASENAME)
- AC_SUBST(LIBFLAC_BASENAME)
---- a/xbmc/dbwrappers/Database.cpp
-+++ b/xbmc/dbwrappers/Database.cpp
-@@ -29,7 +29,9 @@
- #include "utils/AutoPtrHandle.h"
- #include "utils/log.h"
- #include "utils/URIUtils.h"
-+#ifdef BUILD_MYSQL
- #include "mysqldataset.h"
-+#endif /* BUILD_MYSQL */
- #include "sqlitedataset.h"
-
-
-@@ -266,6 +268,7 @@
-
- m_sqlite = true;
-
-+#ifdef BUILD_MYSQL
- if ( dbSettings.type.Equals("mysql") )
- {
- // check we have all information before we cancel the fallback
-@@ -276,7 +279,8 @@
- CLog::Log(LOGINFO, "Essential mysql database information is missing. Require at least host, user and pass defined.");
- }
- else
-+#endif /* BUILD_MYSQL */
- {
- dbSettings.type = "sqlite3";
- dbSettings.host = _P(g_settings.GetDatabaseFolder());
- dbSettings.name = GetBaseDBName();
-@@ -369,10 +373,12 @@
- {
- m_pDB.reset( new SqliteDatabase() ) ;
- }
-+#ifdef BUILD_MYSQL
- else if (dbSettings.type.Equals("mysql"))
- {
- m_pDB.reset( new MysqlDatabase() ) ;
- }
-+#endif /* BUILD_MYSQL */
- else
- {
- CLog::Log(LOGERROR, "Unable to determine database type: %s", dbSettings.type.c_str());
---- a/xbmc/dbwrappers/mysqldataset.cpp
-+++ b/xbmc/dbwrappers/mysqldataset.cpp
-@@ -23,9 +23,11 @@
- #include <string>
- #include <set>
-
-+#include "system.h" // for GetLastError()
-+#ifdef BUILD_MYSQL
-+
- #include "mysqldataset.h"
- #include "utils/log.h"
--#include "system.h" // for GetLastError()
- #include "mysql/errmsg.h"
- #ifdef _WIN32
- #pragma comment(lib, "mysqlclient.lib")
-@@ -1562,3 +1564,4 @@
-
- }//namespace
-
-+#endif /* BUILD_MYSQL */
diff --git a/media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5-fix-plt-trn-get.patch b/media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5-fix-plt-trn-get.patch
deleted file mode 100644
index 7e6ce676..00000000
--- a/media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5-fix-plt-trn-get.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-
-Update libpng 1.5 patch: check return values of png_get_PLTE() and
-png_get_tRNS() before using the values to avoid using uninitialized values.
-
---- a/lib/cximage-6.0/CxImage/ximapng.cpp
-+++ b/lib/cximage-6.0/CxImage/ximapng.cpp
-@@ -178,12 +178,14 @@ bool CxImagePNG::Decode(CxFile *hFile)
- int _num_palette;
- png_colorp _palette;
- #if PNG_LIBPNG_VER > 10399
-- png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette);
-+ png_uint_32 _palette_ret;
-+ _palette_ret = png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette);
-+ if (_palette_ret && _num_palette>0){
- #else
- _num_palette=info_ptr->num_palette;
- _palette=info_ptr->palette;
--#endif
- if (_num_palette>0){
-+#endif
- SetPalette((rgb_color*)_palette,_num_palette);
- SetClrImportant(_num_palette);
- } else if (_bit_depth ==2) { //<DP> needed for 2 bpp grayscale PNGs
-@@ -199,11 +201,13 @@ bool CxImagePNG::Decode(CxFile *hFile)
- int _num_trans;
- png_color_16p _trans_color;
- #if PNG_LIBPNG_VER > 10399
-- png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color);
-+ png_uint_32 _trans_ret;
-+ _trans_ret = png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color);
-+ if (_trans_ret && _num_trans!=0){ //palette transparency
- #else
- _num_trans=info_ptr->num_trans;
--#endif
- if (_num_trans!=0){ //palette transparency
-+#endif
- if (_num_trans==1){
- if (_color_type == PNG_COLOR_TYPE_PALETTE){
- #if PNG_LIBPNG_VER > 10399
-@@ -219,7 +223,11 @@ bool CxImagePNG::Decode(CxFile *hFile)
- #endif
- }
- }
-+#if PNG_LIBPNG_VER > 10399
-+ if (_num_trans>1 && _trans_alpha!=NULL){
-+#else
- if (_num_trans>1){
-+#endif
- RGBQUAD* pal=GetPalette();
- if (pal){
- DWORD ip;
diff --git a/media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5-headers.patch b/media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5-headers.patch
deleted file mode 100644
index 4648f9fd..00000000
--- a/media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5-headers.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/tools/TexturePacker/XBTFWriter.cpp b/tools/TexturePacker/XBTFWriter.cpp
-index 78b47fe..2e75d96 100644
---- a/tools/TexturePacker/XBTFWriter.cpp
-+++ b/tools/TexturePacker/XBTFWriter.cpp
-@@ -22,6 +22,7 @@
- #include "XBTFWriter.h"
- #define __STDC_FORMAT_MACROS
- #include <inttypes.h>
-+#include <unistd.h> /* for unlink() prototype */
- #include "guilib/XBTF.h"
- #include "utils/EndianSwap.h"
- #if !defined(__APPLE__) && !defined(__FreeBSD__)
diff --git a/media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5.patch b/media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5.patch
deleted file mode 100644
index da331d2b..00000000
--- a/media-tv/xbmc/files/xbmc-11.0_beta1-libpng-1.5.patch
+++ /dev/null
@@ -1,596 +0,0 @@
-fix building with newer libpng. patch by Ian Stakenvicius.
-
-https://bugs.gentoo.org/380127
-
---- a/xbmc/lib/cximage-6.0/CxImage/ximapng.h
-+++ b/xbmc/lib/cximage-6.0/CxImage/ximapng.h
-@@ -69,8 +69,13 @@
-
- static void PNGAPI user_error_fn(png_structp png_ptr,png_const_charp error_msg)
- {
-+#if PNG_LIBPNG_VER > 10399
-+ strncpy((char*)png_get_error_ptr(png_ptr),error_msg,255);
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- strncpy((char*)png_ptr->error_ptr,error_msg,255);
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
- };
-
---- a/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp
-+++ b/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp
-@@ -15,7 +15,11 @@
- void CxImagePNG::ima_png_error(png_struct *png_ptr, char *message)
- {
- strcpy(info.szLastError,message);
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
- ////////////////////////////////////////////////////////////////////////////////
- #if CXIMAGE_SUPPORT_DECODE
-@@ -62,7 +66,11 @@
- /* Set error handling if you are using the setjmp/longjmp method (this is
- * the normal method of doing things with libpng). REQUIRED unless you
- * set up your own error handlers in the png_create_read_struct() earlier. */
-+#if PNG_LIBPNG_VER > 10399
-+ if (setjmp(png_jmpbuf(png_ptr))) {
-+#else
- if (setjmp(png_ptr->jmpbuf)) {
-+#endif
- /* Free all of the memory associated with the png_ptr and info_ptr */
- delete [] row_pointers;
- png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
-@@ -70,16 +78,35 @@
- /* read the file information */
- png_read_info(png_ptr, info_ptr);
-
-+ png_uint_32 _width,_height;
-+ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type;
-+#if PNG_LIBPNG_VER > 10399
-+ png_get_IHDR(png_ptr,info_ptr,&_width,&_height,&_bit_depth,&_color_type,
-+ &_interlace_type,&_compression_type,&_filter_type);
-+#else
-+ _width=info_ptr->width;
-+ _height=info_ptr->height;
-+ _bit_depth=info_ptr->bit_depth;
-+ _color_type=info_ptr->color_type;
-+ _interlace_type=info_ptr->interlace_type;
-+ _compression_type=info_ptr->compression_type;
-+ _filter_type=info_ptr->filter_type;
-+#endif
-+
- if (info.nEscape == -1){
-- head.biWidth = info_ptr->width;
-- head.biHeight= info_ptr->height;
-+ head.biWidth = _width;
-+ head.biHeight= _height;
- info.dwType = CXIMAGE_FORMAT_PNG;
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
-
- /* calculate new number of channels */
- int channels=0;
-- switch(info_ptr->color_type){
-+ switch(_color_type){
- case PNG_COLOR_TYPE_GRAY:
- case PNG_COLOR_TYPE_PALETTE:
- channels = 1;
-@@ -101,71 +128,108 @@
- break;
- default:
- strcpy(info.szLastError,"unknown PNG color type");
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
-
- //find the right pixel depth used for cximage
-+#if PNG_LIBPNG_VER > 10399
-+ int pixel_depth = _bit_depth * png_get_channels(png_ptr,info_ptr);
-+#else
- int pixel_depth = info_ptr->pixel_depth;
-+#endif
- if (channels == 1 && pixel_depth>8) pixel_depth=8;
- if (channels == 2) pixel_depth=8;
- if (channels >= 3) pixel_depth=24;
-
-- if (!Create(info_ptr->width, info_ptr->height, pixel_depth, CXIMAGE_FORMAT_PNG)){
-+ if (!Create(_width, _height, pixel_depth, CXIMAGE_FORMAT_PNG)){
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
- longjmp(png_ptr->jmpbuf, 1);
-+#endif
- }
-
- /* get metrics */
-- switch (info_ptr->phys_unit_type)
-+ png_uint_32 _x_pixels_per_unit,_y_pixels_per_unit;
-+ int _phys_unit_type;
-+#if PNG_LIBPNG_VER > 10399
-+ png_get_pHYs(png_ptr,info_ptr,&_x_pixels_per_unit,&_y_pixels_per_unit,&_phys_unit_type);
-+#else
-+ _x_pixels_per_unit=info_ptr->x_pixels_per_unit;
-+ _y_pixels_per_unit=info_ptr->y_pixels_per_unit;
-+ _phys_unit_type=info_ptr->phys_unit_type;
-+#endif
-+ switch (_phys_unit_type)
- {
- case PNG_RESOLUTION_UNKNOWN:
-- SetXDPI(info_ptr->x_pixels_per_unit);
-- SetYDPI(info_ptr->y_pixels_per_unit);
-+ SetXDPI(_x_pixels_per_unit);
-+ SetYDPI(_y_pixels_per_unit);
- break;
- case PNG_RESOLUTION_METER:
-- SetXDPI((long)floor(info_ptr->x_pixels_per_unit * 254.0 / 10000.0 + 0.5));
-- SetYDPI((long)floor(info_ptr->y_pixels_per_unit * 254.0 / 10000.0 + 0.5));
-+ SetXDPI((long)floor(_x_pixels_per_unit * 254.0 / 10000.0 + 0.5));
-+ SetYDPI((long)floor(_y_pixels_per_unit * 254.0 / 10000.0 + 0.5));
- break;
- }
-
-- if (info_ptr->num_palette>0){
-- SetPalette((rgb_color*)info_ptr->palette,info_ptr->num_palette);
-- SetClrImportant(info_ptr->num_palette);
-- } else if (info_ptr->bit_depth ==2) { //<DP> needed for 2 bpp grayscale PNGs
-+ int _num_palette;
-+ png_colorp _palette;
-+#if PNG_LIBPNG_VER > 10399
-+ png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette);
-+#else
-+ _num_palette=info_ptr->num_palette;
-+ _palette=info_ptr->palette;
-+#endif
-+ if (_num_palette>0){
-+ SetPalette((rgb_color*)_palette,_num_palette);
-+ SetClrImportant(_num_palette);
-+ } else if (_bit_depth ==2) { //<DP> needed for 2 bpp grayscale PNGs
- SetPaletteColor(0,0,0,0);
- SetPaletteColor(1,85,85,85);
- SetPaletteColor(2,170,170,170);
- SetPaletteColor(3,255,255,255);
- } else SetGrayPalette(); //<DP> needed for grayscale PNGs
-
-- int nshift = max(0,(info_ptr->bit_depth>>3)-1)<<3;
-+ int nshift = max(0,(_bit_depth>>3)-1)<<3;
-
-- if (info_ptr->num_trans!=0){ //palette transparency
-- if (info_ptr->num_trans==1){
-- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE){
-+ png_bytep _trans_alpha;
-+ int _num_trans;
-+ png_color_16p _trans_color;
-+#if PNG_LIBPNG_VER > 10399
-+ png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color);
-+#else
-+ _num_trans=info_ptr->num_trans;
-+#endif
-+ if (_num_trans!=0){ //palette transparency
-+ if (_num_trans==1){
-+ if (_color_type == PNG_COLOR_TYPE_PALETTE){
- #if PNG_LIBPNG_VER > 10399
-- info.nBkgndIndex = info_ptr->trans_color.index;
-+ info.nBkgndIndex = _trans_color->index;
- #else
- info.nBkgndIndex = info_ptr->trans_values.index;
- #endif
- } else{
- #if PNG_LIBPNG_VER > 10399
-- info.nBkgndIndex = info_ptr->trans_color.gray>>nshift;
-+ info.nBkgndIndex = _trans_color->gray>>nshift;
- #else
- info.nBkgndIndex = info_ptr->trans_values.gray>>nshift;
- #endif
- }
- }
-- if (info_ptr->num_trans>1){
-+ if (_num_trans>1){
- RGBQUAD* pal=GetPalette();
- if (pal){
- DWORD ip;
-- for (ip=0;ip<min(head.biClrUsed,(unsigned long)info_ptr->num_trans);ip++)
-+ for (ip=0;ip<min(head.biClrUsed,(unsigned long)_num_trans);ip++)
- #if PNG_LIBPNG_VER > 10399
-- pal[ip].rgbReserved=info_ptr->trans_alpha[ip];
-+ pal[ip].rgbReserved=_trans_alpha[ip];
- #else
- pal[ip].rgbReserved=info_ptr->trans[ip];
- #endif
-- for (ip=info_ptr->num_trans;ip<head.biClrUsed;ip++){
-+ for (ip=_num_trans;ip<head.biClrUsed;ip++){
- pal[ip].rgbReserved=255;
- }
- info.bAlphaPaletteEnabled=true;
-@@ -174,14 +238,12 @@
- }
-
- if (channels == 3){ //check RGB binary transparency
-- png_bytep trans;
-- int num_trans;
-- png_color_16 *image_background;
-- if (png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &image_background)){
--#if PNG_LIBPNG_VER > 10399
-- info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_color.red>>nshift);
-- info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_color.green>>nshift);
-- info.nBkgndColor.rgbBlue = (BYTE)(info_ptr->trans_color.blue>>nshift);
-+ /* seems unnecessary to call again, but the conditional must be important so... */
-+ if (png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color)){
-+#if PNG_LIBPNG_VER > 10399
-+ info.nBkgndColor.rgbRed = (BYTE)(_trans_color->red>>nshift);
-+ info.nBkgndColor.rgbGreen = (BYTE)(_trans_color->green>>nshift);
-+ info.nBkgndColor.rgbBlue = (BYTE)(_trans_color->blue>>nshift);
- #else
- info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_values.red>>nshift);
- info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_values.green>>nshift);
-@@ -202,15 +264,24 @@
- }
-
- // <vho> - flip the RGB pixels to BGR (or RGBA to BGRA)
-- if (info_ptr->color_type & PNG_COLOR_MASK_COLOR){
-+ if (_color_type & PNG_COLOR_MASK_COLOR){
- png_set_bgr(png_ptr);
- }
-
- // <vho> - handle cancel
-- if (info.nEscape) longjmp(png_ptr->jmpbuf, 1);
-+ if (info.nEscape)
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
-+ longjmp(png_ptr->jmpbuf, 1);
-+#endif
-
- // row_bytes is the width x number of channels x (bit-depth / 8)
-+#if PNG_LIBPNG_VER > 10399
-+ row_pointers = new BYTE[png_get_rowbytes(png_ptr,info_ptr) + 8];
-+#else
- row_pointers = new BYTE[info_ptr->rowbytes + 8];
-+#endif
-
- // turn on interlace handling
- int number_passes = png_set_interlace_handling(png_ptr);
-@@ -221,8 +292,12 @@
- SetCodecOption(0);
- }
-
-- int chan_offset = info_ptr->bit_depth >> 3;
-+ int chan_offset = _bit_depth >> 3;
-+#if PNG_LIBPNG_VER > 10399
-+ int pixel_offset = (_bit_depth * png_get_channels(png_ptr,info_ptr)) >> 3;
-+#else
- int pixel_offset = info_ptr->pixel_depth >> 3;
-+#endif
-
- for (int pass=0; pass < number_passes; pass++) {
- iter.Upset();
-@@ -230,7 +305,12 @@
- do {
-
- // <vho> - handle cancel
-- if (info.nEscape) longjmp(png_ptr->jmpbuf, 1);
-+ if (info.nEscape)
-+#if PNG_LIBPNG_VER > 10399
-+ longjmp(png_jmpbuf(png_ptr), 1);
-+#else
-+ longjmp(png_ptr->jmpbuf, 1);
-+#endif
-
- #if CXIMAGE_SUPPORT_ALPHA // <vho>
- if (AlphaIsValid()) {
-@@ -241,7 +321,7 @@
- BYTE* prow= iter.GetRow(ay);
-
- //recover data from previous scan
-- if (info_ptr->interlace_type && pass>0 && pass!=7){
-+ if (_interlace_type && pass>0 && pass!=7){
- for(ax=0;ax<head.biWidth;ax++){
- long px = ax * pixel_offset;
- if (channels == 2){
-@@ -278,10 +358,14 @@
- #endif // CXIMAGE_SUPPORT_ALPHA // vho
- {
- //recover data from previous scan
-- if (info_ptr->interlace_type && pass>0){
-+ if (_interlace_type && pass>0){
-+#if PNG_LIBPNG_VER > 10399
-+ iter.GetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr));
-+#else
- iter.GetRow(row_pointers, info_ptr->rowbytes);
-+#endif
- //re-expand buffer for images with bit depth > 8
-- if (info_ptr->bit_depth > 8){
-+ if (_bit_depth > 8){
- for(long ax=(head.biWidth*channels-1);ax>=0;ax--)
- row_pointers[ax*chan_offset] = row_pointers[ax];
- }
-@@ -291,15 +375,19 @@
- png_read_row(png_ptr, row_pointers, NULL);
-
- //shrink 16 bit depth images down to 8 bits
-- if (info_ptr->bit_depth > 8){
-+ if (_bit_depth > 8){
- for(long ax=0;ax<(head.biWidth*channels);ax++)
- row_pointers[ax] = row_pointers[ax*chan_offset];
- }
-
- //copy the pixels
-+#if PNG_LIBPNG_VER > 10399
-+ iter.SetRow(row_pointers, png_get_rowbytes(png_ptr,info_ptr));
-+#else
- iter.SetRow(row_pointers, info_ptr->rowbytes);
-+#endif
- //<DP> expand 2 bpp images only in the last pass
-- if (info_ptr->bit_depth==2 && pass==(number_passes-1))
-+ if (_bit_depth==2 && pass==(number_passes-1))
- expand2to4bpp(iter.GetRow());
-
- //go on
-@@ -361,9 +449,13 @@
- /* Set error handling. REQUIRED if you aren't supplying your own
- * error hadnling functions in the png_create_write_struct() call.
- */
-+#if PNG_LIBPNG_VER > 10399
-+ if (setjmp(png_jmpbuf(png_ptr))){
-+#else
- if (setjmp(png_ptr->jmpbuf)){
- /* If we get here, we had a problem reading the file */
- if (info_ptr->palette) free(info_ptr->palette);
-+#endif
- png_destroy_write_struct(&png_ptr, (png_infopp)&info_ptr);
- cx_throw("Error saving PNG file");
- }
-@@ -372,9 +464,23 @@
- //png_init_io(png_ptr, hFile);
-
- // use custom I/O functions
-- png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data);
-+ png_set_write_fn(png_ptr,hFile,/*(png_rw_ptr)*/user_write_data,/*(png_flush_ptr)*/user_flush_data);
-
- /* set the file information here */
-+#if PNG_LIBPNG_VER > 10399
-+ /* use variables to hold the values so it isnt necessary to png_get them later */
-+ png_uint_32 _width,_height;
-+ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type;
-+ png_byte _channels,_pixel_depth;
-+
-+ _width = GetWidth();
-+ _height = GetHeight();
-+ _pixel_depth = (BYTE)GetBpp();
-+ _channels = (GetBpp()>8) ? (BYTE)3: (BYTE)1;
-+ _bit_depth = (BYTE)(GetBpp()/_channels);
-+ _compression_type = PNG_COMPRESSION_TYPE_DEFAULT;
-+ _filter_type = PNG_FILTER_TYPE_DEFAULT;
-+#else
- info_ptr->width = GetWidth();
- info_ptr->height = GetHeight();
- info_ptr->pixel_depth = (BYTE)GetBpp();
-@@ -382,13 +488,22 @@
- info_ptr->bit_depth = (BYTE)(GetBpp()/info_ptr->channels);
- info_ptr->compression_type = info_ptr->filter_type = 0;
- info_ptr->valid = 0;
-+#endif
-
- switch(GetCodecOption(CXIMAGE_FORMAT_PNG)){
- case 1:
-+#if PNG_LIBPNG_VER > 10399
-+ _interlace_type = PNG_INTERLACE_ADAM7;
-+#else
- info_ptr->interlace_type = PNG_INTERLACE_ADAM7;
-+#endif
- break;
- default:
-+#if PNG_LIBPNG_VER > 10399
-+ _interlace_type = PNG_INTERLACE_NONE;
-+#else
- info_ptr->interlace_type = PNG_INTERLACE_NONE;
-+#endif
- }
-
- /* set compression level */
-@@ -398,22 +513,47 @@
-
- if (GetNumColors()){
- if (bGrayScale){
-+#if PNG_LIBPNG_VER > 10399
-+ _color_type = PNG_COLOR_TYPE_GRAY;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
-+#endif
- } else {
-+#if PNG_LIBPNG_VER > 10399
-+ _color_type = PNG_COLOR_TYPE_PALETTE;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
-+#endif
- }
- } else {
-+#if PNG_LIBPNG_VER > 10399
-+ _color_type = PNG_COLOR_TYPE_RGB;
-+#else
- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
-+#endif
- }
- #if CXIMAGE_SUPPORT_ALPHA
- if (AlphaIsValid()){
-+#if PNG_LIBPNG_VER > 10399
-+ _color_type |= PNG_COLOR_MASK_ALPHA;
-+ _channels++;
-+ _bit_depth = 8;
-+ _pixel_depth += 8;
-+#else
- info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
- info_ptr->channels++;
- info_ptr->bit_depth = 8;
- info_ptr->pixel_depth += 8;
-+#endif
- }
- #endif
-
-+#if PNG_LIBPNG_VER > 10399
-+ /* set the header here, since we're done modifying these values */
-+ png_set_IHDR(png_ptr,info_ptr,_width,_height,_bit_depth,_color_type,_interlace_type,
-+ _compression_type,_filter_type);
-+#endif
-+
- /* set background */
- png_color_16 image_background={ 0, 255, 255, 255, 0 };
- RGBQUAD tc = GetTransColor();
-@@ -427,22 +567,24 @@
- /* set metrics */
- png_set_pHYs(png_ptr, info_ptr, head.biXPelsPerMeter, head.biYPelsPerMeter, PNG_RESOLUTION_METER);
-
-+#if PNG_LIBPNG_VER <= 10399
- png_set_IHDR(png_ptr, info_ptr, info_ptr->width, info_ptr->height, info_ptr->bit_depth,
- info_ptr->color_type, info_ptr->interlace_type,
- PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
-+#endif
-
- //<DP> simple transparency
- if (info.nBkgndIndex >= 0){
-- info_ptr->num_trans = 1;
-- info_ptr->valid |= PNG_INFO_tRNS;
- #if PNG_LIBPNG_VER > 10399
-- info_ptr->trans_alpha = trans;
-- info_ptr->trans_color.index = (BYTE)info.nBkgndIndex;
-- info_ptr->trans_color.red = tc.rgbRed;
-- info_ptr->trans_color.green = tc.rgbGreen;
-- info_ptr->trans_color.blue = tc.rgbBlue;
-- info_ptr->trans_color.gray = info_ptr->trans_color.index;
-+ png_color_16 _trans_color;
-+ _trans_color.index = (BYTE)info.nBkgndIndex;
-+ _trans_color.red = tc.rgbRed;
-+ _trans_color.green = tc.rgbGreen;
-+ _trans_color.blue = tc.rgbBlue;
-+ _trans_color.gray = _trans_color.index;
- #else
-+ info_ptr->num_trans = 1;
-+ info_ptr->valid |= PNG_INFO_tRNS;
- info_ptr->trans = trans;
- info_ptr->trans_values.index = (BYTE)info.nBkgndIndex;
- info_ptr->trans_values.red = tc.rgbRed;
-@@ -454,34 +596,53 @@
- // the transparency indexes start from 0 for non grayscale palette
- if (!bGrayScale && head.biClrUsed && info.nBkgndIndex)
- SwapIndex(0,(BYTE)info.nBkgndIndex);
-+
-+#if PNG_LIBPNG_VER > 10399
-+ png_set_tRNS(png_ptr,info_ptr,(png_bytep)trans,1,&_trans_color);
-+#endif
- }
-
- /* set the palette if there is one */
-+#if PNG_LIBPNG_VER > 10399
-+ png_colorp _palette;
-+#endif
- if (GetPalette()){
-+#if PNG_LIBPNG_VER <= 10399
- if (!bGrayScale){
- info_ptr->valid |= PNG_INFO_PLTE;
- }
-+#endif
-
- int nc = GetClrImportant();
- if (nc==0) nc = GetNumColors();
-
-+ // copy the palette colors
-+#if PNG_LIBPNG_VER > 10399
-+ _palette = new png_color[nc];
-+#else
-+ info_ptr->palette = new png_color[nc];
-+ info_ptr->num_palette = (png_uint_16) nc;
-+#endif
-+ for (int i=0; i<nc; i++)
-+#if PNG_LIBPNG_VER > 10399
-+ GetPaletteColor(i, &_palette[i].red, &_palette[i].green, &_palette[i].blue);
-+
-+ png_set_PLTE(png_ptr,info_ptr,_palette,nc);
-+#else
-+ GetPaletteColor(i, &info_ptr->palette[i].red, &info_ptr->palette[i].green, &info_ptr->palette[i].blue);
-+#endif
-+
- if (info.bAlphaPaletteEnabled){
- for(WORD ip=0; ip<nc;ip++)
- trans[ip]=GetPaletteColor((BYTE)ip).rgbReserved;
-- info_ptr->num_trans = (WORD)nc;
-- info_ptr->valid |= PNG_INFO_tRNS;
- #if PNG_LIBPNG_VER > 10399
-- info_ptr->trans_alpha = trans;
-+ png_set_tRNS(png_ptr,info_ptr,(png_bytep)trans,nc,NULL);
- #else
-+ info_ptr->num_trans = (WORD)nc;
-+ info_ptr->valid |= PNG_INFO_tRNS;
- info_ptr->trans = trans;
- #endif
- }
--
-- // copy the palette colors
-- info_ptr->palette = new png_color[nc];
-- info_ptr->num_palette = (png_uint_16) nc;
-- for (int i=0; i<nc; i++)
-- GetPaletteColor(i, &info_ptr->palette[i].red, &info_ptr->palette[i].green, &info_ptr->palette[i].blue);
- }
-
- #if CXIMAGE_SUPPORT_ALPHA // <vho>
-@@ -495,8 +656,12 @@
- } } }
- #endif // CXIMAGE_SUPPORT_ALPHA // <vho>
-
-+#if PNG_LIBPNG_VER > 10399
-+ int row_size = max(info.dwEffWidth, (_width * _channels * _bit_depth / 8));
-+#else
- int row_size = max(info.dwEffWidth, info_ptr->width*info_ptr->channels*(info_ptr->bit_depth/8));
- info_ptr->rowbytes = row_size;
-+#endif
- BYTE *row_pointers = new BYTE[row_size];
-
- /* write the file information */
-@@ -514,7 +679,11 @@
- if (AlphaIsValid()){
- for (long ax=head.biWidth-1; ax>=0;ax--){
- c = BlindGetPixelColor(ax,ay);
-+#if PNG_LIBPNG_VER > 10399
-+ int px = ax * _channels;
-+#else
- int px = ax * info_ptr->channels;
-+#endif
- if (!bGrayScale){
- row_pointers[px++]=c.rgbRed;
- row_pointers[px++]=c.rgbGreen;
-@@ -529,7 +698,11 @@
- #endif //CXIMAGE_SUPPORT_ALPHA // <vho>
- {
- iter.GetRow(row_pointers, row_size);
-+#if PNG_LIBPNG_VER > 10399
-+ if (_color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP
-+#else
- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB) //HACK BY OP
-+#endif
- RGBtoBGR(row_pointers, row_size);
- png_write_row(png_ptr, row_pointers);
- }
-@@ -546,9 +719,14 @@
- png_write_end(png_ptr, info_ptr);
-
- /* if you malloced the palette, free it here */
-+#if PNG_LIBPNG_VER > 10399
-+ if (_palette){
-+ delete [] (_palette);
-+#else
- if (info_ptr->palette){
- delete [] (info_ptr->palette);
- info_ptr->palette = NULL;
-+#endif
- }
-
- /* clean up after the write, and free any memory allocated */
diff --git a/media-tv/xbmc/files/xbmc-12.1-nomythtv.patch b/media-tv/xbmc/files/xbmc-12.1-nomythtv.patch
deleted file mode 100644
index f793ba34..00000000
--- a/media-tv/xbmc/files/xbmc-12.1-nomythtv.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-http://trac.xbmc.org/ticket/11775
-
-make mythtv support optional
-
-diff --git a/Makefile.in b/Makefile.in
-index 9ffae7e..17cc525 100755
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -147,7 +147,7 @@ LIB_DIRS=\
- lib/cpluff \
- lib/xbmc-dll-symbols
-
--ifeq (@USE_MYSQL@,1)
-+ifeq (@USE_MYTHTV@,1)
- LIB_DIRS += lib/cmyth
- CMYTH=cmyth
- endif
-diff --git a/configure.in b/configure.in
-index d44825f..629d7b4 100755
---- a/configure.in
-+++ b/configure.in
-@@ -387,6 +387,12 @@ AC_ARG_ENABLE([mysql],
- [use_mysql=$enableval],
- [use_mysql=yes])
-
-+AC_ARG_ENABLE([mythtv],
-+ [AS_HELP_STRING([--disable-mythtv],
-+ [disable mythtv])],
-+ [use_mythtv=$enableval],
-+ [use_mythtv=yes])
-+
- AC_ARG_ENABLE([webserver],
- [AS_HELP_STRING([--disable-webserver],
- [disable webserver])],
-@@ -748,6 +754,9 @@ if test "$use_mysql" = "yes"; then
- else
- AC_MSG_ERROR($missing_program)
- fi
-+ if test "$use_mythtv" = "yes"; then
-+ AC_DEFINE([HAVE_MYTHTV],[1],["Define to 1 if you want mythtv support"])
-+ fi
- fi
- AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library))
- AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library))
-@@ -1895,6 +1904,15 @@ else
- final_message="$final_message\n MySQL:\tNo"
- USE_MYSQL=0
- fi
-+
-+if test "$use_mythtv" = "yes"; then
-+ final_message="$final_message\n MythTV:\tYes"
-+ USE_MYTHTV=1
-+else
-+ final_message="$final_message\n MythTV:\tNo"
-+ USE_MYTHTV=0
-+fi
-+
- if test "$use_webserver" = "yes"; then
- final_message="$final_message\n Webserver:\tYes"
- USE_WEB_SERVER=1
-@@ -2123,6 +2141,7 @@ AC_SUBST(USE_LIBUDEV)
- AC_SUBST(USE_LIBUSB)
- AC_SUBST(USE_LIBCEC)
- AC_SUBST(USE_MYSQL)
-+AC_SUBST(USE_MYTHTV)
- AC_SUBST(USE_WEB_SERVER)
-
-
diff --git a/media-tv/xbmc/files/xbmc-12.3-no-sse2.patch b/media-tv/xbmc/files/xbmc-12.3-no-sse2.patch
deleted file mode 100644
index a0f787c0..00000000
--- a/media-tv/xbmc/files/xbmc-12.3-no-sse2.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-https://bugs.gentoo.org/475266
-
-From 07ccc514dc688f0dd53f603d206894023e65ab20 Mon Sep 17 00:00:00 2001
-From: Jose Quinteiro <gentoo@quinteiro.org>
-Date: Sat, 27 Apr 2013 11:29:51 -0700
-Subject: [PATCH] Detect SSE2 support
-
-Compilation on an older 32-bit Athlon XP chip fails with the error
-"./Utils/AEUtil.h:50:12: error: '__m128i' does not name a type"
-This is because the __m128i type is only available on SSE2 platforms.
-Modify the preprocessor logic to detect SSE and SSE2 support separately.
-
-The "emmintrin.h" header should only be included on SSE2 platforms as
-well.
----
- xbmc/cores/AudioEngine/Utils/AEConvert.cpp | 25 ++++++++++---------------
- xbmc/cores/AudioEngine/Utils/AEUtil.cpp | 4 ++--
- xbmc/cores/AudioEngine/Utils/AEUtil.h | 9 ++++++++-
- 3 files changed, 20 insertions(+), 18 deletions(-)
-
-diff --git a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp
-index 0b0b646..7cfde5e 100644
---- a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp
-+++ b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp
-@@ -33,11 +33,6 @@
- #include <math.h>
- #include <string.h>
-
--#ifdef __SSE__
--#include <xmmintrin.h>
--#include <emmintrin.h>
--#endif
--
- #ifdef __ARM_NEON__
- #include <arm_neon.h>
- #endif
-@@ -517,7 +512,7 @@ unsigned int CAEConvert::Float_S8(float *data, const unsigned int samples, uint8
- unsigned int CAEConvert::Float_S16LE(float *data, const unsigned int samples, uint8_t *dest)
- {
- int16_t *dst = (int16_t*)dest;
-- #ifdef __SSE__
-+ #ifdef __SSE2__
-
- unsigned int count = samples;
- unsigned int unaligned = (0x10 - ((uintptr_t)data & 0xF)) >> 2;
-@@ -623,7 +618,7 @@ unsigned int CAEConvert::Float_S16LE(float *data, const unsigned int samples, ui
- /* cleanup */
- _mm_empty();
-
-- #else /* no SSE */
-+ #else /* no SSE2 */
-
- uint32_t i = 0;
- uint32_t even = samples & ~0x3;
-@@ -651,7 +646,7 @@ unsigned int CAEConvert::Float_S16LE(float *data, const unsigned int samples, ui
- unsigned int CAEConvert::Float_S16BE(float *data, const unsigned int samples, uint8_t *dest)
- {
- int16_t *dst = (int16_t*)dest;
-- #ifdef __SSE__
-+ #ifdef __SSE2__
-
- unsigned int count = samples;
- unsigned int unaligned = (0x10 - ((uintptr_t)data & 0xF)) >> 2;
-@@ -757,7 +752,7 @@ unsigned int CAEConvert::Float_S16BE(float *data, const unsigned int samples, ui
- /* cleanup */
- _mm_empty();
-
-- #else /* no SSE */
-+ #else /* no SSE2 */
-
- uint32_t i = 0;
- uint32_t even = samples & ~0x3;
-@@ -785,7 +780,7 @@ unsigned int CAEConvert::Float_S16BE(float *data, const unsigned int samples, ui
- unsigned int CAEConvert::Float_S24NE4(float *data, const unsigned int samples, uint8_t *dest)
- {
- int32_t *dst = (int32_t*)dest;
-- #ifdef __SSE__
-+ #ifdef __SSE2__
-
- const __m128 mul = _mm_set_ps1((float)INT24_MAX+.5f);
- unsigned int count = samples;
-@@ -835,7 +830,7 @@ unsigned int CAEConvert::Float_S24NE4(float *data, const unsigned int samples, u
- }
- }
- _mm_empty();
-- #else /* no SSE */
-+ #else /* no SSE2 */
- for (uint32_t i = 0; i < samples; ++i)
- *dst++ = (safeRound(*data++ * ((float)INT24_MAX+.5f)) & 0xFFFFFF) << 8;
- #endif
-@@ -929,7 +924,7 @@ unsigned int CAEConvert::Float_S24NE3(float *data, const unsigned int samples, u
- unsigned int CAEConvert::Float_S32LE(float *data, const unsigned int samples, uint8_t *dest)
- {
- int32_t *dst = (int32_t*)dest;
-- #ifdef __SSE__
-+ #ifdef __SSE2__
- const __m128 mul = _mm_set_ps1(MUL32);
- unsigned int count = samples;
-
-@@ -989,7 +984,7 @@ unsigned int CAEConvert::Float_S32LE(float *data, const unsigned int samples, ui
- _mm_empty();
- #else
-
-- /* no SIMD */
-+ /* no SSE2 */
- for (uint32_t i = 0; i < samples; ++i, ++data, ++dst)
- {
- dst[0] = safeRound(data[0] * MUL32);
-@@ -1038,7 +1033,7 @@ unsigned int CAEConvert::Float_S32LE_Neon(float *data, const unsigned int sample
- unsigned int CAEConvert::Float_S32BE(float *data, const unsigned int samples, uint8_t *dest)
- {
- int32_t *dst = (int32_t*)dest;
-- #ifdef __SSE__
-+ #ifdef __SSE2__
- const __m128 mul = _mm_set_ps1(MUL32);
- unsigned int count = samples;
-
-@@ -1097,7 +1092,7 @@ unsigned int CAEConvert::Float_S32BE(float *data, const unsigned int samples, ui
- }
- _mm_empty();
- #else
-- /* no SIMD */
-+ /* no SSE2 */
- for (uint32_t i = 0; i < samples; ++i, ++data, ++dst)
- {
- dst[0] = safeRound(data[0] * MUL32);
-diff --git a/xbmc/cores/AudioEngine/Utils/AEUtil.cpp b/xbmc/cores/AudioEngine/Utils/AEUtil.cpp
-index 6de84dc..2b6e0cd 100644
---- a/xbmc/cores/AudioEngine/Utils/AEUtil.cpp
-+++ b/xbmc/cores/AudioEngine/Utils/AEUtil.cpp
-@@ -30,7 +30,7 @@ using namespace std;
-
- /* declare the rng seed and initialize it */
- unsigned int CAEUtil::m_seed = (unsigned int)(CurrentHostCounter() / 1000.0f);
--#ifdef __SSE__
-+#ifdef __SSE2__
- /* declare the SSE seed and initialize it */
- MEMALIGN(16, __m128i CAEUtil::m_sseSeed) = _mm_set_epi32(CAEUtil::m_seed, CAEUtil::m_seed+1, CAEUtil::m_seed, CAEUtil::m_seed+1);
- #endif
-@@ -386,7 +386,7 @@ float CAEUtil::FloatRand1(const float min, const float max)
-
- void CAEUtil::FloatRand4(const float min, const float max, float result[4], __m128 *sseresult/* = NULL */)
- {
-- #ifdef __SSE__
-+ #ifdef __SSE2__
- /*
- this method may be called from other SSE code, we need
- to calculate the delta & factor using SSE as the FPU
-diff --git a/xbmc/cores/AudioEngine/Utils/AEUtil.h b/xbmc/cores/AudioEngine/Utils/AEUtil.h
-index 48cbc3b..6fdb7f2 100644
---- a/xbmc/cores/AudioEngine/Utils/AEUtil.h
-+++ b/xbmc/cores/AudioEngine/Utils/AEUtil.h
-@@ -27,6 +27,9 @@
- #ifdef TARGET_WINDOWS
- #if _M_IX86_FP>0 && !defined(__SSE__)
- #define __SSE__
-+#if _M_IX86_FP>1 && !defined(__SSE2__)
-+#define __SSE2__
-+#endif
- #endif
- #endif
-
-@@ -36,6 +39,10 @@
- #define __m128 void
- #endif
-
-+#ifdef __SSE2__
-+#include <emmintrin.h>
-+#endif
-+
- #ifdef __GNUC__
- #define MEMALIGN(b, x) x __attribute__((aligned(b)))
- #else
-@@ -63,7 +70,7 @@ class CAEUtil
- {
- private:
- static unsigned int m_seed;
-- #ifdef __SSE__
-+ #ifdef __SSE2__
- static __m128i m_sseSeed;
- #endif
-
---
-1.8.4.3
-
diff --git a/media-tv/xbmc/files/xbmc-9.11-TexturePacker-parallel-build.patch b/media-tv/xbmc/files/xbmc-9.11-TexturePacker-parallel-build.patch
deleted file mode 100644
index f6bc030e..00000000
--- a/media-tv/xbmc/files/xbmc-9.11-TexturePacker-parallel-build.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-http://trac.xbmc.org/ticket/9275
-
---- xbmc/Makefile.in
-+++ xbmc/Makefile.in
-@@ -501,7 +501,7 @@ else
- $(MAKE) -C tools/XBMCTex/
- endif
-
--tools/TexturePacker/TexturePacker:
-+tools/TexturePacker/TexturePacker: guilib/guilib.a xbmc/lib/libsquish/libsquish-@ARCH@.a
- $(MAKE) -C tools/TexturePacker/
-
- install-bin: xbmc.bin # developement convenience target
diff --git a/media-tv/xbmc/files/xbmc-9.11-jpeg-speedup.patch b/media-tv/xbmc/files/xbmc-9.11-jpeg-speedup.patch
deleted file mode 100644
index 63cadbf5..00000000
--- a/media-tv/xbmc/files/xbmc-9.11-jpeg-speedup.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-fix from upstream
-http://bugs.gentoo.org/300909
-
-r26689 | jmarshallnz | 2010-01-11 14:30:08 -0500 (Mon, 11 Jan 2010) | 2 lines
-fixed: Ticket #7810 - high cpu load during loading of images with libjpeg7, thanks to akawaka.
-
-Index: xbmc/lib/cximage-6.0/CxImage/ximajpg.cpp
-===================================================================
---- xbmc/lib/cximage-6.0/CxImage/ximajpg.cpp (revision 26688)
-+++ xbmc/lib/cximage-6.0/CxImage/ximajpg.cpp (revision 26689)
-@@ -220,6 +220,7 @@ bool CxImageJPG::Decode(CxFile * hFile)
-
- // Set the scale <ignacio>
- cinfo.scale_denom = GetJpegScale();
-+ cinfo.scale_num = 1;
-
- // Borrowed the idea from GIF implementation <ignacio>
- if (info.nEscape == -1) {
diff --git a/media-tv/xbmc/files/xbmc-9.11-libpng14.patch b/media-tv/xbmc/files/xbmc-9.11-libpng14.patch
deleted file mode 100644
index b5af087e..00000000
--- a/media-tv/xbmc/files/xbmc-9.11-libpng14.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-http://bugs.gentoo.org/319113
-http://repos.archlinux.org/wsvn/community/xbmc/trunk/libpng14.patch
-
-diff -Nur xbmc-9.11.orig/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp xbmc-9.11/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp
---- xbmc-9.11.orig/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp 2008-07-18 23:40:53.000000000 +0300
-+++ xbmc-9.11/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp 2010-01-20 21:55:11.000000000 +0200
-@@ -142,9 +142,9 @@
- if (info_ptr->num_trans!=0){ //palette transparency
- if (info_ptr->num_trans==1){
- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE){
-- info.nBkgndIndex = info_ptr->trans_values.index;
-+ info.nBkgndIndex = info_ptr->trans_color.index;
- } else{
-- info.nBkgndIndex = info_ptr->trans_values.gray>>nshift;
-+ info.nBkgndIndex = info_ptr->trans_color.gray>>nshift;
- }
- }
- if (info_ptr->num_trans>1){
-@@ -152,7 +152,7 @@
- if (pal){
- DWORD ip;
- for (ip=0;ip<min(head.biClrUsed,(unsigned long)info_ptr->num_trans);ip++)
-- pal[ip].rgbReserved=info_ptr->trans[ip];
-+ pal[ip].rgbReserved=info_ptr->trans_alpha[ip];
- for (ip=info_ptr->num_trans;ip<head.biClrUsed;ip++){
- pal[ip].rgbReserved=255;
- }
-@@ -166,9 +166,9 @@
- int num_trans;
- png_color_16 *image_background;
- if (png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &image_background)){
-- info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_values.red>>nshift);
-- info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_values.green>>nshift);
-- info.nBkgndColor.rgbBlue = (BYTE)(info_ptr->trans_values.blue>>nshift);
-+ info.nBkgndColor.rgbRed = (BYTE)(info_ptr->trans_color.red>>nshift);
-+ info.nBkgndColor.rgbGreen = (BYTE)(info_ptr->trans_color.green>>nshift);
-+ info.nBkgndColor.rgbBlue = (BYTE)(info_ptr->trans_color.blue>>nshift);
- info.nBkgndColor.rgbReserved = 0;
- info.nBkgndIndex = 0;
- }
-@@ -417,12 +417,12 @@
- if (info.nBkgndIndex >= 0){
- info_ptr->num_trans = 1;
- info_ptr->valid |= PNG_INFO_tRNS;
-- info_ptr->trans = trans;
-- info_ptr->trans_values.index = (BYTE)info.nBkgndIndex;
-- info_ptr->trans_values.red = tc.rgbRed;
-- info_ptr->trans_values.green = tc.rgbGreen;
-- info_ptr->trans_values.blue = tc.rgbBlue;
-- info_ptr->trans_values.gray = info_ptr->trans_values.index;
-+ info_ptr->trans_alpha = trans;
-+ info_ptr->trans_color.index = (BYTE)info.nBkgndIndex;
-+ info_ptr->trans_color.red = tc.rgbRed;
-+ info_ptr->trans_color.green = tc.rgbGreen;
-+ info_ptr->trans_color.blue = tc.rgbBlue;
-+ info_ptr->trans_color.gray = info_ptr->trans_color.index;
-
- // the transparency indexes start from 0 for non grayscale palette
- if (!bGrayScale && head.biClrUsed && info.nBkgndIndex)
-@@ -443,7 +443,7 @@
- trans[ip]=GetPaletteColor((BYTE)ip).rgbReserved;
- info_ptr->num_trans = (WORD)nc;
- info_ptr->valid |= PNG_INFO_tRNS;
-- info_ptr->trans = trans;
-+ info_ptr->trans_alpha = trans;
- }
-
- // copy the palette colors
-diff -Nur xbmc-9.11.orig/xbmc/screensavers/rsxs-0.9/src/pngimage.cc xbmc-9.11/xbmc/screensavers/rsxs-0.9/src/pngimage.cc
---- xbmc-9.11.orig/xbmc/screensavers/rsxs-0.9/src/pngimage.cc 2008-07-30 23:35:38.000000000 +0300
-+++ xbmc-9.11/xbmc/screensavers/rsxs-0.9/src/pngimage.cc 2010-01-20 22:21:01.000000000 +0200
-@@ -65,7 +65,7 @@
- (png_get_color_type(png, pngInfo) == PNG_COLOR_TYPE_GRAY) &&
- png_get_bit_depth(png, pngInfo) < 8
- )
-- png_set_gray_1_2_4_to_8(png);
-+ png_set_expand_gray_1_2_4_to_8(png);
- if (png_get_valid(png, pngInfo, PNG_INFO_tRNS))
- png_set_tRNS_to_alpha(png);
- if (fullColor)
-diff -Nur xbmc-9.11.orig/xbmc/visualizations/Goom/goom2k4-0/src/pngload.c xbmc-9.11/xbmc/visualizations/Goom/goom2k4-0/src/pngload.c
---- xbmc-9.11.orig/xbmc/visualizations/Goom/goom2k4-0/src/pngload.c 2008-08-04 05:05:51.000000000 +0300
-+++ xbmc-9.11/xbmc/visualizations/Goom/goom2k4-0/src/pngload.c 2010-01-20 22:16:23.000000000 +0200
-@@ -94,7 +94,7 @@
- png_set_palette_to_rgb (png_ptr);
-
- if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
-- png_set_gray_1_2_4_to_8 (png_ptr);
-+ png_set_expand_gray_1_2_4_to_8 (png_ptr);
- else if (color_type == PNG_COLOR_TYPE_GRAY ||
- color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
- png_set_gray_to_rgb (png_ptr);
diff --git a/media-tv/xbmc/files/xbmc-9.11-shader-upscalers.patch b/media-tv/xbmc/files/xbmc-9.11-shader-upscalers.patch
deleted file mode 100644
index d4feaa47..00000000
--- a/media-tv/xbmc/files/xbmc-9.11-shader-upscalers.patch
+++ /dev/null
@@ -1,887 +0,0 @@
-http://bugs.gentoo.org/306661
-
-backport shader based upscalers from svn trunk
-
---- language/English/strings.xml
-+++ language/English/strings.xml
-@@ -1554,16 +1554,17 @@
- <string id="16304">Lanczos2</string>
- <string id="16305">Lanczos3</string>
- <string id="16306">Sinc8</string>
--
- <string id="16307">Bicubic (software)</string>
- <string id="16308">Lanczos (software)</string>
- <string id="16309">Sinc (software)</string>
--
- <string id="16310">(VDPAU)Temporal</string>
- <string id="16311">(VDPAU)Temporal/Spatial</string>
- <string id="16312">(VDPAU)Noise Reduction</string>
- <string id="16313">(VDPAU)Sharpness</string>
- <string id="16314">Inverse Telecine</string>
-+ <string id="16315">Lanczos3 optimized</string>
-+ <string id="16316">Auto</string>
-+
- <string id="17500">Display sleep timeout</string>
-
- <string id="19000">Switch to channel</string>
---- system/shaders/convolution-6x6.glsl
-+++ system/shaders/convolution-6x6.glsl
-@@ -0,0 +1,69 @@
-+uniform sampler2D img;
-+uniform float stepx;
-+uniform float stepy;
-+
-+#if (HAS_FLOAT_TEXTURE)
-+uniform sampler1D kernelTex;
-+
-+vec3 weight(float pos)
-+{
-+ return texture1D(kernelTex, pos).rgb;
-+}
-+#else
-+uniform sampler2D kernelTex;
-+
-+vec3 weight(float pos)
-+{
-+ //row 0 contains the high byte, row 1 contains the low byte
-+ return ((texture2D(kernelTex, vec2(pos, 0.0)) * 256.0 + texture2D(kernelTex, vec2(pos, 1.0)))).rgb / 128.5 - 1.0;
-+}
-+#endif
-+
-+vec3 pixel(float xpos, float ypos)
-+{
-+ return texture2D(img, vec2(xpos, ypos)).rgb;
-+}
-+
-+vec3 line (float ypos, vec3 xpos1, vec3 xpos2, vec3 linetaps1, vec3 linetaps2)
-+{
-+ vec3 pixels;
-+
-+ pixels = pixel(xpos1.r, ypos) * linetaps1.r;
-+ pixels += pixel(xpos1.g, ypos) * linetaps2.r;
-+ pixels += pixel(xpos1.b, ypos) * linetaps1.g;
-+ pixels += pixel(xpos2.r, ypos) * linetaps2.g;
-+ pixels += pixel(xpos2.g, ypos) * linetaps1.b;
-+ pixels += pixel(xpos2.b, ypos) * linetaps2.b;
-+
-+ return pixels;
-+}
-+
-+void main()
-+{
-+ float xf = fract(gl_TexCoord[0].x / stepx);
-+ float yf = fract(gl_TexCoord[0].y / stepy);
-+
-+ vec3 linetaps1 = weight((1.0 - xf) / 2.0);
-+ vec3 linetaps2 = weight((1.0 - xf) / 2.0 + 0.5);
-+ vec3 columntaps1 = weight((1.0 - yf) / 2.0);
-+ vec3 columntaps2 = weight((1.0 - yf) / 2.0 + 0.5);
-+
-+ vec3 xpos1 = vec3(
-+ (-1.5 - xf) * stepx + gl_TexCoord[0].x,
-+ (-0.5 - xf) * stepx + gl_TexCoord[0].x,
-+ ( 0.5 - xf) * stepx + gl_TexCoord[0].x);
-+ vec3 xpos2 = vec3(
-+ ( 1.5 - xf) * stepx + gl_TexCoord[0].x,
-+ ( 2.5 - xf) * stepx + gl_TexCoord[0].x,
-+ ( 3.5 - xf) * stepx + gl_TexCoord[0].x);
-+
-+ gl_FragColor.rgb = line((-1.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.r;
-+ gl_FragColor.rgb += line((-0.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.r;
-+ gl_FragColor.rgb += line(( 0.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.g;
-+ gl_FragColor.rgb += line(( 1.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.g;
-+ gl_FragColor.rgb += line(( 2.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.b;
-+ gl_FragColor.rgb += line(( 3.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.b;
-+
-+ gl_FragColor.a = gl_Color.a;
-+}
-+
---- system/shaders/bicubic.glsl
-+++ system/shaders/bicubic.glsl
-@@ -0,0 +1,47 @@
-+uniform sampler2D img;
-+uniform float stepx;
-+uniform float stepy;
-+uniform sampler2D kernelTex;
-+
-+vec4 cubicFilter(float xValue, vec4 c0, vec4 c1, vec4 c2, vec4 c3)
-+{
-+ vec4 h = texture2D(kernelTex, vec2(xValue, 0.5));
-+ vec4 r = c0 * h.r;
-+ r += c1 * h.g;
-+ r += c2 * h.b;
-+ r += c3 * h.a;
-+ return r;
-+}
-+
-+void main()
-+{
-+ vec2 f = vec2(gl_TexCoord[0].x / stepx , gl_TexCoord[0].y / stepy);
-+ f = fract(f);
-+ vec4 t0 = cubicFilter(f.x,
-+ texture2D(img, gl_TexCoord[0].xy + vec2(-stepx, -stepy)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(0.0, -stepy)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(stepx, -stepy)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(2.0*stepx, -stepy)));
-+
-+ vec4 t1 = cubicFilter(f.x,
-+ texture2D(img, gl_TexCoord[0].xy + vec2(-stepx, 0.0)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(0.0, 0.0)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(stepx, 0.0)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(2.0*stepx, 0.0)));
-+
-+ vec4 t2 = cubicFilter(f.x,
-+ texture2D(img, gl_TexCoord[0].xy + vec2(-stepx, stepy)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(0.0, stepy)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(stepx, stepy)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(2.0*stepx, stepy)));
-+
-+ vec4 t3 = cubicFilter(f.x,
-+ texture2D(img, gl_TexCoord[0].xy + vec2(-stepx, 2.0*stepy)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(0, 2.0*stepy)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(stepx, 2.0*stepy)),
-+ texture2D(img, gl_TexCoord[0].xy + vec2(2.0*stepx, 2.0*stepy)));
-+
-+ gl_FragColor = cubicFilter(f.y, t0, t1, t2, t3);
-+ gl_FragColor.a = gl_Color.a;
-+}
-+
---- system/shaders/convolution-4x4.glsl
-+++ system/shaders/convolution-4x4.glsl
-@@ -0,0 +1,60 @@
-+uniform sampler2D img;
-+uniform float stepx;
-+uniform float stepy;
-+
-+#if (HAS_FLOAT_TEXTURE)
-+uniform sampler1D kernelTex;
-+
-+vec4 weight(float pos)
-+{
-+ return texture1D(kernelTex, pos);
-+}
-+#else
-+uniform sampler2D kernelTex;
-+
-+vec4 weight(float pos)
-+{
-+ //row 0 contains the high byte, row 1 contains the low byte
-+ return (texture2D(kernelTex, vec2(pos, 0.0)) * 256.0 + texture2D(kernelTex, vec2(pos, 1.0))) / 128.5 - 1.0;
-+}
-+#endif
-+
-+vec3 pixel(float xpos, float ypos)
-+{
-+ return texture2D(img, vec2(xpos, ypos)).rgb;
-+}
-+
-+vec3 line (float ypos, vec4 xpos, vec4 linetaps)
-+{
-+ vec3 pixels;
-+
-+ pixels = pixel(xpos.r, ypos) * linetaps.r;
-+ pixels += pixel(xpos.g, ypos) * linetaps.g;
-+ pixels += pixel(xpos.b, ypos) * linetaps.b;
-+ pixels += pixel(xpos.a, ypos) * linetaps.a;
-+
-+ return pixels;
-+}
-+
-+void main()
-+{
-+ float xf = fract(gl_TexCoord[0].x / stepx);
-+ float yf = fract(gl_TexCoord[0].y / stepy);
-+
-+ vec4 linetaps = weight(1.0 - xf);
-+ vec4 columntaps = weight(1.0 - yf);
-+
-+ vec4 xpos = vec4(
-+ (-0.5 - xf) * stepx + gl_TexCoord[0].x,
-+ ( 0.5 - xf) * stepx + gl_TexCoord[0].x,
-+ ( 1.5 - xf) * stepx + gl_TexCoord[0].x,
-+ ( 2.5 - xf) * stepx + gl_TexCoord[0].x);
-+
-+ gl_FragColor.rgb = line((-0.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.r;
-+ gl_FragColor.rgb += line(( 0.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.g;
-+ gl_FragColor.rgb += line(( 1.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.b;
-+ gl_FragColor.rgb += line(( 2.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.a;
-+
-+ gl_FragColor.a = gl_Color.a;
-+}
-+
---- xbmc/settings/VideoSettings.h
-+++ xbmc/settings/VideoSettings.h
-@@ -51,9 +51,10 @@
- {
- VS_SCALINGMETHOD_NEAREST=0,
- VS_SCALINGMETHOD_LINEAR,
--
-+
- VS_SCALINGMETHOD_CUBIC,
- VS_SCALINGMETHOD_LANCZOS2,
-+ VS_SCALINGMETHOD_LANCZOS3_FAST,
- VS_SCALINGMETHOD_LANCZOS3,
- VS_SCALINGMETHOD_SINC8,
- VS_SCALINGMETHOD_NEDI,
-@@ -61,7 +62,9 @@
- VS_SCALINGMETHOD_BICUBIC_SOFTWARE,
- VS_SCALINGMETHOD_LANCZOS_SOFTWARE,
- VS_SCALINGMETHOD_SINC_SOFTWARE,
-- VS_SCALINGMETHOD_VDPAU_HARDWARE
-+ VS_SCALINGMETHOD_VDPAU_HARDWARE,
-+
-+ VS_SCALINGMETHOD_AUTO
- };
-
- class CVideoSettings
---- xbmc/cores/VideoRenderers/VideoShaders/VideoFilterShader.cpp
-+++ xbmc/cores/VideoRenderers/VideoShaders/VideoFilterShader.cpp
-@@ -21,6 +21,7 @@
- #include "system.h"
- #include "VideoFilterShader.h"
- #include "utils/log.h"
-+#include "ConvolutionKernels.h"
-
- #include <string>
- #include <math.h>
-@@ -63,60 +64,13 @@
-
- BicubicFilterShader::BicubicFilterShader(float B, float C)
- {
-- string shaderf =
-- "uniform sampler2D img;"
-- "uniform float stepx;"
-- "uniform float stepy;"
-- "uniform sampler2D kernelTex;"
--
-- "vec4 cubicFilter(float xValue, vec4 c0, vec4 c1, vec4 c2, vec4 c3)"
-- "{"
-- " vec4 h = texture2D(kernelTex, vec2(xValue, 0.5));"
-- " vec4 r = c0 * h.r;"
-- " r += c1 * h.g;"
-- " r += c2 * h.b;"
-- " r += c3 * h.a;"
-- " return r;"
-- "}"
-- ""
-- "void main()"
-- "{"
-- "vec2 f = vec2(gl_TexCoord[0].x / stepx , gl_TexCoord[0].y / stepy);"
-- "f = fract(f);"
-- "vec4 t0 = cubicFilter(f.x,"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(-stepx, -stepy)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(0.0, -stepy)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(stepx, -stepy)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(2.0*stepx, -stepy)));"
-- ""
-- "vec4 t1 = cubicFilter(f.x,"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(-stepx, 0.0)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(0.0, 0.0)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(stepx, 0.0)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(2.0*stepx, 0.0)));"
-- ""
-- "vec4 t2 = cubicFilter(f.x,"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(-stepx, stepy)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(0.0, stepy)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(stepx, stepy)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(2.0*stepx, stepy)));"
-- ""
-- "vec4 t3 = cubicFilter(f.x,"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(-stepx, 2.0*stepy)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(0, 2.0*stepy)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(stepx, 2.0*stepy)),"
-- "texture2D(img, gl_TexCoord[0].xy + vec2(2.0*stepx, 2.0*stepy)));"
--
-- "gl_FragColor = cubicFilter(f.y, t0, t1, t2, t3) ;"
-- "gl_FragColor.a = gl_Color.a;"
-- "}";
-- PixelShader()->SetSource(shaderf);
-+ PixelShader()->LoadSource("bicubic.glsl");
- m_kernelTex1 = 0;
- m_B = B;
- m_C = C;
-- if (B<=0)
-+ if (B<0)
- m_B=1.0f/3.0f;
-- if (C<=0)
-+ if (C<0)
- m_C=1.0f/3.0f;
- }
-
-@@ -209,8 +163,8 @@
- glBindTexture(GL_TEXTURE_2D, m_kernelTex1);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
-- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
-+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, size, 1, 0, GL_RGBA, GL_FLOAT, img);
-
- glActiveTexture(GL_TEXTURE0);
-@@ -254,4 +208,110 @@
- return val;
- }
-
-+ConvolutionFilterShader::ConvolutionFilterShader(ESCALINGMETHOD method)
-+{
-+ m_method = method;
-+ m_kernelTex1 = 0;
-+
-+ string shadername;
-+ string defines;
-+
-+ if (m_method == VS_SCALINGMETHOD_CUBIC ||
-+ m_method == VS_SCALINGMETHOD_LANCZOS2 ||
-+ m_method == VS_SCALINGMETHOD_LANCZOS3_FAST)
-+ shadername = "convolution-4x4.glsl";
-+ else if (m_method == VS_SCALINGMETHOD_LANCZOS3)
-+ shadername = "convolution-6x6.glsl";
-+
-+ m_floattex = glewIsSupported("GL_ARB_texture_float");
-+
-+ if (m_floattex)
-+ defines = "#define HAS_FLOAT_TEXTURE 1\n";
-+ else
-+ defines = "#define HAS_FLOAT_TEXTURE 0\n";
-+
-+ CLog::Log(LOGDEBUG, "GL: ConvolutionFilterShader: using %s defines: %s", shadername.c_str(), defines.c_str());
-+ PixelShader()->LoadSource(shadername, defines);
-+}
-+
-+void ConvolutionFilterShader::OnCompiledAndLinked()
-+{
-+ // obtain shader attribute handles on successfull compilation
-+ m_hSourceTex = glGetUniformLocation(ProgramHandle(), "img");
-+ m_hStepX = glGetUniformLocation(ProgramHandle(), "stepx");
-+ m_hStepY = glGetUniformLocation(ProgramHandle(), "stepy");
-+ m_hKernTex = glGetUniformLocation(ProgramHandle(), "kernelTex");
-+
-+ CConvolutionKernel kernel(m_method, 256);
-+
-+ if (m_kernelTex1)
-+ {
-+ glDeleteTextures(1, &m_kernelTex1);
-+ m_kernelTex1 = 0;
-+ }
-+
-+ glGenTextures(1, &m_kernelTex1);
-+
-+ if ((m_kernelTex1<=0))
-+ {
-+ CLog::Log(LOGERROR, "GL: ConvolutionFilterShader: Error creating kernel texture");
-+ return;
-+ }
-+
-+ glActiveTexture(GL_TEXTURE2);
-+
-+ //if float textures are supported, we can load the kernel as a 1d float texture
-+ //if not, we load it as a 2d texture with 2 rows, where row 0 contains the high byte
-+ //and row 1 contains the low byte, which can be converted in the shader
-+ if (m_floattex)
-+ {
-+ glBindTexture(GL_TEXTURE_1D, m_kernelTex1);
-+ glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-+ glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-+ glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-+ glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-+ glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA16F_ARB, kernel.GetSize(), 0, GL_RGBA, GL_FLOAT, kernel.GetFloatPixels());
-+ }
-+ else
-+ {
-+ glBindTexture(GL_TEXTURE_2D, m_kernelTex1);
-+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, kernel.GetSize(), 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, kernel.GetIntFractPixels());
-+ }
-+
-+ glActiveTexture(GL_TEXTURE0);
-+
-+ VerifyGLState();
-+}
-+
-+bool ConvolutionFilterShader::OnEnabled()
-+{
-+ // set shader attributes once enabled
-+ glActiveTexture(GL_TEXTURE2);
-+
-+ if (m_floattex)
-+ glBindTexture(GL_TEXTURE_1D, m_kernelTex1);
-+ else
-+ glBindTexture(GL_TEXTURE_2D, m_kernelTex1);
-+
-+ glActiveTexture(GL_TEXTURE0);
-+ glUniform1i(m_hSourceTex, m_sourceTexUnit);
-+ glUniform1i(m_hKernTex, 2);
-+ glUniform1f(m_hStepX, m_stepX);
-+ glUniform1f(m_hStepY, m_stepY);
-+ VerifyGLState();
-+ return true;
-+}
-+
-+void ConvolutionFilterShader::Free()
-+{
-+ if (m_kernelTex1)
-+ glDeleteTextures(1, &m_kernelTex1);
-+ m_kernelTex1 = 0;
-+ BaseVideoFilterShader::Free();
-+}
-+
- #endif
---- xbmc/cores/VideoRenderers/VideoShaders/ConvolutionKernels.cpp
-+++ xbmc/cores/VideoRenderers/VideoShaders/ConvolutionKernels.cpp
-@@ -0,0 +1,226 @@
-+/*
-+ * Copyright (C) 2005-2008 Team XBMC
-+ * http://www.xbmc.org
-+ *
-+ * This Program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2, or (at your option)
-+ * any later version.
-+ *
-+ * This Program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with XBMC; see the file COPYING. If not, write to
-+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-+ * http://www.gnu.org/copyleft/gpl.html
-+ *
-+ */
-+#ifdef _WIN32
-+ #define _USE_MATH_DEFINES
-+#endif
-+
-+#include "ConvolutionKernels.h"
-+#include "MathUtils.h"
-+
-+#define SINC(x) (sin(M_PI * (x)) / (M_PI * (x)))
-+
-+CConvolutionKernel::CConvolutionKernel(ESCALINGMETHOD method, int size)
-+{
-+ m_size = size;
-+ m_floatpixels = new float[m_size * 4];
-+
-+ if (method == VS_SCALINGMETHOD_LANCZOS2)
-+ Lanczos2();
-+ else if (method == VS_SCALINGMETHOD_LANCZOS3_FAST)
-+ Lanczos3Fast();
-+ else if (method == VS_SCALINGMETHOD_LANCZOS3)
-+ Lanczos3();
-+ else if (method == VS_SCALINGMETHOD_CUBIC)
-+ Bicubic(1.0 / 3.0, 1.0 / 3.0);
-+
-+ ToIntFract();
-+}
-+
-+CConvolutionKernel::~CConvolutionKernel()
-+{
-+ delete [] m_floatpixels;
-+ delete [] m_intfractpixels;
-+}
-+
-+//generate a lanczos2 kernel which can be loaded with RGBA format
-+//each value of RGBA has one tap, so a shader can load 4 taps with a single pixel lookup
-+void CConvolutionKernel::Lanczos2()
-+{
-+ for (int i = 0; i < m_size; i++)
-+ {
-+ double x = (double)i / (double)m_size;
-+
-+ //generate taps
-+ for (int j = 0; j < 4; j++)
-+ m_floatpixels[i * 4 + j] = (float)LanczosWeight(x + (double)(j - 2), 2.0);
-+
-+ //any collection of 4 taps added together needs to be exactly 1.0
-+ //for lanczos this is not always the case, so we take each collection of 4 taps
-+ //and divide those taps by the sum of the taps
-+ float weight = 0.0;
-+ for (int j = 0; j < 4; j++)
-+ weight += m_floatpixels[i * 4 + j];
-+
-+ for (int j = 0; j < 4; j++)
-+ m_floatpixels[i * 4 + j] /= weight;
-+ }
-+}
-+
-+//generate a lanczos3 kernel which can be loaded with RGBA format
-+//each value of RGBA has one tap, so a shader can load 4 taps with a single pixel lookup
-+//the two outer lobes of the lanczos3 kernel are added to the two lobes one step to the middle
-+//this basically looks the same as lanczos3, but the kernel only has 4 taps,
-+//so it can use the 4x4 convolution shader which is twice as fast as the 6x6 one
-+void CConvolutionKernel::Lanczos3Fast()
-+{
-+ for (int i = 0; i < m_size; i++)
-+ {
-+ double a = 3.0;
-+ double x = (double)i / (double)m_size;
-+
-+ //generate taps
-+ m_floatpixels[i * 4 + 0] = (float)(LanczosWeight(x - 2.0, a) + LanczosWeight(x - 3.0, a));
-+ m_floatpixels[i * 4 + 1] = (float) LanczosWeight(x - 1.0, a);
-+ m_floatpixels[i * 4 + 2] = (float) LanczosWeight(x , a);
-+ m_floatpixels[i * 4 + 3] = (float)(LanczosWeight(x + 1.0, a) + LanczosWeight(x + 2.0, a));
-+
-+ //any collection of 4 taps added together needs to be exactly 1.0
-+ //for lanczos this is not always the case, so we take each collection of 4 taps
-+ //and divide those taps by the sum of the taps
-+ float weight = 0.0;
-+ for (int j = 0; j < 4; j++)
-+ weight += m_floatpixels[i * 4 + j];
-+
-+ for (int j = 0; j < 4; j++)
-+ m_floatpixels[i * 4 + j] /= weight;
-+ }
-+}
-+
-+//generate a lanczos3 kernel which can be loaded with RGBA format
-+//each value of RGB has one tap, so a shader can load 3 taps with a single pixel lookup
-+void CConvolutionKernel::Lanczos3()
-+{
-+ for (int i = 0; i < m_size; i++)
-+ {
-+ double x = (double)i / (double)m_size;
-+
-+ //generate taps
-+ for (int j = 0; j < 3; j++)
-+ m_floatpixels[i * 4 + j] = (float)LanczosWeight(x * 2.0 + (double)(j * 2 - 3), 3.0);
-+
-+ m_floatpixels[i * 4 + 3] = 0.0;
-+ }
-+
-+ //any collection of 6 taps added together needs to be exactly 1.0
-+ //for lanczos this is not always the case, so we take each collection of 6 taps
-+ //and divide those taps by the sum of the taps
-+ for (int i = 0; i < m_size / 2; i++)
-+ {
-+ float weight = 0.0;
-+ for (int j = 0; j < 3; j++)
-+ {
-+ weight += m_floatpixels[i * 4 + j];
-+ weight += m_floatpixels[(i + m_size / 2) * 4 + j];
-+ }
-+ for (int j = 0; j < 3; j++)
-+ {
-+ m_floatpixels[i * 4 + j] /= weight;
-+ m_floatpixels[(i + m_size / 2) * 4 + j] /= weight;
-+ }
-+ }
-+}
-+
-+//generate a bicubic kernel which can be loaded with RGBA format
-+//each value of RGBA has one tap, so a shader can load 4 taps with a single pixel lookup
-+void CConvolutionKernel::Bicubic(double B, double C)
-+{
-+ for (int i = 0; i < m_size; i++)
-+ {
-+ double x = (double)i / (double)m_size;
-+
-+ //generate taps
-+ for (int j = 0; j < 4; j++)
-+ m_floatpixels[i * 4 + j] = (float)BicubicWeight(x + (double)(j - 2), B, C);
-+ }
-+}
-+
-+double CConvolutionKernel::LanczosWeight(double x, double radius)
-+{
-+ double ax = fabs(x);
-+
-+ if (ax == 0.0)
-+ return 1.0;
-+ else if (ax < radius)
-+ return SINC(ax) * SINC(ax / radius);
-+ else
-+ return 0.0;
-+}
-+
-+double CConvolutionKernel::BicubicWeight(double x, double B, double C)
-+{
-+ double ax = fabs(x);
-+
-+ if (ax<1.0)
-+ {
-+ return ((12 - 9*B - 6*C) * ax * ax * ax +
-+ (-18 + 12*B + 6*C) * ax * ax +
-+ (6 - 2*B))/6;
-+ }
-+ else if (ax<2.0)
-+ {
-+ return ((-B - 6*C) * ax * ax * ax +
-+ (6*B + 30*C) * ax * ax + (-12*B - 48*C) *
-+ ax + (8*B + 24*C)) / 6;
-+ }
-+ else
-+ {
-+ return 0.0;
-+ }
-+}
-+
-+
-+//convert float to high byte/low byte, so the kernel can be loaded into an 8 bit texture
-+//with height 2 and converted back to real float in the shader
-+//it only works when the kernel texture uses nearest neighbour, but there's almost no difference
-+//between that and linear interpolation
-+void CConvolutionKernel::ToIntFract()
-+{
-+ m_intfractpixels = new uint8_t[m_size * 8];
-+
-+ for (int i = 0; i < m_size * 4; i++)
-+ {
-+ int value = MathUtils::round_int((m_floatpixels[i] + 1.0) / 2.0 * 65535.0);
-+ if (value < 0)
-+ value = 0;
-+ else if (value > 65535)
-+ value = 65535;
-+
-+ int integer = value / 256;
-+ int fract = value % 256;
-+
-+ m_intfractpixels[i] = (uint8_t)integer;
-+ m_intfractpixels[i + m_size * 4] = (uint8_t)fract;
-+ }
-+
-+#if 0
-+ for (int i = 0; i < 4; i++)
-+ {
-+ for (int j = 0; j < m_size; j++)
-+ {
-+ printf("%i %f %f\n",
-+ i * m_size + j,
-+ ((double)m_intfractpixels[j * 4 + i] + (double)m_intfractpixels[j * 4 + i + m_size * 4] / 255.0) / 255.0 * 2.0 - 1.0,
-+ m_floatpixels[j * 4 + i]);
-+ }
-+ }
-+#endif
-+}
-+
---- xbmc/cores/VideoRenderers/VideoShaders/VideoFilterShader.h
-+++ xbmc/cores/VideoRenderers/VideoShaders/VideoFilterShader.h
-@@ -4,6 +4,7 @@
- #ifdef HAS_GL
-
- #include "../../../../guilib/Shader.h"
-+#include "../../../settings/VideoSettings.h"
-
- using namespace Shaders;
-
-@@ -35,7 +36,7 @@
- class BicubicFilterShader : public BaseVideoFilterShader
- {
- public:
-- BicubicFilterShader(float B=0.0f, float C=0.0f);
-+ BicubicFilterShader(float B=-1.0f, float C=-1.0f);
- void OnCompiledAndLinked();
- bool OnEnabled();
- void Free();
-@@ -55,6 +56,25 @@
- float m_C;
- };
-
-+ class ConvolutionFilterShader : public BaseVideoFilterShader
-+ {
-+ public:
-+ ConvolutionFilterShader(ESCALINGMETHOD method);
-+ void OnCompiledAndLinked();
-+ bool OnEnabled();
-+ void Free();
-+
-+ protected:
-+ // kernel textures
-+ GLuint m_kernelTex1;
-+
-+ // shader handles to kernel textures
-+ GLint m_hKernTex;
-+
-+ ESCALINGMETHOD m_method;
-+ bool m_floattex; //if float textures are supported
-+ };
-+
- } // end namespace
-
- #endif
---- xbmc/cores/VideoRenderers/VideoShaders/ConvolutionKernels.h
-+++ xbmc/cores/VideoRenderers/VideoShaders/ConvolutionKernels.h
-@@ -0,0 +1,55 @@
-+/*
-+ * Copyright (C) 2005-2008 Team XBMC
-+ * http://www.xbmc.org
-+ *
-+ * This Program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2, or (at your option)
-+ * any later version.
-+ *
-+ * This Program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with XBMC; see the file COPYING. If not, write to
-+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-+ * http://www.gnu.org/copyleft/gpl.html
-+ *
-+ */
-+
-+#ifndef CONVOLUTIONKERNELS
-+#define CONVOLUTIONKERNELS
-+
-+#include "system.h"
-+#include "../../../settings/VideoSettings.h"
-+
-+class CConvolutionKernel
-+{
-+ public:
-+ CConvolutionKernel(ESCALINGMETHOD method, int size);
-+ ~CConvolutionKernel();
-+
-+ int GetSize() { return m_size; }
-+ float* GetFloatPixels() { return m_floatpixels; }
-+ uint8_t* GetIntFractPixels() { return m_intfractpixels; }
-+
-+ private:
-+
-+ void Lanczos2();
-+ void Lanczos3Fast();
-+ void Lanczos3();
-+ void Bicubic(double B, double C);
-+
-+ double LanczosWeight(double x, double radius);
-+ double BicubicWeight(double x, double B, double C);
-+
-+ void ToIntFract();
-+
-+ int m_size;
-+ float* m_floatpixels;
-+ uint8_t* m_intfractpixels;
-+};
-+
-+#endif //CONVOLUTIONKERNELS
---- xbmc/cores/VideoRenderers/VideoShaders/Makefile
-+++ xbmc/cores/VideoRenderers/VideoShaders/Makefile
-@@ -1,5 +1,5 @@
- INCLUDES=-I. -I.. -I../../ -I../../../ -I../../../linux -I../../../../guilib
--SRCS=YUV2RGBShader.cpp VideoFilterShader.cpp
-+SRCS=YUV2RGBShader.cpp VideoFilterShader.cpp ConvolutionKernels.cpp
-
- LIB=VideoShaders.a
-
---- xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
-+++ xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
-@@ -886,6 +886,19 @@
-
- VerifyGLState();
-
-+ if (m_scalingMethod == VS_SCALINGMETHOD_AUTO)
-+ {
-+ bool scaleSD = (int)m_sourceWidth < m_upscalingWidth && (int)m_sourceHeight < m_upscalingHeight &&
-+ m_sourceHeight < 720 && m_sourceWidth < 1280;
-+
-+ if (Supports(VS_SCALINGMETHOD_VDPAU_HARDWARE))
-+ m_scalingMethod = VS_SCALINGMETHOD_VDPAU_HARDWARE;
-+ else if (Supports(VS_SCALINGMETHOD_LANCZOS3_FAST) && scaleSD)
-+ m_scalingMethod = VS_SCALINGMETHOD_LANCZOS3_FAST;
-+ else
-+ m_scalingMethod = VS_SCALINGMETHOD_LINEAR;
-+ }
-+
- switch (m_scalingMethod)
- {
- case VS_SCALINGMETHOD_NEAREST:
-@@ -898,13 +911,10 @@
- m_renderQuality = RQ_SINGLEPASS;
- return;
-
-+ case VS_SCALINGMETHOD_LANCZOS2:
-+ case VS_SCALINGMETHOD_LANCZOS3_FAST:
-+ case VS_SCALINGMETHOD_LANCZOS3:
- case VS_SCALINGMETHOD_CUBIC:
-- if(!glewIsSupported("GL_ARB_texture_float"))
-- {
-- CLog::Log(LOGERROR, "GL: hardware doesn't support GL_ARB_texture_float");
-- break;
-- }
--
- if (!m_fbo.Initialize())
- {
- CLog::Log(LOGERROR, "GL: Error initializing FBO");
-@@ -917,7 +927,7 @@
- break;
- }
-
-- m_pVideoFilterShader = new BicubicFilterShader(0.3f, 0.3f);
-+ m_pVideoFilterShader = new ConvolutionFilterShader(m_scalingMethod);
- if (!m_pVideoFilterShader->CompileAndLink())
- {
- CLog::Log(LOGERROR, "GL: Error compiling and linking video filter shader");
-@@ -928,8 +938,6 @@
- m_renderQuality = RQ_MULTIPASS;
- return;
-
-- case VS_SCALINGMETHOD_LANCZOS2:
-- case VS_SCALINGMETHOD_LANCZOS3:
- case VS_SCALINGMETHOD_SINC8:
- case VS_SCALINGMETHOD_NEDI:
- CLog::Log(LOGERROR, "GL: TODO: This scaler has not yet been implemented");
-@@ -1895,16 +1903,19 @@
- bool CLinuxRendererGL::Supports(ESCALINGMETHOD method)
- {
- if(method == VS_SCALINGMETHOD_NEAREST
-- || method == VS_SCALINGMETHOD_LINEAR)
-+ || method == VS_SCALINGMETHOD_LINEAR
-+ || method == VS_SCALINGMETHOD_AUTO)
- return true;
-
--
-- if(method == VS_SCALINGMETHOD_CUBIC
-- && glewIsSupported("GL_ARB_texture_float")
-- && glewIsSupported("GL_EXT_framebuffer_object")
-- && m_renderMethod == RENDER_GLSL)
-- return true;
--
-+ if(method == VS_SCALINGMETHOD_CUBIC
-+ || method == VS_SCALINGMETHOD_LANCZOS2
-+ || method == VS_SCALINGMETHOD_LANCZOS3_FAST
-+ || method == VS_SCALINGMETHOD_LANCZOS3)
-+ {
-+ if (glewIsSupported("GL_EXT_framebuffer_object") && (m_renderMethod & RENDER_GLSL))
-+ return true;
-+ }
-+
- if (g_advancedSettings.m_videoHighQualityScaling != SOFTWARE_UPSCALING_DISABLED)
- {
- if(method == VS_SCALINGMETHOD_BICUBIC_SOFTWARE
---- xbmc/GUIDialogVideoSettings.cpp
-+++ xbmc/GUIDialogVideoSettings.cpp
-@@ -103,6 +103,7 @@
- entries.push_back(make_pair(VS_SCALINGMETHOD_LINEAR , 16302));
- entries.push_back(make_pair(VS_SCALINGMETHOD_CUBIC , 16303));
- entries.push_back(make_pair(VS_SCALINGMETHOD_LANCZOS2 , 16304));
-+ entries.push_back(make_pair(VS_SCALINGMETHOD_LANCZOS3_FAST , 16315));
- entries.push_back(make_pair(VS_SCALINGMETHOD_LANCZOS3 , 16305));
- entries.push_back(make_pair(VS_SCALINGMETHOD_SINC8 , 16306));
- // entries.push_back(make_pair(VS_SCALINGMETHOD_NEDI , ?????));
-@@ -110,6 +111,7 @@
- entries.push_back(make_pair(VS_SCALINGMETHOD_LANCZOS_SOFTWARE , 16308));
- entries.push_back(make_pair(VS_SCALINGMETHOD_SINC_SOFTWARE , 16309));
- entries.push_back(make_pair(VS_SCALINGMETHOD_VDPAU_HARDWARE , 13120));
-+ entries.push_back(make_pair(VS_SCALINGMETHOD_AUTO , 16316));
-
- /* remove unsupported methods */
- for(vector<pair<int, int> >::iterator it = entries.begin(); it != entries.end();)
---- xbmc/Settings.cpp
-+++ xbmc/Settings.cpp
-@@ -772,7 +772,7 @@
- GetInteger(pElement, "interlacemethod", interlaceMethod, VS_INTERLACEMETHOD_NONE, VS_INTERLACEMETHOD_NONE, VS_INTERLACEMETHOD_INVERSE_TELECINE);
- m_stSettings.m_defaultVideoSettings.m_InterlaceMethod = (EINTERLACEMETHOD)interlaceMethod;
- int scalingMethod;
-- GetInteger(pElement, "scalingmethod", scalingMethod, VS_SCALINGMETHOD_LINEAR, VS_SCALINGMETHOD_NEAREST, VS_SCALINGMETHOD_CUBIC);
-+ GetInteger(pElement, "scalingmethod", scalingMethod, VS_SCALINGMETHOD_LINEAR, VS_SCALINGMETHOD_NEAREST, VS_SCALINGMETHOD_AUTO);
- m_stSettings.m_defaultVideoSettings.m_ScalingMethod = (ESCALINGMETHOD)scalingMethod;
-
- GetInteger(pElement, "viewmode", m_stSettings.m_defaultVideoSettings.m_ViewMode, VIEW_MODE_NORMAL, VIEW_MODE_NORMAL, VIEW_MODE_CUSTOM);
diff --git a/media-tv/xbmc/files/xbmc-9.11-use-cdio-system-headers-on-non-win32.patch b/media-tv/xbmc/files/xbmc-9.11-use-cdio-system-headers-on-non-win32.patch
deleted file mode 100644
index 345d9115..00000000
--- a/media-tv/xbmc/files/xbmc-9.11-use-cdio-system-headers-on-non-win32.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
-index 9097519..9b6418d 100644
---- a/xbmc/Application.cpp
-+++ b/xbmc/Application.cpp
-@@ -236,7 +236,11 @@
- #endif
-
- #ifdef HAS_DVD_DRIVE
-+#ifdef _WIN32
- #include "lib/libcdio/logging.h"
-+#else
-+#include <cdio/logging.h>
-+#endif
- #endif
-
- #ifdef HAS_HAL
-diff --git a/xbmc/FileSystem/Makefile b/xbmc/FileSystem/Makefile
-index 782d57a..1e524ed 100644
---- a/xbmc/FileSystem/Makefile
-+++ b/xbmc/FileSystem/Makefile
-@@ -1,5 +1,4 @@
- INCLUDES=-I. -I../ -I../cores -I../linux -I../../guilib -I../lib/UnrarXLib -I../utils -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
--INCLUDES+=-I../lib/libcdio/libcdio/include
-
- CXXFLAGS+=-D__STDC_FORMAT_MACROS \
-
-diff --git a/xbmc/FileSystem/cdioSupport.cpp b/xbmc/FileSystem/cdioSupport.cpp
-index 00e5fdd..21a0b67 100644
---- a/xbmc/FileSystem/cdioSupport.cpp
-+++ b/xbmc/FileSystem/cdioSupport.cpp
-@@ -26,7 +26,7 @@
- #include "cdioSupport.h"
- #include "utils/SingleLock.h"
- #include "utils/log.h"
--#ifndef _LINUX
-+#ifdef _WIN32
- #include "lib/libcdio/logging.h"
- #include "lib/libcdio/util.h"
- #include "lib/libcdio/mmc.h"
-diff --git a/xbmc/FileSystem/iso9660.cpp b/xbmc/FileSystem/iso9660.cpp
-index 6e1633f..58fbc50 100644
---- a/xbmc/FileSystem/iso9660.cpp
-+++ b/xbmc/FileSystem/iso9660.cpp
-@@ -44,7 +44,7 @@ ISO9660
- #include "utils/CharsetConverter.h"
-
- #include "DetectDVDType.h" // for MODE2_DATA_SIZE etc.
--#ifdef _LINUX
-+#ifndef _WIN32
- #include <cdio/bytesex.h>
- #else
- #include "lib/libcdio/bytesex.h" // for from_723 & from_733
-diff --git a/xbmc/Makefile b/xbmc/Makefile
-index abfbdcb..f55381a 100644
---- a/xbmc/Makefile
-+++ b/xbmc/Makefile
-@@ -8,8 +8,6 @@ INCLUDES+=-Ilib/libUPnP/Platinum/Source/Core \
- -Ilib/libUPnP/Neptune/Source/System/Posix \
- -Ilib/libUPnP/Neptune/Source/Core
-
--INCLUDES+=-Ilib/libcdio/libcdio/include
--
- SRCS=Application.cpp \
- CueDocument.cpp \
- GUISettings.cpp \
-diff --git a/xbmc/cdrip/CDDAReader.cpp b/xbmc/cdrip/CDDAReader.cpp
-index c8b37b2..e3e9c0b 100644
---- a/xbmc/cdrip/CDDAReader.cpp
-+++ b/xbmc/cdrip/CDDAReader.cpp
-@@ -24,7 +24,11 @@
- #ifdef HAS_CDDA_RIPPER
-
- #include "CDDAReader.h"
-+#ifdef _WIN32
- #include "lib/libcdio/cdio.h"
-+#else
-+#include <cdio/cdio.h>
-+#endif
- #include "utils/log.h"
-
- #define SECTOR_COUNT 52
-diff --git a/xbmc/cores/paplayer/AC3CDDACodec.cpp b/xbmc/cores/paplayer/AC3CDDACodec.cpp
-index 20cded7..f2a077a 100644
---- a/xbmc/cores/paplayer/AC3CDDACodec.cpp
-+++ b/xbmc/cores/paplayer/AC3CDDACodec.cpp
-@@ -22,7 +22,11 @@
- #include "system.h"
- #include "AC3CDDACodec.h"
- #ifdef HAS_AC3_CDDA_CODEC
-+#ifdef _WIN32
- #include "lib/libcdio/sector.h"
-+#else
-+#include <cdio/sector.h>
-+#endif
-
- AC3CDDACodec::AC3CDDACodec() : AC3Codec()
- {
-diff --git a/xbmc/cores/paplayer/CDDAcodec.cpp b/xbmc/cores/paplayer/CDDAcodec.cpp
-index ca8f1be..42460dc 100644
---- a/xbmc/cores/paplayer/CDDAcodec.cpp
-+++ b/xbmc/cores/paplayer/CDDAcodec.cpp
-@@ -20,7 +20,11 @@
- */
-
- #include "CDDAcodec.h"
-+#ifdef _WIN32
- #include "lib/libcdio/sector.h"
-+#else
-+#include <cdio/sector.h>
-+#endif
-
- #define SECTOR_COUNT 55 // max. sectors that can be read at once
- #define MAX_BUFFER_SIZE 2*SECTOR_COUNT*CDIO_CD_FRAMESIZE_RAW
-diff --git a/xbmc/cores/paplayer/DTSCDDACodec.cpp b/xbmc/cores/paplayer/DTSCDDACodec.cpp
-index e64cc2e..9bc46c6 100644
---- a/xbmc/cores/paplayer/DTSCDDACodec.cpp
-+++ b/xbmc/cores/paplayer/DTSCDDACodec.cpp
-@@ -22,7 +22,11 @@
- #include "system.h"
- #include "DTSCDDACodec.h"
- #ifdef HAS_DTS_CODEC
-+#ifdef _WIN32
- #include "lib/libcdio/sector.h"
-+#else
-+#include <cdio/sector.h>
-+#endif
-
- DTSCDDACodec::DTSCDDACodec() : DTSCodec()
- {
diff --git a/media-tv/xbmc/files/xbmc-9.11-wavpack.patch b/media-tv/xbmc/files/xbmc-9.11-wavpack.patch
deleted file mode 100644
index 4ef0d147..00000000
--- a/media-tv/xbmc/files/xbmc-9.11-wavpack.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-fix from upstream trunk
-
-http://xbmc.org/trac/ticket/8185
-
-Index: trunk/xbmc/cores/paplayer/DllWAVPack.h
-===================================================================
---- trunk/xbmc/cores/paplayer/DllWAVPack.h (revision 22927)
-+++ trunk/xbmc/cores/paplayer/DllWAVPack.h (revision 25321)
-@@ -58,7 +58,7 @@
- virtual int WavpackGetReducedChannels (WavpackContext *wpc)=0;
- virtual int WavpackGetFloatNormExp (WavpackContext *wpc)=0;
-- virtual int WavpackGetMD5Sum (WavpackContext *wpc, uchar data [16])=0;
-+ virtual int WavpackGetMD5Sum (WavpackContext *wpc, unsigned char data [16])=0;
- virtual uint32_t WavpackGetWrapperBytes (WavpackContext *wpc)=0;
-- virtual uchar *WavpackGetWrapperData (WavpackContext *wpc)=0;
-+ virtual unsigned char *WavpackGetWrapperData (WavpackContext *wpc)=0;
- virtual void WavpackFreeWrapper (WavpackContext *wpc)=0;
- virtual void WavpackSeekTrailingWrapper (WavpackContext *wpc)=0;
-@@ -77,5 +77,5 @@
- virtual int WavpackSetConfiguration (WavpackContext *wpc, WavpackConfig *config, uint32_t total_samples)=0;
- virtual int WavpackAddWrapper (WavpackContext *wpc, void *data, uint32_t bcount)=0;
-- virtual int WavpackStoreMD5Sum (WavpackContext *wpc, uchar data [16])=0;
-+ virtual int WavpackStoreMD5Sum (WavpackContext *wpc, unsigned char data [16])=0;
- virtual int WavpackPackInit (WavpackContext *wpc)=0;
- virtual int WavpackPackSamples (WavpackContext *wpc, int32_t *sample_buffer, uint32_t sample_count)=0;
-@@ -133,9 +133,9 @@
- virtual int WavpackGetFloatNormExp (WavpackContext *wpc)
- { return ::WavpackGetFloatNormExp (wpc); }
-- virtual int WavpackGetMD5Sum (WavpackContext *wpc, uchar data [16])
-+ virtual int WavpackGetMD5Sum (WavpackContext *wpc, unsigned char data [16])
- { return ::WavpackGetMD5Sum (wpc, data); }
- virtual uint32_t WavpackGetWrapperBytes (WavpackContext *wpc)
- { return ::WavpackGetWrapperBytes (wpc); }
-- virtual uchar *WavpackGetWrapperData (WavpackContext *wpc)
-+ virtual unsigned char *WavpackGetWrapperData (WavpackContext *wpc)
- { return ::WavpackGetWrapperData (wpc); }
- virtual void WavpackFreeWrapper (WavpackContext *wpc)
-@@ -171,5 +171,5 @@
- virtual int WavpackAddWrapper (WavpackContext *wpc, void *data, uint32_t bcount)
- { return ::WavpackAddWrapper (wpc, data, bcount); }
-- virtual int WavpackStoreMD5Sum (WavpackContext *wpc, uchar data [16])
-+ virtual int WavpackStoreMD5Sum (WavpackContext *wpc, unsigned char data [16])
- { return ::WavpackStoreMD5Sum (wpc, data); }
- virtual int WavpackPackInit (WavpackContext *wpc)
diff --git a/media-tv/xbmc/files/xbmc-9999-arm-kill-softfp.patch b/media-tv/xbmc/files/xbmc-9999-arm-kill-softfp.patch
deleted file mode 100644
index c50d83e2..00000000
--- a/media-tv/xbmc/files/xbmc-9999-arm-kill-softfp.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- xbmc-9999.orig/configure.in
-+++ xbmc-9999/configure.in
-@@ -572,9 +572,9 @@ if test "$host_vendor" = "apple" ; then
- LIBS="$LIBS -framework ApplicationServices"
- fi
- elif test "$use_arch" = "arm"; then
-- CFLAGS="$CFLAGS -mfloat-abi=softfp -mno-apcs-stack-check"
-- CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp -mno-apcs-stack-check"
-- FFMPEG_EXTRACFLAGS="-mfloat-abi=softfp"
-+ CFLAGS="$CFLAGS -mno-apcs-stack-check"
-+ CXXFLAGS="$CXXFLAGS -mno-apcs-stack-check"
-+ FFMPEG_EXTRACFLAGS=""
- if test "$use_tegra" = "yes"; then
- # Compile for ARMv7a architecture, need to test gcc for vfpv3-d16 support
- SAVE_CFLAGS="$CFLAGS"
diff --git a/media-tv/xbmc/files/xbmc-9999-libpng-1.5-fix-plt-trn-get.patch b/media-tv/xbmc/files/xbmc-9999-libpng-1.5-fix-plt-trn-get.patch
deleted file mode 100644
index 02954e8e..00000000
--- a/media-tv/xbmc/files/xbmc-9999-libpng-1.5-fix-plt-trn-get.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- xbmc-10.1.orig/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp
-+++ xbmc-10.1/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp
-@@ -178,12 +178,14 @@ bool CxImagePNG::Decode(CxFile *hFile)
- int _num_palette;
- png_colorp _palette;
- #if PNG_LIBPNG_VER > 10399
-- png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette);
-+ png_uint_32 _palette_ret;
-+ _palette_ret = png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette);
-+ if (_palette_ret && _num_palette>0){
- #else
- _num_palette=info_ptr->num_palette;
- _palette=info_ptr->palette;
--#endif
- if (_num_palette>0){
-+#endif
- SetPalette((rgb_color*)_palette,_num_palette);
- SetClrImportant(_num_palette);
- } else if (_bit_depth ==2) { //<DP> needed for 2 bpp grayscale PNGs
-@@ -199,11 +201,13 @@ bool CxImagePNG::Decode(CxFile *hFile)
- int _num_trans;
- png_color_16p _trans_color;
- #if PNG_LIBPNG_VER > 10399
-- png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color);
-+ png_uint_32 _trans_ret;
-+ _trans_ret = png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color);
-+ if (_trans_ret && _num_trans!=0){ //palette transparency
- #else
- _num_trans=info_ptr->num_trans;
--#endif
- if (_num_trans!=0){ //palette transparency
-+#endif
- if (_num_trans==1){
- if (_color_type == PNG_COLOR_TYPE_PALETTE){
- #if PNG_LIBPNG_VER > 10399
-@@ -219,7 +223,11 @@ bool CxImagePNG::Decode(CxFile *hFile)
- #endif
- }
- }
-+#if PNG_LIBPNG_VER > 10399
-+ if (_num_trans>1 && _trans_alpha!=NULL){
-+#else
- if (_num_trans>1){
-+#endif
- RGBQUAD* pal=GetPalette();
- if (pal){
- DWORD ip;
diff --git a/media-tv/xbmc/files/xbmc-9999-no-arm-flags.patch b/media-tv/xbmc/files/xbmc-9999-no-arm-flags.patch
deleted file mode 100644
index 82a73835..00000000
--- a/media-tv/xbmc/files/xbmc-9999-no-arm-flags.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-http://bugs.gentoo.org/400617
-
-do not force any particular ABI or FPU or SIMD compiler flags for arm
-targets. let the toolchain and user CFLAGS control that.
-
---- a/configure.in
-+++ b/configure.in
-@@ -571,7 +571,7 @@
- elif test "$target_platform" = "target_raspberry_pi"; then
- ARCH="arm"
- use_arch="arm"
--elif test "$use_arch" = "arm"; then
-+elif false; then
- CFLAGS="$CFLAGS -mno-apcs-stack-check"
- CXXFLAGS="$CXXFLAGS -mno-apcs-stack-check"
- FFMPEG_EXTRACFLAGS=""
diff --git a/media-tv/xbmc/files/xbmc-9999-no-exec-stack.patch b/media-tv/xbmc/files/xbmc-9999-no-exec-stack.patch
deleted file mode 100644
index 67b20b7b..00000000
--- a/media-tv/xbmc/files/xbmc-9999-no-exec-stack.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-http://trac.xbmc.org/ticket/12735
-
-From f0e33eefa4b5d46f26811db2f5e943dcd7f2870e Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Thu, 1 Mar 2012 00:04:49 -0500
-Subject: [PATCH] mark stack as non-executable
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- xbmc/utils/fastmemcpy-arm.S | 5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/xbmc/utils/fastmemcpy-arm.S b/xbmc/utils/fastmemcpy-arm.S
-index 0e810a7..3d77c68 100644
---- a/xbmc/utils/fastmemcpy-arm.S
-+++ b/xbmc/utils/fastmemcpy-arm.S
-@@ -527,3 +527,8 @@ copy_last_3_and_return:
-
- #endif /* __ARM_ARCH__ < 7 */
- #endif
-+
-+#if defined(__linux__) && defined(__ELF__)
-+/* we don't need an executable stack */
-+.section .note.GNU-stack,"",%progbits
-+#endif
---
-1.7.8.4
-
diff --git a/media-tv/xbmc/files/xbmc-9999-nomythtv.patch b/media-tv/xbmc/files/xbmc-9999-nomythtv.patch
deleted file mode 100644
index 40ab23b9..00000000
--- a/media-tv/xbmc/files/xbmc-9999-nomythtv.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-http://trac.xbmc.org/ticket/11775
-
-make mythtv support optional
-
-diff --git a/Makefile.in b/Makefile.in
-index 9ffae7e..17cc525 100755
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -209,7 +209,7 @@ LIB_DIRS=\
- lib/cpluff \
- lib/xbmc-dll-symbols
-
--ifeq (@USE_MYSQL@,1)
-+ifeq (@USE_MYTHTV@,1)
- LIB_DIRS += lib/cmyth
- CMYTH=cmyth
- endif
-diff --git a/configure.in b/configure.in
-index d44825f..629d7b4 100755
---- a/configure.in
-+++ b/configure.in
-@@ -479,6 +479,12 @@ AC_ARG_ENABLE([mysql],
- [AS_HELP_STRING([--disable-mysql],
- [disable mysql])],
-
-+AC_ARG_ENABLE([mythtv],
-+ [AS_HELP_STRING([--disable-mythtv],
-+ [disable mythtv])],
-+ [use_mythtv=$enableval],
-+ [use_mythtv=yes])
-+
- AC_ARG_ENABLE([webserver],
- [AS_HELP_STRING([--disable-webserver],
- [disable webserver])],
-@@ -1080,6 +1086,9 @@ if test "$use_mysql" = "yes"; then
- else
- AC_MSG_ERROR($missing_program)
- fi
-+ if test "$use_mythtv" = "yes"; then
-+ AC_DEFINE([HAVE_MYTHTV],[1],["Define to 1 if you want mythtv support"])
-+ fi
- fi
- AC_CHECK_HEADER([ass/ass.h],, AC_MSG_ERROR($missing_library))
- AC_CHECK_HEADER([mpeg2dec/mpeg2.h],, AC_MSG_ERROR($missing_library))
-@@ -2372,6 +2381,15 @@ else
- final_message="$final_message\n MySQL:\tNo"
- USE_MYSQL=0
- fi
-+
-+if test "$use_mythtv" = "yes"; then
-+ final_message="$final_message\n MythTV:\tYes"
-+ USE_MYTHTV=1
-+else
-+ final_message="$final_message\n MythTV:\tNo"
-+ USE_MYTHTV=0
-+fi
-+
- if test "$use_webserver" = "yes"; then
- final_message="$final_message\n Webserver:\tYes"
- USE_WEB_SERVER=1
-@@ -2675,6 +2693,7 @@ AC_SUBST(USE_LIBUDEV)
- AC_SUBST(USE_LIBUSB)
- AC_SUBST(USE_LIBCEC)
- AC_SUBST(USE_MYSQL)
-+AC_SUBST(USE_MYTHTV)
- AC_SUBST(USE_WAYLAND)
-
diff --git a/media-tv/xbmc/metadata.xml b/media-tv/xbmc/metadata.xml
deleted file mode 100644
index 02050d13..00000000
--- a/media-tv/xbmc/metadata.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<herd>xbox</herd>
-<use>
- <flag name='airplay'>enable AirPlay support</flag>
- <flag name='bluray'>Enable playback of Blu-ray filesystems</flag>
- <flag name='cec'>Enable support for HDMI-CEC devices via libcec</flag>
- <flag name='goom'>Enable GOOM visualization plugin</flag>
- <flag name='midi'>Support MIDI files</flag>
- <flag name='nfs'>Enable NFS client support</flag>
- <flag name='projectm'>Enable projectM visualization plugin</flag>
- <flag name='pvr'>Enable MythTV support</flag>
- <flag name='rtmp'>Enable Real Time Messaging Protocol using librtmp</flag>
- <flag name='rsxs'>Enable really slick X screensavers</flag>
- <flag name='sftp'>Support browsing files over SFTP</flag>
- <flag name='vaapi'>Enables VAAPI (Video Acceleration API) for hardware decoding</flag>
- <flag name='webserver'>Enable internal webserver</flag>
- <flag name='xrandr'>Support X randr extension</flag>
-</use>
-</pkgmetadata>
diff --git a/media-tv/xbmc/xbmc-10.1.ebuild b/media-tv/xbmc/xbmc-10.1.ebuild
deleted file mode 100644
index b7682b9b..00000000
--- a/media-tv/xbmc/xbmc-10.1.ebuild
+++ /dev/null
@@ -1,225 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-10.1.ebuild,v 1.8 2011/10/12 22:53:27 vapier Exp $
-
-EAPI="2"
-
-inherit eutils python flag-o-matic
-
-# Use XBMC_ESVN_REPO_URI to track a different branch
-ESVN_REPO_URI=${XBMC_ESVN_REPO_URI:-http://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk}
-ESVN_PROJECT=${ESVN_REPO_URI##*/svnroot/}
-ESVN_PROJECT=${ESVN_PROJECT%/*}
-if [[ ${PV} == "9999" ]] ; then
- inherit subversion autotools
- KEYWORDS=""
-else
- inherit autotools
- SRC_URI="http://mirrors.xbmc.org/releases/source/${P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
-fi
-
-DESCRIPTION="XBMC is a free and open source media-player and entertainment hub"
-HOMEPAGE="http://xbmc.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="alsa altivec avahi css debug joystick midi profile pulseaudio rtmp sse sse2 udev vaapi vdpau webserver +xrandr"
-
-COMMON_DEPEND="virtual/opengl
- app-arch/bzip2
- app-arch/unzip
- app-arch/zip
- app-i18n/enca
- dev-libs/boost
- dev-libs/fribidi
- dev-libs/libcdio[-minimal]
- dev-libs/libpcre[cxx]
- >=dev-libs/lzo-2.04
- >=dev-python/pysqlite-2
- media-libs/alsa-lib
- media-libs/faad2
- media-libs/flac
- media-libs/fontconfig
- media-libs/freetype
- >=media-libs/glew-1.5.6
- media-libs/jasper
- media-libs/jbigkit
- virtual/jpeg
- >=media-libs/libass-0.9.7
- css? ( media-libs/libdvdcss )
- media-libs/libmad
- media-libs/libmms
- media-libs/libmodplug
- media-libs/libmpeg2
- media-libs/libogg
- media-libs/libpng
- media-libs/libsamplerate
- media-libs/libsdl[audio,opengl,video,X]
- alsa? ( media-libs/libsdl[alsa] )
- media-libs/libvorbis
- media-libs/sdl-gfx
- >=media-libs/sdl-image-1.2.10[gif,jpeg,png]
- media-libs/sdl-mixer
- media-libs/sdl-sound
- media-libs/tiff
- pulseaudio? ( media-sound/pulseaudio )
- media-sound/wavpack
- >=virtual/ffmpeg-0.6
- rtmp? ( media-video/rtmpdump )
- avahi? ( net-dns/avahi )
- webserver? ( net-libs/libmicrohttpd )
- net-misc/curl
- || ( >=net-fs/samba-3.4.6[smbclient] <net-fs/samba-3.3 )
- sys-apps/dbus
- sys-libs/zlib
- virtual/mysql
- x11-apps/xdpyinfo
- x11-apps/mesa-progs
- vaapi? ( x11-libs/libva )
- vdpau? (
- || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 )
- virtual/ffmpeg[vdpau]
- )
- x11-libs/libXinerama
- xrandr? ( x11-libs/libXrandr )
- x11-libs/libXrender"
-RDEPEND="${COMMON_DEPEND}
- udev? ( sys-fs/udisks sys-power/upower )"
-DEPEND="${COMMON_DEPEND}
- app-text/dos2unix
- dev-util/gperf
- x11-proto/xineramaproto
- dev-util/cmake
- x86? ( dev-lang/nasm )"
-
-pkg_setup() {
- # nasty runtime things might happen otherwise
- # /usr/lib64/xbmc/system/players/dvdplayer/avcodec-52-x86_64-linux.so:
- # undefined symbol: NeAACDecSetConfiguration
- append-ldflags $(no-as-needed)
- python_pkg_setup
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- subversion_src_unpack
- cd "${S}"
- rm -f configure
- else
- unpack ${A}
- cd "${S}"
- fi
-
- # Fix case sensitivity
- mv media/Fonts/{a,A}rial.ttf || die
- mv media/{S,s}plash.png || die
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-10.0-python-2.7.patch #350098
- epatch "${FILESDIR}"/${PN}-10.1-gcc-4.6.patch #367261
- epatch "${FILESDIR}"/${P}-libpng-1.5.patch #380127
- epatch "${FILESDIR}"/${PN}-10.1-headers.patch #380127
- # Fix runtime SEGV, Kogaion bug #2968
- dos2unix -o "${S}/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp"
- epatch "${FILESDIR}"/${PN}-9999-libpng-1.5-fix-plt-trn-get.patch
- unix2dos -o "${S}/xbmc/lib/cximage-6.0/CxImage/ximapng.cpp"
-
- # some dirs ship generated autotools, some dont
- local d
- for d in . xbmc/cores/dvdplayer/Codecs/{libdts,libdvd/lib*/} lib/cpluff ; do
- [[ -e ${d}/configure ]] && continue
- pushd ${d} >/dev/null
- einfo "Generating autotools in ${d}"
- eautoreconf
- popd >/dev/null
- done
-
- local squish #290564
- use altivec && squish="-DSQUISH_USE_ALTIVEC=1 -maltivec"
- use sse && squish="-DSQUISH_USE_SSE=1 -msse"
- use sse2 && squish="-DSQUISH_USE_SSE=2 -msse2"
- sed -i \
- -e '/^CXXFLAGS/{s:-D[^=]*=.::;s:-m[[:alnum:]]*::}' \
- -e "1iCXXFLAGS += ${squish}" \
- xbmc/lib/libsquish/Makefile.in || die
-
- # Fix XBMC's final version string showing as "exported"
- # instead of the SVN revision number.
- export SVN_REV=${ESVN_WC_REVISION:-exported}
-
- # Avoid lsb-release dependency
- sed -i \
- -e 's:lsb_release -d:cat /etc/gentoo-release:' \
- xbmc/utils/SystemInfo.cpp
-
- # Do not use termcap #262822
- sed -i 's:-ltermcap::' xbmc/lib/libPython/Python/configure
-
- # avoid long delays when powerkit isn't running #348580
- sed -i \
- -e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
- xbmc/linux/*.cpp || die
-
- epatch_user #293109
-
- # Tweak autotool timestamps to avoid regeneration
- find . -type f -print0 | xargs -0 touch -r configure
-}
-
-src_configure() {
- # Disable documentation generation
- export ac_cv_path_LATEX=no
- # Avoid help2man
- export HELP2MAN=$(type -P help2man || echo true)
-
- # XBMC python mods only work with internal Python 2.4
- # ffmpeg is a moving target and newer version may
- # not work with xbmc, even if API compatible (vdpau in
- # ffmpeg is the main issue)
- # a52 support is deprecated
- # libdts support is deprecated
- econf \
- --docdir=/usr/share/doc/${PF} \
- --disable-ccache \
- --disable-optimizations \
- --disable-external-python \
- --disable-external-ffmpeg \
- --disable-external-libdts \
- --disable-external-liba52 \
- --enable-gl \
- --disable-liba52 \
- --disable-libdts \
- $(use_enable avahi) \
- $(use_enable css dvdcss) \
- $(use_enable debug) \
- --disable-hal \
- $(use_enable joystick) \
- $(use_enable midi mid) \
- $(use_enable profile profiling) \
- $(use_enable pulseaudio pulse) \
- $(use_enable rtmp) \
- $(use_enable vaapi) \
- $(use_enable vdpau) \
- $(use_enable webserver) \
- $(use_enable xrandr)
-}
-
-src_install() {
- emake install DESTDIR="${D}" || die
- dodoc keymapping.txt README.linux
- rm "${D}"/usr/share/doc/${PF}/{copying.txt,LICENSE.GPL} || die
-
-# insinto /usr/share/applications
-# doins tools/Linux/xbmc.desktop
-# doicon tools/Linux/xbmc.png
-
- insinto "$(python_get_sitedir)" #309885
- doins tools/EventClients/lib/python/xbmcclient.py || die
- newbin "tools/EventClients/Clients/XBMC Send/xbmc-send.py" xbmc-send || die
-}
-
-pkg_postinst() {
- elog "Visit http://wiki.xbmc.org/?title=XBMC_Online_Manual"
-}
diff --git a/media-tv/xbmc/xbmc-11.0.ebuild b/media-tv/xbmc/xbmc-11.0.ebuild
deleted file mode 100644
index 5c092077..00000000
--- a/media-tv/xbmc/xbmc-11.0.ebuild
+++ /dev/null
@@ -1,232 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-11.0.ebuild,v 1.6 2012/04/05 00:26:27 vapier Exp $
-
-EAPI="4"
-
-# Does not work with py3 here
-# It might work with py:2.5 but I didn't test that
-PYTHON_DEPEND="2:2.6"
-
-inherit eutils python
-
-EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
-if [[ ${PV} == "9999" ]] ; then
- inherit git-2 autotools
-else
- inherit autotools
- MY_P=${P/_/-*_}
- SRC_URI="http://mirrors.xbmc.org/releases/source/${MY_P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
- S=${WORKDIR}/${MY_P}
-fi
-
-DESCRIPTION="XBMC is a free and open source media-player and entertainment hub"
-HOMEPAGE="http://xbmc.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="airplay alsa altivec avahi bluetooth bluray cec css debug goom joystick midi mysql profile +projectm pulseaudio pvr +rsxs rtmp +samba sse sse2 udev vaapi vdpau webserver +xrandr"
-REQUIRED_USE="pvr? ( mysql )"
-
-COMMON_DEPEND="virtual/glu
- virtual/opengl
- app-arch/bzip2
- app-arch/unzip
- app-arch/zip
- app-i18n/enca
- airplay? ( app-pda/libplist )
- >=dev-lang/python-2.4
- dev-libs/boost
- dev-libs/fribidi
- dev-libs/libcdio[-minimal]
- cec? ( dev-libs/libcec )
- dev-libs/libpcre[cxx]
- >=dev-libs/lzo-2.04
- dev-libs/yajl
- >=dev-python/pysqlite-2
- dev-python/simplejson
- media-libs/alsa-lib
- media-libs/flac
- media-libs/fontconfig
- media-libs/freetype
- >=media-libs/glew-1.5.6
- media-libs/jasper
- media-libs/jbigkit
- virtual/jpeg
- >=media-libs/libass-0.9.7
- bluray? ( media-libs/libbluray )
- css? ( media-libs/libdvdcss )
- media-libs/libmad
- media-libs/libmodplug
- media-libs/libmpeg2
- media-libs/libogg
- media-libs/libpng
- projectm? ( media-libs/libprojectm )
- media-libs/libsamplerate
- media-libs/libsdl[audio,opengl,video,X]
- alsa? ( media-libs/libsdl[alsa] )
- media-libs/libvorbis
- media-libs/sdl-gfx
- >=media-libs/sdl-image-1.2.10[gif,jpeg,png]
- media-libs/sdl-mixer
- media-libs/sdl-sound
- media-libs/tiff
- pulseaudio? ( media-sound/pulseaudio )
- media-sound/wavpack
- >=virtual/ffmpeg-0.6[encode]
- rtmp? ( media-video/rtmpdump )
- avahi? ( net-dns/avahi )
- webserver? ( net-libs/libmicrohttpd )
- net-misc/curl
- samba? ( >=net-fs/samba-3.4.6[smbclient] )
- bluetooth? ( net-wireless/bluez )
- sys-apps/dbus
- sys-libs/zlib
- mysql? ( virtual/mysql )
- x11-apps/xdpyinfo
- x11-apps/mesa-progs
- vaapi? ( x11-libs/libva[opengl] )
- vdpau? (
- || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 )
- virtual/ffmpeg[vdpau]
- )
- x11-libs/libXinerama
- xrandr? ( x11-libs/libXrandr )
- x11-libs/libXrender"
-RDEPEND="${COMMON_DEPEND}
- udev? ( sys-fs/udisks:0 sys-power/upower )"
-DEPEND="${COMMON_DEPEND}
- dev-util/gperf
- x11-proto/xineramaproto
- dev-util/cmake
- x86? ( dev-lang/nasm )"
-
-pkg_setup() {
- python_set_active_version 2
- python_pkg_setup
-}
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- git-2_src_unpack
- cd "${S}"
- rm -f configure
- else
- unpack ${A}
- cd "${S}"
- fi
-
- # Fix case sensitivity
- mv media/Fonts/{a,A}rial.ttf || die
- mv media/{S,s}plash.png || die
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-9999-nomythtv.patch
- epatch "${FILESDIR}"/${PN}-9999-no-arm-flags.patch #400617
- epatch "${FILESDIR}"/${PN}-11.0-no-exec-stack.patch
- # The mythtv patch touches configure.ac, so force a regen
- rm -f configure
-
- # some dirs ship generated autotools, some dont
- local d
- for d in \
- . \
- lib/{libdvd/lib*/,cpluff,libapetag,libid3tag/libid3tag} \
- xbmc/screensavers/rsxs-* \
- xbmc/visualizations/Goom/goom2k4-0
- do
- [[ -e ${d}/configure ]] && continue
- pushd ${d} >/dev/null
- eautoreconf
- popd >/dev/null
- done
-
- local squish #290564
- use altivec && squish="-DSQUISH_USE_ALTIVEC=1 -maltivec"
- use sse && squish="-DSQUISH_USE_SSE=1 -msse"
- use sse2 && squish="-DSQUISH_USE_SSE=2 -msse2"
- sed -i \
- -e '/^CXXFLAGS/{s:-D[^=]*=.::;s:-m[[:alnum:]]*::}' \
- -e "1iCXXFLAGS += ${squish}" \
- lib/libsquish/Makefile.in || die
-
- # Disable internal func checks as our USE/DEPEND
- # stuff handles this just fine already #408395
- export ac_cv_lib_avcodec_ff_vdpau_vc1_decode_picture=yes
-
- # Fix XBMC's final version string showing as "exported"
- # instead of the SVN revision number.
- export HAVE_GIT=no GIT_REV=${EGIT_VERSION:-exported}
-
- # Avoid lsb-release dependency
- sed -i \
- -e 's:lsb_release -d:cat /etc/gentoo-release:' \
- xbmc/utils/SystemInfo.cpp || die
-
- # avoid long delays when powerkit isn't running #348580
- sed -i \
- -e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
- xbmc/linux/*.cpp || die
-
- epatch_user #293109
-
- # Tweak autotool timestamps to avoid regeneration
- find . -type f -print0 | xargs -0 touch -r configure
-}
-
-src_configure() {
- # Disable documentation generation
- export ac_cv_path_LATEX=no
- # Avoid help2man
- export HELP2MAN=$(type -P help2man || echo true)
- # No configure flage for this #403561
- export ac_cv_lib_bluetooth_hci_devid=$(usex bluetooth)
-
- econf \
- --docdir=/usr/share/doc/${PF} \
- --disable-ccache \
- --disable-optimizations \
- --disable-external-libraries \
- --enable-gl \
- $(use_enable airplay) \
- $(use_enable avahi) \
- $(use_enable bluray libbluray) \
- $(use_enable cec libcec) \
- $(use_enable css dvdcss) \
- $(use_enable debug) \
- $(use_enable goom) \
- --disable-hal \
- $(use_enable joystick) \
- $(use_enable midi mid) \
- $(use_enable mysql) \
- $(use_enable profile profiling) \
- $(use_enable projectm) \
- $(use_enable pulseaudio pulse) \
- $(use_enable pvr mythtv) \
- $(use_enable rsxs) \
- $(use_enable rtmp) \
- $(use_enable samba) \
- $(use_enable vaapi) \
- $(use_enable vdpau) \
- $(use_enable webserver) \
- $(use_enable xrandr)
-}
-
-src_install() {
- default
- rm "${ED}"/usr/share/doc/*/{LICENSE.GPL,copying.txt}*
-
- insinto /usr/share/applications
- doins tools/Linux/xbmc.desktop
- newicon tools/Linux/xbmc-48x48.png xbmc.png
-
- insinto "$(python_get_sitedir)" #309885
- doins tools/EventClients/lib/python/xbmcclient.py || die
- newbin "tools/EventClients/Clients/XBMC Send/xbmc-send.py" xbmc-send || die
-}
-
-pkg_postinst() {
- elog "Visit http://wiki.xbmc.org/?title=XBMC_Online_Manual"
-}
diff --git a/media-tv/xbmc/xbmc-12.0.ebuild b/media-tv/xbmc/xbmc-12.0.ebuild
deleted file mode 100644
index 04eea0d6..00000000
--- a/media-tv/xbmc/xbmc-12.0.ebuild
+++ /dev/null
@@ -1,237 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-12.0.ebuild,v 1.1 2013/02/18 06:53:34 vapier Exp $
-
-EAPI="4"
-
-# Does not work with py3 here
-# It might work with py:2.5 but I didn't test that
-PYTHON_DEPEND="2:2.6"
-PYTHON_USE_WITH=sqlite
-
-inherit eutils python multiprocessing autotools
-
-case ${PV} in
-9999)
- EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
- inherit git-2
- SRC_URI="!java? ( mirror://gentoo/${P}-20121224-generated-addons.tar.xz )"
- ;;
-*_alpha*|*_beta*|*_rc*)
- MY_PV="Frodo_${PV#*_}"
- MY_P="${PN}-${MY_PV}"
- SRC_URI="https://github.com/xbmc/xbmc/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
- !java? ( mirror://gentoo/${P}-generated-addons.tar.xz )"
- KEYWORDS="~amd64 ~x86"
- ;;
-*)
- MY_P=${P/_/-*_}
- SRC_URI="http://mirrors.xbmc.org/releases/source/${MY_P}.tar.gz"
- KEYWORDS="~amd64 ~x86"
- ;;
-esac
-
-DESCRIPTION="XBMC is a free and open source media-player and entertainment hub"
-HOMEPAGE="http://xbmc.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="airplay alsa altivec avahi bluetooth bluray cec css debug goom java joystick midi mysql nfs profile +projectm pulseaudio pvr +rsxs rtmp +samba sse sse2 sftp udev upnp vaapi vdpau webserver +xrandr"
-REQUIRED_USE="pvr? ( mysql )"
-
-COMMON_DEPEND="virtual/glu
- virtual/opengl
- app-arch/bzip2
- app-arch/unzip
- app-arch/zip
- app-i18n/enca
- airplay? ( app-pda/libplist )
- >=dev-lang/python-2.4
- dev-libs/boost
- dev-libs/fribidi
- dev-libs/libcdio[-minimal]
- cec? ( >=dev-libs/libcec-2 )
- dev-libs/libpcre[cxx]
- >=dev-libs/lzo-2.04
- dev-libs/tinyxml[stl]
- dev-libs/yajl
- dev-python/simplejson
- media-libs/alsa-lib
- media-libs/flac
- media-libs/fontconfig
- media-libs/freetype
- >=media-libs/glew-1.5.6
- media-libs/jasper
- media-libs/jbigkit
- >=media-libs/libass-0.9.7
- bluray? ( media-libs/libbluray )
- css? ( media-libs/libdvdcss )
- media-libs/libmad
- media-libs/libmodplug
- media-libs/libmpeg2
- media-libs/libogg
- media-libs/libpng
- projectm? ( media-libs/libprojectm )
- media-libs/libsamplerate
- media-libs/libsdl[audio,opengl,video,X]
- alsa? ( media-libs/libsdl[alsa] )
- >=media-libs/taglib-1.8
- media-libs/libvorbis
- media-libs/sdl-gfx
- >=media-libs/sdl-image-1.2.10[gif,jpeg,png]
- media-libs/sdl-mixer
- media-libs/sdl-sound
- media-libs/tiff
- pulseaudio? ( media-sound/pulseaudio )
- media-sound/wavpack
- || ( media-libs/libpostproc <media-video/libav-0.8.2-r1 media-video/ffmpeg )
- >=virtual/ffmpeg-0.6[encode]
- rtmp? ( media-video/rtmpdump )
- avahi? ( net-dns/avahi )
- nfs? ( net-fs/libnfs )
- webserver? ( net-libs/libmicrohttpd[messages] )
- sftp? ( net-libs/libssh )
- net-misc/curl
- samba? ( >=net-fs/samba-3.4.6[smbclient] )
- bluetooth? ( net-wireless/bluez )
- sys-apps/dbus
- sys-libs/zlib
- virtual/jpeg
- mysql? ( virtual/mysql )
- x11-apps/xdpyinfo
- x11-apps/mesa-progs
- vaapi? ( x11-libs/libva[opengl] )
- vdpau? (
- || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 )
- virtual/ffmpeg[vdpau]
- )
- x11-libs/libXinerama
- xrandr? ( x11-libs/libXrandr )
- x11-libs/libXrender"
-RDEPEND="${COMMON_DEPEND}
- udev? ( sys-fs/udisks:0 sys-power/upower )"
-DEPEND="${COMMON_DEPEND}
- app-arch/xz-utils
- dev-lang/swig
- dev-util/gperf
- x11-proto/xineramaproto
- dev-util/cmake
- x86? ( dev-lang/nasm )
- java? ( virtual/jre )"
-
-S=${WORKDIR}/${MY_P}
-
-pkg_setup() {
- python_set_active_version 2
- python_pkg_setup
-}
-
-src_unpack() {
- [[ ${PV} == "9999" ]] && git-2_src_unpack || default
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-9999-nomythtv.patch
- epatch "${FILESDIR}"/${PN}-9999-no-arm-flags.patch #400617
- # The mythtv patch touches configure.ac, so force a regen
- rm -f configure
-
- # some dirs ship generated autotools, some dont
- multijob_init
- local d
- for d in $(printf 'f:\n\t@echo $(BOOTSTRAP_TARGETS)\ninclude bootstrap.mk\n' | emake -f - f) ; do
- [[ -e ${d} ]] && continue
- pushd ${d/%configure/.} >/dev/null || die
- AT_NOELIBTOOLIZE="yes" AT_TOPLEVEL_EAUTORECONF="yes" \
- multijob_child_init eautoreconf
- popd >/dev/null
- done
- multijob_finish
- elibtoolize
-
- # Disable internal func checks as our USE/DEPEND
- # stuff handles this just fine already #408395
- export ac_cv_lib_avcodec_ff_vdpau_vc1_decode_picture=yes
-
- local squish #290564
- use altivec && squish="-DSQUISH_USE_ALTIVEC=1 -maltivec"
- use sse && squish="-DSQUISH_USE_SSE=1 -msse"
- use sse2 && squish="-DSQUISH_USE_SSE=2 -msse2"
- sed -i \
- -e '/^CXXFLAGS/{s:-D[^=]*=.::;s:-m[[:alnum:]]*::}' \
- -e "1iCXXFLAGS += ${squish}" \
- lib/libsquish/Makefile.in || die
-
- # Fix XBMC's final version string showing as "exported"
- # instead of the SVN revision number.
- export HAVE_GIT=no GIT_REV=${EGIT_VERSION:-exported}
-
- # avoid long delays when powerkit isn't running #348580
- sed -i \
- -e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
- xbmc/linux/*.cpp || die
-
- epatch_user #293109
-
- # Tweak autotool timestamps to avoid regeneration
- find . -type f -print0 | xargs -0 touch -r configure
-}
-
-src_configure() {
- # Disable documentation generation
- export ac_cv_path_LATEX=no
- # Avoid help2man
- export HELP2MAN=$(type -P help2man || echo true)
- # No configure flage for this #403561
- export ac_cv_lib_bluetooth_hci_devid=$(usex bluetooth)
- # Requiring java is asine #434662
- export ac_cv_path_JAVA_EXE=$(which $(usex java java true))
-
- econf \
- --docdir=/usr/share/doc/${PF} \
- --disable-ccache \
- --disable-optimizations \
- --enable-external-libraries \
- --enable-gl \
- $(use_enable airplay) \
- $(use_enable avahi) \
- $(use_enable bluray libbluray) \
- $(use_enable cec libcec) \
- $(use_enable css dvdcss) \
- $(use_enable debug) \
- $(use_enable goom) \
- --disable-hal \
- $(use_enable joystick) \
- $(use_enable midi mid) \
- $(use_enable mysql) \
- $(use_enable nfs) \
- $(use_enable profile profiling) \
- $(use_enable projectm) \
- $(use_enable pulseaudio pulse) \
- $(use_enable pvr mythtv) \
- $(use_enable rsxs) \
- $(use_enable rtmp) \
- $(use_enable samba) \
- $(use_enable sftp ssh) \
- $(use_enable upnp) \
- $(use_enable vaapi) \
- $(use_enable vdpau) \
- $(use_enable webserver) \
- $(use_enable xrandr)
-}
-
-src_install() {
- default
- rm "${ED}"/usr/share/doc/*/{LICENSE.GPL,copying.txt}*
-
- domenu tools/Linux/xbmc.desktop
- newicon tools/Linux/xbmc-48x48.png xbmc.png
-
- insinto "$(python_get_sitedir)" #309885
- doins tools/EventClients/lib/python/xbmcclient.py || die
- newbin "tools/EventClients/Clients/XBMC Send/xbmc-send.py" xbmc-send || die
-}
-
-pkg_postinst() {
- elog "Visit http://wiki.xbmc.org/?title=XBMC_Online_Manual"
-}
diff --git a/media-tv/xbmc/xbmc-12.2-r1.ebuild b/media-tv/xbmc/xbmc-12.2-r1.ebuild
deleted file mode 100644
index 74ef849e..00000000
--- a/media-tv/xbmc/xbmc-12.2-r1.ebuild
+++ /dev/null
@@ -1,262 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-12.2-r1.ebuild,v 1.5 2013/07/06 12:12:03 scarabeus Exp $
-
-EAPI=5
-
-# Does not work with py3 here
-# It might work with py:2.5 but I didn't test that
-PYTHON_COMPAT=( python{2_6,2_7} )
-PYTHON_REQ_USE="sqlite"
-
-inherit eutils python-single-r1 multiprocessing autotools
-
-BACKPORTS_VERSION=1
-
-case ${PV} in
-9999)
- EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
- inherit git-2
- SRC_URI="!java? ( mirror://gentoo/${P}-20121224-generated-addons.tar.xz )"
- ;;
-*_alpha*|*_beta*|*_rc*)
- MY_PV="Frodo_${PV#*_}"
- MY_P="${PN}-${MY_PV}"
- SRC_URI="https://github.com/xbmc/xbmc/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
- !java? ( mirror://gentoo/${P}-generated-addons.tar.xz )"
- KEYWORDS="amd64 x86"
- ;;
-*)
- MY_P=${P/_/-*_}
- SRC_URI="http://mirrors.xbmc.org/releases/source/${MY_P}.tar.gz
- mirror://gentoo/${PN}_backports-12-${BACKPORTS_VERSION}.tar.bz2"
- KEYWORDS="amd64 x86"
- ;;
-esac
-
-DESCRIPTION="XBMC is a free and open source media-player and entertainment hub"
-HOMEPAGE="http://xbmc.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="airplay alsa altivec avahi bluetooth bluray caps cec css debug gles goom java joystick midi mysql neon nfs +opengl profile +projectm pulseaudio pvr +rsxs rtmp +samba +sdl sse sse2 sftp udev upnp +usb vaapi vdpau webserver +X +xrandr"
-REQUIRED_USE="
- pvr? ( mysql )
- rsxs? ( X )
- X? ( sdl )
- xrandr? ( X )
-"
-
-COMMON_DEPEND="${PYTHON_DEPS}
- app-arch/bzip2
- app-arch/unzip
- app-arch/zip
- app-i18n/enca
- airplay? ( app-pda/libplist )
- dev-libs/boost
- dev-libs/fribidi
- dev-libs/libcdio[-minimal]
- cec? ( >=dev-libs/libcec-2.1 )
- dev-libs/libpcre[cxx]
- >=dev-libs/lzo-2.04
- dev-libs/tinyxml[stl]
- dev-libs/yajl
- dev-python/simplejson[${PYTHON_USEDEP}]
- media-libs/alsa-lib
- media-libs/flac
- media-libs/fontconfig
- media-libs/freetype
- >=media-libs/glew-1.5.6
- media-libs/jasper
- media-libs/jbigkit
- >=media-libs/libass-0.9.7
- bluray? ( media-libs/libbluray )
- css? ( media-libs/libdvdcss )
- media-libs/libmad
- media-libs/libmodplug
- media-libs/libmpeg2
- media-libs/libogg
- media-libs/libpng
- projectm? ( media-libs/libprojectm )
- media-libs/libsamplerate
- sdl? ( media-libs/libsdl[audio,opengl,video,X] )
- alsa? ( media-libs/libsdl[alsa] )
- >=media-libs/taglib-1.8
- media-libs/libvorbis
- sdl? (
- media-libs/sdl-gfx
- >=media-libs/sdl-image-1.2.10[gif,jpeg,png]
- media-libs/sdl-mixer
- media-libs/sdl-sound
- )
- media-libs/tiff
- pulseaudio? ( media-sound/pulseaudio )
- media-sound/wavpack
- rtmp? ( media-video/rtmpdump )
- avahi? ( net-dns/avahi )
- nfs? ( net-fs/libnfs )
- webserver? ( net-libs/libmicrohttpd[messages] )
- sftp? ( net-libs/libssh )
- net-misc/curl
- samba? ( >=net-fs/samba-3.4.6[smbclient] )
- bluetooth? ( net-wireless/bluez )
- sys-apps/dbus
- caps? ( sys-libs/libcap )
- sys-libs/zlib
- virtual/jpeg
- usb? ( virtual/libusb )
- mysql? ( virtual/mysql )
- opengl? (
- virtual/glu
- virtual/opengl
- )
- gles? ( virtual/opengl )
- vaapi? ( x11-libs/libva[opengl] )
- vdpau? (
- || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 )
- )
- X? (
- x11-apps/xdpyinfo
- x11-apps/mesa-progs
- x11-libs/libXinerama
- xrandr? ( x11-libs/libXrandr )
- x11-libs/libXrender
- )"
-RDEPEND="${COMMON_DEPEND}
- udev? ( sys-fs/udisks:0 sys-power/upower )"
-DEPEND="${COMMON_DEPEND}
- app-arch/xz-utils
- dev-lang/swig
- dev-util/gperf
- X? ( x11-proto/xineramaproto )
- dev-util/cmake
- x86? ( dev-lang/nasm )
- java? ( virtual/jre )"
-
-S=${WORKDIR}/${MY_P}
-
-pkg_setup() {
- python-single-r1_pkg_setup
-}
-
-src_unpack() {
- [[ ${PV} == "9999" ]] && git-2_src_unpack || default
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-9999-nomythtv.patch
- epatch "${FILESDIR}"/${PN}-9999-no-arm-flags.patch #400617
- # Backported fixes
- EPATCH_MULTI_MSG="Applying patches backported from master..." \
- EPATCH_SUFFIX="patch" \
- epatch "${WORKDIR}/${PN}_backports"
- # The mythtv patch touches configure.ac, so force a regen
- rm -f configure
-
- # some dirs ship generated autotools, some dont
- multijob_init
- local d
- for d in $(printf 'f:\n\t@echo $(BOOTSTRAP_TARGETS)\ninclude bootstrap.mk\n' | emake -f - f) ; do
- [[ -e ${d} ]] && continue
- pushd ${d/%configure/.} >/dev/null || die
- AT_NOELIBTOOLIZE="yes" AT_TOPLEVEL_EAUTORECONF="yes" \
- multijob_child_init eautoreconf
- popd >/dev/null
- done
- multijob_finish
- elibtoolize
-
- # Disable internal func checks as our USE/DEPEND
- # stuff handles this just fine already #408395
- export ac_cv_lib_avcodec_ff_vdpau_vc1_decode_picture=yes
-
- local squish #290564
- use altivec && squish="-DSQUISH_USE_ALTIVEC=1 -maltivec"
- use sse && squish="-DSQUISH_USE_SSE=1 -msse"
- use sse2 && squish="-DSQUISH_USE_SSE=2 -msse2"
- sed -i \
- -e '/^CXXFLAGS/{s:-D[^=]*=.::;s:-m[[:alnum:]]*::}' \
- -e "1iCXXFLAGS += ${squish}" \
- lib/libsquish/Makefile.in || die
-
- # Fix XBMC's final version string showing as "exported"
- # instead of the SVN revision number.
- export HAVE_GIT=no GIT_REV=${EGIT_VERSION:-exported}
-
- # avoid long delays when powerkit isn't running #348580
- sed -i \
- -e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
- xbmc/linux/*.cpp || die
-
- epatch_user #293109
-
- # Tweak autotool timestamps to avoid regeneration
- find . -type f -print0 | xargs -0 touch -r configure
-}
-
-src_configure() {
- # Disable documentation generation
- export ac_cv_path_LATEX=no
- # Avoid help2man
- export HELP2MAN=$(type -P help2man || echo true)
- # No configure flage for this #403561
- export ac_cv_lib_bluetooth_hci_devid=$(usex bluetooth)
- # Requiring java is asine #434662
- export ac_cv_path_JAVA_EXE=$(which $(usex java java true))
-
- # Kogaion, we need libav-9, and all is broken as usual
- econf \
- --docdir=/usr/share/doc/${PF} \
- --disable-ccache \
- --disable-optimizations \
- --enable-external-libraries \
- --disable-external-ffmpeg \
- --enable-gl \
- $(use_enable airplay) \
- $(use_enable avahi) \
- $(use_enable bluray libbluray) \
- $(use_enable caps libcap) \
- $(use_enable cec libcec) \
- $(use_enable css dvdcss) \
- $(use_enable debug) \
- $(use_enable gles) \
- $(use_enable goom) \
- --disable-hal \
- $(use_enable joystick) \
- $(use_enable midi mid) \
- $(use_enable mysql) \
- $(use_enable neon) \
- $(use_enable nfs) \
- $(use_enable opengl gl) \
- $(use_enable profile profiling) \
- $(use_enable projectm) \
- $(use_enable pulseaudio pulse) \
- $(use_enable pvr mythtv) \
- $(use_enable rsxs) \
- $(use_enable rtmp) \
- $(use_enable samba) \
- $(use_enable sdl) \
- $(use_enable sftp ssh) \
- $(use_enable usb libusb) \
- $(use_enable upnp) \
- $(use_enable vaapi) \
- $(use_enable vdpau) \
- $(use_enable webserver) \
- $(use_enable X x11) \
- $(use_enable xrandr)
-}
-
-src_install() {
- default
- rm "${ED}"/usr/share/doc/*/{LICENSE.GPL,copying.txt}*
-
- domenu tools/Linux/xbmc.desktop
- newicon tools/Linux/xbmc-48x48.png xbmc.png
-
- python_domodule tools/EventClients/lib/python/xbmcclient.py
- python_newscript "tools/EventClients/Clients/XBMC Send/xbmc-send.py" xbmc-send
-}
-
-pkg_postinst() {
- elog "Visit http://wiki.xbmc.org/?title=XBMC_Online_Manual"
-}
diff --git a/media-tv/xbmc/xbmc-12.3.ebuild b/media-tv/xbmc/xbmc-12.3.ebuild
deleted file mode 100644
index bf784d8d..00000000
--- a/media-tv/xbmc/xbmc-12.3.ebuild
+++ /dev/null
@@ -1,264 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-12.3.ebuild,v 1.2 2013/12/31 19:18:32 vapier Exp $
-
-EAPI="5"
-
-# Does not work with py3 here
-# It might work with py:2.5 but I didn't test that
-PYTHON_COMPAT=( python{2_6,2_7} )
-PYTHON_REQ_USE="sqlite"
-
-inherit eutils python-single-r1 multiprocessing autotools
-
-BACKPORTS_VERSION=1
-
-case ${PV} in
-9999)
- EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
- inherit git-2
- SRC_URI="!java? ( mirror://gentoo/${P}-20121224-generated-addons.tar.xz )"
- ;;
-*_alpha*|*_beta*|*_rc*)
- MY_PV="Frodo_${PV#*_}"
- MY_P="${PN}-${MY_PV}"
- SRC_URI="https://github.com/xbmc/xbmc/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
- !java? ( mirror://gentoo/${P}-generated-addons.tar.xz )"
- KEYWORDS="~amd64 ~x86"
- ;;
-*)
- MY_P=${P/_/-*_}
- SRC_URI="http://mirrors.xbmc.org/releases/source/${MY_P}.tar.gz
- mirror://gentoo/${PN}_backports-12-${BACKPORTS_VERSION}.tar.bz2
- mirror://gentoo/${P}-generated-addons.tar.xz"
- KEYWORDS="~amd64 ~x86"
- ;;
-esac
-
-DESCRIPTION="XBMC is a free and open source media-player and entertainment hub"
-HOMEPAGE="http://xbmc.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="airplay alsa altivec avahi bluetooth bluray caps cec css debug gles goom java joystick midi mysql neon nfs +opengl profile +projectm pulseaudio pvr +rsxs rtmp +samba +sdl sse sse2 sftp udev upnp +usb vaapi vdpau webserver +X +xrandr"
-REQUIRED_USE="
- pvr? ( mysql )
- rsxs? ( X )
- X? ( sdl )
- xrandr? ( X )
-"
-
-COMMON_DEPEND="${PYTHON_DEPS}
- app-arch/bzip2
- app-arch/unzip
- app-arch/zip
- app-i18n/enca
- airplay? ( app-pda/libplist )
- dev-libs/boost
- dev-libs/fribidi
- dev-libs/libcdio[-minimal]
- cec? ( >=dev-libs/libcec-2.1 )
- dev-libs/libpcre[cxx]
- >=dev-libs/lzo-2.04
- dev-libs/tinyxml[stl]
- dev-libs/yajl
- dev-python/simplejson[${PYTHON_USEDEP}]
- media-libs/alsa-lib
- media-libs/flac
- media-libs/fontconfig
- media-libs/freetype
- >=media-libs/glew-1.5.6
- media-libs/jasper
- media-libs/jbigkit
- >=media-libs/libass-0.9.7
- bluray? ( media-libs/libbluray )
- css? ( media-libs/libdvdcss )
- media-libs/libmad
- media-libs/libmodplug
- media-libs/libmpeg2
- media-libs/libogg
- media-libs/libpng
- projectm? ( media-libs/libprojectm )
- media-libs/libsamplerate
- sdl? ( media-libs/libsdl[sound,opengl,video,X] )
- alsa? ( media-libs/libsdl[alsa] )
- >=media-libs/taglib-1.8
- media-libs/libvorbis
- sdl? (
- media-libs/sdl-gfx
- >=media-libs/sdl-image-1.2.10[gif,jpeg,png]
- media-libs/sdl-mixer
- media-libs/sdl-sound
- )
- media-libs/tiff
- pulseaudio? ( media-sound/pulseaudio )
- media-sound/wavpack
- rtmp? ( media-video/rtmpdump )
- avahi? ( net-dns/avahi )
- nfs? ( net-fs/libnfs )
- webserver? ( net-libs/libmicrohttpd[messages] )
- sftp? ( net-libs/libssh[sftp] )
- net-misc/curl
- samba? ( >=net-fs/samba-3.4.6[smbclient] )
- bluetooth? ( net-wireless/bluez )
- sys-apps/dbus
- caps? ( sys-libs/libcap )
- sys-libs/zlib
- virtual/jpeg
- usb? ( virtual/libusb )
- mysql? ( virtual/mysql )
- opengl? (
- virtual/glu
- virtual/opengl
- )
- gles? ( virtual/opengl )
- vaapi? ( x11-libs/libva[opengl] )
- vdpau? (
- || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 )
- )
- X? (
- x11-apps/xdpyinfo
- x11-apps/mesa-progs
- x11-libs/libXinerama
- xrandr? ( x11-libs/libXrandr )
- x11-libs/libXrender
- )"
-RDEPEND="${COMMON_DEPEND}
- udev? ( sys-fs/udisks:0 sys-power/upower )"
-DEPEND="${COMMON_DEPEND}
- app-arch/xz-utils
- dev-lang/swig
- dev-util/gperf
- X? ( x11-proto/xineramaproto )
- dev-util/cmake
- x86? ( dev-lang/nasm )
- java? ( virtual/jre )"
-
-S=${WORKDIR}/${MY_P}-Frodo
-
-pkg_setup() {
- python-single-r1_pkg_setup
-}
-
-src_unpack() {
- [[ ${PV} == "9999" ]] && git-2_src_unpack || default
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-12.1-nomythtv.patch
- epatch "${FILESDIR}"/${PN}-9999-no-arm-flags.patch #400617
- epatch "${FILESDIR}"/${PN}-12.3-no-sse2.patch #475266
- # Backported fixes
- EPATCH_MULTI_MSG="Applying patches backported from master..." \
- EPATCH_SUFFIX="patch" \
- epatch "${WORKDIR}/${PN}_backports"
- # The mythtv patch touches configure.ac, so force a regen
- rm -f configure
-
- # some dirs ship generated autotools, some dont
- multijob_init
- local d
- for d in $(printf 'f:\n\t@echo $(BOOTSTRAP_TARGETS)\ninclude bootstrap.mk\n' | emake -f - f) ; do
- [[ -e ${d} ]] && continue
- pushd ${d/%configure/.} >/dev/null || die
- AT_NOELIBTOOLIZE="yes" AT_TOPLEVEL_EAUTORECONF="yes" \
- multijob_child_init eautoreconf
- popd >/dev/null
- done
- multijob_finish
- elibtoolize
-
- # Disable internal func checks as our USE/DEPEND
- # stuff handles this just fine already #408395
- export ac_cv_lib_avcodec_ff_vdpau_vc1_decode_picture=yes
-
- local squish #290564
- use altivec && squish="-DSQUISH_USE_ALTIVEC=1 -maltivec"
- use sse && squish="-DSQUISH_USE_SSE=1 -msse"
- use sse2 && squish="-DSQUISH_USE_SSE=2 -msse2"
- sed -i \
- -e '/^CXXFLAGS/{s:-D[^=]*=.::;s:-m[[:alnum:]]*::}' \
- -e "1iCXXFLAGS += ${squish}" \
- lib/libsquish/Makefile.in || die
-
- # Fix XBMC's final version string showing as "exported"
- # instead of the SVN revision number.
- export HAVE_GIT=no GIT_REV=${EGIT_VERSION:-exported}
-
- # avoid long delays when powerkit isn't running #348580
- sed -i \
- -e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
- xbmc/linux/*.cpp || die
-
- epatch_user #293109
-
- # Tweak autotool timestamps to avoid regeneration
- find . -type f -exec touch -r configure {} +
-}
-
-src_configure() {
- # Disable documentation generation
- export ac_cv_path_LATEX=no
- # Avoid help2man
- export HELP2MAN=$(type -P help2man || echo true)
- # No configure flage for this #403561
- export ac_cv_lib_bluetooth_hci_devid=$(usex bluetooth)
- # Requiring java is asine #434662
- export ac_cv_path_JAVA_EXE=$(which $(usex java java true))
-
- # Kogaion, we need libav-9, and all is broken as usual
- econf \
- --docdir=/usr/share/doc/${PF} \
- --disable-ccache \
- --disable-optimizations \
- --enable-external-libraries \
- --disable-external-ffmpeg \
- --enable-gl \
- $(use_enable airplay) \
- $(use_enable avahi) \
- $(use_enable bluray libbluray) \
- $(use_enable caps libcap) \
- $(use_enable cec libcec) \
- $(use_enable css dvdcss) \
- $(use_enable debug) \
- $(use_enable gles) \
- $(use_enable goom) \
- --disable-hal \
- $(use_enable joystick) \
- $(use_enable midi mid) \
- $(use_enable mysql) \
- $(use_enable neon) \
- $(use_enable nfs) \
- $(use_enable opengl gl) \
- $(use_enable profile profiling) \
- $(use_enable projectm) \
- $(use_enable pulseaudio pulse) \
- $(use_enable pvr mythtv) \
- $(use_enable rsxs) \
- $(use_enable rtmp) \
- $(use_enable samba) \
- $(use_enable sdl) \
- $(use_enable sftp ssh) \
- $(use_enable usb libusb) \
- $(use_enable upnp) \
- $(use_enable vaapi) \
- $(use_enable vdpau) \
- $(use_enable webserver) \
- $(use_enable X x11) \
- $(use_enable xrandr)
-}
-
-src_install() {
- default
- rm "${ED}"/usr/share/doc/*/{LICENSE.GPL,copying.txt}*
-
- domenu tools/Linux/xbmc.desktop
- newicon tools/Linux/xbmc-48x48.png xbmc.png
-
- python_domodule tools/EventClients/lib/python/xbmcclient.py
- python_newscript "tools/EventClients/Clients/XBMC Send/xbmc-send.py" xbmc-send
-}
-
-pkg_postinst() {
- elog "Visit http://wiki.xbmc.org/?title=XBMC_Online_Manual"
-}
diff --git a/media-tv/xbmc/xbmc-13.2.ebuild b/media-tv/xbmc/xbmc-13.2.ebuild
deleted file mode 100644
index 6bb5d406..00000000
--- a/media-tv/xbmc/xbmc-13.2.ebuild
+++ /dev/null
@@ -1,296 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI="5"
-
-# Does not work with py3 here
-# It might work with py:2.5 but I didn't test that
-PYTHON_COMPAT=( python{2_6,2_7} )
-PYTHON_REQ_USE="sqlite"
-
-inherit eutils python-single-r1 multiprocessing autotools
-
-CODENAME="Gotham"
-case ${PV} in
-9999)
- EGIT_REPO_URI="git://github.com/xbmc/xbmc.git"
- inherit git-2
- #SRC_URI="!java? ( mirror://gentoo/${P}-20130413-generated-addons.tar.xz )"
- ;;
-*_alpha*|*_beta*|*_rc*)
- MY_PV="${CODENAME}_${PV#*_}"
- MY_P="${PN}-${MY_PV}"
- SRC_URI="https://github.com/xbmc/xbmc/archive/${MY_PV}.tar.gz -> ${P}.tar.gz
- !java? ( mirror://gentoo/${P}-generated-addons.tar.xz )"
- KEYWORDS="~amd64 ~x86"
- S=${WORKDIR}/${MY_P}
- ;;
-*|*_p*)
- MY_PV=${PV/_p/_r}
- MY_P="${PN}-${MY_PV}"
- SRC_URI="http://mirrors.xbmc.org/releases/source/${MY_P}.tar.gz
- http://mirrors.xbmc.org/releases/source/${MY_P}-generated-addons.tar.xz"
- KEYWORDS="~amd64 ~x86"
-
- S=${WORKDIR}/${MY_P}-${CODENAME}
- ;;
-esac
-
-DESCRIPTION="XBMC is a free and open source media-player and entertainment hub"
-HOMEPAGE="http://xbmc.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="airplay alsa altivec avahi bluetooth bluray caps cec css debug +fishbmc gles goom java joystick midi mysql nfs +opengl profile +projectm pulseaudio pvr +rsxs rtmp +samba +sdl sse sse2 sftp udisks upnp upower +usb vaapi vdpau webserver +X +xrandr"
-REQUIRED_USE="
- pvr? ( mysql )
- rsxs? ( X )
- X? ( sdl )
- xrandr? ( X )
-"
-
-COMMON_DEPEND="${PYTHON_DEPS}
- app-arch/bzip2
- app-arch/unzip
- app-arch/zip
- app-i18n/enca
- airplay? ( app-pda/libplist )
- dev-libs/boost
- dev-libs/fribidi
- dev-libs/libcdio[-minimal]
- cec? ( >=dev-libs/libcec-2.1 )
- dev-libs/libpcre[cxx]
- >=dev-libs/lzo-2.04
- dev-libs/tinyxml[stl]
- dev-libs/yajl
- dev-python/simplejson[${PYTHON_USEDEP}]
- media-fonts/corefonts
- media-fonts/roboto
- media-libs/alsa-lib
- media-libs/flac
- media-libs/fontconfig
- media-libs/freetype
- >=media-libs/glew-1.5.6
- media-libs/jasper
- media-libs/jbigkit
- >=media-libs/libass-0.9.7
- bluray? ( media-libs/libbluray )
- css? ( media-libs/libdvdcss )
- media-libs/libmad
- media-libs/libmodplug
- media-libs/libmpeg2
- media-libs/libogg
- media-libs/libpng
- projectm? ( media-libs/libprojectm )
- media-libs/libsamplerate
- sdl? ( media-libs/libsdl[sound,opengl,video,X] )
- alsa? ( media-libs/libsdl[alsa] )
- >=media-libs/taglib-1.8
- media-libs/libvorbis
- sdl? (
- media-libs/sdl-gfx
- >=media-libs/sdl-image-1.2.10[gif,jpeg,png]
- media-libs/sdl-mixer
- media-libs/sdl-sound
- )
- media-libs/tiff
- pulseaudio? ( media-sound/pulseaudio )
- media-sound/wavpack
- rtmp? ( media-video/rtmpdump )
- avahi? ( net-dns/avahi )
- nfs? ( net-fs/libnfs )
- webserver? ( net-libs/libmicrohttpd[messages] )
- sftp? ( net-libs/libssh[sftp] )
- net-misc/curl
- samba? ( >=net-fs/samba-3.4.6[smbclient(+)] )
- bluetooth? ( net-wireless/bluez )
- sys-apps/dbus
- caps? ( sys-libs/libcap )
- sys-libs/zlib
- virtual/jpeg
- usb? ( virtual/libusb )
- mysql? ( virtual/mysql )
- opengl? (
- virtual/glu
- virtual/opengl
- )
- gles? (
- virtual/opengl
- media-libs/mesa[gles2]
- )
- vaapi? ( x11-libs/libva[opengl] )
- vdpau? (
- || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 )
- )
- X? (
- x11-apps/xdpyinfo
- x11-apps/mesa-progs
- x11-libs/libXinerama
- xrandr? ( x11-libs/libXrandr )
- x11-libs/libXrender
- )"
-RDEPEND="${COMMON_DEPEND}
- udisks? ( sys-fs/udisks:0 )
- upower? ( || ( sys-power/upower sys-power/upower-pm-utils ) )"
-DEPEND="${COMMON_DEPEND}
- app-arch/xz-utils
- dev-lang/swig
- dev-util/gperf
- X? ( x11-proto/xineramaproto )
- dev-util/cmake
- x86? ( dev-lang/nasm )
- java? ( virtual/jre )"
-# Force java for latest git version to avoid having to hand maintain the
-# generated addons package. #488118
-[[ ${PV} == "9999" ]] && DEPEND+=" virtual/jre"
-
-pkg_setup() {
- python-single-r1_pkg_setup
-}
-
-src_unpack() {
- [[ ${PV} == "9999" ]] && git-2_src_unpack || default
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-9999-nomythtv.patch
- epatch "${FILESDIR}"/${PN}-9999-no-arm-flags.patch #400617
- # The mythtv patch touches configure.ac, so force a regen
- rm -f configure
-
- # some dirs ship generated autotools, some dont
- multijob_init
- local d
- for d in $(printf 'f:\n\t@echo $(BOOTSTRAP_TARGETS)\ninclude bootstrap.mk\n' | emake -f - f) ; do
- [[ -e ${d} ]] && continue
- pushd ${d/%configure/.} >/dev/null || die
- AT_NOELIBTOOLIZE="yes" AT_TOPLEVEL_EAUTORECONF="yes" \
- multijob_child_init eautoreconf
- popd >/dev/null
- done
- multijob_finish
- elibtoolize
-
- [[ ${PV} == "9999" ]] && emake -f codegenerator.mk
-
- # Disable internal func checks as our USE/DEPEND
- # stuff handles this just fine already #408395
- export ac_cv_lib_avcodec_ff_vdpau_vc1_decode_picture=yes
-
- local squish #290564
- use altivec && squish="-DSQUISH_USE_ALTIVEC=1 -maltivec"
- use sse && squish="-DSQUISH_USE_SSE=1 -msse"
- use sse2 && squish="-DSQUISH_USE_SSE=2 -msse2"
- sed -i \
- -e '/^CXXFLAGS/{s:-D[^=]*=.::;s:-m[[:alnum:]]*::}' \
- -e "1iCXXFLAGS += ${squish}" \
- lib/libsquish/Makefile.in || die
-
- # Fix XBMC's final version string showing as "exported"
- # instead of the SVN revision number.
- export HAVE_GIT=no GIT_REV=${EGIT_VERSION:-exported}
-
- # avoid long delays when powerkit isn't running #348580
- sed -i \
- -e '/dbus_connection_send_with_reply_and_block/s:-1:3000:' \
- xbmc/linux/*.cpp || die
-
- epatch_user #293109
-
- # Tweak autotool timestamps to avoid regeneration
- find . -type f -exec touch -r configure {} +
-}
-
-src_configure() {
- # Disable documentation generation
- export ac_cv_path_LATEX=no
- # Avoid help2man
- export HELP2MAN=$(type -P help2man || echo true)
- # No configure flage for this #403561
- export ac_cv_lib_bluetooth_hci_devid=$(usex bluetooth)
- # Requiring java is asine #434662
- [[ ${PV} != "9999" ]] && export ac_cv_path_JAVA_EXE=$(which $(usex java java true))
-
- econf \
- --docdir=/usr/share/doc/${PF} \
- --disable-ccache \
- --disable-optimizations \
- --enable-external-libraries \
- --disable-external-ffmpeg \
- $(use_enable airplay) \
- $(use_enable avahi) \
- $(use_enable bluray libbluray) \
- $(use_enable caps libcap) \
- $(use_enable cec libcec) \
- $(use_enable css dvdcss) \
- $(use_enable debug) \
- $(use_enable fishbmc) \
- $(use_enable gles) \
- $(use_enable goom) \
- --disable-hal \
- $(use_enable joystick) \
- $(use_enable midi mid) \
- $(use_enable mysql) \
- $(use_enable nfs) \
- $(use_enable opengl gl) \
- $(use_enable profile profiling) \
- $(use_enable projectm) \
- $(use_enable pulseaudio pulse) \
- $(use_enable pvr mythtv) \
- $(use_enable rsxs) \
- $(use_enable rtmp) \
- $(use_enable samba) \
- $(use_enable sdl) \
- $(use_enable sftp ssh) \
- $(use_enable usb libusb) \
- $(use_enable upnp) \
- $(use_enable vaapi) \
- $(use_enable vdpau) \
- $(use_enable webserver) \
- $(use_enable X x11) \
- $(use_enable xrandr)
-}
-
-src_install() {
- default
- rm "${ED}"/usr/share/doc/*/{LICENSE.GPL,copying.txt}*
-
- domenu tools/Linux/xbmc.desktop
- newicon media/icon48x48.png xbmc.png
-
- # Remove optional addons (platform specific and disabled by USE flag).
- local disabled_addons=(
- repository.pvr-{android,ios,osx{32,64},win32}.xbmc.org
- visualization.dxspectrum
- )
- use fishbmc || disabled_addons+=( visualization.fishbmc )
- use projectm || disabled_addons+=( visualization.{milkdrop,projectm} )
- use rsxs || disabled_addons+=( screensaver.rsxs.{euphoria,plasma,solarwinds} )
- rm -rf "${disabled_addons[@]/#/${ED}/usr/share/xbmc/addons/}"
-
- # Punt simplejson bundle, we use the system one anyway.
- rm -rf "${ED}"/usr/share/xbmc/addons/script.module.simplejson/lib
- # Remove fonconfig settings that are used only on MacOSX.
- # Can't be patched upstream because they just find all files and install
- # them into same structure like they have in git.
- rm -rf "${ED}"/usr/share/xbmc/system/players/dvdplayer/etc
-
- # Replace bundled fonts with system ones
- # teletext.ttf: unknown
- # bold-caps.ttf: unknown
- # roboto: roboto-bold, roboto-regular
- # arial.ttf: font mashed from droid/roboto, not removed wrt bug#460514
- rm -rf "${ED}"/usr/share/xbmc/addons/skin.confluence/fonts/Roboto-*
- dosym /usr/share/fonts/roboto/Roboto-Regular.ttf \
- /usr/share/xbmc/addons/skin.confluence/fonts/Roboto-Regular.ttf
- dosym /usr/share/fonts/roboto/Roboto-Bold.ttf \
- /usr/share/xbmc/addons/skin.confluence/fonts/Roboto-Bold.ttf
-
- python_domodule tools/EventClients/lib/python/xbmcclient.py
- python_newscript "tools/EventClients/Clients/XBMC Send/xbmc-send.py" xbmc-send
-}
-
-pkg_postinst() {
- elog "Visit http://wiki.xbmc.org/?title=XBMC_Online_Manual"
-}