xbmc-rpi: optimize png files; drop udisks/upower optional deps.

This commit is contained in:
Juan RP 2014-02-28 12:03:50 +01:00
parent 67698e712b
commit 5403b17216
1 changed files with 19 additions and 9 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'xbmc-rpi'
pkgname=xbmc-rpi
version=12.3
revision=1
revision=2
patch_args="-Np1"
wrksrc="xbmc-${version}-Frodo"
short_desc="XBMC Media Center for the Raspberry Pi"
@ -18,12 +18,10 @@ if [ "$XBPS_MACHINE" != "i686" -a "$XBPS_MACHINE" != "x86_64" ]; then
msg_error "${pkgname}-${version}: can only be cross built on x86."
fi
#broken_as_needed=yes
hostmakedepends="
automake libtool pkg-config gperf cmake zip unzip nasm yasm
swig jre which gettext-devel libltdl-devel python-devel libmysqlclient-devel
SDL_image-devel lzo-devel"
SDL_image-devel lzo-devel optipng"
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
@ -34,10 +32,10 @@ makedepends="
tinyxml-devel taglib-devel libcap-devel lame-devel libnfs-devel systemd-devel
libcec-devel libbluray-devel libmicrohttpd-devel libcdio-devel python-devel
libdvdread-devel libssh-devel rpi-firmware"
makedepends+=" udisks2 upower hicolor-icon-theme desktop-file-utils"
makedepends+=" hicolor-icon-theme desktop-file-utils"
# The following dependencies are dlopen(3)ed.
depends="libbluray libmad libogg libcurl libflac libmodplug libass libmpeg2 lame librtmp libnfs libplist"
depends+=" udisks2 upower hicolor-icon-theme desktop-file-utils"
depends+=" hicolor-icon-theme desktop-file-utils"
provides="xbmc-${version}_${revision}"
# Create xbmc system user to launch xbmc-standalone.
@ -46,7 +44,7 @@ xbmc_homedir="/var/lib/xbmc"
xbmc_groups="audio,video"
pre_configure() {
. /etc/profile.d/jre.sh
. /etc/profile.d/java.sh
./bootstrap
# fix lsb_release dependency
@ -55,10 +53,22 @@ pre_configure() {
# 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
# 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
}
do_configure() {
. /etc/profile.d/jre.sh
. /etc/profile.d/java.sh
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"
@ -70,7 +80,6 @@ do_configure() {
./configure ${configure_args} \
--disable-gl \
--enable-gles \
--disable-sdl \
--disable-x11 \
--disable-xrandr \
@ -84,6 +93,7 @@ do_configure() {
--disable-pulse \
--disable-projectm \
--with-platform=raspberry-pi \
--enable-gles \
--enable-dvdcss \
--enable-optical-drive \
--enable-libbluray \