diff --git a/packages/mediacenter/xbmc-pvr-theme-Confluence/install b/packages/mediacenter/xbmc-pvr-theme-Confluence/install
new file mode 100755
index 0000000000..3aff360e25
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr-theme-Confluence/install
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+################################################################################
+# This file is part of OpenELEC - http://www.openelec.tv
+# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+. config/options $1
+
+mkdir -p $INSTALL/usr/share/xbmc/addons/skin.confluence
+ cp -R $PKG_BUILD/* $INSTALL/usr/share/xbmc/addons/skin.confluence
diff --git a/packages/mediacenter/xbmc-pvr-theme-Confluence/meta b/packages/mediacenter/xbmc-pvr-theme-Confluence/meta
new file mode 100644
index 0000000000..f49d13a546
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr-theme-Confluence/meta
@@ -0,0 +1,37 @@
+################################################################################
+# This file is part of OpenELEC - http://www.openelec.tv
+# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+PKG_NAME="xbmc-pvr-theme-Confluence"
+PKG_VERSION="10.0-Dharma"
+PKG_REV="1"
+PKG_ARCH="any"
+PKG_LICENSE="GPL"
+PKG_SITE="http://www.xbmc.org"
+#PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2"
+PKG_URL="http://192.168.0.1/$PKG_NAME-$PKG_VERSION.tar.bz2"
+PKG_DEPENDS=""
+PKG_BUILD_DEPENDS="toolchain"
+PKG_PRIORITY="optional"
+PKG_SECTION="mediacenter"
+PKG_SHORTDESC="xbmc-pvr-theme-Confluence: XBMC Mediacenter default theme"
+PKG_LONGDESC="XBMC Media Center (which was formerly named Xbox Media Center) is a free and open source cross-platform media player and home entertainment system software with a 10-foot user interface designed for the living-room TV. Its graphical user interface allows the user to easily manage video, photos, podcasts, and music from a computer, optical disk, local network, and the internet using a remote control."
+PKG_IS_ADDON="no"
+
+PKG_AUTORECONF="no"
diff --git a/packages/mediacenter/xbmc-pvr/build b/packages/mediacenter/xbmc-pvr/build
new file mode 100755
index 0000000000..cf182af5f3
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/build
@@ -0,0 +1,172 @@
+#!/bin/sh
+
+################################################################################
+# This file is part of OpenELEC - http://www.openelec.tv
+# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+. config/options $1
+
+if [ "$XBMC_VIS_PROJECTM" = yes ]; then
+ XBMC_PROJECTM="--enable-xbmcprojectm"
+else
+ XBMC_PROJECTM="--disable-xbmcprojectm"
+fi
+
+if [ "$PULSEAUDIO_SUPPORT" = yes ]; then
+ XBMC_PULSEAUDIO="--enable-pulse"
+else
+ XBMC_PULSEAUDIO="--disable-pulse"
+fi
+
+if [ "$NONFREE_SUPPORT" = yes ]; then
+ XBMC_NONFREE="--enable-non-free"
+else
+ XBMC_NONFREE="--disable-non-free"
+fi
+
+if [ "$DVDCSS_SUPPORT" = yes ]; then
+ XBMC_DVDCSS="--enable-dvdcss"
+else
+ XBMC_DVDCSS="--disable-dvdcss"
+fi
+
+if [ "$FAAC_SUPPORT" = yes ]; then
+ XBMC_FAAC="--enable-faac"
+else
+ XBMC_FAAC="--disable-faac"
+fi
+
+if [ "$AVAHI_DAEMON" = yes ]; then
+ XBMC_AVAHI="--enable-avahi"
+else
+ XBMC_AVAHI="--disable-avahi"
+fi
+
+if [ "$WEBSERVER" = yes ]; then
+ XBMC_WEBSERVER="--enable-webserver"
+else
+ XBMC_WEBSERVER="--disable-webserver"
+fi
+
+if [ "$VDPAU" = yes ]; then
+ XBMC_VDPAU="--enable-vdpau"
+else
+ XBMC_VDPAU="--disable-vdpau"
+fi
+
+if [ "$VAAPI" = yes ]; then
+ XBMC_VAAPI="--enable-vaapi"
+else
+ XBMC_VAAPI="--disable-vaapi"
+fi
+
+if [ "$CRYSTALHD" = yes ]; then
+ XBMC_CRYSTALHD="--enable-crystalhd"
+else
+ XBMC_CRYSTALHD="--disable-crystalhd"
+fi
+
+# xbmc (ffmpeg) fails to build with LTO optimization
+ strip_lto
+ strip_gold
+ strip_linker_plugin
+
+# dont use some optimizations because of problems
+# this fixes problems with faac implementation of ffmpeg
+ LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"`
+
+# this fixes the "stretching picture bug"
+ CFLAGS=`echo $CFLAGS | sed -e "s|-ftree-loop-distribution||"`
+ CFLAGS=`echo $CFLAGS | sed -e "s|-floop-interchange||"`
+ CFLAGS=`echo $CFLAGS | sed -e "s|-floop-strip-mine||"`
+ CFLAGS=`echo $CFLAGS | sed -e "s|-floop-block||"`
+ CFLAGS=`echo $CFLAGS | sed -e "s|-fgraphite-identity||"`
+
+ CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-ftree-loop-distribution||"`
+ CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-floop-interchange||"`
+ CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-floop-strip-mine||"`
+ CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-floop-block||"`
+ CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-fgraphite-identity||"`
+
+# setup skin dir from default skin
+ SKIN_DIR="skin.`tolower $SKIN_DEFAULT`"
+
+cd $PKG_BUILD
+
+do_autoreconf
+do_autoreconf lib/cpluff
+[ -d lib/libass ] && do_autoreconf lib/libass
+[ -d xbmc/cores/dvdplayer/Codecs/libdvd/libdvdcss ] && do_autoreconf xbmc/cores/dvdplayer/Codecs/libdvd/libdvdcss
+do_autoreconf xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread
+do_autoreconf xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav
+do_autoreconf xbmc/lib/libid3tag/libid3tag
+
+./configure --host=$TARGET_NAME \
+ --build=$HOST_NAME \
+ --with-arch=$TARGET_ARCH \
+ --with-cpu=$TARGET_CPU \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ SVN_REV=`cat svn.version` \
+ --disable-debug \
+ --disable-optimizations \
+ --enable-gl \
+ $XBMC_VDPAU \
+ $XBMC_VAAPI \
+ $XBMC_CRYSTALHD \
+ --disable-vdadecoder \
+ --disable-profiling \
+ --enable-joystick \
+ --enable-xrandr \
+ --disable-goom \
+ $XBMC_PROJECTM \
+ --disable-rsxs \
+ --disable-ccache \
+ $XBMC_PULSEAUDIO \
+ --enable-ffmpeg-libvorbis \
+ $XBMC_FAAC \
+ $XBMC_DVDCSS \
+ --disable-mid \
+ $XBMC_AVAHI \
+ --disable-hal \
+ $XBMC_NONFREE \
+ --disable-asap-codec \
+ $XBMC_WEBSERVER \
+ --disable-libdts \
+ --disable-liba52 \
+ --enable-libbluray \
+ --disable-external-ffmpeg \
+ --disable-external-liba52 \
+ --disable-external-libdts \
+ --enable-external-python \
+
+# setup default skin inside the sources
+ sed -i -e "s|skin.confluence|$SKIN_DIR|g" xbmc/Settings.h
+
+make externals
+make xbmc.bin
+make xbmc-xrandr
+
+if [ "$WIIMOTE_SUPPORT" = yes ]; then
+ (cd tools/EventClients/Clients/WiiRemote;
+ $CXX $CFLAGS -lwiiuse WiiUse_WiiRemote.cpp -o WiiUse_WiiRemote;
+ )
+fi
diff --git a/packages/mediacenter/xbmc-pvr/config/os.openelec.tv/addon.xml b/packages/mediacenter/xbmc-pvr/config/os.openelec.tv/addon.xml
new file mode 100644
index 0000000000..f786fbfc1d
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/config/os.openelec.tv/addon.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/packages/mediacenter/xbmc-pvr/config/repository.openelec.tv/addon.xml b/packages/mediacenter/xbmc-pvr/config/repository.openelec.tv/addon.xml
new file mode 100644
index 0000000000..7ebb2ad74b
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/config/repository.openelec.tv/addon.xml
@@ -0,0 +1,17 @@
+
+
+
+ @ADDON_URL@/addons.xml
+ @ADDON_URL@/addons.xml.md5
+ @ADDON_URL@
+
+
+ Install Add-ons, Plugins, Games and Programs from OpenELEC.tv
+ Download and install Add-ons, Plugins, Games and Programs from the Official OpenELEC.tv addon repository.[CR] By using the official Repository you will be able to take advantage of our extensive file mirror service to help get you faster downloads from a region close to you.[CR] All addons on this repository have under gone basic testing, if you find a broken or not working addon please report it to OpenELEC.tv so we can take any action needed.
+ all
+
+
diff --git a/packages/mediacenter/xbmc-pvr/init.d/92_setup-xbmc b/packages/mediacenter/xbmc-pvr/init.d/92_setup-xbmc
new file mode 100644
index 0000000000..459c761722
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/init.d/92_setup-xbmc
@@ -0,0 +1,124 @@
+################################################################################
+# Copyright (C) 2009-2010 OpenELEC.tv
+# http://www.openelec.tv
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+# setup XBMC
+#
+# runlevels: openelec
+
+progress "setup XBMC"
+
+#
+# clean temp dir
+#
+ rm -rf $HOME/.xbmc/temp/*
+
+#
+# add some default settings
+#
+ mkdir -p $HOME/.xbmc/userdata
+
+# use dds fanarts by default
+ if [ ! -f $HOME/.xbmc/userdata/advancedsettings.xml ] ; then
+ cat > $HOME/.xbmc/userdata/advancedsettings.xml << EOF
+
+ true
+ cputemp
+ gputemp
+
+ 30
+
+
+EOF
+ fi
+
+#
+# setup directories for XBMC sources
+#
+
+ [ ! -d "$HOME/music" ] && mkdir -p $HOME/music
+ [ ! -d "$HOME/pictures" ] && mkdir -p $HOME/pictures
+ [ ! -d "$HOME/tvshows" ] && mkdir -p $HOME/tvshows
+ [ ! -d "$HOME/videos" ] && mkdir -p $HOME/videos
+
+ mkdir -p $HOME/.xbmc/userdata
+
+ if [ ! -f $HOME/.xbmc/userdata/sources.xml ] ; then
+ cat > $HOME/.xbmc/userdata/sources.xml << EOF
+
+
+
+
+
+ Music
+ $HOME/music/
+
+
+
+
+
+ Pictures
+ $HOME/pictures/
+
+
+
+EOF
+ fi
+
+#
+# common setup guisettings
+#
+
+ mkdir -p $HOME/.xbmc/userdata
+
+ [ ! -d "$HOME/screenshots" ] && mkdir -p $HOME/screenshots
+
+ if [ ! -f $HOME/.xbmc/userdata/guisettings.xml ] ; then
+ echo "" > $HOME/.xbmc/userdata/guisettings.xml
+
+ cat >> $HOME/.xbmc/userdata/guisettings.xml << EOF
+
+ $HOME/screenshots/
+
+EOF
+
+#
+# common setup for amd and nvidia graphic
+#
+
+ # Always sync to vblank
+ if [ "$GPUTYPE" = "NVIDIA" -o "$GPUTYPE" = "RADEON" ] ; then
+ cat >> $HOME/.xbmc/userdata/guisettings.xml << EOF
+
+ 2
+
+EOF
+ fi
+ echo "" >> $HOME/.xbmc/userdata/guisettings.xml
+ fi
diff --git a/packages/mediacenter/xbmc-pvr/init.d/93_xbmc b/packages/mediacenter/xbmc-pvr/init.d/93_xbmc
new file mode 100644
index 0000000000..aeb0a615c8
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/init.d/93_xbmc
@@ -0,0 +1,63 @@
+################################################################################
+# Copyright (C) 2009-2010 OpenELEC.tv
+# http://www.openelec.tv
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+# starting XBMC
+#
+# runlevels: openelec
+
+LIRCDEV="/var/run/lirc/lircd"
+[ -e /var/run/lirc/lircd.irtrans ] && LIRCDEV="/var/run/lirc/lircd.irtrans"
+XBMC_ARGS="--standalone -fs --lircdev $LIRCDEV"
+
+progress "starting XBMC"
+
+# starting autoupdate
+ [ -f /usr/bin/autoupdate ] && /usr/bin/autoupdate &
+
+# waiting for Xorg to start
+ wait_for_xorg
+
+# starting XBMC
+ while true; do
+
+ DISPLAY=:0.0 /usr/lib/xbmc/xbmc.bin $XBMC_ARGS > /dev/null 2>&1
+ RET=$?
+
+ case "$RET" in
+ 0)
+ poweroff -f
+ ;;
+ 64)
+ poweroff -f
+ ;;
+ 66)
+ reboot
+ ;;
+ 255)
+ echo "Abnormal Exit. Exited with code $RET"
+ echo "is Xorg running? check /var/log/Xorg.log"
+ ;;
+ *)
+ echo "Abnormal Exit. Exited with code $RET"
+ ;;
+ esac
+
+ usleep 250000
+ done
diff --git a/packages/mediacenter/xbmc-pvr/install b/packages/mediacenter/xbmc-pvr/install
new file mode 100755
index 0000000000..7cfb7bffc3
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/install
@@ -0,0 +1,87 @@
+#!/bin/sh
+
+################################################################################
+# This file is part of OpenELEC - http://www.openelec.tv
+# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+. config/options $1
+
+PYTHON_LIBDIR="`ls -d $INSTALL/usr/lib/python*`"
+
+mkdir -p $INSTALL/usr/bin
+ cp $PKG_DIR/scripts/cputemp $INSTALL/usr/bin
+ cp $PKG_DIR/scripts/gputemp $INSTALL/usr/bin
+ cp $PKG_BUILD/tools/EventClients/Clients/XBMC\ Send/xbmc-send.py $INSTALL/usr/bin/xbmc-send
+
+mkdir -p $INSTALL/usr/lib/xbmc
+ cp $PKG_BUILD/xbmc.bin $INSTALL/usr/lib/xbmc
+ cp $PKG_BUILD/xbmc-xrandr $INSTALL/usr/lib/xbmc
+
+cd $PKG_BUILD
+ find system addons \
+ -regextype posix-extended -type f \
+ -not -iregex ".*svn.*|.*win32(dx)?\.vis|.*osx\.vis" \
+ -iregex ".*-linux.*|.*\.vis|.*\.xbs" \
+ -exec install -D "{}" $ROOT/$INSTALL/usr/lib/xbmc/"{}" ";"
+
+ find addons language media scripts sounds userdata system \
+ -regextype posix-extended -type f \
+ -not -iregex ".*-linux.*|.*\.vis|.*\.xbs|.*svn.*|.*\.orig|.*\.so|.*\.dll|.*\.pyd|.*python/.*\.zlib" \
+ -exec install -D -m 0644 "{}" $ROOT/$INSTALL/usr/share/xbmc/"{}" ";"
+cd -
+
+# overriding Splash image
+mkdir -p $INSTALL/usr/share/xbmc/media
+ rm -rf $INSTALL/usr/share/xbmc/media/Splash.png
+# if [ -f $PROJECT_DIR/$PROJECT/splash/splash.png ]; then
+# cp $PROJECT_DIR/$PROJECT/splash/splash.png $INSTALL/usr/share/xbmc/media/Splash.png
+# else
+# cp $PKG_DIR/splash/splash.png $INSTALL/usr/share/xbmc/media/Splash.png
+# fi
+
+mkdir -p $INSTALL/usr/share/xbmc/addons
+ cp -R $PKG_DIR/config/os.openelec.tv $INSTALL/usr/share/xbmc/addons
+ $SED "s|@ADDON_OS_VERSION@|$OS_VERSION|g" -i $INSTALL/usr/share/xbmc/addons/os.openelec.tv/addon.xml
+ cp -R $PKG_DIR/config/repository.openelec.tv $INSTALL/usr/share/xbmc/addons
+ $SED "s|@ADDON_URL@|$ADDON_URL|g" -i $INSTALL/usr/share/xbmc/addons/repository.openelec.tv/addon.xml
+
+mkdir -p $PYTHON_LIBDIR/site-packages/xbmc
+ cp -R $PKG_BUILD/tools/EventClients/lib/python/* $PYTHON_LIBDIR/site-packages/xbmc
+
+if [ "$WIIMOTE_SUPPORT" = yes ]; then
+ mkdir -p $INSTALL/usr/bin
+ cp $PKG_BUILD/tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote $INSTALL/usr/bin/xbmc-wiiremote
+ mkdir -p $INSTALL/lib/udev
+ cp $PKG_DIR/scripts/wiiremote_helper $INSTALL/lib/udev
+ mkdir -p $INSTALL/lib/udev/rules.d
+ cp $PKG_DIR/rules.d/98-wiiremote.rules $INSTALL/lib/udev/rules.d
+fi
+
+if [ "$PS3REMOTE_SUPPORT" = yes ]; then
+ mkdir -p $INSTALL/usr/bin
+ cp $PKG_BUILD/tools/EventClients/Clients/PS3\ BD\ Remote/ps3_remote.py $INSTALL/usr/bin/xbmc-ps3remote
+ mkdir -p $INSTALL/usr/share/pixmaps/xbmc
+ cp $PKG_BUILD/tools/EventClients/icons/bluetooth.png $INSTALL/usr/share/pixmaps/xbmc
+ mkdir -p $PYTHON_LIBDIR/site-packages/xbmc
+ echo 'ICON_PATH="/usr/share/pixmaps/xbmc/"' > $PYTHON_LIBDIR/site-packages/xbmc/defs.py
+ mkdir -p $INSTALL/lib/udev
+ cp $PKG_DIR/scripts/ps3remote_helper $INSTALL/lib/udev
+ mkdir -p $INSTALL/lib/udev/rules.d
+ cp $PKG_DIR/rules.d/98-ps3remote.rules $INSTALL/lib/udev/rules.d
+fi
diff --git a/packages/mediacenter/xbmc-pvr/meta b/packages/mediacenter/xbmc-pvr/meta
new file mode 100644
index 0000000000..61d845b8eb
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/meta
@@ -0,0 +1,76 @@
+################################################################################
+# This file is part of OpenELEC - http://www.openelec.tv
+# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+PKG_NAME="xbmc-pvr"
+PKG_VERSION="10.0-Dharma"
+PKG_REV="1"
+PKG_ARCH="any"
+PKG_LICENSE="GPL"
+PKG_SITE="http://www.xbmc.org"
+#PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2"
+PKG_URL="http://192.168.0.1/$PKG_NAME-$PKG_VERSION.tar.bz2"
+PKG_DEPENDS="boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba alsa bc"
+PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba"
+PKG_PRIORITY="optional"
+PKG_SECTION="mediacenter"
+PKG_SHORTDESC="xbmc-pvr: XBMC Mediacenter"
+PKG_LONGDESC="XBMC Media Center (which was formerly named Xbox Media Center) is a free and open source cross-platform media player and home entertainment system software with a 10-foot user interface designed for the living-room TV. Its graphical user interface allows the user to easily manage video, photos, podcasts, and music from a computer, optical disk, local network, and the internet using a remote control."
+PKG_IS_ADDON="no"
+
+PKG_AUTORECONF="no"
+
+if [ "$FAAC_SUPPORT" = yes ]; then
+ PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS faac"
+ PKG_DEPENDS="$PKG_DEPENDS faac"
+fi
+
+if [ "$AVAHI_DAEMON" = yes ]; then
+ PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS avahi"
+ PKG_DEPENDS="$PKG_DEPENDS avahi"
+fi
+
+if [ "$WEBSERVER" = yes ]; then
+ PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libmicrohttpd"
+ PKG_DEPENDS="$PKG_DEPENDS libmicrohttpd"
+fi
+
+if [ "$VDPAU" = yes ]; then
+ PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libvdpau"
+ PKG_DEPENDS="$PKG_DEPENDS libvdpau"
+fi
+
+if [ "$VAAPI" = yes ]; then
+ PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libva"
+ PKG_DEPENDS="$PKG_DEPENDS libva"
+fi
+
+if [ "$CRYSTALHD" = yes ]; then
+ PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS crystalhd"
+ PKG_DEPENDS="$PKG_DEPENDS crystalhd"
+fi
+
+if [ "$WIIMOTE_SUPPORT" = yes ]; then
+ PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS wiiuse"
+ PKG_DEPENDS="$PKG_DEPENDS wiiuse"
+fi
+
+if [ "$PS3REMOTE_SUPPORT" = yes ]; then
+ PKG_DEPENDS="$PKG_DEPENDS PyBluez"
+fi
diff --git a/packages/mediacenter/xbmc-pvr/patches/900-advancedsettings_patches.txt b/packages/mediacenter/xbmc-pvr/patches/900-advancedsettings_patches.txt
new file mode 100644
index 0000000000..b1a3c55293
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/900-advancedsettings_patches.txt
@@ -0,0 +1,4 @@
+ bei openelec fehlt mir eigentlich nur noch die bluetooth ps3 remote und mein metadata patch :)
+ wo find ich den patch nochmal?
+ http://trac.xbmc.org/ticket/10292 und http://trac.xbmc.org/ticket/10298
+ http://trac.xbmc.org/attachment/ticket/10292/advancedsettings-alwaysextractflags.diff und http://trac.xbmc.org/attachment/ticket/10298/advancedsettings-videolibrary.flattenmoviesets.diff
diff --git a/packages/mediacenter/xbmc-pvr/patches/rename.sh b/packages/mediacenter/xbmc-pvr/patches/rename.sh
new file mode 100755
index 0000000000..64715435df
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/rename.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+################################################################################
+# This file is part of OpenELEC - http://www.openelec.tv
+# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+
+for i in `ls xbmc-*.patch`; do
+ mv $i `echo $i | sed "s,$1,$2,g"`
+done
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-002-arm_remove_forced_python2.5-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-002-arm_remove_forced_python2.5-0.1.patch
new file mode 100644
index 0000000000..f90ee1faa0
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-002-arm_remove_forced_python2.5-0.1.patch
@@ -0,0 +1,15 @@
+diff -Naur xbmc-dharma-35100/Makefile.in xbmc-dharma-35100.patch/Makefile.in
+--- xbmc-dharma-35100/Makefile.in 2010-10-30 05:36:41.000000000 +0200
++++ xbmc-dharma-35100.patch/Makefile.in 2010-11-01 04:53:48.542705631 +0100
+@@ -471,11 +471,6 @@
+ xbmc/cores/DllLoader/exports/util/exports_utils.a \
+ xbmc/cores/DllLoader/exports/exports.a
+
+-ifeq (arm, $(ARCH))
+-# Force external python2.5 for now!
+-LIBS +=-lpython2.5
+-endif
+-
+ xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC)
+ ifeq ($(findstring osx,$(ARCH)), osx)
+ $(CXX) $(LDFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-201-let_select_XBMCProjectM-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-201-let_select_XBMCProjectM-0.1.patch
new file mode 100644
index 0000000000..8da9696e60
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-201-let_select_XBMCProjectM-0.1.patch
@@ -0,0 +1,97 @@
+diff -Naur xbmc-31903/configure.in xbmc-31903.patch/configure.in
+--- xbmc-31903/configure.in 2010-07-17 16:25:37.000000000 +0200
++++ xbmc-31903.patch/configure.in 2010-07-17 16:46:16.387376489 +0200
+@@ -23,6 +23,8 @@
+ xrandr_disabled="== XRandR support disabled. SDL will be used for resolution support. =="
+ goom_enabled="== GOOM enabled. =="
+ goom_disabled="== GOOM disabled. =="
++xbmcprojectm_enabled="== XBMCProjectM enabled. =="
++xbmxprojectm_disabled="== XBMCProjectM disabled. =="
+ pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
+ pulse_disabled="== PulseAudio support manually disabled. =="
+ faac_not_found="== Could not find libfaac. FAAC support disabled. =="
+@@ -161,6 +163,12 @@
+ [use_goom=$enableval],
+ [use_goom=no])
+
++AC_ARG_ENABLE([xbmcprojectm],
++ [AS_HELP_STRING([--enable-xbmcprojectm],
++ [enable XBMCProjectM visualisation (default is yes)])],
++ [use_xbmcprojectm=$enableval],
++ [use_xbmcprojectm=yes])
++
+ AC_ARG_ENABLE([ccache],
+ [AS_HELP_STRING([--enable-ccache],
+ [enable building with ccache feature (default is auto)])],
+@@ -725,6 +733,15 @@
+ AC_CHECK_HEADERS([librtmp/log.h librtmp/amf.h librtmp/rtmp.h],use_librtmp=yes,
+ use_librtmp=no;AC_MSG_RESULT($librtmp_not_found))
+
++# XBMCPROJECTM
++if test "$use_xbmcprojectm" = "yes"; then
++ AC_MSG_NOTICE($xbmcprojectm_enabled)
++ BUILD_XBMCPROJECTM=0
++else
++ AC_MSG_NOTICE($xbmcprojectm_disabled)
++ BUILD_XBMCPROJECTM=1
++fi
++
+ ### External libraries checks
+ # External FFmpeg
+ if test "$use_external_ffmpeg" = "yes"; then
+@@ -1132,6 +1149,12 @@
+ final_message="$final_message\n GOOM:\t\tNo"
+ fi
+
++if test "$use_xbmcprojectm" = "yes"; then
++ final_message="$final_message\n XBMCProjectM:\tYes"
++else
++ final_message="$final_message\n XBMCProjectM:\tNo"
++fi
++
+ if test "$use_mid" = "yes"; then
+ final_message="$final_message\n MID Support:\tYes"
+ SDL_DEFINES="$SDL_DEFINES -DMID"
+@@ -1401,6 +1424,7 @@
+ AC_SUBST(SDL_DEFINES)
+ AC_SUBST(BUILD_DVDCSS)
+ AC_SUBST(BUILD_GOOM)
++AC_SUBST(BUILD_XBMCPROJECTM)
+ AC_SUBST(USE_EXTERNAL_FFMPEG)
+ AC_SUBST(USE_EXTERNAL_LIBA52)
+ AC_SUBST(USE_INTERNAL_LIBA52)
+@@ -1788,7 +1812,7 @@
+ -DSYSCONF_INSTALL_DIR:PATH="${sysconfdir}" -DSHARE_INSTALL_PREFIX:PATH="${datadir}" .
+ set +x
+ fi
+-], [0])
++], [$BUILD_XBMCPROJECTM])
+
+ XB_CONFIG_MODULE([xbmc/visualizations/Goom/goom2k4-0],[
+ if test "$host_vendor" != "apple" ; then
+diff -Naur xbmc-31903/Makefile.in xbmc-31903.patch/Makefile.in
+--- xbmc-31903/Makefile.in 2010-07-17 16:25:37.000000000 +0200
++++ xbmc-31903.patch/Makefile.in 2010-07-17 16:46:16.391376663 +0200
+@@ -108,8 +108,10 @@
+
+ VIS_DIRS=\
+ xbmc/visualizations/OpenGLSpectrum \
+- xbmc/visualizations/WaveForm \
+- xbmc/visualizations/XBMCProjectM
++ xbmc/visualizations/WaveForm
++ifneq (@BUILD_XBMCPROJECTM@,1)
++VIS_DIRS+=xbmc/visualizations/XBMCProjectM
++endif
+ ifeq ($(findstring osx,$(ARCH)), osx)
+ VIS_DIRS+=xbmc/visualizations/iTunes
+ endif
+@@ -307,7 +309,9 @@
+ ifneq (arm, $(ARCH))
+ $(MAKE) -C xbmc/visualizations/OpenGLSpectrum
+ $(MAKE) -C xbmc/visualizations/WaveForm
++ifneq (@BUILD_XBMCPROJECTM@,1)
+ $(MAKE) -C xbmc/visualizations/XBMCProjectM
++endif
+ ifeq ($(findstring osx,$(ARCH)), osx)
+ $(MAKE) -C xbmc/visualizations/iTunes
+ endif
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-202-let_select_RSXS-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-202-let_select_RSXS-0.1.patch
new file mode 100644
index 0000000000..40a0cc8094
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-202-let_select_RSXS-0.1.patch
@@ -0,0 +1,98 @@
+diff -Naur xbmc-31903/configure.in xbmc-31903.patch/configure.in
+--- xbmc-31903/configure.in 2010-07-17 16:47:46.246501133 +0200
++++ xbmc-31903.patch/configure.in 2010-07-17 16:47:17.801376519 +0200
+@@ -25,6 +25,8 @@
+ goom_disabled="== GOOM disabled. =="
+ xbmcprojectm_enabled="== XBMCProjectM enabled. =="
+ xbmxprojectm_disabled="== XBMCProjectM disabled. =="
++rsxs_enabled="== RSXS enabled. =="
++rsxs_disabled="== RSXS disabled. =="
+ pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
+ pulse_disabled="== PulseAudio support manually disabled. =="
+ faac_not_found="== Could not find libfaac. FAAC support disabled. =="
+@@ -169,6 +171,12 @@
+ [use_xbmcprojectm=$enableval],
+ [use_xbmcprojectm=yes])
+
++AC_ARG_ENABLE([rsxs],
++ [AS_HELP_STRING([--enable-rsxs],
++ [enable RSXS Screensaver (default is yes)])],
++ [use_rsxs=$enableval],
++ [use_rsxs=yes])
++
+ AC_ARG_ENABLE([ccache],
+ [AS_HELP_STRING([--enable-ccache],
+ [enable building with ccache feature (default is auto)])],
+@@ -742,6 +750,15 @@
+ BUILD_XBMCPROJECTM=1
+ fi
+
++# RSXS
++if test "$use_rsxs" = "yes"; then
++ AC_MSG_NOTICE($rsxs_enabled)
++ BUILD_RSXS=0
++else
++ AC_MSG_NOTICE($rsxs_disabled)
++ BUILD_RSXS=1
++fi
++
+ ### External libraries checks
+ # External FFmpeg
+ if test "$use_external_ffmpeg" = "yes"; then
+@@ -1155,6 +1172,12 @@
+ final_message="$final_message\n XBMCProjectM:\tNo"
+ fi
+
++if test "$use_rsxs" = "yes"; then
++ final_message="$final_message\n RSXS:\t\tYes"
++else
++ final_message="$final_message\n RSXS:\t\tNo"
++fi
++
+ if test "$use_mid" = "yes"; then
+ final_message="$final_message\n MID Support:\tYes"
+ SDL_DEFINES="$SDL_DEFINES -DMID"
+@@ -1425,6 +1448,7 @@
+ AC_SUBST(BUILD_DVDCSS)
+ AC_SUBST(BUILD_GOOM)
+ AC_SUBST(BUILD_XBMCPROJECTM)
++AC_SUBST(BUILD_RSXS)
+ AC_SUBST(USE_EXTERNAL_FFMPEG)
+ AC_SUBST(USE_EXTERNAL_LIBA52)
+ AC_SUBST(USE_INTERNAL_LIBA52)
+@@ -1866,7 +1890,7 @@
+ --disable-skyrocket
+ fi
+ fi
+-], [0])
++], [$BUILD_RSXS])
+
+ XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libbdnav/], [
+ if test "$host_vendor" = "apple" ; then
+diff -Naur xbmc-31903/Makefile.in xbmc-31903.patch/Makefile.in
+--- xbmc-31903/Makefile.in 2010-07-17 16:47:46.258501239 +0200
++++ xbmc-31903.patch/Makefile.in 2010-07-17 16:47:17.803376676 +0200
+@@ -103,8 +103,10 @@
+ lib/xbmc-dll-symbols \
+ lib/jsoncpp/jsoncpp/src/lib_json
+
+-SS_DIRS=\
+- xbmc/screensavers/rsxs-0.9/xbmc
++SS_DIRS=
++ifneq (@BUILD_RSXS@,1)
++SS_DIRS=+xbmc/screensavers/rsxs-0.9/xbmc
++endif
+
+ VIS_DIRS=\
+ xbmc/visualizations/OpenGLSpectrum \
+@@ -323,8 +325,10 @@
+ endif
+ screensavers: exports
+ ifneq (arm, $(ARCH))
++ifneq (@BUILD_RSXS@,1)
+ $(MAKE) -C xbmc/screensavers/rsxs-0.9/xbmc
+ endif
++endif
+ libpython: dllloader
+ $(MAKE) -C xbmc/lib/libPython
+ $(MAKE) -C xbmc/lib/libPython/xbmcmodule
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-301-correct_lzo_include-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-301-correct_lzo_include-0.1.patch
new file mode 100644
index 0000000000..d9b5732f81
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-301-correct_lzo_include-0.1.patch
@@ -0,0 +1,28 @@
+diff -Naur xbmc-31903/configure.in xbmc-31903.patch/configure.in
+--- xbmc-31903/configure.in 2010-07-17 16:50:02.838501479 +0200
++++ xbmc-31903.patch/configure.in 2010-07-17 16:50:20.633376618 +0200
+@@ -1205,12 +1205,6 @@
+ final_message="$final_message\n MID Support:\tNo"
+ fi
+
+-if test -d "/usr/include/lzo"; then
+- INCLUDES="$INCLUDES -I/usr/include/lzo"
+-else
+- INCLUDES="$INCLUDES"
+-fi
+-
+ if test "x$use_ccache" != "xno"; then
+ AC_PATH_PROG(CCACHE,ccache,none)
+ if test "$ac_cv_path_CCACHE" = "none"; then
+diff -Naur xbmc-31903/tools/TexturePacker/XBMCTex.cpp xbmc-31903.patch/tools/TexturePacker/XBMCTex.cpp
+--- xbmc-31903/tools/TexturePacker/XBMCTex.cpp 2010-07-17 16:28:40.000000000 +0200
++++ xbmc-31903.patch/tools/TexturePacker/XBMCTex.cpp 2010-07-17 16:50:20.634375824 +0200
+@@ -37,7 +37,7 @@
+ #endif
+
+ #ifdef _LINUX
+-#include
++#include
+ #else
+ #include "../../xbmc/lib/liblzo/LZO1X.H"
+ #endif
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-302-dont_hardcode_usr_include-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-302-dont_hardcode_usr_include-0.1.patch
new file mode 100644
index 0000000000..33af095f6e
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-302-dont_hardcode_usr_include-0.1.patch
@@ -0,0 +1,29 @@
+diff -Naur xbmc-28910/guilib/Makefile.in xbmc-28910.patch/guilib/Makefile.in
+--- xbmc-28910/guilib/Makefile.in 2010-03-28 17:12:32.000000000 +0200
++++ xbmc-28910.patch/guilib/Makefile.in 2010-03-28 19:13:23.816629379 +0200
+@@ -1,4 +1,4 @@
+-INCLUDES=-I. -I../ -Icommon -I../xbmc -I../xbmc/linux -I../xbmc/utils -I/usr/include/freetype2 -I/usr/include/SDL -I../xbmc/lib/libsquish
++INCLUDES=-I. -I../ -Icommon -I../xbmc -I../xbmc/linux -I../xbmc/utils -I../xbmc/lib/libsquish
+ ifneq (@USE_EXTERNAL_FFMPEG@,1)
+ INCLUDES+=-I../xbmc/cores/dvdplayer/Codecs/ffmpeg
+ endif
+diff -Naur xbmc-28910/xbmc/FileSystem/Makefile.in xbmc-28910.patch/xbmc/FileSystem/Makefile.in
+--- xbmc-28910/xbmc/FileSystem/Makefile.in 2010-03-28 17:14:55.000000000 +0200
++++ xbmc-28910.patch/xbmc/FileSystem/Makefile.in 2010-03-28 19:13:23.834753245 +0200
+@@ -1,6 +1,6 @@
+ ARCH=@ARCH@
+
+-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 -I../lib
++INCLUDES=-I. -I../ -I../cores -I../linux -I../../guilib -I../lib/UnrarXLib -I../utils -I../lib
+ INCLUDES+=-I../lib/libcdio/libcdio/include
+ ifeq ($(findstring osx,$(ARCH)), osx)
+ INCLUDES+=-I../../lib/libcurl-OSX/include
+diff -Naur xbmc-28910/xbmc/Makefile.in xbmc-28910.patch/xbmc/Makefile.in
+--- xbmc-28910/xbmc/Makefile.in 2010-03-28 17:13:35.000000000 +0200
++++ xbmc-28910.patch/xbmc/Makefile.in 2010-03-28 19:13:23.837752973 +0200
+@@ -1,4 +1,4 @@
+-INCLUDES+=-I../ -I. -Ilinux -Icores -I../guilib -Iutils -IFileSystem -I/usr/include/freetype2 -Icores/dvdplayer
++INCLUDES+=-I../ -I. -Ilinux -Icores -I../guilib -Iutils -IFileSystem -Icores/dvdplayer
+
+ ifneq (@USE_EXTERNAL_FFMPEG@,1)
+ INCLUDES+=-Icores/dvdplayer/Codecs/ffmpeg
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-303-WiiRemote_crosscompiling-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-303-WiiRemote_crosscompiling-0.1.patch
new file mode 100644
index 0000000000..e63840a6da
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-303-WiiRemote_crosscompiling-0.1.patch
@@ -0,0 +1,53 @@
+diff -Naur xbmc-dharma-33971/tools/EventClients/Clients/WiiRemote/Makefile xbmc-dharma-33971.patch/tools/EventClients/Clients/WiiRemote/Makefile
+--- xbmc-dharma-33971/tools/EventClients/Clients/WiiRemote/Makefile 2010-09-19 14:54:08.000000000 +0200
++++ xbmc-dharma-33971.patch/tools/EventClients/Clients/WiiRemote/Makefile 2010-09-21 20:31:58.649299449 +0200
+@@ -1,3 +1,4 @@
++CXX ?= g++
+ CFLAGS = -Wall -pipe -fPIC -funroll-loops
+ OBJ_DIR = release-$(shell $(CC) -v 2>&1|grep ^Target:|cut -d' ' -f2)
+ OBJS = wiiuse_v0.12/src/$(OBJ_DIR)/libwiiuse.so
+@@ -6,7 +7,7 @@
+
+ all:
+ @$(MAKE) -C wiiuse_$(VERSION)/src $@
+- g++ $(CFLAGS) WiiUse_WiiRemote.cpp $(OBJS) -o $(BIN)
++ $(CXX) $(CFLAGS) -I./wiiuse_$(VERSION)/src WiiUse_WiiRemote.cpp $(OBJS) -o $(BIN)
+ wiiuse:
+ @$(MAKE) -C wiiuse_$(VERSION)/src
+ clean:
+diff -Naur xbmc-dharma-33971/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/example/Makefile xbmc-dharma-33971.patch/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/example/Makefile
+--- xbmc-dharma-33971/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/example/Makefile 2010-09-19 14:54:08.000000000 +0200
++++ xbmc-dharma-33971.patch/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/example/Makefile 2010-09-21 20:28:15.388265664 +0200
+@@ -5,7 +5,7 @@
+ #
+ # Change this to your GCC version.
+ #
+-CC = gcc
++CC ?= gcc
+
+ ####################################################
+ #
+diff -Naur xbmc-dharma-33971/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/example-sdl/Makefile xbmc-dharma-33971.patch/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/example-sdl/Makefile
+--- xbmc-dharma-33971/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/example-sdl/Makefile 2010-09-19 14:54:08.000000000 +0200
++++ xbmc-dharma-33971.patch/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/example-sdl/Makefile 2010-09-21 20:28:22.476390252 +0200
+@@ -5,7 +5,7 @@
+ #
+ # Change this to your GCC version.
+ #
+-CC = gcc
++CC ?= gcc
+
+ ####################################################
+ #
+diff -Naur xbmc-dharma-33971/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/src/Makefile xbmc-dharma-33971.patch/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/src/Makefile
+--- xbmc-dharma-33971/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/src/Makefile 2010-09-19 14:54:08.000000000 +0200
++++ xbmc-dharma-33971.patch/tools/EventClients/Clients/WiiRemote/wiiuse_v0.12/src/Makefile 2010-09-21 20:28:32.447265813 +0200
+@@ -5,7 +5,7 @@
+ #
+ # Change this to your GCC version.
+ #
+-CC = gcc
++CC ?= gcc
+
+ ####################################################
+ #
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-303-fix_libdvd_xFLAGS-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-303-fix_libdvd_xFLAGS-0.1.patch
new file mode 100644
index 0000000000..d3155b02bc
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-303-fix_libdvd_xFLAGS-0.1.patch
@@ -0,0 +1,119 @@
+diff -Naur xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdcss/src/libdvdcss.pc.in xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdcss/src/libdvdcss.pc.in
+--- xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdcss/src/libdvdcss.pc.in 2010-09-04 04:22:52.000000000 +0200
++++ xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdcss/src/libdvdcss.pc.in 2010-09-06 00:34:45.247116875 +0200
+@@ -6,5 +6,5 @@
+ Name: libdvdcss
+ Description: DVD access and decryption library.
+ Version: @VERSION@
+-Libs: -L${libdir} -ldvdcss
+-Cflags: -I{includedir} -I${includedir}/@PACKAGE@
++Libs: -ldvdcss
++Cflags: -I.
+diff -Naur xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav-config2.sh xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav-config2.sh
+--- xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav-config2.sh 2010-09-04 04:22:50.000000000 +0200
++++ xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav-config2.sh 2010-09-06 00:30:38.943396556 +0200
+@@ -56,17 +56,17 @@
+ fi
+
+ if test "$echo_cflags" = "yes"; then
+- echo -I$prefix/include $dvdread_cflags $extracflags $threadcflags
++ echo $dvdread_cflags $extracflags $threadcflags
+ fi
+
+ if test "$echo_minicflags" = "yes"; then
+- echo -I$prefix/include -I$prefix/include/dvdnav $extracflags $threadcflags
++ echo $extracflags $threadcflags
+ fi
+
+ if test "$echo_libs" = "yes"; then
+- echo -L$libdir -ldvdnav $dvdread_libs $threadlib
++ echo -ldvdnav $dvdread_libs $threadlib
+ fi
+
+ if test "$echo_minilibs" = "yes"; then
+- echo -L$libdir -ldvdnavmini $threadlib
++ echo -ldvdnavmini $threadlib
+ fi
+diff -Naur xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav-config.in xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav-config.in
+--- xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav-config.in 2010-09-04 04:22:50.000000000 +0200
++++ xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav-config.in 2010-09-06 00:31:04.643116783 +0200
+@@ -76,13 +76,13 @@
+ fi
+
+ if test "$echo_cflags" = "yes"; then
+- echo -I@includedir@ -I@includedir@/libdvdread @THREAD_CFLAGS@
++ echo @THREAD_CFLAGS@
+ fi
+
+ if test "$echo_libs" = "yes"; then
+- echo -L@libdir@ -ldvdnav -ldvdread @THREAD_LIBS@
++ echo -ldvdnav -ldvdread @THREAD_LIBS@
+ fi
+
+ if test "$echo_minilibs" = "yes"; then
+- echo -L@libdir@ -ldvdnavmini @THREAD_LIBS@
++ echo -ldvdnavmini @THREAD_LIBS@
+ fi
+diff -Naur xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnavmini.pc.in xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnavmini.pc.in
+--- xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnavmini.pc.in 2010-09-04 04:22:50.000000000 +0200
++++ xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnavmini.pc.in 2010-09-06 00:31:31.665116765 +0200
+@@ -7,5 +7,5 @@
+ Description: DVD Navigation mini library
+ Version: @VERSION@
+
+-Cflags: -I${includedir} @DVDREAD_CFLAGS@ @THREAD_CFLAGS@
+-Libs: -L${libdir} -ldvdnav @THREAD_LIBS@
++Cflags: @DVDREAD_CFLAGS@ @THREAD_CFLAGS@
++Libs: -ldvdnav @THREAD_LIBS@
+diff -Naur xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav.pc.in xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav.pc.in
+--- xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav.pc.in 2010-09-04 04:22:50.000000000 +0200
++++ xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav/misc/dvdnav.pc.in 2010-09-06 00:31:18.193116906 +0200
+@@ -8,5 +8,5 @@
+ Version: @VERSION@
+
+ Requires.private: dvdread >= 4.1.2
+-Cflags: -I${includedir} @THREAD_CFLAGS@
+-Libs: -L${libdir} -ldvdnav @THREAD_LIBS@
++Cflags: @THREAD_CFLAGS@
++Libs: -ldvdnav @THREAD_LIBS@
+diff -Naur xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread-config.in xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread-config.in
+--- xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread-config.in 2010-09-04 04:22:51.000000000 +0200
++++ xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread-config.in 2010-09-06 00:32:18.255991830 +0200
+@@ -72,9 +72,9 @@
+ fi
+
+ if test "$echo_cflags" = "yes"; then
+- echo -I@includedir@
++ echo ""
+ fi
+
+ if test "$echo_libs" = "yes"; then
+- echo -L@libdir@ -ldvdread
++ echo -ldvdread
+ fi
+diff -Naur xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread-config.sh xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread-config.sh
+--- xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread-config.sh 2010-09-04 04:22:51.000000000 +0200
++++ xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread-config.sh 2010-09-06 00:32:35.283991243 +0200
+@@ -48,9 +48,9 @@
+ fi
+
+ if test "$echo_cflags" = "yes"; then
+- echo -I$prefix/include $extracflags
++ echo $extracflags
+ fi
+
+ if test "$echo_libs" = "yes"; then
+- echo -L$libdir $dvdreadlib
++ echo $dvdreadlib
+ fi
+diff -Naur xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread.pc.in xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread.pc.in
+--- xbmc-dharma-33517/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread.pc.in 2010-09-04 04:22:51.000000000 +0200
++++ xbmc-dharma-33517.patch/xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread/misc/dvdread.pc.in 2010-09-06 00:32:57.831991741 +0200
+@@ -7,5 +7,5 @@
+ Description: Low level DVD access library
+ Version: @VERSION@
+
+-Cflags: -I${includedir}
+-Libs: -L${libdir} -ldvdread
++Cflags: -I.
++Libs: -ldvdread
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-321-CrystalHD_use_yuy2_to_yv12-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-321-CrystalHD_use_yuy2_to_yv12-0.1.patch
new file mode 100644
index 0000000000..2526f8e3ba
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-321-CrystalHD_use_yuy2_to_yv12-0.1.patch
@@ -0,0 +1,12 @@
+diff -Naur xbmc-10.0-Dharma/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD.cpp xbmc-10.0-Dharma.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD.cpp
+--- xbmc-10.0-Dharma/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD.cpp 2010-12-17 20:14:04.000000000 +0100
++++ xbmc-10.0-Dharma.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/CrystalHD.cpp 2011-01-21 13:52:11.238550146 +0100
+@@ -773,7 +773,7 @@
+ if (!pBuffer)
+ {
+ // No free pre-allocated buffers so make one
+-#ifdef _WIN32
++#if 1
+ // force Windows to use YV12 until DX renderer gets NV12 or YUY2 capability.
+ pBuffer = new CPictureBuffer(DVDVideoPicture::FMT_YUV420P, m_width, m_height);
+ #else
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-401-we_dont_need_libXinerama-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-401-we_dont_need_libXinerama-0.1.patch
new file mode 100644
index 0000000000..c3e6dea659
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-401-we_dont_need_libXinerama-0.1.patch
@@ -0,0 +1,13 @@
+diff -Naur xbmc-31903/configure.in xbmc-31903.patch/configure.in
+--- xbmc-31903/configure.in 2010-07-17 16:50:57.045376680 +0200
++++ xbmc-31903.patch/configure.in 2010-07-17 16:52:57.912501212 +0200
+@@ -585,9 +585,6 @@
+ PKG_CHECK_MODULES([XMU], [xmu],
+ [INCLUDES="$INCLUDES $XMU_CFLAGS"; LIBS="$LIBS $XMU_LIBS"],
+ AC_MSG_ERROR($missing_library))
+- PKG_CHECK_MODULES([XINERAMA],[xinerama],
+- [INCLUDES="$INCLUDES $XINERAMA_CFLAGS"; LIBS="$LIBS $XINERAMA_LIBS"],
+- AC_MSG_ERROR($missing_library))
+ PKG_CHECK_MODULES([CURL], [libcurl],
+ [INCLUDES="$INCLUDES $CURL_CFLAGS"; LIBS="$LIBS $CURL_LIBS"],
+ AC_MSG_ERROR($missing_library))
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-402-enable_yasm_in_ffmpeg-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-402-enable_yasm_in_ffmpeg-0.1.patch
new file mode 100644
index 0000000000..f2db6fd5a2
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-402-enable_yasm_in_ffmpeg-0.1.patch
@@ -0,0 +1,19 @@
+diff -Naur xbmc-31903/configure.in xbmc-31903.patch/configure.in
+--- xbmc-31903/configure.in 2010-07-17 16:53:28.281376543 +0200
++++ xbmc-31903.patch/configure.in 2010-07-17 16:55:45.481375135 +0200
+@@ -1045,6 +1045,7 @@
+ fi
+ fi
+
++AC_CHECK_PROG(HAVE_YASM,yasm,"yes","no",)
+ AC_CHECK_PROG(HAVE_SVNVERSION,svnversion,"yes","no",)
+ AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
+
+@@ -1639,6 +1640,7 @@
+ `if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\
+ `if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\
+ --target-os=$(tolower $(uname -s)) \
++ `if test "$HAVE_YASM" = "yes"; then echo --enable-yasm; fi` \
+ --disable-muxers \
+ --enable-muxer=spdif \
+ --enable-muxer=adts \
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-403-openssl_only_needed_for_internal_python-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-403-openssl_only_needed_for_internal_python-0.1.patch
new file mode 100644
index 0000000000..f914bcde7b
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-403-openssl_only_needed_for_internal_python-0.1.patch
@@ -0,0 +1,21 @@
+diff -Naur xbmc-10.0-Dharma/configure.in xbmc-10.0-Dharma.patch/configure.in
+--- xbmc-10.0-Dharma/configure.in 2010-12-17 20:30:53.000000000 +0100
++++ xbmc-10.0-Dharma.patch/configure.in 2011-01-06 03:41:05.387941174 +0100
+@@ -546,8 +546,6 @@
+ AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
+-AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library))
+-AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([wavpack], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([mpeg2], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([mpeg2convert],[main],, AC_MSG_ERROR($missing_library))
+@@ -940,6 +938,8 @@
+ USE_EXTERNAL_PYTHON=1
+ AC_DEFINE([USE_EXTERNAL_PYTHON], [1], [Whether to use external python library.])
+ else
++ AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library))
++ AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
+ AC_MSG_NOTICE($external_python_disabled)
+ USE_EXTERNAL_PYTHON=0
+ fi
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-451-full_splash-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-451-full_splash-0.1.patch
new file mode 100644
index 0000000000..0d66158268
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-451-full_splash-0.1.patch
@@ -0,0 +1,16 @@
+diff -Naur xbmc-28910/xbmc/utils/Splash.cpp xbmc-28910.patch/xbmc/utils/Splash.cpp
+--- xbmc-28910/xbmc/utils/Splash.cpp 2010-03-28 17:14:58.000000000 +0200
++++ xbmc-28910.patch/xbmc/utils/Splash.cpp 2010-03-28 19:29:51.138661142 +0200
+@@ -53,9 +53,9 @@
+ g_graphicsContext.Clear();
+
+ g_graphicsContext.SetCameraPosition(CPoint(0, 0));
+- float w = g_graphicsContext.GetWidth() * 0.5f;
+- float h = g_graphicsContext.GetHeight() * 0.5f;
+- CGUIImage* image = new CGUIImage(0, 0, w*0.5f, h*0.5f, w, h, m_ImageName);
++ float w = g_graphicsContext.GetWidth();
++ float h = g_graphicsContext.GetHeight();
++ CGUIImage* image = new CGUIImage(0, 0, 0, 0, w, h, m_ImageName);
+ image->SetAspectRatio(CAspectRatio::AR_KEEP);
+ image->AllocResources();
+
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-452-change_lcd_content-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-452-change_lcd_content-0.1.patch
new file mode 100644
index 0000000000..d9c54b3756
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-452-change_lcd_content-0.1.patch
@@ -0,0 +1,12 @@
+diff -Naur xbmc-29490/userdata/LCD.xml xbmc-29490.patch/userdata/LCD.xml
+--- xbmc-29490/userdata/LCD.xml 2010-04-24 22:42:45.000000000 +0200
++++ xbmc-29490.patch/userdata/LCD.xml 2010-04-27 17:26:02.946045110 +0200
+@@ -21,7 +21,7 @@
+ Freemem: $INFO[System.FreeMemory]
+
+
+- XBMC running...
++ *** OpenELEC.tv ***
+ $INFO[System.Time] $INFO[System.Date]
+ Freemem: $INFO[System.FreeMemory]
+ $INFO[System.ScreenWidth]x$INFO[System.ScreenHeight] $INFO[System.ScreenMode]
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-452-ps3_remote_be_more_quiet-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-452-ps3_remote_be_more_quiet-0.1.patch
new file mode 100644
index 0000000000..4bbd0f3b1f
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-452-ps3_remote_be_more_quiet-0.1.patch
@@ -0,0 +1,29 @@
+diff -Naur xbmc-dharma-33971/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py xbmc-dharma-33971.patch/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py
+--- xbmc-dharma-33971/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py 2010-09-19 14:54:08.000000000 +0200
++++ xbmc-dharma-33971.patch/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py 2010-09-25 22:30:55.174281890 +0200
+@@ -59,9 +59,6 @@
+ target_connected = False
+ target_address = None
+ while target_connected is False:
+- xbmc.send_notification("Action Required!",
+- "Hold Start+Enter on your remote.",
+- bticon)
+ print "Searching for %s" % target_name
+ print "(Hold Start + Enter on remote to make it discoverable)"
+ time.sleep(2)
+@@ -72,7 +69,6 @@
+ except Exception, e:
+ print "Error performing bluetooth discovery"
+ print str(e)
+- xbmc.send_notification("Error", "Unable to find devices.", bticon)
+ time.sleep(5)
+ continue
+
+@@ -109,7 +105,6 @@
+ print "ERROR - Could Not Connect. Trying again..."
+ time.sleep(2)
+ else:
+- xbmc.send_notification("Error", "No remotes were found.", bticon)
+ print "Could not find BD Remote Control. Trying again..."
+ time.sleep(2)
+ return (remote,target_address)
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-462-add_remote_irtrans_mediacenter-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-462-add_remote_irtrans_mediacenter-0.1.patch
new file mode 100644
index 0000000000..2b969b601e
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-462-add_remote_irtrans_mediacenter-0.1.patch
@@ -0,0 +1,52 @@
+diff -Naur xbmc-29490/system/Lircmap.xml xbmc-29490.patch/system/Lircmap.xml
+--- xbmc-29490/system/Lircmap.xml 2010-04-24 22:45:26.000000000 +0200
++++ xbmc-29490.patch/system/Lircmap.xml 2010-04-28 22:00:13.734656322 +0200
+@@ -362,4 +362,48 @@
+ recordlist
+ teletext
+
++
++ pause
++ stop
++ fwd
++ rew
++ left
++ right
++ up
++ down
++
++ ch+
++ ch-
++ back
++
++ play
++ info
++ next
++ prev
++ teletext
++ ehome
++ rec
++ vol+
++ vol-
++ mute
++ power
++ video
++ music
++ pictures
++ tv
++ 1
++ 2
++ 3
++ 4
++ 5
++ 6
++ 7
++ 8
++ 9
++ 0
++ red
++ green
++ yellow
++ blue
++
+
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-463-add_remote_devinput-0.1.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-463-add_remote_devinput-0.1.patch
new file mode 100644
index 0000000000..8b0ef3b6b2
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-463-add_remote_devinput-0.1.patch
@@ -0,0 +1,69 @@
+diff -Naur xbmc-dharma-35248/system/Lircmap.xml xbmc-dharma-35248.patch/system/Lircmap.xml
+--- xbmc-dharma-35248/system/Lircmap.xml 2010-11-12 13:25:11.464538074 +0100
++++ xbmc-dharma-35248.patch/system/Lircmap.xml 2010-11-12 13:26:26.486568902 +0100
+@@ -365,7 +365,6 @@
+
+
+ cx23885_remote
+- devinput
+ KEY_LEFT
+ KEY_RIGHT
+ KEY_UP
+@@ -452,4 +451,57 @@
+ yellow
+ blue
+
++
++
++ KEY_LEFT
++ KEY_RIGHT
++ KEY_UP
++ KEY_DOWN
++
++ KEY_ENTER
++ KEY_DELETE
++ KEY_PROG1
++ KEY_EXIT
++ KEY_RECORD
++ KEY_PLAY
++ KEY_PAUSE
++ KEY_STOP
++ KEY_FASTFORWARD
++ KEY_REWIND
++ KEY_VOLUMEUP
++ KEY_VOLUMEDOWN
++ KEY_CHANNELUP
++ KEY_CHANNELDOWN
++ KEY_NEXT
++ KEY_PREVIOUS
++ KEY_EPG
++ KEY_SUBTITLE
++ KEY_INFO
++ KEY_ZOOM
++ KEY_MUTE
++ KEY_POWER
++
++
++ KEY_VIDEO
++ KEY_AUDIO
++ KEY_CAMERA
++ KEY_TUNER
++ KEY_TEXT
++ KEY_NUMERIC_1
++ KEY_NUMERIC_2
++ KEY_NUMERIC_3
++ KEY_NUMERIC_4
++ KEY_NUMERIC_5
++ KEY_NUMERIC_6
++ KEY_NUMERIC_7
++ KEY_NUMERIC_8
++ KEY_NUMERIC_9
++ KEY_NUMERIC_0
++ KEY_NUMERIC_STAR
++ KEY_NUMERIC_POUND
++ KEY_RED
++ KEY_GREEN
++ KEY_YELLOW
++ KEY_BLUE
++
+
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-501-fixed_bitstream_mode_improperly_set-Ticket-10981.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-501-fixed_bitstream_mode_improperly_set-Ticket-10981.patch
new file mode 100644
index 0000000000..a77ad31d11
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-501-fixed_bitstream_mode_improperly_set-Ticket-10981.patch
@@ -0,0 +1,12 @@
+diff -Naur xbmc-10.0-Dharma/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/spdif.c xbmc-10.0-Dharma.patch/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/spdif.c
+--- xbmc-10.0-Dharma/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/spdif.c 2010-12-17 20:13:36.000000000 +0100
++++ xbmc-10.0-Dharma.patch/xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/spdif.c 2011-01-07 01:19:48.721555949 +0100
+@@ -108,7 +108,7 @@
+ static int spdif_header_ac3(AVFormatContext *s, AVPacket *pkt)
+ {
+ IEC958Context *ctx = s->priv_data;
+- int bitstream_mode = pkt->data[6] & 0x7;
++ int bitstream_mode = pkt->data[5] & 0x7;
+
+ ctx->data_type = IEC958_AC3 | (bitstream_mode << 8);
+ ctx->pkt_offset = AC3_FRAME_SIZE << 2;
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-901-advancedsettings_alwaysextractflags.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-901-advancedsettings_alwaysextractflags.patch
new file mode 100644
index 0000000000..de16d8ec29
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-901-advancedsettings_alwaysextractflags.patch
@@ -0,0 +1,23 @@
+diff -Naur xbmc-dharma-35003/xbmc/GUISettings.cpp xbmc-dharma-35003.patch/xbmc/GUISettings.cpp
+--- xbmc-dharma-35003/xbmc/GUISettings.cpp 2010-10-25 15:36:18.000000000 +0200
++++ xbmc-dharma-35003.patch/xbmc/GUISettings.cpp 2010-10-25 23:34:14.131974258 +0200
+@@ -618,6 +618,7 @@
+ AddInt(vid, "myvideos.selectaction", 22079, SELECT_ACTION_PLAY_OR_RESUME, SELECT_ACTION_CHOOSE, 1, SELECT_ACTION_INFO, SPIN_CONTROL_TEXT);
+ AddBool(NULL, "myvideos.treatstackasfile", 20051, true);
+ AddBool(vid, "myvideos.extractflags",20433, true);
++ AddBool(vid, "myvideos.alwaysextractflags",20433, false);
+ AddBool(vid, "myvideos.cleanstrings", 20418, false);
+ AddBool(NULL, "myvideos.extractthumb",20433, true);
+
+diff -Naur xbmc-dharma-35003/xbmc/ThumbLoader.cpp xbmc-dharma-35003.patch/xbmc/ThumbLoader.cpp
+--- xbmc-dharma-35003/xbmc/ThumbLoader.cpp 2010-10-25 15:37:06.000000000 +0200
++++ xbmc-dharma-35003.patch/xbmc/ThumbLoader.cpp 2010-10-25 23:34:04.223857821 +0200
+@@ -148,7 +148,7 @@
+ m_item.SetThumbnailImage(m_target);
+ }
+ }
+- else if (m_item.HasVideoInfoTag() && !m_item.GetVideoInfoTag()->HasStreamDetails())
++ else if (m_item.HasVideoInfoTag() && (!m_item.GetVideoInfoTag()->HasStreamDetails() || g_guiSettings.GetBool("myvideos.alwaysextractflags")))
+ {
+ CLog::Log(LOGDEBUG,"%s - trying to extract filestream details from video file %s", __FUNCTION__, m_path.c_str());
+ result = CDVDFileInfo::GetFileStreamDetails(&m_item);
diff --git a/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-902-advancedsettings_videolibrary.flattenmoviesets.patch b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-902-advancedsettings_videolibrary.flattenmoviesets.patch
new file mode 100644
index 0000000000..a22d3acb65
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-10.0-Dharma-902-advancedsettings_videolibrary.flattenmoviesets.patch
@@ -0,0 +1,24 @@
+diff -Naur xbmc-dharma-35003/xbmc/GUISettings.cpp xbmc-dharma-35003.patch/xbmc/GUISettings.cpp
+--- xbmc-dharma-35003/xbmc/GUISettings.cpp 2010-10-25 23:37:10.165043528 +0200
++++ xbmc-dharma-35003.patch/xbmc/GUISettings.cpp 2010-10-25 23:37:27.888251923 +0200
+@@ -528,6 +528,7 @@
+ AddBool(NULL, "videolibrary.seasonthumbs", 20382, true);
+ AddBool(vdl, "videolibrary.actorthumbs", 20402, true);
+ AddInt(vdl, "videolibrary.flattentvshows", 20412, 1, 0, 1, 2, SPIN_CONTROL_TEXT);
++ AddBool(NULL, "videolibrary.flattenmoviesets", 22002, false);
+ AddBool(vdl, "videolibrary.updateonstartup", 22000, false);
+ AddBool(vdl, "videolibrary.backgroundupdate", 22001, false);
+ AddSeparator(vdl, "videolibrary.sep3");
+diff -Naur xbmc-dharma-35003/xbmc/VideoDatabase.cpp xbmc-dharma-35003.patch/xbmc/VideoDatabase.cpp
+--- xbmc-dharma-35003/xbmc/VideoDatabase.cpp 2010-10-25 15:36:19.000000000 +0200
++++ xbmc-dharma-35003.patch/xbmc/VideoDatabase.cpp 2010-10-25 23:37:27.887251911 +0200
+@@ -4394,7 +4394,7 @@
+ if (NULL == m_pDS.get()) return false;
+
+ CStdString strSQL = "select * from movieview ";
+- if (fetchSets)
++ if (fetchSets && !g_guiSettings.GetBool("videolibrary.flattenmoviesets"))
+ {
+ // not getting a set, so grab all sets that match this where clause first
+ CStdString setsWhere;
+diff -Naur xbmc-dharma-35003/xbmc/VideoDatabase.cpp.orig xbmc-dharma-35003.patch/xbmc/VideoDatabase.cpp.orig
diff --git a/packages/mediacenter/xbmc-pvr/profile.d/xbmc.conf b/packages/mediacenter/xbmc-pvr/profile.d/xbmc.conf
new file mode 100644
index 0000000000..84c1a778a6
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/profile.d/xbmc.conf
@@ -0,0 +1,29 @@
+################################################################################
+# This file is part of OpenELEC - http://www.openelec.tv
+# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
+# Copyright (C) 2010-2011 Roman Weber (roman@openelec.tv)
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+# Mediacenter environment variables.
+#
+# This file contains non-OpenELEC evironment variables as well as OpenELEC
+# evironment variables that are not user defined.
+################################################################################
+
+XBMC_HOME="/usr/share/xbmc"
+
+export XBMC_HOME
diff --git a/packages/mediacenter/xbmc-pvr/rules.d/98-ps3remote.rules b/packages/mediacenter/xbmc-pvr/rules.d/98-ps3remote.rules
new file mode 100644
index 0000000000..913d47f406
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/rules.d/98-ps3remote.rules
@@ -0,0 +1,27 @@
+################################################################################
+# This file is part of OpenELEC - http://www.openelec.tv
+# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+# only does something with "bluetooth" subsystem devices.
+SUBSYSTEM!="bluetooth", GOTO="end"
+
+# Start PS3 Remote support if bluetooth is starting
+ACTION=="add|remove", RUN+="/lib/udev/ps3remote_helper"
+
+LABEL="end"
diff --git a/packages/mediacenter/xbmc-pvr/rules.d/98-wiiremote.rules b/packages/mediacenter/xbmc-pvr/rules.d/98-wiiremote.rules
new file mode 100644
index 0000000000..b12c683a39
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/rules.d/98-wiiremote.rules
@@ -0,0 +1,27 @@
+################################################################################
+# This file is part of OpenELEC - http://www.openelec.tv
+# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+# only does something with "bluetooth" subsystem devices.
+SUBSYSTEM!="bluetooth", GOTO="end"
+
+# Start Wii Remote support if bluetooth is starting
+ACTION=="add|remove", RUN+="/lib/udev/wiiremote_helper"
+
+LABEL="end"
diff --git a/packages/mediacenter/xbmc-pvr/scripts/cputemp b/packages/mediacenter/xbmc-pvr/scripts/cputemp
new file mode 100755
index 0000000000..4e5d1a0721
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/scripts/cputemp
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+################################################################################
+# Copyright (C) 2009-2010 OpenELEC.tv
+# http://www.openelec.tv
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+TEMP="0"
+
+if [ -f /sys/class/thermal/thermal_zone0/temp ]; then
+ TEMP=`echo "$(cat /sys/class/thermal/thermal_zone0/temp)/1000" |bc`
+elif [ -f /usr/bin/sensors ]; then
+# TEMP=`/usr/bin/sensors -u | head -6 |grep "temp1_input"| awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}'`
+ TEMP=`/usr/bin/sensors -u | tail -n4 | grep temp1_input | awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}'`
+fi
+
+echo "${TEMP} C"
diff --git a/packages/mediacenter/xbmc-pvr/scripts/gputemp b/packages/mediacenter/xbmc-pvr/scripts/gputemp
new file mode 100755
index 0000000000..accc4f023a
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/scripts/gputemp
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+################################################################################
+# Copyright (C) 2009-2010 OpenELEC.tv
+# http://www.openelec.tv
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+TEMP="0"
+
+if lspci -n | grep 0300 | grep -q 10de; then
+ [ -f /usr/bin/nvidia-smi ] && TEMP=`/usr/bin/nvidia-smi -a | grep 'Temperature' | awk '{print $3}'`
+fi
+
+echo "${TEMP} C"
diff --git a/packages/mediacenter/xbmc-pvr/scripts/ps3remote_helper b/packages/mediacenter/xbmc-pvr/scripts/ps3remote_helper
new file mode 100755
index 0000000000..84d8db2806
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/scripts/ps3remote_helper
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+################################################################################
+# Copyright (C) 2009-2010 OpenELEC.tv
+# http://www.openelec.tv
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+case "${ACTION}" in
+ add)
+ if [ -f /usr/bin/xbmc-ps3remote ]; then
+ /usr/bin/xbmc-ps3remote localhost 9777 &
+ fi
+ ;;
+ remove)
+ killall xbmc-ps3remote
+ ;;
+esac
+
+exit 0
diff --git a/packages/mediacenter/xbmc-pvr/scripts/wiiremote_helper b/packages/mediacenter/xbmc-pvr/scripts/wiiremote_helper
new file mode 100755
index 0000000000..5f8d87556f
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/scripts/wiiremote_helper
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+################################################################################
+# Copyright (C) 2009-2010 OpenELEC.tv
+# http://www.openelec.tv
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+case "${ACTION}" in
+ add)
+ if [ -f /usr/bin/xbmc-wiiremote ]; then
+ /usr/bin/xbmc-wiiremote &
+ fi
+ ;;
+ remove)
+ killall xbmc-wiiremote
+ ;;
+esac
+
+exit 0
diff --git a/packages/mediacenter/xbmc-pvr/splash/splash.png b/packages/mediacenter/xbmc-pvr/splash/splash.png
new file mode 100644
index 0000000000..7a4fe389f0
Binary files /dev/null and b/packages/mediacenter/xbmc-pvr/splash/splash.png differ
diff --git a/packages/mediacenter/xbmc-pvr/splash/splash1.png b/packages/mediacenter/xbmc-pvr/splash/splash1.png
new file mode 100644
index 0000000000..8c86ae06a7
Binary files /dev/null and b/packages/mediacenter/xbmc-pvr/splash/splash1.png differ
diff --git a/packages/mediacenter/xbmc-pvr/splash/splash2.png b/packages/mediacenter/xbmc-pvr/splash/splash2.png
new file mode 100644
index 0000000000..1db8fc8ccd
Binary files /dev/null and b/packages/mediacenter/xbmc-pvr/splash/splash2.png differ
diff --git a/packages/mediacenter/xbmc-pvr/splash/splash3.png b/packages/mediacenter/xbmc-pvr/splash/splash3.png
new file mode 100644
index 0000000000..cc3bb90a5a
Binary files /dev/null and b/packages/mediacenter/xbmc-pvr/splash/splash3.png differ
diff --git a/packages/mediacenter/xbmc-pvr/splash/splash4.png b/packages/mediacenter/xbmc-pvr/splash/splash4.png
new file mode 100644
index 0000000000..62590dfd6e
Binary files /dev/null and b/packages/mediacenter/xbmc-pvr/splash/splash4.png differ
diff --git a/packages/mediacenter/xbmc-pvr/unpack b/packages/mediacenter/xbmc-pvr/unpack
new file mode 100755
index 0000000000..04e7dbae71
--- /dev/null
+++ b/packages/mediacenter/xbmc-pvr/unpack
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+################################################################################
+# This file is part of OpenELEC - http://www.openelec.tv
+# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
+#
+# 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 OpenELEC.tv; 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
+################################################################################
+
+. config/options $1
+
+echo "### Applying project based patches ###"
+
+for patch in `ls $PROJECT_DIR/$PROJECT/patches/$1`; do
+ cat $PROJECT_DIR/$PROJECT/patches/$1/$patch | patch -d \
+ `echo $PKG_BUILD | cut -f1 -d\ ` -p1
+done