2015-02-06 16:31:29 +01:00
|
|
|
# Template file for 'kodi-rpi'
|
|
|
|
pkgname=kodi-rpi
|
2015-03-29 06:20:47 +02:00
|
|
|
version=14.2
|
|
|
|
revision=1
|
2015-02-06 16:31:29 +01:00
|
|
|
wrksrc="xbmc-${version}-Helix"
|
|
|
|
short_desc="A software media player and entertainment hub for digital media (RPi)"
|
2015-04-10 09:16:30 +02:00
|
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
2015-02-06 16:31:29 +01:00
|
|
|
homepage="http://www.kodi.tv"
|
2014-01-24 11:49:32 +01:00
|
|
|
license="GPL-2"
|
2015-02-06 16:31:29 +01:00
|
|
|
distfiles="https://github.com/xbmc/xbmc/archive/${version}-Helix.tar.gz"
|
2015-03-29 06:20:47 +02:00
|
|
|
checksum=d9cb8590430a925fb789a5beb4da2695cdcd2d2500dd31126f3b77b31aa267f4
|
2014-01-24 11:49:32 +01:00
|
|
|
|
2015-02-06 14:54:16 +01:00
|
|
|
only_for_archs="armv6l armv7l"
|
2014-01-24 11:49:32 +01: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 16:16:35 +02:00
|
|
|
swig gettext-devel libltdl-devel python-devel libmysqlclient-devel
|
2014-10-09 10:23:46 +02:00
|
|
|
SDL_image-devel lzo-devel openjdk-jre"
|
2014-01-24 11:49:32 +01:00
|
|
|
makedepends="
|
2015-03-27 10:50:40 +01:00
|
|
|
libudev-devel pcre-devel expat-devel libpng-devel libjpeg-turbo-devel
|
|
|
|
avahi-libs-devel alsa-lib-devel samba-devel tiff-devel libmysqlclient-devel
|
2014-01-24 11:49:32 +01:00
|
|
|
libmpeg2-devel wavpack-devel zlib-devel lzo-devel fribidi-devel sqlite-devel freetype-devel
|
2015-03-27 10:50:40 +01:00
|
|
|
jasper-devel faac-devel faad2-devel libmodplug-devel libressl-devel libass-devel
|
2015-02-06 16:31:29 +01:00
|
|
|
libmad-devel fontconfig-devel libsamplerate-devel libmms-devel libcurl-devel ffmpeg-devel
|
2015-03-27 10:50:40 +01:00
|
|
|
enca-devel boost-devel libbluetooth-devel yajl-devel libplist-devel librtmp-devel
|
|
|
|
tinyxml-devel taglib-devel libcap-devel lame-devel libnfs-devel libxslt-devel
|
2014-08-23 16:16:35 +02:00
|
|
|
libcec-devel libmicrohttpd-devel libcdio-devel python-devel libssh-devel rpi-firmware"
|
2015-02-06 16:36:59 +01:00
|
|
|
|
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
|
2015-03-12 11:23:20 +01:00
|
|
|
librtmp libnfs>=1.9.7 libplist>=1.12 libssh"
|
2014-02-28 12:03:50 +01:00
|
|
|
depends+=" hicolor-icon-theme desktop-file-utils"
|
2014-01-24 11:49:32 +01:00
|
|
|
|
2015-02-06 16:31:29 +01:00
|
|
|
provides="kodi-${version}_${revision} xbmc-${version}_${revision}"
|
|
|
|
replaces="xbmc>=0 kodi>=0"
|
2015-02-06 16:36:59 +01:00
|
|
|
|
2014-01-24 11:49:32 +01:00
|
|
|
# Create xbmc system user to launch xbmc-standalone.
|
|
|
|
system_accounts="xbmc"
|
|
|
|
xbmc_homedir="/var/lib/xbmc"
|
2014-08-23 16:16:35 +02:00
|
|
|
xbmc_groups="audio,input,video"
|
2014-01-24 11:49:32 +01:00
|
|
|
|
|
|
|
pre_configure() {
|
2015-03-29 06:20:47 +02:00
|
|
|
# remove lsb_release dependency
|
|
|
|
sed -i -e 's:/usr/bin/lsb_release -d:echo Void:' xbmc/utils/SystemInfo.cpp
|
|
|
|
|
2014-10-09 10:23:46 +02:00
|
|
|
. /etc/profile.d/10_openjdk.sh
|
2014-01-24 11:49:32 +01: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() {
|
2014-10-09 10:23:46 +02:00
|
|
|
. /etc/profile.d/10_openjdk.sh
|
2014-01-24 11:49:32 +01: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"
|
2015-03-14 11:31:01 +01:00
|
|
|
# XXX http://build.voidlinux.eu/builders/x86_64_builder/builds/10520/steps/shell_3/logs/stdio
|
|
|
|
CXXFLAGS="$CFLAGS -fpermissive"
|
2014-01-24 11:49:32 +01: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 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 \
|
2015-02-06 16:31:29 +01:00
|
|
|
--enable-player=omxplayer \
|
|
|
|
--enable-external-libraries \
|
|
|
|
--with-ffmpeg=shared
|
2014-01-24 11:49:32 +01: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
|
|
|
|
|
2015-03-29 06:20:47 +02:00
|
|
|
# lsb_release fix
|
|
|
|
sed -i -e 's/which lsb_release > \/dev\/null/\[ -f \/etc\/os-release ]/g' ${DESTDIR}/usr/bin/kodi
|
|
|
|
sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/echo Void/g" ${DESTDIR}/usr/bin/kodi
|
2014-01-24 11:49:32 +01:00
|
|
|
|
|
|
|
vinstall ${FILESDIR}/polkit.rules 0644 etc/polkit-1/rules.d 10-xbmc.rules
|
2015-02-06 16:31:29 +01:00
|
|
|
rm -rf ${DESTDIR}/usr/include
|
|
|
|
|
2014-10-13 11:16:14 +02:00
|
|
|
vsv xbmc-standalone
|
2014-01-24 11:49:32 +01:00
|
|
|
}
|