diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2005-05-20 02:39:14 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2005-05-20 02:39:14 +0000 |
commit | 8d0a01ae2ff303b56ca0bc74b7639e8ba31caa1d (patch) | |
tree | 7c7d1172dbec988a03e44e5e31bde15f321ba48e /eclass | |
parent | rev bump; switch to new eclass; cleanups (diff) | |
download | historical-8d0a01ae2ff303b56ca0bc74b7639e8ba31caa1d.tar.gz historical-8d0a01ae2ff303b56ca0bc74b7639e8ba31caa1d.tar.bz2 historical-8d0a01ae2ff303b56ca0bc74b7639e8ba31caa1d.zip |
new eclass cause the other one was the devil.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/mythtv-plugins.eclass | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/eclass/mythtv-plugins.eclass b/eclass/mythtv-plugins.eclass new file mode 100644 index 000000000000..2cd771e45049 --- /dev/null +++ b/eclass/mythtv-plugins.eclass @@ -0,0 +1,81 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/mythtv-plugins.eclass,v 1.1 2005/05/20 02:39:14 cardoe Exp $ +# +# Author: Doug Goldstein <cardoe@gentoo.org +# + +ECLASS=mythtv-plugins +INHERITED="${INHERITED} ${ECLASS} debug" +IUSE="${IUSE} mmx" + +EXPORT_FUNCTIONS src_unpack src_compile src_install +MYTHPLUGINS="mythbrowser mythdvd mythgallery mythgame mythmusic mythnews mythphone mythvideo mythweather mythweb" +MTVCONF="" +S="${WORKDIR}/mythplugins-${PV}" + +DEPEND=">=sys-apps/sed-4" + +mythtv-plugins_src_unpack() { + unpack ${A} + cd ${S} + + sed -e 's!PREFIX = /usr/local!PREFIX = /usr!' \ + -i 'settings.pro' || die "fixing PREFIX to /usr failed" + + sed -e "s!QMAKE_CXXFLAGS_RELEASE = -O3 -march=pentiumpro -fomit-frame-pointer!QMAKE_CXXFLAGS_RELEASE = ${CXXFLAGS}!" \ + -i 'settings.pro' || die "ciarnam sucks" + #sed -e "/^QMAKE_CXXFLAGS_RELEASE/s!= .*!= ${CXXFLAGS}!" \ + #-i 'settings.pro' || die "Fixing QMake's CXXFLAGS failed" + + sed -e "s!QMAKE_CFLAGS_RELEASE = \$\${QMAKE_CXXFLAGS_RELEASE}!QMAKE_CFLAGS_RELEASE = ${CFLAGS}!" \ + -i 'settings.pro' || die "ciaranm sucks" + #sed -e "/^QMAKE_CFLAGS_RELEASE/s!= .*!= ${CFLAGS}!" + #-i 'settings.pro' || die "Fixing Qmake's CFLAGS failed" +} + +mythtv-plugins_src_compile() { + cd ${S} + + if use debug; then + sed -e 's!CONFIG += release!CONFIG += debug!' \ + -i 'settings.pro' || die "switching to debug build failed" + fi + + if ( use x86 && ! use mmx ) || ! use amd64; then + sed -e 's!DEFINES += HAVE_MMX!DEFINES -= HAVE_MMX!' \ + -i 'settings.pro' || die "disabling MMX failed" + fi + + local myconf="" + + if hasq ${PN} ${MYTHPLUGINS} ; then + for x in ${MYTHPLUGINS} ; do + if [[ ${PN} == ${x} ]] ; then + myconf="${myconf} --enable-${x}" + else + myconf="${myconf} --disable-${x}" + fi + done + else + die "Package ${PN} is unsupported" + fi + + econf ${myconf} ${MTVCONF} + + qmake -o "Makefile" mythplugins.pro || die "qmake failed to run" + emake || die "make failed to compile" +} + +mythtv-plugins_src_install() { + if hasq ${PN} ${MYTHPLUGINS} ; then + cd ${S}/${PN} + else + die "Package ${PN} is unsupported" + fi + + einstall INSTALL_ROOT="${D}" + for doc in AUTHORS COPYING FAQ UPGRADING ChangeLog README; do + test -e "${doc}" && dodoc ${doc} + done +} |