void-packages/srcpkgs/kodi-rpi/template

112 lines
4 KiB
Text
Raw Normal View History

# Template file for 'kodi-rpi'
pkgname=kodi-rpi
version=14.1
2015-03-12 10:23:20 +00:00
revision=4
wrksrc="xbmc-${version}-Helix"
short_desc="A software media player and entertainment hub for digital media (RPi)"
2014-01-24 10:49:32 +00:00
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.kodi.tv"
2014-01-24 10:49:32 +00:00
license="GPL-2"
distfiles="https://github.com/xbmc/xbmc/archive/${version}-Helix.tar.gz"
checksum=a38059e292cf8523918834e49fcc2d688525ceb7951ddf7f5ee535f4147255d6
2014-01-24 10:49:32 +00:00
2015-02-06 13:54:16 +00:00
only_for_archs="armv6l armv7l"
2014-01-24 10:49:32 +00:00
# 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 openjdk-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
jasper-devel faac-devel faad2-devel libmodplug-devel libressl-devel>=2.1.4 libass-devel
libmad-devel fontconfig-devel libsamplerate-devel libmms-devel libcurl-devel ffmpeg-devel
enca-devel boost-devel libbluetooth-devel yajl-devel libplist-devel>=1.12 librtmp-devel
2015-03-12 10:23:20 +00:00
tinyxml-devel taglib-devel libcap-devel lame-devel libnfs-devel>=1.9.7 libxslt-devel
2014-08-23 14:16:35 +00:00
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
2015-03-12 10:23:20 +00:00
librtmp libnfs>=1.9.7 libplist>=1.12 libssh"
depends+=" hicolor-icon-theme desktop-file-utils"
2014-01-24 10:49:32 +00:00
provides="kodi-${version}_${revision} xbmc-${version}_${revision}"
replaces="xbmc>=0 kodi>=0"
2014-01-24 10:49:32 +00:00
# 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() {
. /etc/profile.d/10_openjdk.sh
2014-01-24 10:49:32 +00:00
./bootstrap
# 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() {
. /etc/profile.d/10_openjdk.sh
2014-01-24 10:49:32 +00:00
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"
# XXX http://build.voidlinux.eu/builders/x86_64_builder/builds/10520/steps/shell_3/logs/stdio
CXXFLAGS="$CFLAGS -fpermissive"
2014-01-24 10:49:32 +00:00
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 \
--enable-external-libraries \
--with-ffmpeg=shared
2014-01-24 10:49:32 +00:00
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
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
rm -rf ${DESTDIR}/usr/include
2014-10-13 09:16:14 +00:00
vsv xbmc-standalone
2014-01-24 10:49:32 +00:00
}