# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_PV=${PV/_/-} MY_P=${PN}-${MY_PV} S=${WORKDIR}/${MY_P} DESCRIPTION="Menu system for easy movie and audio playback and image viewing." HOMEPAGE="http://mymediasystem.org" #SRC_URI="http://mms.sunsite.dk/${PN}-1.1.0-rc1.tar.bz2" SRC_URI="http://mms.sunsite.dk/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" IUSE="boost cpudetection debug dvb dxr3 epg evdev game gstreamer imms inotify lcd lirc opengl plugins radio svga sdl xine tv X" RDEPEND="sys-devel/gettext sys-devel/libtool media-libs/imlib2 media-libs/taglib dev-cpp/commoncpp2 dev-libs/libpcre dev-libs/glib dev-db/sqlite sys-libs/ncurses sys-apps/eject boost? ( >=dev-libs/boost-1.34 ) gstreamer? ( media-plugins/gst-plugins-alsa ) xine? ( media-video/xine-ui ) !xine? ( media-video/mplayer ) !gstreamer? ( !xine? ( media-sound/alsaplayer) ) evdev? ( x11-drivers/xf86-input-evdev ) plugins? ( dev-lang/python ) inotify? ( sys-fs/inotify-tools ) lirc? ( app-misc/lirc ) lcd? ( app-misc/lcdproc ) svga? ( media-libs/svgalib ) sdl? ( media-libs/libsdl ) opengl? ( virtual/opengl ) dxr3? ( media-video/em8300-libraries ) X? ( x11-base/xorg-x11 ) epg? ( media-tv/xmltv dev-libs/libxml2 )" DEPEND="${RDEPEND} sys-devel/autoconf sys-devel/automake" src_unpack() { unpack ${A} cd "${S}" } src_compile() { # enabled by default: fancylook for audio,movie & game local myconf if ! use epg then myconf="${myconf} --disable-epg" else myconf="${myconf} --enable-picture-epg" fi if use xine then myconf="${myconf} --enable-xine-audio --disable-alsaplayer" elif use gstreamer then myconf="${myconf} --enable-gst-audio --disable-alsaplayer" fi ( ! use cpudetection ) \ && myconf="${myconf} --disable-optimization" ( use debug ) \ && myconf="${myconf} --enable-debug" ( use dvb ) \ && myconf="${myconf} --enable-dvb" ( use dxr3 ) \ && myconf="${myconf} --enable-dxr3" ( use evdev ) \ && myconf="${myconf} --enable-evdev" ( ! use inotify) \ && myconf="${myconf} --disable-inotify" ( use game) \ && myconf="${myconf} --enable-game" ( ! use imms ) \ && myconf="${myconf} --disable-imms" ( use lcd ) \ && myconf="${myconf} --enable-lcd" ( use lirc ) \ && myconf="${myconf} --enable-lirc" ( use opengl ) \ && myconf="${myconf} --enable-opengl" ( use plugins ) \ && myconf="${myconf} --enable-python" ( ! use radio) \ && myconf="${myconf} --disable-radio" ( ! use sdl ) \ && myconf="${myconf} --disable-sdl" ( ! use X ) \ && myconf="${myconf} --disable-x11-sdl" ( use svga ) \ && myconf="${myconf} --enable-vgagl" ( use tv) \ && myconf="${myconf} --enable-tv" # ( use gstreamer) \ # && myconf="${myconf} --enable-gst-audio" # ( use xine) \ # && myconf="${myconf} --enable-xine-audio" # if use xine use gstreamer; then # myconf="${myconf} --disable-alsaplayer" echo $myconf ./configure --prefix=/usr \ ${myconf} || die sed -i 's/"tinyxml.h"/"..\/tinyxml\/tinyxml.h"/' plugins/feature/audio/lyrics.cpp sed -i 's/"tinystr.h"/"..\/tinyxml\/tinystr.h"/' plugins/feature/audio/lyrics.cpp sed -i 's/"tinyxml.h"/"..\/tinyxml\/tinyxml.h"/' plugins/feature/audio/shoutcast.cpp sed -i 's/"tinystr.h"/"..\/tinyxml\/tinystr.h"/' plugins/feature/audio/shoutcast.cpp emake -j1 || die } src_install() { emake DESTDIR="${D}" install || die "Failed to install mms!" dodoc doc/LICENSE doc/README } pkg_postinst() { einfo "Be sure to change Configs in /etc/mms to your needs" einfo "You also need to place a TV.xml file in /etc/mms for epg to work" einfo einfo "Documentation is available online: http://wiki.mymediasystem.org" einfo # if use evdev && ! linux_chkconfig_present INPUT_EVDEV ; then # ewarn "You must enable INPUT_EVDEV in your kernel to use EVDEV!" # ewarn # ewarn " Device Drivers" # ewarn " Input device support" # ewarn " <*>/ Event interface" # ewarn # fi if use game ; then einfo "You have enabled the game Use-Flag" einfo "You can choose from the following Emulators:" einfo " games-emulation/xmame - Multiple Arcade Machine Emulator" einfo " games-emulation/zsnes - SNES (Super Nintendo) emulator" einfo " games-emulation/epsxe - ePSXe PlayStation Emulator" einfo fi }