2014-01-24 11:49:32 +01:00
|
|
|
# Template file for 'xbmc-rpi'
|
|
|
|
pkgname=xbmc-rpi
|
2014-06-08 09:06:38 +02:00
|
|
|
version=13.1
|
2014-07-15 20:00:45 +02:00
|
|
|
revision=2
|
2014-01-24 11:49:32 +01:00
|
|
|
patch_args="-Np1"
|
2014-05-05 14:40:30 +02:00
|
|
|
wrksrc="xbmc-${version}-Gotham"
|
2014-01-24 11:49:32 +01: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 09:06:38 +02:00
|
|
|
distfiles="http://mirrors.xbmc.org/releases/source/xbmc-${version}.tar.gz"
|
|
|
|
checksum=344b604eae2ddb47c032dd7964d01f27e6fcd7a8873c84c0841d5da75961a678
|
2014-01-24 11:49:32 +01: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
|
|
|
|
swig jre which gettext-devel libltdl-devel python-devel libmysqlclient-devel
|
2014-02-28 12:03:50 +01:00
|
|
|
SDL_image-devel lzo-devel optipng"
|
2014-01-24 11:49:32 +01: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
|
2014-07-15 20:00:45 +02:00
|
|
|
jasper-devel faac-devel faad2-devel libmodplug-devel libressl-devel libass-devel
|
2014-01-24 11:49:32 +01:00
|
|
|
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
|
2014-05-05 14:40:30 +02:00
|
|
|
libcec-devel libmicrohttpd-devel libcdio-devel python-devel libssh-devel libxslt-devel
|
|
|
|
libxslt-devel rpi-firmware"
|
2014-02-28 12:03:50 +01:00
|
|
|
makedepends+=" hicolor-icon-theme desktop-file-utils"
|
2014-01-24 11:49:32 +01:00
|
|
|
# The following dependencies are dlopen(3)ed.
|
2014-05-05 14:40:30 +02:00
|
|
|
depends="libmad libogg libcurl libflac libmodplug libass libmpeg2 lame
|
|
|
|
librtmp libnfs libplist libssh"
|
2014-02-28 12:03:50 +01:00
|
|
|
depends+=" hicolor-icon-theme desktop-file-utils"
|
2014-01-24 11:49:32 +01: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 12:03:50 +01:00
|
|
|
. /etc/profile.d/java.sh
|
2014-01-24 11:49:32 +01: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 12:03:50 +01: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 11:49:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
do_configure() {
|
2014-02-28 12:03:50 +01:00
|
|
|
. /etc/profile.d/java.sh
|
2014-01-24 11:49:32 +01: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 14:40:30 +02:00
|
|
|
--disable-optical-drive \
|
|
|
|
--disable-libbluray \
|
2014-01-24 11:49:32 +01:00
|
|
|
--with-platform=raspberry-pi \
|
2014-02-28 12:03:50 +01:00
|
|
|
--enable-gles \
|
2014-01-24 11:49:32 +01: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 14:40:30 +02:00
|
|
|
vinstall media/icon48x48.png 644 usr/share/pixmaps xbmc.png
|
2014-01-24 11:49:32 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|