111 lines
4 KiB
Bash
111 lines
4 KiB
Bash
# Template file for 'kodi-rpi'
|
|
pkgname=kodi-rpi
|
|
version=14.2
|
|
revision=1
|
|
wrksrc="xbmc-${version}-Helix"
|
|
short_desc="A software media player and entertainment hub for digital media (RPi)"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
homepage="http://www.kodi.tv"
|
|
license="GPL-2"
|
|
distfiles="https://github.com/xbmc/xbmc/archive/${version}-Helix.tar.gz"
|
|
checksum=d9cb8590430a925fb789a5beb4da2695cdcd2d2500dd31126f3b77b31aa267f4
|
|
|
|
only_for_archs="armv6l armv7l"
|
|
# 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 gettext-devel libltdl-devel python-devel libmysqlclient-devel
|
|
SDL_image-devel lzo-devel openjdk-jre"
|
|
makedepends="
|
|
libudev-devel pcre-devel expat-devel libpng-devel libjpeg-turbo-devel
|
|
avahi-libs-devel alsa-lib-devel samba-devel tiff-devel libmysqlclient-devel
|
|
libmpeg2-devel wavpack-devel zlib-devel lzo-devel fribidi-devel sqlite-devel freetype-devel
|
|
jasper-devel faac-devel faad2-devel libmodplug-devel libressl-devel libass-devel
|
|
libmad-devel fontconfig-devel libsamplerate-devel libmms-devel libcurl-devel ffmpeg-devel
|
|
enca-devel boost-devel libbluetooth-devel yajl-devel libplist-devel librtmp-devel
|
|
tinyxml-devel taglib-devel libcap-devel lame-devel libnfs-devel libxslt-devel
|
|
libcec-devel libmicrohttpd-devel libcdio-devel python-devel libssh-devel rpi-firmware"
|
|
|
|
# The following dependencies are dlopen(3)ed.
|
|
depends="libmad libogg libcurl libflac libmodplug libass libmpeg2 lame
|
|
librtmp libnfs>=1.9.7 libplist>=1.12 libssh"
|
|
depends+=" hicolor-icon-theme desktop-file-utils"
|
|
|
|
provides="kodi-${version}_${revision} xbmc-${version}_${revision}"
|
|
replaces="xbmc>=0 kodi>=0"
|
|
|
|
# Create xbmc system user to launch xbmc-standalone.
|
|
system_accounts="xbmc"
|
|
xbmc_homedir="/var/lib/xbmc"
|
|
xbmc_groups="audio,input,video"
|
|
|
|
pre_configure() {
|
|
# remove lsb_release dependency
|
|
sed -i -e 's:/usr/bin/lsb_release -d:echo Void:' xbmc/utils/SystemInfo.cpp
|
|
|
|
. /etc/profile.d/10_openjdk.sh
|
|
./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
|
|
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"
|
|
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 \
|
|
--disable-optical-drive \
|
|
--disable-libbluray \
|
|
--with-platform=raspberry-pi \
|
|
--enable-gles \
|
|
--enable-optimizations \
|
|
--enable-libcec \
|
|
--enable-player=omxplayer \
|
|
--enable-external-libraries \
|
|
--with-ffmpeg=shared
|
|
|
|
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
|
|
|
|
# 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
|
|
|
|
vinstall ${FILESDIR}/polkit.rules 0644 etc/polkit-1/rules.d 10-xbmc.rules
|
|
rm -rf ${DESTDIR}/usr/include
|
|
|
|
vsv xbmc-standalone
|
|
}
|