2015-03-31 05:40:41 +00:00
|
|
|
# Contributor Oleg Rakhmanov <oleg [at] archlinuxarm [dot] com>
|
2012-09-20 14:27:56 +00:00
|
|
|
# Contributor tomasgroth at yahoo.dk
|
|
|
|
# Contributor WarheadsSE <max@warheads.net>
|
2015-12-06 14:56:10 +00:00
|
|
|
# Contributor Adrian Fedoreanu <adrian [dot] fedoreanu [at] gmail [dot] com>
|
2013-06-12 04:52:38 +00:00
|
|
|
|
2015-02-05 00:16:53 +00:00
|
|
|
buildarch=20
|
2012-09-20 14:27:56 +00:00
|
|
|
|
2015-03-31 05:40:41 +00:00
|
|
|
_prefix=/usr
|
|
|
|
|
|
|
|
pkgbase=kodi-rbp-git
|
|
|
|
pkgname=('kodi-rbp-git' 'kodi-rbp-git-eventclients')
|
2017-01-04 06:36:57 +00:00
|
|
|
pkgver=17.0rc2.20170101
|
2015-03-31 05:40:41 +00:00
|
|
|
|
2017-01-04 06:36:57 +00:00
|
|
|
_tag=17.0rc2-Krypton
|
2017-01-10 08:19:50 +00:00
|
|
|
pkgrel=2
|
2012-09-20 14:27:56 +00:00
|
|
|
pkgdesc="A software media player and entertainment hub for digital media for the Raspberry Pi"
|
2015-03-31 05:40:41 +00:00
|
|
|
arch=('armv6h' 'armv7h')
|
2014-11-19 05:48:23 +00:00
|
|
|
url="http://kodi.tv"
|
2015-03-31 05:40:41 +00:00
|
|
|
license=('GPL2')
|
|
|
|
makedepends=('hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio'
|
|
|
|
'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd'
|
|
|
|
'sdl_image' 'python2' 'python2-pillow' 'python2-pybluez' 'python2-simplejson' 'libass'
|
|
|
|
'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray'
|
|
|
|
'libnfs' 'afpfs-ng' 'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware' 'libcec-rpi'
|
2016-05-10 18:29:54 +00:00
|
|
|
'libplist' 'swig' 'taglib' 'libxslt' 'shairplay' 'boost' 'cmake' 'gperf' 'nasm' 'zip'
|
2016-09-17 23:47:54 +00:00
|
|
|
'udisks' 'upower' 'git' 'autoconf' 'java-environment' 'libcrossguid-git' 'dcadec' 'libpulse')
|
2016-11-05 07:22:38 +00:00
|
|
|
source=("xbmc-$_tag.tar.gz::https://github.com/xbmc/xbmc/archive/$_tag.tar.gz"
|
2015-11-20 12:06:38 +00:00
|
|
|
'kodi.service'
|
2016-11-01 07:29:16 +00:00
|
|
|
'99-kodi.rules'
|
2016-11-24 05:42:20 +00:00
|
|
|
'https://github.com/popcornmix/xbmc/commit/0c320b6cdd4fb409be45008e6b9042463d54b742.patch'
|
|
|
|
'https://github.com/popcornmix/xbmc/commit/4d983105d7fd65b1d92f2ae2602e6e1cdcaddbe0.patch'
|
2016-09-17 23:47:54 +00:00
|
|
|
'polkit.rules')
|
2017-01-04 06:36:57 +00:00
|
|
|
sha256sums=('6bd03e0e26251972c2237d5ca25ab3c292f9a88e4ee02b798d9f89360e8ac522'
|
2015-03-31 05:40:41 +00:00
|
|
|
'5235068d5800d69f0287087815990e7fe8d6572733d60c8800546d35f608e87f'
|
2016-11-22 08:08:59 +00:00
|
|
|
'b31570f95654434b01fd8531612fbb6be77cbc1c519dd60f92feae26eb160f3d'
|
2016-11-24 05:42:20 +00:00
|
|
|
'813f8c622c341eefb33774115199d2abe9c189cf2ce52e79719dbd42d48a1274'
|
|
|
|
'd830c010ead152bc9a9ba6b812c985d6e649bda7480fec9b3c451f5ea03ba792'
|
2016-09-17 23:47:54 +00:00
|
|
|
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96')
|
|
|
|
|
2013-04-08 18:51:48 +00:00
|
|
|
prepare() {
|
2016-11-05 07:22:38 +00:00
|
|
|
cd "$srcdir/xbmc-$_tag"
|
2015-03-31 05:40:41 +00:00
|
|
|
|
2016-11-24 05:42:20 +00:00
|
|
|
# ffmpeg: Automatic switch to software decode for GMC with more than one warp point
|
|
|
|
patch -Np1 -i "$srcdir/0c320b6cdd4fb409be45008e6b9042463d54b742.patch"
|
|
|
|
# hacky fix for files with GMC
|
|
|
|
patch -Np1 -i "$srcdir/4d983105d7fd65b1d92f2ae2602e6e1cdcaddbe0.patch"
|
|
|
|
|
2015-03-31 05:40:41 +00:00
|
|
|
find -type f -name *.py -exec sed 's|^#!.*python$|#!/usr/bin/python2|' -i "{}" +
|
|
|
|
sed 's|^#!.*python$|#!/usr/bin/python2|' -i tools/depends/native/rpl-native/rpl
|
2016-11-01 07:29:16 +00:00
|
|
|
sed 's/python/python2/' -i tools/Linux/kodi.sh.in
|
2015-03-31 05:40:41 +00:00
|
|
|
sed 's/shell python/shell python2/' -i tools/EventClients/Makefile.in
|
|
|
|
# disable wiiremote due to incompatibility with bluez-5.29
|
|
|
|
sed '/WiiRemote/d' -i tools/EventClients/Makefile.in
|
|
|
|
sed '/mkdir -p $(DESTDIR)$(bindir)/i \
|
|
|
|
install:' -i tools/EventClients/Makefile.in
|
2016-05-15 08:54:56 +00:00
|
|
|
|
2013-04-08 18:51:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2016-11-05 07:22:38 +00:00
|
|
|
cd "$srcdir/xbmc-$_tag"
|
2012-09-20 14:27:56 +00:00
|
|
|
|
2015-03-31 05:40:41 +00:00
|
|
|
# Bootstrapping
|
|
|
|
MAKEFLAGS=-j1 ./bootstrap
|
2012-09-20 14:27:56 +00:00
|
|
|
|
2015-03-31 05:40:41 +00:00
|
|
|
# Configuring Kodi
|
2012-09-20 14:27:56 +00:00
|
|
|
export PYTHON_VERSION=2 # external python v2
|
|
|
|
# we need to compile for armv6 instead of armv5 to avoid problems compiling assembler code
|
2016-01-13 21:35:19 +00:00
|
|
|
FLAGS="-Ofast -fexcess-precision=fast -mfloat-abi=hard -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4 -D_GLIBCXX_USE_CXX11_ABI=1 \
|
2015-08-21 04:28:35 +00:00
|
|
|
-I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
2015-02-10 05:36:41 +00:00
|
|
|
[[ $CARCH == "armv6h" ]] && export CFLAGS="$FLAGS -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp" && export CXXFLAGS="$FLAGS -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp"
|
2015-02-05 00:16:53 +00:00
|
|
|
[[ $CARCH == "armv7h" ]] && export CFLAGS="$FLAGS -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad" && export CXXFLAGS="$FLAGS -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad"
|
|
|
|
|
2012-09-20 14:27:56 +00:00
|
|
|
export LDFLAGS="$LDFLAGS -L/opt/vc/lib"
|
2015-03-31 05:40:41 +00:00
|
|
|
|
2014-09-22 05:42:32 +00:00
|
|
|
# If build fails try uncommenting the line below first
|
2015-03-31 05:40:41 +00:00
|
|
|
# export MAKEFLAGS="-j1"
|
2015-11-07 20:34:05 +00:00
|
|
|
|
2012-09-20 14:27:56 +00:00
|
|
|
./configure --prefix=$_prefix --exec-prefix=$_prefix \
|
2013-12-30 05:21:53 +00:00
|
|
|
--with-platform=raspberry-pi \
|
|
|
|
--disable-gl \
|
|
|
|
--enable-gles \
|
|
|
|
--disable-x11 \
|
|
|
|
--disable-vaapi \
|
|
|
|
--disable-vdpau \
|
|
|
|
--disable-debug \
|
|
|
|
--disable-mid \
|
2015-02-01 06:10:38 +00:00
|
|
|
--enable-player=omxplayer \
|
2015-03-31 05:40:41 +00:00
|
|
|
--with-lirc-device=/run/lirc/lircd \
|
|
|
|
ac_cv_lib_bluetooth_hci_devid=no
|
2012-09-20 14:27:56 +00:00
|
|
|
make
|
|
|
|
}
|
|
|
|
|
2015-03-31 05:40:41 +00:00
|
|
|
package_kodi-rbp-git() {
|
|
|
|
pkgdesc="A software media player and entertainment hub for digital media (Raspberry Pi)"
|
|
|
|
|
|
|
|
# depends expected for kodi plugins:
|
|
|
|
# 'python2-pillow' 'python2-pybluez' 'python2-simplejson'
|
|
|
|
# depends expeced in FEH.py
|
|
|
|
# 'mesa-demos' 'xorg-xdpyinfo'
|
|
|
|
depends=('hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio'
|
|
|
|
'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd'
|
|
|
|
'sdl_image' 'python2' 'python2-pillow' 'python2-pybluez' 'python2-simplejson' 'libass'
|
|
|
|
'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray'
|
2017-01-10 08:19:50 +00:00
|
|
|
'libnfs' 'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware'
|
2016-05-10 18:29:54 +00:00
|
|
|
'libplist' 'swig' 'taglib' 'libxslt' 'shairplay' 'libcrossguid-git')
|
2015-03-31 05:40:41 +00:00
|
|
|
|
|
|
|
optdepends=(
|
|
|
|
'afpfs-ng: Apple shares support'
|
2017-01-10 08:19:50 +00:00
|
|
|
'libcec-rpi: Pulse-Eight USB-CEC adapter support'
|
2015-03-31 05:40:41 +00:00
|
|
|
'lirc: remote controller support'
|
|
|
|
'polkit: permissions for automounting external drives and power management functionality'
|
|
|
|
'udisks: automount external drives'
|
|
|
|
'upower: used to trigger power management functionality'
|
|
|
|
'unrar: access compressed files without unpacking them'
|
|
|
|
'lsb-release: log distro information in crashlog')
|
|
|
|
|
2016-11-05 07:22:38 +00:00
|
|
|
install='kodi.install'
|
2015-03-31 05:40:41 +00:00
|
|
|
provides=('xbmc' 'kodi')
|
2016-05-10 18:29:54 +00:00
|
|
|
conflicts=('xbmc' 'kodi' 'arm-mem-git' 'shairplay-git')
|
2015-03-31 05:40:41 +00:00
|
|
|
replaces=('xbmc-rbp-git')
|
|
|
|
|
2016-11-05 07:22:38 +00:00
|
|
|
cd "$srcdir/xbmc-$_tag"
|
2012-09-20 14:27:56 +00:00
|
|
|
# Running make install
|
2016-11-05 07:22:38 +00:00
|
|
|
make DESTDIR="$pkgdir" install
|
2012-09-20 14:27:56 +00:00
|
|
|
|
2015-03-31 05:40:41 +00:00
|
|
|
# We will no longer support the xbmc name
|
|
|
|
rm "$pkgdir/usr/share/xsessions/xbmc.desktop"
|
|
|
|
rm "$pkgdir/usr/bin/"xbmc{,-standalone}
|
|
|
|
# we will leave /usr/{include,lib,share}/xbmc for now
|
2012-09-20 14:27:56 +00:00
|
|
|
|
|
|
|
# Licenses
|
2016-11-05 07:22:38 +00:00
|
|
|
install -dm0755 "$pkgdir$_prefix/share/licenses/$pkgname"
|
2012-09-20 14:27:56 +00:00
|
|
|
for licensef in LICENSE.GPL copying.txt; do
|
2016-11-05 07:22:38 +00:00
|
|
|
mv "$pkgdir$_prefix/share/doc/kodi/$licensef" "$pkgdir$_prefix/share/licenses/$pkgname"
|
2012-09-20 14:27:56 +00:00
|
|
|
done
|
|
|
|
|
2016-11-05 07:22:38 +00:00
|
|
|
install -Dm0644 "$srcdir/kodi.service" "$pkgdir/usr/lib/systemd/system/kodi.service"
|
|
|
|
install -Dm0644 "$srcdir/polkit.rules" "$pkgdir/usr/share/polkit-1/rules.d/10-kodi.rules"
|
|
|
|
chmod 0700 "$pkgdir/usr/share/polkit-1/rules.d/"
|
2016-11-01 07:29:16 +00:00
|
|
|
|
|
|
|
# fix permissions necessary for accelerated video playback
|
2016-11-05 07:22:38 +00:00
|
|
|
install -Dm0644 "$srcdir/99-kodi.rules" "$pkgdir/etc/udev/rules.d/99-kodi.rules"
|
2012-09-20 14:27:56 +00:00
|
|
|
}
|
2015-03-31 05:40:41 +00:00
|
|
|
|
|
|
|
package_kodi-rbp-git-eventclients() {
|
|
|
|
pkgdesc="Kodi Event Clients (Raspberry Pi)"
|
|
|
|
provides=('kodi-eventclients')
|
|
|
|
conflicts=('kodi-eventclients')
|
|
|
|
depends=('cwiid')
|
|
|
|
|
2016-11-05 07:22:38 +00:00
|
|
|
cd "$srcdir/xbmc-$_tag"
|
2015-03-31 05:40:41 +00:00
|
|
|
|
|
|
|
make DESTDIR="$pkgdir" eventclients WII_EXTRA_OPTS=-DCWIID_OLD
|
|
|
|
}
|