aboutsummaryrefslogtreecommitdiffstats
path: root/main/xbmc
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-11-20 10:23:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-11-20 10:23:15 +0000
commit25600cb7829f777585251a09f31edf57101bbd49 (patch)
tree12389c500a9e18ac0974357cc33e11aaf7785d09 /main/xbmc
parentd4a10987706fbdb64fd342bcd8b72caf07ebe105 (diff)
downloadaports-25600cb7829f777585251a09f31edf57101bbd49.tar.bz2
aports-25600cb7829f777585251a09f31edf57101bbd49.tar.xz
main/xbmc: upgrade to 13.2 and fix build with new libcec
Diffstat (limited to 'main/xbmc')
-rw-r--r--main/xbmc/0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch41
-rw-r--r--main/xbmc/0002-CEC-bump-libCEC-to-2.2.0.patch39
-rw-r--r--main/xbmc/0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch26
-rw-r--r--main/xbmc/0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch112
-rw-r--r--main/xbmc/0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch32
-rw-r--r--main/xbmc/0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch29
-rw-r--r--main/xbmc/APKBUILD86
-rw-r--r--main/xbmc/enable-external-ffmpeg.patch100
-rw-r--r--main/xbmc/fix-fileemu.patch142
-rw-r--r--main/xbmc/fix-musl.patch106
-rw-r--r--main/xbmc/samba4.patch20
11 files changed, 574 insertions, 159 deletions
diff --git a/main/xbmc/0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch b/main/xbmc/0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch
new file mode 100644
index 0000000000..f2fc11b850
--- /dev/null
+++ b/main/xbmc/0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch
@@ -0,0 +1,41 @@
+From 4037c9fd07fbec1873549e71e0b1c2833a5a87db Mon Sep 17 00:00:00 2001
+From: Lars Op den Kamp <lars@opdenkamp.eu>
+Date: Mon, 27 Oct 2014 14:42:30 +0100
+Subject: [PATCH 1/8] [CEC] fixed: don't try to stick a value > 255 in a byte
+
+---
+ system/peripherals.xml | 2 +-
+ xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/system/peripherals.xml b/system/peripherals.xml
+index 57af5d1..5fcff7c 100644
+--- a/system/peripherals.xml
++++ b/system/peripherals.xml
+@@ -30,7 +30,7 @@
+ <setting key="device_type" type="int" value="1" configurable="0" />
+ <setting key="wake_devices_advanced" type="string" value="" configurable="0" />
+ <setting key="standby_devices_advanced" type="string" value="" configurable="0" />
+- <setting key="double_tap_timeout_ms" type="int" min="0" value="2000" configurable="0" />
++ <setting key="double_tap_timeout_ms" type="int" min="0" value="300" configurable="0" />
+ </peripheral>
+
+ <peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
+diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+index 9907ba2..1d068dc 100644
+--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+@@ -1347,8 +1347,8 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
+ m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
+ m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
+
+- // double tap prevention timeout in ms
+- m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
++ // double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
++ m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms") / 50;
+ }
+
+ void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)
+--
+2.1.2
+
diff --git a/main/xbmc/0002-CEC-bump-libCEC-to-2.2.0.patch b/main/xbmc/0002-CEC-bump-libCEC-to-2.2.0.patch
new file mode 100644
index 0000000000..e7aecd75e2
--- /dev/null
+++ b/main/xbmc/0002-CEC-bump-libCEC-to-2.2.0.patch
@@ -0,0 +1,39 @@
+From 6cd70921650dda8864a844033e36f1bea55d034b Mon Sep 17 00:00:00 2001
+From: Lars Op den Kamp <lars@opdenkamp.eu>
+Date: Mon, 27 Oct 2014 12:29:09 +0100
+Subject: [PATCH 2/8] [CEC] bump libCEC to 2.2.0
+
+---
+ project/BuildDependencies/scripts/libcec_d.txt | 2 +-
+ tools/depends/target/libcec/Makefile | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/project/BuildDependencies/scripts/libcec_d.txt b/project/BuildDependencies/scripts/libcec_d.txt
+index a126c74..3d0265e 100644
+--- a/project/BuildDependencies/scripts/libcec_d.txt
++++ b/project/BuildDependencies/scripts/libcec_d.txt
+@@ -1,3 +1,3 @@
+ ; filename source of the file
+
+-libcec-2.1.4.zip http://mirrors.xbmc.org/build-deps/win32/
++libcec-2.2.0-win32.zip http://mirrors.xbmc.org/build-deps/win32/
+diff --git a/tools/depends/target/libcec/Makefile b/tools/depends/target/libcec/Makefile
+index 16fec1b..6c72240 100644
+--- a/tools/depends/target/libcec/Makefile
++++ b/tools/depends/target/libcec/Makefile
+@@ -3,9 +3,9 @@ DEPS= ../../Makefile.include Makefile
+
+ # lib name, version
+ LIBNAME=libcec
+-VERSION=2.1.4
+-SOURCE=$(LIBNAME)-$(VERSION)-2
+-ARCHIVE=$(SOURCE).tar.gz
++VERSION=2.2.0
++SOURCE=$(LIBNAME)-$(VERSION)
++ARCHIVE=$(SOURCE)-3.tar.gz
+
+ # configuration settings
+ CONFIGURE=./configure --prefix=$(PREFIX) --disable-rpi \
+--
+2.1.2
+
diff --git a/main/xbmc/0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch b/main/xbmc/0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch
new file mode 100644
index 0000000000..e8f5837214
--- /dev/null
+++ b/main/xbmc/0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch
@@ -0,0 +1,26 @@
+From e59d7e028288464e6890141a830e4a83d4b9d065 Mon Sep 17 00:00:00 2001
+From: Lars Op den Kamp <lars@opdenkamp.eu>
+Date: Mon, 27 Oct 2014 15:32:36 +0100
+Subject: [PATCH 3/8] [CEC] prevent bus rescan on a Pi, since the adapter
+ cannot be removed
+
+---
+ xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
+index b02535a..4941ae6 100644
+--- a/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
++++ b/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
+@@ -101,6 +101,8 @@ bool CPeripheralBusCEC::PerformDeviceScan(PeripheralScanResults &results)
+ break;
+ case ADAPTERTYPE_RPI:
+ result.m_mappedBusType = PERIPHERAL_BUS_RPI;
++ /** the Pi's adapter cannot be removed, no need to rescan */
++ m_bNeedsPolling = false;
+ break;
+ default:
+ break;
+--
+2.1.2
+
diff --git a/main/xbmc/0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch b/main/xbmc/0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch
new file mode 100644
index 0000000000..d4556ae290
--- /dev/null
+++ b/main/xbmc/0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch
@@ -0,0 +1,112 @@
+From 6544830d1a0b9810c2feb2fcb34df3f90b010d2f Mon Sep 17 00:00:00 2001
+From: Lars Op den Kamp <lars@opdenkamp.eu>
+Date: Mon, 27 Oct 2014 21:01:00 +0100
+Subject: [PATCH 4/8] [CEC] fixed: don't return garbage from CEC related app
+ messenger methods see
+ https://github.com/xbmc/xbmc/commit/19d37944ca2a2ac2f3e71a40a94e9ea289d8f2db#commitcomment-8248480
+
+---
+ xbmc/Application.cpp | 14 ++++++++------
+ xbmc/ApplicationMessenger.cpp | 20 +++++---------------
+ xbmc/ApplicationMessenger.h | 4 ++--
+ 3 files changed, 15 insertions(+), 23 deletions(-)
+
+diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
+index d5604dc..4d26183 100644
+--- a/xbmc/Application.cpp
++++ b/xbmc/Application.cpp
+@@ -2351,16 +2351,18 @@
+
+ if (StringUtils::StartsWithNoCase(action.GetName(),"CECToggleState") || StringUtils::StartsWithNoCase(action.GetName(),"CECStandby"))
+ {
+- bool ret = true;
+-
+- CLog::Log(LOGDEBUG, "%s: action %s [%d], toggling state of playing device", __FUNCTION__, action.GetName().c_str(), action.GetID());
+ // do not wake up the screensaver right after switching off the playing device
+ if (StringUtils::StartsWithNoCase(action.GetName(),"CECToggleState"))
+- ret = CApplicationMessenger::Get().CECToggleState();
++ {
++ CLog::Log(LOGDEBUG, "%s: action %s [%d], toggling state of playing device", __FUNCTION__, action.GetName().c_str(), action.GetID());
++ if (!CApplicationMessenger::Get().CECToggleState())
++ return true;
++ }
+ else
+- ret = CApplicationMessenger::Get().CECStandby();
+- if (!ret) /* display is switched off */
++ {
++ CApplicationMessenger::Get().CECStandby();
+ return true;
++ }
+ }
+
+ ResetScreenSaver();
+diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp
+index 1a59c5c..d228273 100644
+--- a/xbmc/ApplicationMessenger.cpp
++++ b/xbmc/ApplicationMessenger.cpp
+@@ -843,12 +843,12 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg)
+ }
+ case TMSG_CECACTIVATESOURCE:
+ {
+- *((bool*)pMsg->lpVoid) = g_peripherals.ToggleDeviceState(STATE_ACTIVATE_SOURCE);
++ g_peripherals.ToggleDeviceState(STATE_ACTIVATE_SOURCE);
+ break;
+ }
+ case TMSG_CECSTANDBY:
+ {
+- *((bool*)pMsg->lpVoid) = g_peripherals.ToggleDeviceState(STATE_STANDBY);
++ g_peripherals.ToggleDeviceState(STATE_STANDBY);
+ break;
+ }
+ case TMSG_START_ANDROID_ACTIVITY:
+@@ -1396,29 +1396,19 @@ bool CApplicationMessenger::CECToggleState()
+
+ ThreadMessage tMsg = {TMSG_CECTOGGLESTATE};
+ tMsg.lpVoid = (void*)&result;
+- SendMessage(tMsg, false);
++ SendMessage(tMsg, true);
+
+ return result;
+ }
+
+-bool CApplicationMessenger::CECActivateSource()
++void CApplicationMessenger::CECActivateSource()
+ {
+- bool result;
+-
+ ThreadMessage tMsg = {TMSG_CECACTIVATESOURCE};
+- tMsg.lpVoid = (void*)&result;
+ SendMessage(tMsg, false);
+-
+- return result;
+ }
+
+-bool CApplicationMessenger::CECStandby()
++void CApplicationMessenger::CECStandby()
+ {
+- bool result;
+-
+ ThreadMessage tMsg = {TMSG_CECSTANDBY};
+- tMsg.lpVoid = (void*)&result;
+ SendMessage(tMsg, false);
+-
+- return result;
+ }
+diff --git a/xbmc/ApplicationMessenger.h b/xbmc/ApplicationMessenger.h
+index 9013567..543e065 100644
+--- a/xbmc/ApplicationMessenger.h
++++ b/xbmc/ApplicationMessenger.h
+@@ -219,8 +219,8 @@ public:
+
+ void LoadProfile(unsigned int idx);
+ bool CECToggleState();
+- bool CECActivateSource();
+- bool CECStandby();
++ void CECActivateSource();
++ void CECStandby();
+
+ CStdString GetResponse();
+ int SetResponse(CStdString response);
+--
+2.1.2
+
diff --git a/main/xbmc/0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch b/main/xbmc/0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
new file mode 100644
index 0000000000..023257ca47
--- /dev/null
+++ b/main/xbmc/0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
@@ -0,0 +1,32 @@
+From 9f1e45a10860dd23239de35673643e9e0e4a74f8 Mon Sep 17 00:00:00 2001
+From: Lars Op den Kamp <lars@opdenkamp.eu>
+Date: Tue, 28 Oct 2014 14:52:16 +0100
+Subject: [PATCH 5/8] [CEC] renamed the iDoubleTapTimeoutMs in the new libCEC
+ for clarity. does not change binary compatibility
+
+---
+ xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+index 1d068dc..ad123d9 100644
+--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+@@ -1347,8 +1347,13 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
+ m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
+ m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
+
++#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
+ // double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
+- m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms") / 50;
++ m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50;
++#else
++ // backwards compatibility. will be removed once the next major release of libCEC is out
++ m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
++#endif
+ }
+
+ void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)
+--
+2.1.2
+
diff --git a/main/xbmc/0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch b/main/xbmc/0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch
new file mode 100644
index 0000000000..cd533962a7
--- /dev/null
+++ b/main/xbmc/0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch
@@ -0,0 +1,29 @@
+From fa01c108b60f74abb16992c1376bcca896093eac Mon Sep 17 00:00:00 2001
+From: Lars Op den Kamp <lars@opdenkamp.eu>
+Date: Tue, 28 Oct 2014 16:08:00 +0100
+Subject: [PATCH 6/8] [CEC] fixed - don't use CEC_CLIENT_VERSION_CURRENT for
+ the client version, because it will lead to issues when XBMC is rebuilt after
+ a libCEC bump that changes something
+
+---
+ xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+index ad123d9..015daef 100644
+--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+@@ -1268,8 +1268,8 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu
+
+ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
+ {
+- // use the same client version as libCEC version
+- m_configuration.clientVersion = CEC_CLIENT_VERSION_CURRENT;
++ // client version matches the version of libCEC that we originally used the API from
++ m_configuration.clientVersion = CEC_CLIENT_VERSION_2_2_0;
+
+ // device name 'XBMC'
+ snprintf(m_configuration.strDeviceName, 13, "%s", GetSettingString("device_name").c_str());
+--
+2.1.2
+
diff --git a/main/xbmc/APKBUILD b/main/xbmc/APKBUILD
index b4a72f4732..c07731d44c 100644
--- a/main/xbmc/APKBUILD
+++ b/main/xbmc/APKBUILD
@@ -1,36 +1,45 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xbmc
-pkgver=12.3
-pkgrel=3
+pkgver=13.2
+pkgrel=0
pkgdesc="A software media player and entertainment hub for digital media"
url="http://xbmc.org"
arch="all"
license="GPL"
depends="python hicolor-icon-theme xdpyinfo libcrystalhd unrar mesa-demos curl"
depends_dev="gettext-dev boost-dev mesa-dev glew-dev glu-dev mysql-dev libass-dev
- libogg-dev libvorbis-dev libmodplug-dev curl-dev flac-dev libgcrypt-dev bzip2-dev
- tiff-dev lzo-dev yajl-dev bluez-dev tinyxml-dev fribidi-dev sqlite-dev libpng-dev
- libcdio-dev pcre-dev freetype-dev taglib-dev jasper-dev alsa-lib-dev dbus-dev
- sdl-dev sdl_image-dev lame-dev libmicrohttpd-dev libbluray-dev avahi-dev
- libxrandr-dev libxt-dev libxmu-dev samba-dev gawk libssh-dev libva-dev libnfs-dev
+ libogg-dev libvorbis-dev libmodplug-dev curl-dev flac-dev libgcrypt-dev
+ bzip2-dev tiff-dev lzo-dev yajl-dev bluez-dev tinyxml-dev fribidi-dev
+ sqlite-dev libpng-dev libcdio-dev pcre-dev freetype-dev taglib-dev
+ jasper-dev alsa-lib-dev dbus-dev sdl-dev sdl_image-dev lame-dev
+ libmicrohttpd-dev libbluray-dev avahi-dev libxrandr-dev libxt-dev
+ libxmu-dev samba-dev gawk libssh-dev libva-dev libnfs-dev
yasm-dev libmpeg2-dev libmad-dev libsamplerate-dev rtmpdump-dev
- libjpeg-turbo-dev libcrystalhd-dev udev-dev libcap-dev udisks-dev faac-dev
- libshairport-dev ffmpeg1-dev afpfs-ng-dev libcec-dev"
+ libjpeg-turbo-dev libcrystalhd-dev udev-dev libcap-dev udisks-dev
+ faac-dev gnutls-dev libxslt-dev
+ libshairport-dev ffmpeg-dev afpfs-ng-dev libcec-dev"
makedepends="$depends_dev automake autoconf m4 libtool swig findutils openjdk7-jre-base
boost-thread zip gperf cmake coreutils nasm"
subpackages="$pkgname-dev $pkgname-doc"
install=""
options="ldpath-recursive"
-source="http://mirrors.xbmc.org/releases/source/old/$pkgname-$pkgver.tar.gz
+source="http://mirrors.xbmc.org/releases/source/$pkgname-$pkgver.tar.gz
no-snesapu.patch
- samba4.patch
fix-musl.patch
fix-fileemu.patch
fix-rsxs.patch
+
+ 0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch
+ 0002-CEC-bump-libCEC-to-2.2.0.patch
+ 0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch
+ 0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch
+ 0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
+ 0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch
+ enable-external-ffmpeg.patch
"
-_builddir="$srcdir/$pkgname-$pkgver-Frodo"
+_builddir="$srcdir/$pkgname-$pkgver-Gotham"
prepare() {
local i
@@ -40,14 +49,12 @@ prepare() {
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
- # fix autotools
- sed -i -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADER/" \
- lib/libdvd/libdvdcss/configure.ac || return 1
}
build() {
cd "$_builddir"
./bootstrap || return 1
+ autoconf || return 1
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -62,7 +69,6 @@ build() {
--enable-crystalhd \
--enable-vaapi \
--enable-ffmpeg-libvorbis \
- --enable-external-ffmpeg \
--enable-rtmp \
--enable-joystick \
--enable-xrandr \
@@ -78,21 +84,39 @@ package() {
rm -f "$pkgdir"/usr/lib/*.la
}
-md5sums="7ae385ebf8e5cfcb917393235e6efbdb xbmc-12.3.tar.gz
+md5sums="d80153b2cc78b88966458ab136e9494f xbmc-13.2.tar.gz
5ad388f29ab8f4ca6bc9e2b73bf946ef no-snesapu.patch
-32d11612e948622b195950b93371027c samba4.patch
-eef7181657647bb95452a85b1ff34331 fix-musl.patch
-d94b78880011d0e26c544ffcb9a3f6bf fix-fileemu.patch
-1c8cc1618f29613fe3521db3e4a99db5 fix-rsxs.patch"
-sha256sums="3e15c960d034efdea5f92a7b74716cb48094842d077b076025fd8640754ede73 xbmc-12.3.tar.gz
+9d61cf68c8d994d11d7c4c0ab9383098 fix-musl.patch
+69049c53ffc4a403ccff3bba77e47793 fix-fileemu.patch
+1c8cc1618f29613fe3521db3e4a99db5 fix-rsxs.patch
+d00af955c000f285a230568004209117 0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch
+6ee855d2cd6ada08b2c72b5c15d5ae76 0002-CEC-bump-libCEC-to-2.2.0.patch
+3e810f451e58d5704cdd15b83552aa53 0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch
+693869eb72d696c3457e795722e707c6 0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch
+b6346f66286195189e41839e9a23ef87 0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
+47b765e1d4299fac32bf92f108548d06 0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch
+9f9b41cfc1e21b1e7d0bb10d6e85b3c6 enable-external-ffmpeg.patch"
+sha256sums="acbf5dffa3034a3406240ee3cf81e721386cd383d23d056ddde1f769e050e585 xbmc-13.2.tar.gz
3c04c2cd6909cfb587b194e6c5a3025f1a3f03a0c5178ad70541ff7e69915935 no-snesapu.patch
-de0c56f7ff84bc891d758dba6b3a68d20443e34357cd5dc89e0d4675bfee312c samba4.patch
-7f390049dee084a6900f51763b686fd3ecdba3c336143d063712a537eb13ad70 fix-musl.patch
-c88e17ab49d9bbb66da7cc30dfccd108d824fb6b2c00dfec9e723a3a13b40554 fix-fileemu.patch
-e5de7cf5e781de9288f362c9d1c88d226297ba4aae3f75e5980f0a7cfc2258f0 fix-rsxs.patch"
-sha512sums="abe5333f940460a2d40b04a4821f932b44c7605e0d4954e48781317aa25ee04e102b051165842094c5804024c637ca30506773dc3319aba7ab6dbfbe1973ccaa xbmc-12.3.tar.gz
+c07906ae884919cce64abae77f9facbb1aa68ba214ae7ec3195c260ae1a15c27 fix-musl.patch
+cd566ae87c0ecc3e7cbeee9d80b042ae937d4f243413293616bd31f24efffec7 fix-fileemu.patch
+e5de7cf5e781de9288f362c9d1c88d226297ba4aae3f75e5980f0a7cfc2258f0 fix-rsxs.patch
+f4b436a64e32af6728fc9a584292b56de356d9090f0db0af30798a43aaa077f3 0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch
+9d9ccbd140a71b90d43a22b7722804b9cb509b4e1e1fec02c0e2bceaed3b3958 0002-CEC-bump-libCEC-to-2.2.0.patch
+0f0401189cc8481f05d7b68c50d66e18144c7d261be783e32c5b269f4b356ad7 0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch
+33d6bd2b0da3d8563bfdf6059ad59ca10d9fe617e51990220ceb40d6fb3129d3 0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch
+d98f86ceefb039b43a66332658aeee4aff25370248955ece10d04ae21f33d2a9 0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
+d829a5267f0b8042308b291366915253b3104d85a780a03cdaff6bec82493b95 0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch
+0239e33e87292c7340ed2092f2b5f1e82f5e283b1f763fb125b3aee78f50c355 enable-external-ffmpeg.patch"
+sha512sums="83a514410748b05da4c626caff34fec7b6b26a8bdea9f158e1c75721d3a47d36eb1f97ed4c162f6c2472a97f658e3b5285c1e0b144bfb4f654932586eee4d1c8 xbmc-13.2.tar.gz
8b2b3159b536719bad7c00f2eb51c4778f8e6c049cfe07e2555a530ad8587ca7b83623e1b5f40220d2e490e38442f893f87496620aa94da27d37a8bddc72f434 no-snesapu.patch
-c84cefc90450bc55710ff2f5d12e13b9cdfaf6342647db9acb4c285b63f9d5712956a34c4725f36f39751f2f17c2561f8b5f7c409cd53358567e5915f7bef6bd samba4.patch
-5577264078ce2c649ad0f1dbcfe245571ca525c66f52e05da2d758d0c20236476023912099b3baa40efce2a785dc1684381eb41704b1b420126fbca19a52b0db fix-musl.patch
-6c470003a03f034f012f9cd97ed479d6bb2d0286d1cf515ff0196d32d62ba6b1a0cf5fea900de04ddda5ce6340afd2593b6d222ea5ebe7c09e654f89eca1d16d fix-fileemu.patch
-e1ed2e2e53c20b59f2ea926e9097e99438fdaed9b9d4c0133567bd1c8dc26b003961ad045ce4aaba62e9825e1a2d9651e72bd21bdb09dcc840c8e14d9602d109 fix-rsxs.patch"
+ddcd22512656607dd077135f95c7342081fbbeb9f78f8dc7e55e4a3a98b19d7c046faebb2925443c27dbd1cd7889e054a43a36e1efdbb8df2817997876c35513 fix-musl.patch
+d2c284a7156a842e23a1089053cb28af1a825fddbeb5b5e8d4a8f2d8b37a7861a7082529e603cfe56eb2c7fd35c4ce1aa7e9f224690ab42689c9886d60dafbc7 fix-fileemu.patch
+e1ed2e2e53c20b59f2ea926e9097e99438fdaed9b9d4c0133567bd1c8dc26b003961ad045ce4aaba62e9825e1a2d9651e72bd21bdb09dcc840c8e14d9602d109 fix-rsxs.patch
+53723e36216a115631ec0600824f30e30400eca2ebecad7d0b8d2b976704cf6a9a3c9be9ed9325eddfacc33058d71f11b65f5137e72db914ce4858f9a8d563f5 0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch
+a96644b0047b7e43039bd66984155532662cf25a16a0a569a46cb919f32f73e0accf1f8f4c399499d2da8f44e59462c436b3012e86653bc7c3fde53bc5461951 0002-CEC-bump-libCEC-to-2.2.0.patch
+30839838fe1644fb995af57f14ebbc9dd396c706c30fad407c5958b268c3f61674e1726c67447b0399f31fc1f96bb4fe90682d83e914319ad0b6b56dab73719a 0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch
+dc7a6e5b4dbbed6cdfbb99011e9bae11c7b09542efdf4755daeead816f3d50eac7410081ae74cb5ffffbd38060b0ec2a6cc082538f9fb844be6ef3cc28508290 0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch
+05074fff8c4ff0133380a44202bdc26e15f5b6e924d54190ecfa9c5991f19c65f6cb5705205d3ffe1f108baf397ecaf316db1ca29524e1cf89534c797633994a 0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch
+becb625f28c81802c105e6ff8632aae25a5d78eb7140893d85f0f9420e695cee8cbe30ddfb18748fb294d72fe817db7e219fa512cd861f53ca56e04cdc7e2ade 0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch
+f0ee0fcb52d0e34cfb20a8eeeedba7f82cee4c2c1657810e4f29a77981b4800df7df20d9769436757ded48504b17f1b1c4b5dbd8ff9114fb4a0839576443511e enable-external-ffmpeg.patch"
diff --git a/main/xbmc/enable-external-ffmpeg.patch b/main/xbmc/enable-external-ffmpeg.patch
new file mode 100644
index 0000000000..2bc1aaf039
--- /dev/null
+++ b/main/xbmc/enable-external-ffmpeg.patch
@@ -0,0 +1,100 @@
+diff -rupN a/configure.in b/configure.in
+--- a/configure.in 2014-05-03 21:03:25.000000000 +0000
++++ b/configure.in 2014-05-07 09:56:30.039177391 +0000
+@@ -600,7 +600,7 @@ PKG_PROG_PKG_CONFIG
+ MAKE="${MAKE:-make}"
+ OBJDUMP="${OBJDUMP:-objdump}"
+
+-use_external_ffmpeg=no
++use_external_ffmpeg=yes
+ use_static_ffmpeg=no
+
+ # ffmpeg needs the output of uname -s (e.x. linux, darwin) for the target_os
+@@ -632,7 +632,7 @@ case $host in
+ use_arch="x86"
+ use_cpu="i686"
+ fi
+- use_static_ffmpeg=yes
++ use_static_ffmpeg=no
+ ;;
+ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
+ ARCH="x86_64-linux"
+@@ -640,7 +640,7 @@ case $host in
+ use_arch="x86_64"
+ use_cpu="x86_64"
+ fi
+- use_static_ffmpeg=yes
++ use_static_ffmpeg=no
+ ;;
+ i386-*-freebsd*)
+ ARCH="x86-freebsd"
+@@ -696,7 +696,7 @@ case $host in
+ use_sdl=no
+ use_x11=no
+ use_wayland=no
+- use_static_ffmpeg=yes
++ use_static_ffmpeg=no
+ ;;
+ arm*-*linux-android*)
+ target_platform=target_android
+diff -rupN a/lib/DllAvCodec.h b/lib/DllAvCodec.h
+--- a/lib/DllAvCodec.h 2014-05-03 21:03:25.000000000 +0000
++++ b/lib/DllAvCodec.h 2014-05-07 10:10:06.298165915 +0000
+@@ -43,6 +43,7 @@ extern "C" {
+
+ #if (defined USE_EXTERNAL_FFMPEG)
+ #include <libavcodec/avcodec.h>
++ #include <libavutil/frame.h>
+ #else
+ #include "libavcodec/avcodec.h"
+ #endif
+diff -rupN a/lib/DllAvUtil.h b/lib/DllAvUtil.h
+--- a/lib/DllAvUtil.h 2014-05-03 21:03:25.000000000 +0000
++++ b/lib/DllAvUtil.h 2014-05-07 10:17:31.415798448 +0000
+@@ -31,33 +31,19 @@
+ #endif
+
+ extern "C" {
+-#if (defined USE_EXTERNAL_FFMPEG)
+- #include <libavutil/avutil.h>
+- // for av_get_default_channel_layout
+- #include <libavutil/audioconvert.h>
+- #include <libavutil/crc.h>
+- #include <libavutil/fifo.h>
+- // for LIBAVCODEC_VERSION_INT:
+- #include <libavcodec/avcodec.h>
+- // for enum AVSampleFormat
+- #include <libavutil/samplefmt.h>
+- #include <libavutil/opt.h>
+- #include <libavutil/mem.h>
+- #include <libavutil/mathematics.h>
+- #if (defined USE_LIBAV_HACKS)
+- #include "xbmc-libav-hacks/libav_hacks.h"
+- #endif
+-#else
+- #include "libavutil/avutil.h"
+- //for av_get_default_channel_layout
+- #include "libavutil/audioconvert.h"
+- #include "libavutil/crc.h"
+- #include "libavutil/opt.h"
+- #include "libavutil/mem.h"
+- #include "libavutil/fifo.h"
+- // for enum AVSampleFormat
+- #include "libavutil/samplefmt.h"
+-#endif
++#include <libavutil/avutil.h>
++#include <libavutil/frame.h>
++// for av_get_default_channel_layout
++#include <libavutil/audioconvert.h>
++#include <libavutil/crc.h>
++#include <libavutil/fifo.h>
++// for LIBAVCODEC_VERSION_INT:
++#include <libavcodec/avcodec.h>
++// for enum AVSampleFormat
++#include <libavutil/samplefmt.h>
++#include <libavutil/opt.h>
++#include <libavutil/mem.h>
++#include <libavutil/mathematics.h>
+ }
+
+ #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,29,100)
diff --git a/main/xbmc/fix-fileemu.patch b/main/xbmc/fix-fileemu.patch
index f853168c63..59d0045ac1 100644
--- a/main/xbmc/fix-fileemu.patch
+++ b/main/xbmc/fix-fileemu.patch
@@ -1,15 +1,16 @@
-diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp xbmc-12.3-Frodo/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
---- xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp 2013-12-12 21:47:49.000000000 +0000
-+++ xbmc-12.3-Frodo/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp 2014-04-15 07:51:22.843024856 +0000
+diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
+index ae7ccb5..d8fd7fc 100644
+--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
++++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
@@ -49,6 +49,7 @@
#include <fcntl.h>
#include <time.h>
#include <signal.h>
+#include <paths.h>
- #ifdef _LINUX
+ #ifdef TARGET_POSIX
#include "PlatformDefs.h" // for __stat64
#endif
-@@ -479,13 +480,10 @@
+@@ -466,13 +467,10 @@ extern "C"
EmuFileObject* o = g_emuFileWrapper.GetFileObjectByDescriptor(fd);
if (o)
{
@@ -24,7 +25,7 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp xbmc-1
}
else if (!IS_STD_DESCRIPTOR(fd))
{
-@@ -548,7 +546,7 @@
+@@ -535,7 +533,7 @@ extern "C"
return -1;
}
object->mode = iMode;
@@ -33,10 +34,10 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp xbmc-1
}
delete pFile;
return -1;
-@@ -1194,8 +1192,8 @@
+@@ -1181,8 +1179,8 @@ extern "C"
{
FILE* file = NULL;
- #if defined(_LINUX) && !defined(TARGET_DARWIN) && !defined(__FreeBSD__) && !defined(__ANDROID__)
+ #if defined(TARGET_LINUX) && !defined(TARGET_ANDROID)
- if (strcmp(filename, MOUNTED) == 0
- || strcmp(filename, MNTTAB) == 0)
+ if (strcmp(filename, _PATH_MOUNTED) == 0
@@ -44,77 +45,75 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp xbmc-1
{
CLog::Log(LOGINFO, "%s - something opened the mount file, let's hope it knows what it's doing", __FUNCTION__);
return fopen(filename, mode);
-@@ -1586,7 +1584,7 @@
+@@ -1572,7 +1570,7 @@ extern "C"
int ret;
ret = dll_fgetpos64(stream, &tmpPos);
--#if !defined(_LINUX) || defined(TARGET_DARWIN) || defined(__FreeBSD__) || defined(__ANDROID__)
-+#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(__FreeBSD__) || defined(__ANDROID__)
+-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
++#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
*pos = (fpos_t)tmpPos;
#else
pos->__pos = (off_t)tmpPos.__pos;
-@@ -1599,8 +1597,9 @@
+@@ -1585,8 +1583,9 @@ extern "C"
CFile* pFile = g_emuFileWrapper.GetFileXbmcByStream(stream);
if (pFile != NULL)
{
--#if !defined(_LINUX) || defined(TARGET_DARWIN) || defined(__FreeBSD__) || defined(__ANDROID__)
+-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
- *pos = pFile->GetPosition();
-+#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(__FreeBSD__) || defined(__ANDROID__)
++#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
+ uint64_t *ppos = (uint64_t *) pos;
+ *ppos = pFile->GetPosition();
#else
pos->__pos = pFile->GetPosition();
#endif
-@@ -1621,8 +1620,9 @@
+@@ -1607,8 +1606,9 @@ extern "C"
int fd = g_emuFileWrapper.GetDescriptorByStream(stream);
if (fd >= 0)
{
--#if !defined(_LINUX) || defined(TARGET_DARWIN) || defined(__FreeBSD__) || defined(__ANDROID__)
+-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
- if (dll_lseeki64(fd, *pos, SEEK_SET) >= 0)
-+#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(__FreeBSD__) || defined(__ANDROID__)
++#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
+ const uint64_t *ppos = (const uint64_t *) pos;
+ if (dll_lseeki64(fd, *ppos, SEEK_SET) >= 0)
#else
if (dll_lseeki64(fd, (__off64_t)pos->__pos, SEEK_SET) >= 0)
#endif
-@@ -1654,7 +1654,7 @@
+@@ -1624,7 +1624,7 @@ extern "C"
+ {
+ // it might be something else than a file, or the file is not emulated
+ // let the operating system handle it
+-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
++#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
+ return fsetpos(stream, pos);
+ #else
+ return fsetpos64(stream, pos);
+@@ -1640,7 +1640,7 @@ extern "C"
if (fd >= 0)
{
fpos64_t tmpPos;
--#if !defined(_LINUX) || defined(TARGET_DARWIN) || defined(__FreeBSD__) || defined(__ANDROID__)
-+#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(__FreeBSD__) || defined(__ANDROID__)
+-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
++#if !defined(GLIBC) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
tmpPos= *pos;
#else
tmpPos.__pos = (off64_t)(pos->__pos);
-diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/emu_msvcrt.h xbmc-12.3-Frodo/xbmc/cores/DllLoader/exports/emu_msvcrt.h
---- xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/emu_msvcrt.h 2014-04-15 05:52:42.214313750 +0000
-+++ xbmc-12.3-Frodo/xbmc/cores/DllLoader/exports/emu_msvcrt.h 2014-04-15 05:55:24.897232874 +0000
+diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.h b/xbmc/cores/DllLoader/exports/emu_msvcrt.h
+index ae9b1c4..3b19122 100644
+--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.h
++++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.h
@@ -26,7 +26,7 @@
#define _onexit_t void*
#endif
--#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD)
-+#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || !defined(GLIBC)
+-#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
++#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(GLIBC)
typedef off_t __off_t;
typedef int64_t off64_t;
typedef off64_t __off64_t;
-@@ -46,9 +46,9 @@
-
- typedef void ( *PFV)(void);
-
--#define __IS_STDIN_STREAM(stream) (stream == stdin || stream->_file == stdin->_file || stream->_file == 0)
--#define __IS_STDOUT_STREAM(stream) (stream == stdout || stream->_file == stdout->_file || stream->_file == 1)
--#define __IS_STDERR_STREAM(stream) (stream == stderr || stream->_file == stderr->_file || stream->_file == 2)
-+#define __IS_STDIN_STREAM(stream) (stream == stdin || fileno(stream) == fileno(stdin) || fileno(stream) == 0)
-+#define __IS_STDOUT_STREAM(stream) (stream == stdout || fileno(stream) == fileno(stdout) || fileno(stream) == 1)
-+#define __IS_STDERR_STREAM(stream) (stream == stderr || fileno(stream) == fileno(stderr) || fileno(stream) == 2)
- #define IS_STDIN_STREAM(stream) (stream != NULL && __IS_STDIN_STREAM(stream))
- #define IS_STDOUT_STREAM(stream) (stream != NULL && __IS_STDOUT_STREAM(stream))
- #define IS_STDERR_STREAM(stream) (stream != NULL && __IS_STDERR_STREAM(stream))
-diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp xbmc-12.3-Frodo/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp
---- xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp 2013-12-12 21:47:49.000000000 +0000
-+++ xbmc-12.3-Frodo/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp 2014-04-15 09:48:39.551659175 +0000
-@@ -27,12 +27,7 @@
+diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp
+index cf8a060..9110312 100644
+--- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp
++++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp
+@@ -27,12 +27,7 @@ CEmuFileWrapper g_emuFileWrapper;
CEmuFileWrapper::CEmuFileWrapper()
{
// since we always use dlls we might just initialize it directly
@@ -128,7 +127,7 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.c
}
CEmuFileWrapper::~CEmuFileWrapper()
-@@ -43,22 +38,7 @@
+@@ -43,22 +38,7 @@ void CEmuFileWrapper::CleanUp()
{
CSingleLock lock(m_criticalSection);
for (int i = 0; i < MAX_EMULATED_FILES; i++)
@@ -152,7 +151,7 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.c
}
EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile)
-@@ -69,13 +49,11 @@
+@@ -69,13 +49,11 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile)
for (int i = 0; i < MAX_EMULATED_FILES; i++)
{
@@ -167,7 +166,7 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.c
object->file_lock = new CCriticalSection();
break;
}
-@@ -84,82 +62,71 @@
+@@ -84,82 +62,71 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile)
return object;
}
@@ -285,7 +284,7 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.c
{
return &m_files[i];
}
-@@ -167,20 +134,38 @@
+@@ -167,20 +134,38 @@ EmuFileObject* CEmuFileWrapper::GetFileObjectByDescriptor(int fd)
return NULL;
}
@@ -328,7 +327,7 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.c
{
return object->file_xbmc;
}
-@@ -191,8 +176,8 @@
+@@ -191,8 +176,8 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream)
{
if (stream != NULL)
{
@@ -339,7 +338,7 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.c
{
return object->file_xbmc;
}
-@@ -202,42 +187,20 @@
+@@ -202,42 +187,20 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream)
int CEmuFileWrapper::GetDescriptorByStream(FILE* stream)
{
@@ -386,23 +385,32 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.c
- return false;
+ return GetFileObjectByStream(stream) != NULL;
}
-diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h xbmc-12.3-Frodo/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
---- xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h 2014-04-15 05:52:42.214313750 +0000
-+++ xbmc-12.3-Frodo/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h 2014-04-15 08:00:04.209129880 +0000
-@@ -27,12 +27,7 @@
+diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
+index 3d79c7a..1b3e62f 100644
+--- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
++++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
+@@ -27,14 +27,14 @@
#include "system.h"
#include "threads/CriticalSection.h"
--#if defined(_LINUX) && !defined(TARGET_DARWIN) && !defined(__FreeBSD__) && !defined(__ANDROID__)
+-#if defined(TARGET_POSIX) && !defined(TARGET_DARWIN) && !defined(TARGET_FREEBSD) && !defined(TARGET_ANDROID) && !defined(__UCLIBC__)
-#define _file _fileno
+-#elif defined(__UCLIBC__)
+-#define _file __filedes
-#endif
--
++//#if defined(TARGET_POSIX) && !defined(TARGET_DARWIN) && !defined(TARGET_FREEBSD) && !defined(TARGET_ANDROID) && !defined(__UCLIBC__)
++//#define _file _fileno
++//#elif defined(__UCLIBC__)
++//#define _file __filedes
++//#endif
+
#define MAX_EMULATED_FILES 50
-#define FILE_WRAPPER_OFFSET 0x00000100
++//#define FILE_WRAPPER_OFFSET 0x00000100
namespace XFILE
{
-@@ -41,11 +36,9 @@
+@@ -43,11 +43,9 @@ namespace XFILE
typedef struct stEmuFileObject
{
@@ -416,7 +424,7 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
} EmuFileObject;
class CEmuFileWrapper
-@@ -60,13 +53,16 @@
+@@ -62,19 +60,22 @@ public:
void CleanUp();
EmuFileObject* RegisterFileObject(XFILE::CFile* pFile);
@@ -434,16 +442,26 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h
+ FILE* GetStreamByFileObject(EmuFileObject*);
XFILE::CFile* GetFileXbmcByDescriptor(int fd);
XFILE::CFile* GetFileXbmcByStream(FILE* stream);
- int GetDescriptorByStream(FILE* stream);
-diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/wrapper.c xbmc-12.3-Frodo/xbmc/cores/DllLoader/exports/wrapper.c
---- xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/exports/wrapper.c 2013-12-12 21:47:49.000000000 +0000
-+++ xbmc-12.3-Frodo/xbmc/cores/DllLoader/exports/wrapper.c 2014-04-15 07:51:55.146945331 +0000
+- static int GetDescriptorByStream(FILE* stream);
++ int GetDescriptorByStream(FILE* stream);
+ FILE* GetStreamByDescriptor(int fd);
+- static bool DescriptorIsEmulatedFile(int fd);
+- static bool StreamIsEmulatedFile(FILE* stream);
++ bool DescriptorIsEmulatedFile(int fd);
++ bool StreamIsEmulatedFile(FILE* stream);
+ private:
+ EmuFileObject m_files[MAX_EMULATED_FILES];
+ CCriticalSection m_criticalSection;
+diff --git a/xbmc/cores/DllLoader/exports/wrapper.c b/xbmc/cores/DllLoader/exports/wrapper.c
+index a9225e5..355da1c 100644
+--- a/xbmc/cores/DllLoader/exports/wrapper.c
++++ b/xbmc/cores/DllLoader/exports/wrapper.c
@@ -39,7 +39,7 @@
#endif
#include <dlfcn.h>
--#if defined(TARGET_DARWIN) || defined(__FreeBSD__) || defined(__ANDROID__)
-+#if defined(TARGET_DARWIN) || defined(__FreeBSD__) || defined(__ANDROID__) || !defined(GLIBC)
+-#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
++#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(GLIBC)
typedef off_t __off_t;
typedef int64_t off64_t;
typedef off64_t __off64_t;
diff --git a/main/xbmc/fix-musl.patch b/main/xbmc/fix-musl.patch
index f5b4d987c6..61b3571b07 100644
--- a/main/xbmc/fix-musl.patch
+++ b/main/xbmc/fix-musl.patch
@@ -1,29 +1,4 @@
diff -ru xbmc-12.3-Frodo.orig/configure.in xbmc-12.3-Frodo/configure.in
---- xbmc-12.3-Frodo.orig/configure.in 2014-04-15 05:52:42.214313750 +0000
-+++ xbmc-12.3-Frodo/configure.in 2014-04-15 05:49:51.921324165 +0000
-@@ -556,11 +556,11 @@
- use_cpu="i686"
- ffmpeg_target_os=linux
- ;;
-- i*86*-linux-gnu*)
-+ i*86*-linux-gnu*|i*86*-linux-uclibc*|i*86*-linux-musl*)
- ARCH="i486-linux"
- AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
- ;;
-- x86_64-*-linux-gnu*)
-+ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*)
- ARCH="x86_64-linux"
- AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
- ;;
-@@ -619,7 +619,7 @@
- ARCH="powerpc64-linux"
- AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64")
- ;;
-- arm*-*-linux-gnu*)
-+ arm*-*-linux-gnu*|arm*-*-linux-muslgnu*)
- use_texturepacker=no
- ARCH="arm"
- use_arch="arm"
diff -ru xbmc-12.3-Frodo.orig/lib/SlingboxLib/SlingboxLib.cpp xbmc-12.3-Frodo/lib/SlingboxLib/SlingboxLib.cpp
--- xbmc-12.3-Frodo.orig/lib/SlingboxLib/SlingboxLib.cpp 2013-12-12 21:47:49.000000000 +0000
+++ xbmc-12.3-Frodo/lib/SlingboxLib/SlingboxLib.cpp 2014-04-15 06:07:15.746789122 +0000
@@ -61,33 +36,72 @@ diff -ru xbmc-12.3-Frodo.orig/xbmc/visualizations/XBMCProjectM/libprojectM/BeatD
#include "BeatDetect.hpp"
#ifdef _WIN32
-diff -ru xbmc-12.3-Frodo.orig/tools/TexturePacker/XBTFWriter.cpp xbmc-12.3-Frodo/tools/TexturePacker/XBTFWriter.cpp
---- xbmc-12.3-Frodo.orig/tools/TexturePacker/XBTFWriter.cpp 2013-12-12 21:47:49.000000000 +0000
-+++ xbmc-12.3-Frodo/tools/TexturePacker/XBTFWriter.cpp 2014-04-15 09:58:29.222353358 +0000
-@@ -24,11 +24,7 @@
+--- ./configure.in.orig
++++ ./configure.in
+@@ -628,7 +628,7 @@
+ use_x11=no
+ build_shared_lib=yes
+ ;;
+- i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
++ i*86*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-linux-musl*)
+ ARCH="i486-linux"
+ if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then
+ use_arch="x86"
+@@ -636,7 +636,7 @@
+ fi
+ use_static_ffmpeg=yes
+ ;;
+- x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
++ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*)
+ ARCH="x86_64-linux"
+ if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then
+ use_arch="x86_64"
+@@ -688,7 +688,7 @@
+ powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*)
+ ARCH="powerpc64-linux"
+ ;;
+- arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
++ arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-muslgnu*)
+ ARCH="arm"
+ use_arch="arm"
+ ffmpeg_target_os=linux
+--- ./xbmc/cores/DllLoader/ldt_keeper.c.orig
++++ ./xbmc/cores/DllLoader/ldt_keeper.c
+@@ -48,7 +48,7 @@
+ #if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0))
+ _syscall3( int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount );
+ #else
+-#if defined(TARGET_ANDROID) && defined(__i386__) && !defined(modify_ldt)
++#if defined(__linux__) && !defined(__GLIBC__) && !defined(modify_ldt)
+ #define modify_ldt(a,b,c) syscall( __NR_modify_ldt, a, b, c);
+ #else
+ int modify_ldt(int func, void *ptr, unsigned long bytecount);
+--- ./tools/TexturePacker/XBTFWriter.cpp.orig
++++ ./tools/TexturePacker/XBTFWriter.cpp
+@@ -23,11 +23,7 @@
#include <inttypes.h>
#include "guilib/XBTF.h"
#include "utils/EndianSwap.h"
--#if defined(__FreeBSD__)
+-#if defined(TARGET_FREEBSD) || defined(TARGET_DARWIN)
#include <stdlib.h>
--#elif !defined(__APPLE__)
+-#elif !defined(TARGET_DARWIN)
-#include <malloc.h>
-#endif
#include <memory.h>
#define WRITE_STR(str, size, file) fwrite(str, size, 1, file)
-diff -ru xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/ldt_keeper.c xbmc-12.3-Frodo/xbmc/cores/DllLoader/ldt_keeper.c
---- xbmc-12.3-Frodo.orig/xbmc/cores/DllLoader/ldt_keeper.c 2013-12-12 21:47:49.000000000 +0000
-+++ xbmc-12.3-Frodo/xbmc/cores/DllLoader/ldt_keeper.c 2014-04-15 10:10:17.091888453 +0000
-@@ -48,11 +48,7 @@
- #if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0))
- _syscall3( int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount );
- #else
--#if defined(__ANDROID__) && defined(__i386__) && !defined(modify_ldt)
- #define modify_ldt(a,b,c) syscall( __NR_modify_ldt, a, b, c);
--#else
--int modify_ldt(int func, void *ptr, unsigned long bytecount);
--#endif
- #endif
- #ifdef __cplusplus
- }
+--- ./m4/xbmc_arch.m4.orig
++++ ./m4/xbmc_arch.m4
+@@ -2,10 +2,10 @@
+
+ # host detection and setup
+ case $host in
+- i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
++ i*86*-linux-gnu*|i*86*-*-linux-uclibc|*i*86*-linux-musl*)
+ AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
+ ;;
+- x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
++ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*)
+ AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
+ ;;
+ i386-*-freebsd*)
diff --git a/main/xbmc/samba4.patch b/main/xbmc/samba4.patch
deleted file mode 100644
index 996992c69e..0000000000
--- a/main/xbmc/samba4.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/configure.in b/configure.in
-index fa872e8..2743bd2 100644
---- a/configure.in
-+++ b/configure.in
-@@ -1522,9 +1522,12 @@ fi
-
- # samba
- if test "x$use_samba" != "xno"; then
-- AC_CHECK_LIB([smbclient], [main],,
-- use_samba=no;AC_MSG_ERROR($missing_library))
-- USE_LIBSMBCLIENT=0
-+ PKG_CHECK_MODULES([SAMBA], [smbclient],
-+ [INCLUDES="$INCLUDES $SAMBA_CFLAGS"; LIBS="$LIBS $SAMBA_LIBS"],
-+ [AC_CHECK_LIB([smbclient], [main],,
-+ use_samba=no;AC_MSG_ERROR($missing_library))
-+ USE_LIBSMBCLIENT=0
-+ ])
- else
- AC_MSG_RESULT($samba_disabled)
- USE_LIBSMBCLIENT=0