1 # Maintainer: B <gotleenucks at gmail dot com>
2 # Contributor: DonVla <donvla@users.sourceforge.net>
3 # Contributor: Ulf Winkelvos <ulf [at] winkelvos [dot] de>
4 # Contributor: Ralf Barth <archlinux dot org at haggy dot org>
6 # Original credits go to Edgar Hucek <gimli at dark-green dot com>
7 # for his xbmc-vdpau-vdr PKGBUILD at https://archvdr.svn.sourceforge.net/svnroot/archvdr/trunk/archvdr/xbmc-vdpau-vdr/PKGBUILD.
8 # This PKGBUILD is an adaptation of the xbmc-git PKGBUILD in the AUR; credits go to the people who contributed to that.
10 # XvBA support courtesy of Fernet Menta (https://github.com/FernetMenta)
11 # Thanks to Stephan Raue from the OpenELEC project for integrating the XvBA code into the main Xbmc tree
15 _pkgver=11.0-Eden_beta1
17 pkgdesc="XBMC Media Center with XvBA support"
19 conflicts=('xbmc' 'xbmc-pulse' 'xbmc-svn' 'xbmc-git' 'xbmc-git-xvba')
20 arch=('i686' 'x86_64')
21 url="http://www.xbmc.org"
22 license=('GPL' 'LGPL')
23 depends=('faac' 'faad2' 'glew' 'hicolor-icon-theme' 'jasper' 'libass' 'libcdio' 'libmad' 'libmodplug' 'libmpeg2' 'libmicrohttpd'
24 'libplist' 'libmysqlclient' 'libsamplerate' 'libxtst' 'libxrandr' 'lzo2' 'python2' 'samba' 'sdl_image>=1.2.10'
25 'sdl_mixer' 'sqlite3' 'wavpack' 'yajl' 'xvba-sdk')
26 makedepends=('boost' 'cmake' 'git' 'gperf' 'nasm' 'zip' 'unzip')
27 optdepends=('avahi: to use zerconf features (remote, etc...)'
28 'gdb: for meaningful backtraces in case of trouble - STRONGLY RECOMMENDED'
29 'libcrystalhd: Broadcom CrystalHD kernel module'
30 'libssh: support for sshfs'
31 'libvdpau: accelerated video playback for nvidia cards'
32 'libva: accelerated video playback for nvidia, ati/amd and some intel cards'
33 'lirc: remote controller support'
34 'pulseaudio: pulseaudio support'
35 'udisks: automount external drives'
36 'upower: used to trigger suspend functionality'
37 'python-simplejson: weather service functionality'
38 'unrar: access compressed files without unpacking them')
40 changelog="$pkgname.changelog"
41 install="${pkgname%-xvba}.install"
42 source=(http://mirrors.xbmc.org/releases/source/${pkgname%-xvba}-$_pkgver.tar.gz
43 https://raw.github.com/OpenELEC/OpenELEC.tv/master/packages/mediacenter/xbmc/patches/xbmc-22ad8e4-901.01-ee1a1e2c428b5923da9c39f5a78bc9208e4f2047.patch
44 https://raw.github.com/OpenELEC/OpenELEC.tv/master/packages/mediacenter/xbmc/patches/xbmc-22ad8e4-901.02-2f91d0ca3735ab9b1abbfe6e3c6613e56951b7d2.patch
45 https://raw.github.com/OpenELEC/OpenELEC.tv/master/packages/mediacenter/xbmc/patches/xbmc-22ad8e4-901.03-32df6ef9fc30cd2215e2a0886ceb5dab368ee31a.patch
46 https://raw.github.com/OpenELEC/OpenELEC.tv/master/packages/mediacenter/xbmc/patches/xbmc-22ad8e4-902.01-xvba_support-5d594445f1f63f73a1feeebc96cadcf197372dc1.patch)
50 cd "${srcdir}/xbmc-$_pkgver"
52 # Uncomment when building offline. Xbmc's build process is happy when the tarballs are present in
53 # their respective directories and will not try to download them - a welcome relief. Either way,
54 # pulling in source code halfway through the build process is messy, and annoying.
55 #cp ${srcdir}/Imaging-${_imagingver}.tar.gz ${srcdir}/$pkgname-$pkgver/lib/addons/script.module.pil
56 #cp ${srcdir}/pysqlite-${_pysqlitever}.tar.gz ${srcdir}/$pkgname-$pkgver/lib/addons/script.module.pysqlite
61 # Note on external-libs:
62 # - We cannot use external python because Arch's python was built with
63 # UCS2 unicode support, whereas xbmc expects UCS4 support
64 # - We cannot use Arch's libass because it's incompatible with XBMC's subtitle rendering
65 # - According to an xbmc dev using external/system ffmpeg with xbmc is "pure stupid" :D
67 # Arch Linux has a funky LDFLAGS default setup. Lets drop it to fix
68 # possible linking issues later on. --as-needed is the linker flag
70 unset LDFLAGS; LDFLAGS="-Wl,--hash-style=gnu"
73 # If you feel adventurous, you can play with the CFLAGS
74 #unset {CFLAGS,CXXFLAGS}
75 #export CFLAGS="-march=pentium-m -O2 -pipe" # -fomit-frame-pointer would interfere with debugging
76 #export CXXFLAGS="$CFLAGS"
78 # Fix lsb_release dependency
79 sed -i -e 's|lsb_release -d|echo Arch Linux|' xbmc/utils/SystemInfo.cpp
81 # Take out the gtk-update-icon-cache command
82 sed -i '/gtk-update-icon-cache/d' Makefile.in
84 # XvBA support (experimental!)
85 msg "Patching in XvBA support"
86 # Makepkg doesn't seem to strip HTTPS URLs
87 patch -Np1 -i $srcdir/${source[1]##*/}
88 patch -Np1 -i $srcdir/${source[2]##*/}
89 patch -Np1 -i $srcdir/${source[3]##*/}
90 patch -Np1 -i $srcdir/${source[4]##*/}
92 msg "Bootstrapping XBMC"
95 msg "Configuring XBMC"
96 export PYTHON_VERSION=2 # external python v2
97 ./configure --prefix="/usr" \
98 --enable-external-libraries \
99 --disable-external-ffmpeg \
103 # Now (finally) build
111 cd "${srcdir}/${pkgname%-xvba}-$_pkgver"
112 msg "Running make install"
113 make prefix=${pkgdir}/usr/ install
116 sed -i -e 's/which lsb_release &> \/dev\/null/\[ -f \/etc\/arch-release ]/g' "${pkgdir}/usr/bin/xbmc"
117 sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/arch-release/g" "${pkgdir}/usr/bin/xbmc"
120 install -D -m 0644 "${srcdir}/${pkgname%-xvba}-$_pkgver/tools/Linux/xbmc.desktop" "${pkgdir}/usr/share/applications/xbmc.desktop"
121 install -D -m 0644 "${srcdir}/${pkgname%-xvba}-$_pkgver/tools/Linux/xbmc-48x48.png" "${pkgdir}/usr/share/pixmaps/xbmc.png"
125 install -Dm755 ${srcdir}/${pkgname%-xvba}-$_pkgver/xbmc-xrandr ${pkgdir}/usr/share/xbmc/xbmc-xrandr
126 install -Dm755 ${srcdir}/${pkgname%-xvba}-$_pkgver/tools/TexturePacker/TexturePacker ${pkgdir}/usr/share/xbmc/
129 install -dm755 ${pkgdir}/usr/share/licenses/${pkgname}
130 for licensef in LICENSE.GPL copying.txt; do
131 mv ${pkgdir}/usr/share/doc/xbmc/${licensef} ${pkgdir}/usr/share/licenses/${pkgname}
135 install -d -m 0755 "${pkgdir}/usr/share/doc/${pkgname}"
136 for docsf in keymapping.txt README.linux; do
137 mv "${pkgdir}/usr/share/doc/xbmc/${docsf}" "${pkgdir}/usr/share/doc/${pkgname}"
140 # Clean up some stuff
141 msg "Cleanup unneeded files"
142 rm -rf ${pkgdir}/usr/share/xsessions
143 rm -f ${pkgdir}/usr/share/icons/hicolor/icon-theme.cache
146 msg "Stripping binaries"
147 find $pkgdir -type f -exec strip {} \; >/dev/null 2>/dev/null
151 sha1sums=('9b7950f1717cea162a4f2502be3d54c6a2388054'
152 '49c16997a946d2598f02426ca425f4c6ffda8a8c'
153 '78a8d496a076bf517436b96f924c7082389a406a'
154 '9b41077c8ef5a2f8893ac2d0f089ad8018c3af0c'
155 '5a6411aa556a3347a6823350a78524aee47d6747')