[mythtv] ebuild for mythtv-cvs
Simon Kenyon
simon at koala.ie
Thu Apr 28 00:47:59 UTC 2005
i've taken the ebuild for 0.18 and modified it slightly:
- get the source from cvs
- tried to remove as much cruft from the ebuild a possible
- added support for additional USE flags (debug, profile)
- let the configure script do its job
- removed some fixes for old bugs
- moved all work back into the ebuild and no the eclass
i will need to factor stuff back out to the eclass when i have all the plugins
done.
to use it, install in /usr/local/portage/media-tv/mythtv-cvs and create the
digest. if this doesn't mean anything to you, either go learn some more about
gentoo ebuilds or don't use it.
it appears to have built mythtv and installed it correctly
do not want to run it tonight on my backend because i'm currently recording
something. will try tomorrow when i've written the equiv for mythmusic et al.
hope this of use to somebody. i will of course answer questions about it.
regards
--
simon
-------------- next part --------------
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit cvs flag-o-matic eutils multilib versionator toolchain-funcs
ECLASS=myth-cvs
INHERITED="${INHERITED} ${ECLASS}"
ECVS_SERVER="cvs.mythtv.org:/var/lib/mythcvs"
ECVS_USER="mythtv"
ECVS_PASS="mythtv"
_MODULE=${PN/-cvs/}
ECVS_MODULE=${_MODULE/frontend/tv}
ECVS_TOP_DIR="${DISTDIR}/cvs-src/${PN}"
DESCRIPTION="Homebrew PVR project"
HOMEPAGE="http://www.mythtv.org/"
S=${WORKDIR}/${ECVS_MODULE}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="alsa altivec arts cle266 debug directfb dvb ieee1394 jack joystick lcd
lirc nls nvidia oggvorbis opengl oss profile xv X directx ieee1394" # mmx"
DEPEND=">=media-libs/freetype-2.0
>=media-sound/lame-3.93.1
>=x11-libs/qt-3.1
dev-db/mysql
alsa? ( >=media-libs/alsa-lib-0.9 )
>=sys-apps/sed-4
arts? ( kde-base/arts )
directfb? ( dev-libs/DirectFB )
dvb? ( media-libs/libdvb )
lirc? ( app-misc/lirc )
nvidia? ( media-video/nvidia-glx )
jack? ( media-sound/jack-audio-connection-kit )
ieee1394? ( sys-libs/libraw1394 )
lcd? ( app-misc/lcdproc )
oggvorbis? ( media-libs/libvorbis )
opengl? ( virtual/opengl )
|| ( >=net-misc/wget-1.9.1 >=media-tv/xmltv-0.5.34 )"
RDEPEND="${DEPEND}
!media-tv/mythtv
!media-tv/mythfrontend
!media-tv/mythfrontend-cvs"
pkg_setup() {
if ! built_with_use x11-libs/qt mysql ; then
eerror "Qt is missing MySQL support. Please add"
eerror "'mysql' to your USE flags, and re-emerge Qt."
die "Qt needs MySQL support"
fi
if use ieee1394; then
echo
ewarn "If you want to USE ieee1394, you need to install libiec61883"
ewarn "which is not available in Portage at this time. Do this at your"
ewarn "own risk. No Support provided."
echo
fi
if use nvidia; then
echo
ewarn "You enabled the 'nvidia' USE flag, you must have a GeForce 4 or"
ewarn "greater to use this. Otherwise, you'll have crashes with MythTV"
echo
fi
}
src_unpack() {
cvs_src_unpack ${A} ; cd ${S}
if ! use nls ; then
sed -e "s:i18n::" -i mythtv.pro || die "Disable i18n failed"
fi
cd ${S}
}
src_compile() {
use cle266 && use nvidia && die "You can not have USE="cle266" and USE="nvidia" at the same time. Must disable one or the other."
use debug && use profile && die "You can not have USE="debug" and USE="profile" at the same time. Must disable one or the other."
local myconf
use debug && myconf="${myconf} --compile-type=debug"
use profile && myconf="${myconf} --compile-type=profile"
econf ${myconf} \
$(use_enable alsa audio-alsa) \
$(use_enable altivec) \
$(use_enable arts audio-arts) \
$(use_enable cle266 xvmc-vld) \
$(use_enable directfb) \
$(use_enable directx) \
$(use_enable dvb) \
$(use_enable dvb dvb-eit) \
$(use_enable ieee1394 firewire) \
$(use_enable jack audio-jack) \
$(use_enable joystick joystick-menu) \
$(use_enable lirc) \
$(use_enable nvidia xvmc) \
$(use_enable oggvorbis vorbis) \
$(use_enable opengl opengl-vsync) \
$(use_enable oss audio-oss) \
$(use_enable xv) \
$(use_enable X x11) \
|| die "Error: econf failed!"
qmake -o "Makefile" "${S}/mythtv.pro"
emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" "${@}" || die
}
src_install() {
einstall INSTALL_ROOT="${D}"
for doc in AUTHORS COPYING FAQ UPGRADING ChangeLog README; do
test -e "${doc}" && dodoc ${doc}
done
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
}
More information about the mythtv-dev
mailing list