forked from archlinuxarm/PKGBUILDs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add xbmc for gles on tegra2-based devices
- Loading branch information
Showing
6 changed files
with
1,049 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
RETVAL=0 | ||
|
||
if [[ -z $(glxinfo | grep "direct rendering.*Yes" | uniq) ]]; then | ||
echo "XBMC needs hardware accelerated OpenGL rendering." | ||
echo "Install an appropriate graphics driver." | ||
echo | ||
echo "Please consult XBMC Wiki for supported hardware" | ||
echo "http://xbmc.org/wiki/?title=Supported_hardware" | ||
echo | ||
RETVAL=1 | ||
fi | ||
|
||
if [[ -z $(xdpyinfo | grep "depth of root.*24" | uniq) ]]; then | ||
echo "XBMC cannot run unless the" | ||
echo "screen color depth is at least 24 bit." | ||
echo | ||
echo "Please reconfigure your screen." | ||
RETVAL=1 | ||
fi | ||
|
||
exit ${RETVAL} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# $Id: PKGBUILD 58617 2011-11-16 15:35:16Z spupykin $ | ||
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> | ||
# Contributor: Brad Fanella <bradfanella@archlinux.us> | ||
# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com> | ||
# Contributor: Zeqadious <zeqadious.at.gmail.dot.com> | ||
# Contributor: BlackEagle < ike DOT devolder AT herecura DOT be > | ||
# Contributor: macau <tema.prokopenko@gmail.com> //fix issues for tegra2-based devices, hw video decoding via gles2 | ||
|
||
_prefix=/usr | ||
plugrel=1 | ||
pkgname=xbmc-tegra | ||
pkgver=10.1 | ||
pkgrel=9 | ||
pkgdesc="A software media player and entertainment hub for digital media" | ||
arch=('armv7h') | ||
url="http://xbmc.org" | ||
license=('GPL' 'custom') | ||
depends=('bzip2' 'curl' 'enca' 'faac' 'faad2' 'fontconfig' 'fribidi' | ||
'glew' 'jasper' 'libcdio' 'libegl' 'libgl' 'libmad' 'libmms' | ||
'libmpeg2' 'libmysqlclient' 'libsamplerate' 'libxinerama' | ||
'libxrandr' 'libxtst' 'lzo2' 'sdl_image' 'sdl_mixer' | ||
'smbclient' 'wavpack' 'mesa-demos' 'xorg-xdpyinfo' 'libmicrohttpd' | ||
'libssh' 'libva' 'libmodplug' 'rtmpdump' 'lsb-release' | ||
'libpulse' 'sqlite3' 'libass') | ||
makedepends=('boost' 'cmake' 'gperf' 'nasm' 'libvdpau' 'unzip' 'zip' 'libegl' 'mesa') | ||
optdepends=('lirc: remote controller support' | ||
'unrar: access compressed files without unpacking them' | ||
'udisks: automount external drives' | ||
'upower: used to trigger suspend functionality' | ||
'libvdpau: for nvidia hardware acceleration' | ||
'lcms' | ||
'tk') | ||
install="${pkgname}.install" | ||
source=("http://mirrors.xbmc.org/releases/source/xbmc-$pkgver.tar.gz" | ||
'FEH.sh' | ||
xbmc-10.0-python-2.7.patch | ||
xbmc-10.1-gcc-4.6.patch | ||
http://trac.xbmc.org/raw-attachment/ticket/11584/xbmcplugin_int_format.patch | ||
gles_bgra.patch) | ||
md5sums=('391398126cb86a4f6fbd0b7037997d84' | ||
'7127c0336f91ff48e408e2d1078fe8eb' | ||
'62d46c8b44e4e5313a10922209cb14f8' | ||
'd88b854d6f356a74d7658cd1f74a4695' | ||
'f42aa74a982ca854491a74e960f13804' | ||
'48441891ee2d210c210a34769c7938ad') | ||
|
||
build() { | ||
cd "${srcdir}/xbmc-$pkgver" | ||
#fix gles issue on tegra boards | ||
patch -p1 < $srcdir/gles_bgra.patch | ||
|
||
patch -p1 <$srcdir/xbmc-10.0-python-2.7.patch | ||
patch -p1 <$srcdir/xbmc-10.1-gcc-4.6.patch | ||
(cd xbmc/lib/libPython/xbmcmodule && patch -p5 <$srcdir/xbmcplugin_int_format.patch) | ||
|
||
LDFLAGS="-Wl,--hash-style=gnu" | ||
|
||
# fix linking issue with gcc 4.5, see git 6ea61fce78q | ||
sed -i 's: --soname,: -Wl,--soname,:' \ | ||
xbmc/cores/dvdplayer/Codecs/{,libdvd/}Makefile.in | ||
|
||
msg "Bootstrapping XBMC" | ||
./bootstrap | ||
|
||
#bad idea use softfp on hardfp system | ||
sed s/softfp/hard/g -i configure | ||
|
||
#update python | ||
sed s/lpython2.5/lpython2.7/g -i Makefile.in | ||
|
||
msg "Configuring XBMC" | ||
|
||
./configure --prefix=${_prefix} --disable-vdpau --disable-pulse --disable-hal --disable-avahi --enable-external-libraries --disable-liba52 --disable-libdts --enable-external-python --disable-debug --enable-gles --disable-gl --disable-dvdcss --disable-joystick --disable-openmax --enable-tegra --disable-vaapi --disable-ccache --disable-external-ffmpeg --disable-optimizations | ||
|
||
# Now (finally) build | ||
msg "Running make" | ||
make | ||
make -C lib/addons/script.module.pil | ||
make -C lib/addons/script.module.pysqlite | ||
} | ||
|
||
package() { | ||
cd "${srcdir}/xbmc-$pkgver" | ||
msg "Running make install" | ||
make prefix="${pkgdir}${_prefix}" install | ||
|
||
# Replace FEH.py with FEH.sh (and thus remove external python dependency) | ||
install -D -m 0755 "${srcdir}/FEH.sh" "${pkgdir}${_prefix}/share/xbmc/FEH.sh" | ||
sed -i -e 's/^python \(.*\)FEH.py \(.*\)$/\1FEH.sh \2/' "${pkgdir}${_prefix}/bin/xbmc" | ||
|
||
# lsb_release fix | ||
sed -i -e 's/which lsb_release &> \/dev\/null/\[ -f \/etc\/arch-release ]/g' "${pkgdir}${_prefix}/bin/xbmc" | ||
sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/arch-release/g" "${pkgdir}${_prefix}/bin/xbmc" | ||
|
||
# .desktop files | ||
install -D -m 0644 "${srcdir}/xbmc-$pkgver/tools/Linux/xbmc.desktop" "${pkgdir}${_prefix}/share/applications/xbmc.desktop" | ||
install -D -m 0644 "${srcdir}/xbmc-$pkgver/tools/Linux/xbmc-48x48.png" "${pkgdir}${_prefix}/share/pixmaps/xbmc.png" | ||
|
||
# Tools | ||
install -D -m 0755 "${srcdir}/xbmc-$pkgver/xbmc-xrandr" "${pkgdir}${_prefix}/share/xbmc/xbmc-xrandr" | ||
install -D -m 0755 "${srcdir}/xbmc-$pkgver/tools/TexturePacker/TexturePacker" "${pkgdir}${_prefix}/share/xbmc/" | ||
|
||
# Licenses | ||
install -d -m 0755 "${pkgdir}${_prefix}/share/licenses/${pkgname}" | ||
for licensef in LICENSE.GPL copying.txt; do | ||
mv "${pkgdir}${_prefix}/share/doc/xbmc/${licensef}" "${pkgdir}${_prefix}/share/licenses/${pkgname}" | ||
done | ||
|
||
# cleanup some stuff | ||
msg "Cleanup unneeded files" | ||
rm -rf "${pkgdir}/usr/share/xsessions" | ||
rm -f "${pkgdir}/usr/share/xbmc/FEH.py" | ||
rm -f "${pkgdir}/usr/share/icons/hicolor/icon-theme.cache" | ||
} | ||
# vim:set ts=2 sw=2 et: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- a/xbmc/cores/VideoRenderers/OverlayRendererGL.cpp 2011-03-05 03:33:37.000000000 +0000 | ||
+++ b/xbmc/cores/VideoRenderers/OverlayRendererGL.cpp 2011-11-28 18:20:47.957645004 +0000 | ||
@@ -125,7 +125,11 @@ | ||
, o->width * 4 | ||
, &m_u, &m_v | ||
, GL_RGBA | ||
+#ifndef HAS_GLES | ||
, GL_BGRA | ||
+#else | ||
+ , GL_RGBA | ||
+#endif | ||
, rgba); | ||
free(rgba); | ||
|
||
@@ -199,7 +203,11 @@ | ||
, o->width * 4 | ||
, &m_u, &m_v | ||
, GL_RGBA | ||
+#ifndef HAS_GLES | ||
, GL_BGRA | ||
+#else | ||
+ , GL_RGBA | ||
+#endif | ||
, rgba + min_x + min_y * o->width); | ||
|
||
free(rgba); |
Oops, something went wrong.