2014-01-24 10:49:32 +00:00
|
|
|
# Template file for 'xbmc-rpi'
|
|
|
|
pkgname=xbmc-rpi
|
|
|
|
version=12.3
|
2014-02-28 11:03:50 +00:00
|
|
|
revision=2
|
2014-01-24 10:49:32 +00:00
|
|
|
patch_args="-Np1"
|
|
|
|
wrksrc="xbmc-${version}-Frodo"
|
|
|
|
short_desc="XBMC Media Center for the Raspberry Pi"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
homepage="http://www.xbmc.org"
|
|
|
|
license="GPL-2"
|
|
|
|
distfiles="http://mirrors.xbmc.org/releases/source/xbmc-$version.tar.gz"
|
|
|
|
checksum=3e15c960d034efdea5f92a7b74716cb48094842d077b076025fd8640754ede73
|
|
|
|
|
|
|
|
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
|
|
|
|
swig jre which gettext-devel libltdl-devel python-devel libmysqlclient-devel
|
2014-02-28 11:03:50 +00:00
|
|
|
SDL_image-devel lzo-devel optipng"
|
2014-01-24 10:49:32 +00:00
|
|
|
makedepends="
|
|
|
|
libudev-devel>=183 pcre-devel>=8.30 expat-devel libpng-devel>=1.6 libjpeg-turbo-devel
|
|
|
|
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
|
|
|
|
jasper-devel faac-devel faad2-devel libmodplug-devel openssl-devel libass-devel
|
|
|
|
libmad-devel fontconfig-devel libsamplerate-devel libmms-devel libcurl-devel
|
|
|
|
enca-devel boost-devel libbluetooth-devel yajl-devel libplist-devel librtmp-devel
|
|
|
|
tinyxml-devel taglib-devel libcap-devel lame-devel libnfs-devel systemd-devel
|
|
|
|
libcec-devel libbluray-devel libmicrohttpd-devel libcdio-devel python-devel
|
|
|
|
libdvdread-devel libssh-devel rpi-firmware"
|
2014-02-28 11:03:50 +00:00
|
|
|
makedepends+=" hicolor-icon-theme desktop-file-utils"
|
2014-01-24 10:49:32 +00:00
|
|
|
# The following dependencies are dlopen(3)ed.
|
|
|
|
depends="libbluray libmad libogg libcurl libflac libmodplug libass libmpeg2 lame librtmp libnfs libplist"
|
2014-02-28 11:03:50 +00:00
|
|
|
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"
|
|
|
|
xbmc_groups="audio,video"
|
|
|
|
|
|
|
|
pre_configure() {
|
2014-02-28 11:03:50 +00:00
|
|
|
. /etc/profile.d/java.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
|
2014-02-28 11:03:50 +00:00
|
|
|
|
|
|
|
# Optimize png files.
|
|
|
|
OLDIFS=$IFS
|
|
|
|
IFS=$'\n'
|
|
|
|
PNGFILES=($(find ${wrksrc} -type f -name *.png))
|
|
|
|
IFS=$OLDIFS
|
|
|
|
len=${#PNGFILES[@]}
|
|
|
|
for ((i=0; i<${len}; i++)); do
|
|
|
|
fname="$(basename ${PNGFILES[$i]})"
|
|
|
|
[ "$fname" = "AppIcon.png" ] && continue
|
|
|
|
optipng "${PNGFILES[$i]}"
|
|
|
|
done
|
2014-01-24 10:49:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_configure() {
|
2014-02-28 11:03:50 +00:00
|
|
|
. /etc/profile.d/java.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 \
|
|
|
|
--with-platform=raspberry-pi \
|
2014-02-28 11:03:50 +00:00
|
|
|
--enable-gles \
|
2014-01-24 10:49:32 +00:00
|
|
|
--enable-dvdcss \
|
|
|
|
--enable-optical-drive \
|
|
|
|
--enable-libbluray \
|
|
|
|
--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
|
|
|
|
vinstall tools/Linux/xbmc-48x48.png 644 usr/share/pixmaps xbmc.png
|
|
|
|
|
|
|
|
rm -f ${DESTDIR}/usr/share/icons/hicolor/icon-theme.cache
|
|
|
|
|
|
|
|
vinstall ${FILESDIR}/xbmc.service 0644 usr/lib/systemd/system
|
|
|
|
vinstall ${FILESDIR}/polkit.rules 0644 etc/polkit-1/rules.d 10-xbmc.rules
|
|
|
|
}
|