# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-tv/mythtv/mythtv-0.16.ebuild,v 1.9 2004/12/05 00:46:13 iggy Exp $ inherit myth flag-o-matic eutils DESCRIPTION="Homebrew PVR project" HOMEPAGE="http://www.mythtv.org/" SRC_URI="http://www.mythtv.org/mc/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86 ~amd64" IUSE="alsa arts dvb directfb lcd lirc nvidia cle266 opengl X xv oss debug mmx nls" DEPEND=">=media-libs/freetype-2.0 >=media-sound/lame-3.93.1 X? ( >=x11-libs/qt-3.1 ) directfb? ( dev-libs/DirectFB >=x11-libs/qt-embedded-3.1 ) dev-db/mysql alsa? ( >=media-libs/alsa-lib-0.9 ) >=sys-apps/sed-4 arts? ( kde-base/arts ) dvb? ( media-libs/libdvb ) lcd? ( app-misc/lcdproc ) lirc? ( app-misc/lirc ) nvidia? ( media-video/nvidia-glx ) cle266? ( media-libs/libddmpeg ) || ( >=net-misc/wget-1.9.1 >=media-tv/xmltv-0.5.34 )" RDEPEND="${DEPEND} !media-tv/mythfrontend" pkg_setup() { if use X; then QTP=x11-libs/qt elif use directfb; then QTP=x11-libs/qt-embedded else eerror "You must have either X or directfb in USE" die "No QT library selected" fi local qt_use="$(' ${S}/libs/libmythtv/dvbdiseqc.cpp } src_compile() { export QMAKESPEC="linux-g++" econf || die sed -i -e "s:OPTFLAGS=.*:OPTFLAGS=${CFLAGS}:g" config.mak qmake -o "Makefile" "${PN}.pro" make qmake || die emake -C libs/libavcodec || die emake -C libs/libavformat || die emake -C libs/libmyth || die emake -C libs/libmythtv || die emake -C libs || die emake || die } src_install() { myth_src_install newbin "setup/setup" "mythsetup" dodir /etc/mythtv mv "${D}/usr/share/mythtv/mysql.txt" "${D}/etc/mythtv" dosym /etc/mythtv/mysql.txt /usr/share/mythtv/mysql.txt insinto /usr/share/mythtv/database doins database/* exeinto /usr/share/mythtv doexe "${FILESDIR}/mythfilldatabase.cron" exeinto /etc/init.d newexe "${FILESDIR}/mythbackend.rc6" mythbackend insinto /etc/conf.d newins "${FILESDIR}/mythbackend.conf" mythbackend dodoc keys.txt docs/*.{txt,pdf} dohtml docs/*.html keepdir /var/{log,run}/mythtv }