--- a/xbmc-12.1.ebuild 2013-05-24 23:15:29.545411575 +0200 +++ b/xbmc-12.2.ebuild 2013-05-24 23:15:18.845412522 +0200 @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-12.1.ebuild,v 1.4 2013/04/01 06:35:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-12.2.ebuild,v 1.4 2013/04/01 06:35:52 vapier Exp $ EAPI="4" @@ -9,7 +9,7 @@ PYTHON_DEPEND="2:2.6" PYTHON_USE_WITH=sqlite -inherit eutils python multiprocessing autotools +inherit eutils python multiprocessing autotools flag-o-matic case ${PV} in 9999) @@ -36,11 +36,12 @@ LICENSE="GPL-2" SLOT="0" -IUSE="airplay alsa altivec avahi bluetooth bluray caps cec css debug gles goom java joystick midi mysql neon nfs +opengl profile +projectm pulseaudio pvr +rsxs rtmp +samba +sdl sse sse2 sftp udev upnp +usb vaapi vdpau webserver +X +xrandr" +IUSE="airplay alsa altivec avahi bluetooth bluray caps cec +crystalhd css debug gles goom java joystick midi mysql +neon nfs non-free +opengl +openmax optical-drive profile +projectm pulseaudio pvr raspberrypi +rsxs rtmp +samba +sdl sse sse2 sftp udev upnp +usb vaapi +vdadecoder vdpau +vtbdecoder webserver +X +xrandr" REQUIRED_USE=" pvr? ( mysql ) rsxs? ( X ) xrandr? ( X ) + raspberrypi? ( !neon !alsa ) " COMMON_DEPEND="app-arch/bzip2 @@ -130,7 +132,8 @@ X? ( x11-proto/xineramaproto ) dev-util/cmake x86? ( dev-lang/nasm ) - java? ( virtual/jre )" + java? ( virtual/jre ) + raspberrypi? ( media-libs/raspberrypi-userland )" S=${WORKDIR}/${MY_P} @@ -188,6 +191,18 @@ # Tweak autotool timestamps to avoid regeneration find . -type f -print0 | xargs -0 touch -r configure + + if use raspberrypi ; then + sed -i -e 's/USE_BUILDROOT=1/USE_BUILDROOT=0/' \ + -e 's/sudo //g' \ + -e 's/\/opt\//${S}\/opt\//g' tools/rbp/setup-sdk.sh + sed -i 's/TOOLCHAIN=\/usr\/local\/bcm-gcc/TOOLCHAIN=\/usr/' tools/rbp/setup-sdk.sh + sed -i 's/cd $(SOURCE); $(CONFIGURE)/#cd $(SOURCE); $(CONFIGURE)/' tools/rbp/depends/xbmc/Makefile + ln -s ${S}/xbmc/guilib ${S}/lib/libsquish ${S}/xbmc/linux/PlatformDefs.h ${S}/xbmc/config.h ${S}/tools/TexturePacker/ + ln -s ${S}/xbmc/config.h ${S}/xbmc/utils/ + sh tools/rbp/setup-sdk.sh + make -C tools/rbp/depends/xbmc/ + fi } src_configure() { @@ -200,18 +215,34 @@ # Requiring java is asine #434662 export ac_cv_path_JAVA_EXE=$(which $(usex java java true)) + if use raspberrypi ; then + append-ldflags -L/opt/vc/lib + append-flags -I/opt/vc/include + fi + + local special_config + if use raspberrypi ; then + special_config="--with-platform=raspberry-pi \ + --enable-player=omxplayer \ + --enable-external-ffmpeg \ + --disable-x11" + else + special_config=$(use_enable X x11) + fi econf \ --docdir=/usr/share/doc/${PF} \ --disable-ccache \ - --disable-optimizations \ --enable-external-libraries \ - --enable-gl \ + $(use_enable raspberrypi optimizations) \ + ${special_config} \ $(use_enable airplay) \ + $(use_enable alsa) \ $(use_enable avahi) \ $(use_enable bluray libbluray) \ $(use_enable caps libcap) \ $(use_enable cec libcec) \ $(use_enable css dvdcss) \ + $(use_enable crystalhd) \ $(use_enable debug) \ $(use_enable gles) \ $(use_enable goom) \ @@ -221,7 +252,10 @@ $(use_enable mysql) \ $(use_enable neon) \ $(use_enable nfs) \ + $(use_enable non-free) \ $(use_enable opengl gl) \ + $(use_enable openmax) \ + $(use_enable optical-drive) \ $(use_enable profile profiling) \ $(use_enable projectm) \ $(use_enable pulseaudio pulse) \ @@ -235,9 +269,12 @@ $(use_enable upnp) \ $(use_enable vaapi) \ $(use_enable vdpau) \ + $(use_enable vdadecoder) \ + $(use_enable vtbdecoder) \ $(use_enable webserver) \ - $(use_enable X x11) \ $(use_enable xrandr) + sed -i 's/-msse2//' lib/libsquish/Makefile + sed -i 's/-DSQUISH_USE_SSE=2//' lib/libsquish/Makefile } src_install() {