# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: 2002/11/10 16:30:21 jmarcet Exp $ IUSE="" S=${WORKDIR}/${P} DESCRIPTION="Homebrew PVR project for analog TV cards" SRC_URI="http://www.mythtv.org/mc/${P}.tar.bz2" HOMEPAGE="http://www.mythtv.org/" SLOT="0" LICENSE="GPL-2" KEYWORDS="x86" DEPEND=">=media-libs/freetype-2.0* media-sound/lame media-libs/a52dec >=x11-libs/qt-3* dev-db/mysql virtual/x11 dev-perl/xmltv" src_unpack() { local MARCH_FLAG="" unpack ${A} for i in `grep -l -r 'usr/local' ${S}` do cp -a ${i} ${i}.orig sed -e "s:\/usr\/local:\/usr:" ${i}.orig > ${i} rm -f ${i}.orig done for x in ${CFLAGS} do if [ "${x/march}" != "${x}" ] then MARCH_FLAG="${x/-march=}" break fi done cp -a ${S}/settings.pro ${S}/settings.pro.orig sed -e "s:pentiumpro:${MARCH_FLAG}:" \ ${S}/settings.pro.orig > ${S}/settings.pro rm -f ${S}/settings.pro.orig } src_compile() { econf \ --prefix=/usr \ --enable-a52bin \ --enable-shared || die make || die } src_install() { make \ INSTALL_ROOT=${D} \ install || die exeinto /usr/share/${PN} doexe ${S}/setup/setup dodir /usr/share/${PN}/database insinto /usr/share/${PN}/database doins ${S}/database/* dodoc AUTHORS FAQ README* UPGRADING keys.txt } pkg_postinst() { einfo "If this is the first time you install MythTV," einfo "you need to add /usr/share/mythtv/database/mc.sql" einfo "to your mysql database." einfo einfo "You might run 'mysql < /usr/share/mythtv/database/mc.sql'" einfo einfo "If you're not in the US/Canada, you need to edit" einfo "/usr/share/mythtv/settings.txt and edit at least the very" einfo "first setting -- XMLTVGrab. Change this to the appropriate" einfo "xmltv grabber." einfo einfo "Next, you need to run the /usr/share/mythtv/setup program." einfo "It will ask you some questions about your hardware, and" einfo "then run xmltv's grabber to configure your channels." einfo einfo "If you're upgrading from an older version and for more" einfo "setup and usage instructions, please refer to" einfo "/usr/share/mythtv/README.gz" }