void-packages/srcpkgs/xbmc-rpi/template

111 lines
4 KiB
Text
Raw Normal View History

2014-01-24 10:49:32 +00:00
# Template file for 'xbmc-rpi'
pkgname=xbmc-rpi
2014-08-23 14:16:35 +00:00
version=13.2
revision=1
2014-01-24 10:49:32 +00:00
patch_args="-Np1"
2014-05-05 12:40:30 +00:00
wrksrc="xbmc-${version}-Gotham"
2014-01-24 10:49:32 +00:00
short_desc="XBMC Media Center for the Raspberry Pi"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.xbmc.org"
license="GPL-2"
2014-06-08 07:06:38 +00:00
distfiles="http://mirrors.xbmc.org/releases/source/xbmc-${version}.tar.gz"
2014-08-23 14:16:35 +00:00
checksum=acbf5dffa3034a3406240ee3cf81e721386cd383d23d056ddde1f769e050e585
2014-01-24 10:49:32 +00:00
only_for_archs="armv6l"
# Due to bootstrap requiring java, it's only possible currently to cross
# compile it from x86.
if [ "$XBPS_MACHINE" != "i686" -a "$XBPS_MACHINE" != "x86_64" ]; then
msg_error "${pkgname}-${version}: can only be cross built on x86."
fi
hostmakedepends="
automake libtool pkg-config gperf cmake zip unzip nasm yasm
2014-08-23 14:16:35 +00:00
swig gettext-devel libltdl-devel python-devel libmysqlclient-devel
SDL_image-devel lzo-devel oracle-jre"
2014-01-24 10:49:32 +00:00
makedepends="
libudev-devel pcre-devel>=8.30 expat-devel libpng-devel>=1.6 libjpeg-turbo-devel
2014-01-24 10:49:32 +00:00
avahi-libs-devel alsa-lib-devel samba-devel tiff-devel libmysqlclient-devel>=5.5.27
libmpeg2-devel wavpack-devel zlib-devel lzo-devel fribidi-devel sqlite-devel freetype-devel
2014-07-15 18:00:45 +00:00
jasper-devel faac-devel faad2-devel libmodplug-devel libressl-devel libass-devel
2014-01-24 10:49:32 +00:00
libmad-devel fontconfig-devel libsamplerate-devel libmms-devel libcurl-devel
enca-devel boost-devel libbluetooth-devel yajl-devel libplist-devel librtmp-devel
2014-08-23 14:16:35 +00:00
tinyxml-devel taglib-devel libcap-devel lame-devel libnfs-devel libxslt-devel
libcec-devel libmicrohttpd-devel libcdio-devel python-devel libssh-devel rpi-firmware"
2014-01-24 10:49:32 +00:00
# The following dependencies are dlopen(3)ed.
2014-05-05 12:40:30 +00:00
depends="libmad libogg libcurl libflac libmodplug libass libmpeg2 lame
librtmp libnfs libplist libssh"
depends+=" hicolor-icon-theme desktop-file-utils"
2014-01-24 10:49:32 +00:00
provides="xbmc-${version}_${revision}"
# Create xbmc system user to launch xbmc-standalone.
system_accounts="xbmc"
xbmc_homedir="/var/lib/xbmc"
2014-08-23 14:16:35 +00:00
xbmc_groups="audio,input,video"
2014-01-24 10:49:32 +00:00
pre_configure() {
2014-08-23 14:16:35 +00:00
. /etc/profile.d/oracle-jre.sh
2014-01-24 10:49:32 +00:00
./bootstrap
# fix lsb_release dependency
sed -i -e 's:/usr/bin/lsb_release -d:/bin/true:' xbmc/utils/SystemInfo.cpp
# Use cross prefix for python include/libdir.
sed -e "s,-L\$ac_python_libdir,-L${XBPS_CROSS_BASE}/usr/lib,g" -i configure
sed -e "s,PYTHON_CPPFLAGS=\$python_path,PYTHON_CPPFLAGS=-I${XBPS_CROSS_BASE}/usr/include/python2.7,g" -i configure
}
do_configure() {
2014-08-23 14:16:35 +00:00
. /etc/profile.d/oracle-jre.sh
2014-01-24 10:49:32 +00:00
CFLAGS="-O3 -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -mabi=aapcs-linux"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/ -I${XBPS_CROSS_BASE}/opt/vc/include/IL"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vcos/pthreads"
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vmcs_host/linux"
CXXFLAGS="$CFLAGS"
LDFLAGS+=" -L${XBPS_CROSS_BASE}/opt/vc/lib"
export CFLAGS CXXFLAGS LDFLAGS
./configure ${configure_args} \
--disable-gl \
--disable-sdl \
--disable-x11 \
--disable-xrandr \
--disable-openmax \
--disable-joystick \
--disable-debug \
--disable-crystalhd \
--disable-vtbdecoder \
--disable-vaapi \
--disable-vdpau \
--disable-pulse \
--disable-projectm \
2014-05-05 12:40:30 +00:00
--disable-optical-drive \
--disable-libbluray \
2014-01-24 10:49:32 +00:00
--with-platform=raspberry-pi \
--enable-gles \
2014-01-24 10:49:32 +00:00
--enable-optimizations \
--enable-libcec \
--enable-player=omxplayer
sed -e "s,\$(DVDREAD_CFLAGS),,g;s,AR=ar,AR=$AR,g;s,LD=ld,LD=$LD,g;s,RANLIB=ranlib,RANLIB=$RANLIB,g" -i lib/libdvd/libdvd{nav,read}/Makefile
sed -e 's,-L/usr/lib,,g' -i lib/cmyth/Makefile
}
do_build() {
make ${makejobs}
}
do_install() {
make DESTDIR=${DESTDIR} install
# Remove checks that don't apply to the raspberry pi
head -n 171 ${DESTDIR}/usr/share/xbmc/FEH.py > ${DESTDIR}/usr/share/xbmc/FEH.py.new
mv ${DESTDIR}/usr/share/xbmc/FEH.py.new ${DESTDIR}/usr/share/xbmc/FEH.py
vinstall tools/Linux/xbmc.desktop 644 usr/share/applications
2014-05-05 12:40:30 +00:00
vinstall media/icon48x48.png 644 usr/share/pixmaps xbmc.png
2014-01-24 10:49:32 +00:00
rm -f ${DESTDIR}/usr/share/icons/hicolor/icon-theme.cache
vinstall ${FILESDIR}/polkit.rules 0644 etc/polkit-1/rules.d 10-xbmc.rules
}