Update xbmc-rbp to version 13.0 (Gotham).

Important: Please note that this change is *untested*.
This commit is contained in:
Jan Holthuis 2014-05-22 12:34:19 +02:00
parent 481b7a589e
commit 2ed0f5d9aa
4 changed files with 137 additions and 218 deletions

View file

@ -1,48 +1,50 @@
# Contributor tomasgroth at yahoo.dk
# Contributor WarheadsSE <max@warheads.net>
# Contributor Romzetron <asromzek@gmail.com>
pkgname=xbmc-rbp
pkgver=12.3
pkgrel=1
# Contributor Holzhaus <holthuis.jan@googlemail.com>
buildarch=16
pkgname=xbmc-rbp
pkgver=13.0
_codename=Gotham_r2
pkgrel=1
pkgdesc="A software media player and entertainment hub for digital media for the Raspberry Pi"
arch=('armv6h')
url="http://xbmc.org"
license=('GPL' 'custom')
depends=('hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio' 'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd' 'sdl_image' 'python2' 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray' 'libnfs' 'afpfs-ng' 'libshairport' 'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware' 'libcec' 'libplist' 'swig' 'taglib')
makedepends=('boost' 'cmake' 'gperf' 'nasm' 'zip' 'udisks' 'upower' 'git' 'autoconf' 'jdk7-openjdk')
depends=('hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio' 'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd' 'sdl_image' 'python2' 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray' 'libnfs' 'afpfs-ng' 'libshairport' 'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware' 'libcec' 'libplist' 'swig' 'taglib' 'libxslt' 'shairplay-git')
makedepends=('boost' 'cmake' 'gperf' 'nasm' 'zip' 'udisks' 'upower' 'git' 'autoconf' 'java-environment')
optdepends=(
'lirc: remote controller support'
'udisks: automount external drives'
'upower: used to trigger power management functionality'
'unrar: access compressed files without unpacking them'
)
'unrar: access compressed files without unpacking them')
provides=("xbmc")
conflicts=("xbmc")
install="xbmc.install"
source=("http://mirrors.xbmc.org/releases/source/xbmc-${pkgver}.tar.gz"
"xbmc-ae04d99-321-texturepacker-hostflags-and-rework.patch"
"polkit.rules"
"xbmc.service")
source=("xbmc-$pkgver.tar.gz::https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
'xbmc.service'
'polkit.rules'
'panasonicCEC.patch')
sha256sums=('189804742290946424a401163e351f5158bfd1b71e5b86b864589254b13f9571'
'4ea78374a08e13a64dcf6a424b111b8bfc11de03ed5829744fc6d9b5fc1ec96e'
'554140506063a85000d7072a961bb02514969e58b38a466aa120e9fb668a1863')
md5sums=('7ae385ebf8e5cfcb917393235e6efbdb'
'fc6a925a09ba1b13d84daf1121b42ab9'
'02f7951824ee13103344f36009c0ef2a'
'4e28664d3e0df08e08dba5b09a855ced')
_prefix=/usr
prepare() {
# Fix source directory name.
mv "${srcdir}/xbmc-${pkgver}-Frodo" "${srcdir}/xbmc-${pkgver}"
cd "${srcdir}/xbmc-${pkgver}"
cd "$srcdir/xbmc-$pkgver-$_codename"
# fix lsb_release dependency
sed -i -e 's:/usr/bin/lsb_release -d:cat /etc/arch-release:' xbmc/utils/SystemInfo.cpp
# Suppress double keys within 250ms for some Panasonic TVs
# https://github.com/chbmuc/xbmc/commit/6e5822d4fe648abbd575cf77ced943a1461e9ae5
# http://archlinuxarm.org/forum/viewtopic.php?f=31&t=6376&start=10
patch -Np1 -i ${srcdir}/panasonicCEC.patch
# Patch to fix TexturePacker build.
patch -i ${srcdir}/xbmc-ae04d99-321-texturepacker-hostflags-and-rework.patch -p1
# fix samba4 libsmbclient.h location
sed -e 's/\(#include \)<libsmbclient\.h>/\1<samba-4.0\/libsmbclient\.h>/g' \
@ -50,9 +52,8 @@ prepare() {
-i xbmc/filesystem/SMBDirectory.cpp
}
build() {
cd "${srcdir}/xbmc-${pkgver}"
cd "$srcdir/xbmc-$pkgver-$_codename"
# Bootstrapping XBMC
./bootstrap
@ -60,46 +61,60 @@ build() {
# Configuring XBMC
export PYTHON_VERSION=2 # external python v2
# we need to compile for armv6 instead of armv5 to avoid problems compiling assembler code
export CFLAGS="-O3 -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
export CXXFLAGS="-O3 -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -mabi=aapcs-linux -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
export CFLAGS="-Ofast -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -fexcess-precision=fast -mfloat-abi=hard \
-mfpu=vfp -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=1 \
-I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
export CXXFLAGS="-Ofast -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -fexcess-precision=fast -mfloat-abi=hard -mfpu=vfp \
-mabi=aapcs-linux -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=1 \
-I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
export LDFLAGS="$LDFLAGS -L/opt/vc/lib"
# export MAKEFLAGS="-j1"
./configure --prefix=$_prefix --exec-prefix=$_prefix \
export MAKEFLAGS="-j1"
./configure --prefix=$_prefix --exec-prefix=$_prefix \
--with-platform=raspberry-pi \
--disable-gl \
--enable-gles \
--disable-sdl \
--disable-x11 \
--disable-xrandr \
--disable-openmax \
--disable-joystick \
--disable-debug \
--disable-crystalhd \
--disable-vtbdecoder \
--disable-sdl \
--enable-optimizations \
--disable-external-libraries \
--disable-goom \
--disable-hal \
--disable-pulse \
--disable-vaapi \
--disable-vdpau \
--disable-pulse \
--disable-projectm \
--with-platform=raspberry-pi \
--enable-optimizations \
--enable-libcec \
--enable-dvdcss \
--enable-optical-drive \
--disable-xrandr \
--enable-airplay \
--enable-airtunes \
--disable-alsa \
--enable-avahi \
--enable-libbluray \
--enable-dvdcss \
--disable-debug \
--disable-joystick \
--disable-mid \
--enable-nfs \
--disable-profiling \
--disable-projectm \
--enable-rsxs \
--enable-rtmp \
--disable-vaapi \
--disable-vdadecoder \
--disable-external-ffmpeg \
--enable-optical-drive \
--enable-player=omxplayer
make
}
package() {
cd "${srcdir}/xbmc-${pkgver}"
cd "$srcdir/xbmc-$pkgver-$_codename"
# Running make install
make DESTDIR="${pkgdir}" install
# run feh with python2
sed -i -e 's/python/python2/g' ${pkgdir}${_prefix}/bin/xbmc
# Remove checks that doesn't apply to the raspberry pi
# Remove checks that don't apply to the raspberry pi
head -n 171 "${pkgdir}${_prefix}/share/xbmc/FEH.py" > "${pkgdir}${_prefix}/share/xbmc/FEH.py.new"
mv "${pkgdir}${_prefix}/share/xbmc/FEH.py.new" "${pkgdir}${_prefix}/share/xbmc/FEH.py"
@ -108,7 +123,7 @@ package() {
sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/arch-release/g" "${pkgdir}${_prefix}/bin/xbmc"
# Tools
install -D -m 0755 "${srcdir}/xbmc-${pkgver}/tools/TexturePacker/TexturePacker" "${pkgdir}${_prefix}/share/xbmc/"
install -D -m 0755 "${srcdir}/${_gitname}/tools/TexturePacker/TexturePacker" "${pkgdir}${_prefix}/share/xbmc/"
# Licenses
install -d -m 0755 "${pkgdir}${_prefix}/share/licenses/${pkgname}"

View file

@ -0,0 +1,73 @@
From 6e5822d4fe648abbd575cf77ced943a1461e9ae5 Mon Sep 17 00:00:00 2001
From: Christian Brunner <chb@muc.de>
Date: Sat, 18 Jan 2014 13:20:56 -0800
Subject: [PATCH] [cec] suppress double keys within 250ms
workaround for Panasonic's cec implementation
---
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 16 ++++++++++++----
xbmc/peripherals/devices/PeripheralCecAdapter.h | 1 +
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index 8919380..4bf5f89 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -56,6 +56,9 @@
#define LOCALISED_ID_TV_AVR 36039
#define LOCALISED_ID_NONE 231
+/* time in milliseconds to suppress a double key press */
+#define CEC_SUPPRESS_DOUBLE_KEY 250
+
/* time in seconds to suppress source activation after receiving OnStop */
#define CEC_SUPPRESS_ACTIVATE_SOURCE_AFTER_ON_STOP 2
@@ -765,16 +768,20 @@ void CPeripheralCecAdapter::GetNextKey(void)
void CPeripheralCecAdapter::PushCecKeypress(const CecButtonPress &key)
{
- CLog::Log(LOGDEBUG, "%s - received key %2x duration %d", __FUNCTION__, key.iButton, key.iDuration);
+ CLog::Log(LOGDEBUG, "%s - received key %2x duration %d timestamp %i", __FUNCTION__, key.iButton, key.iDuration, key.iTimestamp);
CSingleLock lock(m_critSection);
+ if (key.iDuration == 0 && key.iTimestamp - m_currentButton.iTimestamp < CEC_SUPPRESS_DOUBLE_KEY )
+ if (m_currentButton.iButton == key.iButton && m_currentButton.iDuration == 0)
+ // ignore this one, since it's already been handled by xbmc (workaround for buggy tv)
+ return;
+
if (key.iDuration > 0)
{
if (m_currentButton.iButton == key.iButton && m_currentButton.iDuration == 0)
{
- // update the duration
- if (m_bHasButton)
- m_currentButton.iDuration = key.iDuration;
+ // update the duration
+ m_currentButton.iDuration = key.iDuration;
// ignore this one, since it's already been handled by xbmc
return;
}
@@ -802,6 +809,7 @@ void CPeripheralCecAdapter::PushCecKeypress(const cec_keypress &key)
{
CecButtonPress xbmcKey;
xbmcKey.iDuration = key.duration;
+ xbmcKey.iTimestamp = XbmcThreads::SystemClockMillis();
switch (key.keycode)
{
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.h b/xbmc/peripherals/devices/PeripheralCecAdapter.h
index 0809b03..cfd4ba9 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.h
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.h
@@ -72,6 +72,7 @@
{
int iButton;
unsigned int iDuration;
+ unsigned int iTimestamp;
} CecButtonPress;
typedef enum
--
1.8.5.1

View file

@ -1,169 +0,0 @@
diff -Naur xbmc-frodo-0ff0d2e/configure.in xbmc-frodo-0ff0d2e.patch/configure.in
--- xbmc-frodo-0ff0d2e/configure.in 2012-10-11 15:45:44.000000000 +0200
+++ xbmc-frodo-0ff0d2e.patch/configure.in 2012-10-11 16:49:08.872850880 +0200
@@ -452,6 +452,12 @@
[use_texturepacker=$enableval],
[use_texturepacker=auto])
+AC_ARG_WITH([texturepacker-root],
+ [AS_HELP_STRING([--with-texturepacker-root],
+ [root dir to search for librarys and includes if building native TexturePacker (default is \$prefix)])],
+ [use_texturepacker_root=$withval],
+ [use_texturepacker_root=$prefix])
+
AC_ARG_WITH([lirc-device],
[AS_HELP_STRING([--with-lirc-device=file],
[specify the default LIRC device (default is /dev/lircd)])],
@@ -2000,13 +2006,13 @@
USE_TEXTUREPACKER_NATIVE=0
if test "x$use_texturepacker" != "xno"; then
- final_message="$final_message\n TexturePacker:Yes"
USE_TEXTUREPACKER=1
- if test "x$use_texturepacker_native" = "xyes"; then
+ if test "x$cross_compiling" = "xyes"; then
USE_TEXTUREPACKER_NATIVE=1
- if [[ ! -d "$USE_TEXTUREPACKER_NATIVE_ROOT" ]]; then
- USE_TEXTUREPACKER_NATIVE_ROOT=
- fi
+ USE_TEXTUREPACKER_NATIVE_ROOT="$use_texturepacker_root"
+ final_message="$final_message\n TexturePacker:Native ($USE_TEXTUREPACKER_NATIVE_ROOT)"
+ else
+ final_message="$final_message\n TexturePacker:Yes"
fi
else
final_message="$final_message\n TexturePacker:No"
diff -Naur xbmc-frodo-0ff0d2e/lib/libsquish/Makefile.in xbmc-frodo-0ff0d2e.patch/lib/libsquish/Makefile.in
--- xbmc-frodo-0ff0d2e/lib/libsquish/Makefile.in 2012-10-11 15:47:26.000000000 +0200
+++ xbmc-frodo-0ff0d2e.patch/lib/libsquish/Makefile.in 2012-10-11 16:49:08.873850900 +0200
@@ -11,26 +11,25 @@
singlecolourfit.cpp \
squish.cpp
-CXXFLAGS+=-I.
-
-LIB=libsquish.a
-
-ifeq (@USE_TEXTUREPACKER_NATIVE@,1)
-NATIVE_LIB=libsquish-native.so
-CLEAN_FILES+=$(NATIVE_LIB)
+LIB = libsquish.a
+NATIVE_LIB = libsquish-native.so
+CLEAN_FILES += $(NATIVE_LIB)
+
+HOST_CXX ?= g++
+CXXFLAGS += -I.
+HOST_CXXFLAGS += -I.
ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
-NATIVE_ARCH=@DARWIN_NATIVE_ARCH@
+ HOST_CXXFLAGS += @DARWIN_NATIVE_ARCH@
endif
-all: $(LIB) $(NATIVE_LIB)
+$(LIB): $(SRCS)
# TexturePacker links to libsquish and needs to run on build system, so make a native flavor.
$(NATIVE_LIB): $(SRCS)
ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
- g++ $(NATIVE_ARCH) -I. $(SRCS) -dynamiclib -install_name `pwd`/libsquish-native.so -o $@
+ $(HOST_CXX) $(HOST_CXXFLAGS) $(SRCS) -dynamiclib -install_name `pwd`/libsquish-native.so -o $@
else
- g++ -I. $(SRCS) -shared -fPIC -Wl,-soname,`pwd`/libsquish-native.so -o $@
-endif
+ $(HOST_CXX) $(HOST_CXXFLAGS) $(SRCS) -shared -fPIC -Wl,-soname,`pwd`/libsquish-native.so -o $@
endif
include ../../Makefile.include
diff -Naur xbmc-frodo-0ff0d2e/tools/TexturePacker/Makefile.in xbmc-frodo-0ff0d2e.patch/tools/TexturePacker/Makefile.in
--- xbmc-frodo-0ff0d2e/tools/TexturePacker/Makefile.in 2012-10-11 15:47:05.000000000 +0200
+++ xbmc-frodo-0ff0d2e.patch/tools/TexturePacker/Makefile.in 2012-10-11 16:49:08.874850920 +0200
@@ -1,56 +1,54 @@
-DEFINES += -D_LINUX -DUSE_LZO_PACKING
+DEFINES += -D_LINUX -DUSE_LZO_PACKING
ifneq ($(or $(findstring powerpc,@ARCH@),$(findstring ppc, @ARCH@)),)
-DEFINES += -DHOST_BIGENDIAN
+DEFINES += -DHOST_BIGENDIAN
endif
-CXXFLAGS+= \
+SRCS = \
+ md5.cpp \
+ SDL_anigif.cpp \
+ XBTFWriter.cpp \
+ XBMCTex.cpp \
+ @abs_top_srcdir@/xbmc/guilib/XBTF.cpp
+
+TARGET = TexturePacker
+CLEAN_FILES = $(TARGET)
+
+all: $(TARGET)
+
+HOST_CXX ?= g++
+HOST_ROOT_PATH = @USE_TEXTUREPACKER_NATIVE_ROOT@
+
+LIBS += -lSDL_image -lSDL -llzo2
+LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish
+HOST_LIBS += -L$(HOST_ROOT_PATH)/lib -lSDL_image -lSDL -llzo2
+HOST_LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish-native
+
+CXXFLAGS += \
-I. \
-I@abs_top_srcdir@/lib \
-I@abs_top_srcdir@/xbmc \
-I@abs_top_srcdir@/xbmc/linux
-RPATH=-Wl,-rpath=$(NATIVE_ROOT_PATH)/lib
+HOST_CXXFLAGS += \
+ -I. \
+ -I@abs_top_srcdir@/lib \
+ -I@abs_top_srcdir@/xbmc \
+ -I@abs_top_srcdir@/xbmc/linux \
+ -I$(HOST_ROOT_PATH)/include
+
+RPATH=-Wl,-rpath=$(HOST_ROOT_PATH)/lib
-ifeq (@USE_TEXTUREPACKER_NATIVE@,1)
-NATIVE_ROOT_PATH=@USE_TEXTUREPACKER_NATIVE_ROOT@
-ifdef NATIVE_ROOT_PATH
ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
DEFINES += -DTARGET_DARWIN
NATIVE_ARCH=@DARWIN_NATIVE_ARCH@
RPATH=
endif
-NATIVE_CXXFLAGS+= -I. \
- -I$(NATIVE_ROOT_PATH)/include \
- -I@abs_top_srcdir@/lib \
- -I@abs_top_srcdir@/xbmc \
- -I@abs_top_srcdir@/xbmc/linux
-NATIVE_LIBS += -L$(NATIVE_ROOT_PATH)/lib
-endif
-NATIVE_LIBS += -lSDL_image -lSDL -llzo2
-NATIVE_LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish-native
-else
-LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish
-endif
-
-LIBS += -lSDL_image -lSDL -llzo2
-
-SRCS = \
- md5.cpp \
- SDL_anigif.cpp \
- XBTFWriter.cpp \
- XBMCTex.cpp \
- @abs_top_srcdir@/xbmc/guilib/XBTF.cpp
-
-
-TARGET = TexturePacker
-CLEAN_FILES=$(TARGET)
-
-all: $(TARGET)
ifeq (@USE_TEXTUREPACKER_NATIVE@,1)
# TexturePacker run native on build system, build it with native tools
$(TARGET): $(SRCS) @abs_top_srcdir@/xbmc/guilib/XBTF.h
- g++ $(DEFINES) $(NATIVE_ARCH) $(NATIVE_CXXFLAGS) $(SRCS) $(NATIVE_LIBS) $(RPATH) -o $(TARGET)
+ make -C @abs_top_srcdir@/lib/libsquish libsquish-native.so
+ $(HOST_CXX) $(DEFINES) $(NATIVE_ARCH) $(HOST_CXXFLAGS) $(SRCS) $(HOST_LIBS) $(RPATH) -o $(TARGET)
clean:
rm -f $(TARGET)
else

View file

@ -1,5 +1,5 @@
[Unit]
Description = Starts instance of XBMC using xinit
Description = Starts an instance of XBMC
After = remote-fs.target
[Service]
@ -7,7 +7,7 @@ User = xbmc
Group = xbmc
Type = simple
ExecStart = /usr/bin/xbmc-standalone -l /run/lirc/lircd
Restart = always
Restart = on-failure
[Install]
WantedBy = multi-user.target