diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2005-04-18 07:37:39 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2005-04-18 07:37:39 +0000 |
commit | c0d0a18fad6f2c2c6162f5ad2ae6c4addb13f329 (patch) | |
tree | 8b14a2e87751f60f5a2d11bd3b190ad6940d37b1 /eclass/myth.eclass | |
parent | Version bump. Closes bug #89448. Wiped out older version. (diff) | |
download | gentoo-2-c0d0a18fad6f2c2c6162f5ad2ae6c4addb13f329.tar.gz gentoo-2-c0d0a18fad6f2c2c6162f5ad2ae6c4addb13f329.tar.bz2 gentoo-2-c0d0a18fad6f2c2c6162f5ad2ae6c4addb13f329.zip |
Updated eclass for 0.18.
Diffstat (limited to 'eclass/myth.eclass')
-rw-r--r-- | eclass/myth.eclass | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/eclass/myth.eclass b/eclass/myth.eclass index fc97d5775025..a50a1bce7e00 100644 --- a/eclass/myth.eclass +++ b/eclass/myth.eclass @@ -1,11 +1,11 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/myth.eclass,v 1.9 2005/02/27 10:59:52 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/myth.eclass,v 1.10 2005/04/18 07:37:39 eradicator Exp $ # # Author: Daniel Ahlberg <aliz@gentoo.org> # -inherit multilib toolchain-funcs +inherit multilib versionator toolchain-funcs ECLASS=myth INHERITED="${INHERITED} ${ECLASS}" @@ -13,11 +13,19 @@ IUSE="${IUSE} nls debug" EXPORT_FUNCTIONS src_unpack src_compile src_install +MYTHPLUGINS="mythbrowser mythdvd mythgallery mythgame mythmusic mythnews mythphone mythvideo mythweather mythweb" + +if version_is_at_least 0.18 && hasq ${PN} ${MYTHPLUGINS} ; then + S="${WORKDIR}/mythplugins-${PV}" +fi + myth_src_unpack() { - if [ "${PN}" == "mythfrontend" ]; then - local package="mythtv" + if version_is_at_least 0.18 && hasq ${PN} ${MYTHPLUGINS} ; then + pkg_pro="mythplugins.pro" + elif [ "${PN}" == "mythfrontend" ]; then + pkg_pro="mythtv.pro" else - local package="${PN}" + pkg_pro="${PN}.pro" fi unpack ${A} ; cd ${S} @@ -29,14 +37,14 @@ myth_src_unpack() { if ! use nls ; then sed -e "s:i18n::" \ - -i ${package}.pro || die "Disable i18n failed" + -i ${pkg_pro} || die "Disable i18n failed" fi if use debug ; then FEATURES="${FEATURES} nostrip" sed -e 's:#CONFIG += debug:CONFIG += debug:' \ - -e 's:CONFIG += release:#CONFIG += release:' \ - -i 'settings.pro' || die "enable debug failed" + -e 's:CONFIG += release:#CONFIG += release:' \ + -i 'settings.pro' || die "enable debug failed" fi setup_pro @@ -50,11 +58,29 @@ myth_src_unpack() { myth_src_compile() { export QMAKESPEC="linux-g++" - qmake -o "Makefile" "${PN}.pro" + if version_is_at_least 0.18 ; then + 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 + fi + + econf ${myconf} + fi + + qmake -o "Makefile" "${S}/${pkg_pro}" emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" "${@}" || die } myth_src_install() { + if version_is_at_least 0.18 && hasq ${PN} ${MYTHPLUGINS} ; then + cd ${S}/${PN} + fi + einstall INSTALL_ROOT="${D}" for doc in AUTHORS COPYING FAQ UPGRADING ChangeLog README; do test -e "${doc}" && dodoc ${doc} |