diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /eclass/mythtv-plugins.eclass | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'eclass/mythtv-plugins.eclass')
-rw-r--r-- | eclass/mythtv-plugins.eclass | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/eclass/mythtv-plugins.eclass b/eclass/mythtv-plugins.eclass new file mode 100644 index 00000000000..0844fa576ba --- /dev/null +++ b/eclass/mythtv-plugins.eclass @@ -0,0 +1,129 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# @ECLASS: mythtv-plugins.eclass +# @MAINTAINER: +# Doug Goldstein <cardoe@gentoo.org> +# @AUTHOR: +# Doug Goldstein <cardoe@gentoo.org> +# @BLURB: Installs MythTV plugins along with patches from the release-${PV}-fixes branch + +# NOTE: YOU MUST INHERIT EITHER qt3 or qt4 IN YOUR PLUGIN! + +inherit mythtv multilib versionator + +# Extra configure options to pass to econf +MTVCONF=${MTVCONF:=""} + +SLOT="0" +IUSE="${IUSE} debug mmx" + +if [[ -z $MYTHTV_NODEPS ]] ; then +RDEPEND="${RDEPEND} + =media-tv/mythtv-${MY_PV}*" +DEPEND="${DEPEND} + =media-tv/mythtv-${MY_PV}* + >=sys-apps/sed-4" +fi + +# bug 240325 +RESTRICT="strip" + +mythtv-plugins_pkg_setup() { + # List of available plugins (needs to include ALL of them in the tarball) + MYTHPLUGINS="mythbrowser mythcontrols mythdvd mythflix mythgallery" + MYTHPLUGINS="${MYTHPLUGINS} mythgame mythmusic mythnews mythphone" + MYTHPLUGINS="${MYTHPLUGINS} mythvideo mythweather mythweb" + + if version_is_at_least "0.20" ; then + MYTHPLUGINS="${MYTHPLUGINS} mytharchive" + fi + + if version_is_at_least "0.21_beta" ; then + MYTHPLUGINS="${MYTHPLUGINS} mythzoneminder mythmovies" + MYTHPLUGINS="${MYTHPLUGINS/mythdvd/}" + fi + + if version_is_at_least "0.22_beta" ; then + MYTHPLUGINS="${MYTHPLUGINS/mythcontrols/}" + MYTHPLUGINS="${MYTHPLUGINS/mythphone/}" + fi + + if version_is_at_least "0.23_beta" ; then + MYTHPLUGINS="${MYTHPLUGINS/mythflix/}" + MYTHPLUGINS="${MYTHPLUGINS} mythnetvision" + fi +} + +mythtv-plugins_src_prepare() { + 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 "Fixing QMake's CXXFLAGS failed" + + sed -e "s!QMAKE_CFLAGS_RELEASE = \$\${QMAKE_CXXFLAGS_RELEASE}!QMAKE_CFLAGS_RELEASE = ${CFLAGS}!" \ + -i 'settings.pro' || die "Fixing Qmake's CFLAGS failed" + + find "${S}" -name '*.pro' -exec sed -i \ + -e "s:\$\${PREFIX}/lib/:\$\${PREFIX}/$(get_libdir)/:g" \ + -e "s:\$\${PREFIX}/lib$:\$\${PREFIX}/$(get_libdir):g" \ + {} \; +} + +mythtv-plugins_src_configure() { + 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 + if ( ! use mmx ); then + sed -e 's!DEFINES += HAVE_MMX!DEFINES -= HAVE_MMX!' \ + -i 'settings.pro' || die "disabling MMX failed" + fi + + local myconf="" + + if has ${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 + + chmod +x configure + econf ${myconf} ${MTVCONF} +} + +mythtv-plugins_src_compile() { + if version_is_at_least "0.22" ; then + eqmake4 mythplugins.pro || die "eqmake4 failed" + else + eqmake3 mythplugins.pro || die "eqmake3 failed" + fi + emake || die "make failed to compile" +} + +mythtv-plugins_src_install() { + if has ${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 +} + +EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install |