From: Doug Goldstein Date: Thu, 14 Feb 2008 22:41:49 +0000 (+0000) Subject: I removed all backwords compat support for installing older versions. After removing... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=d9990f04df3e945d2e46993956f9b74f4b454ef5;p=gentoo.git I removed all backwords compat support for installing older versions. After removing the old stuff, kojiro checked it out and cleaned up the resultant eclass. --- diff --git a/eclass/mythtv.eclass b/eclass/mythtv.eclass index 10ea705e8f64..0b102946b6af 100644 --- a/eclass/mythtv.eclass +++ b/eclass/mythtv.eclass @@ -1,59 +1,44 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mythtv.eclass,v 1.9 2008/02/14 20:37:45 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mythtv.eclass,v 1.10 2008/02/14 22:41:49 cardoe Exp $ # # @ECLASS: mythtv.eclass # @MAINTAINER: Doug Goldstein # @BLURB: Downloads the MythTV source packages and any patches from the fixes branch # -inherit eutils versionator +inherit eutils versionator subversion # Release version MY_PV="${PV%_*}" # what product do we want -if [[ ${PN} = mythtv ]]; then - MY_PN="mythtv" -elif [[ ${PN} = mythtv-themes ]]; then - MY_PN="myththemes" -else - MY_PN="mythplugins" -fi - -# _pre is from SVN trunk while _p is from SVN ${MY_PV}-fixes -if [[ ${MY_PV} != ${PV} ]]; then - if [[ $PV = *_pre* ]]; then - SVNREV="${PV##*_pre}" - ESVN_REPO_URI="http://svn.mythtv.org/svn/trunk/${MY_PN}" - elif [[ $PV = *_p* || $PV = *_beta* ]]; then - PATCHREV="${PV##*_p}" -# as of 0.20_p13783, we're using svn always - if [[ $PATCHREV -gt 13783 ]]; then - SVNREV=$PATCHREV - unset PATCHREV - VER_COMP=( $(get_version_components ${MY_PV}) ) - FIXES_VER="${VER_COMP[0]}-${VER_COMP[1]}" - ESVN_REPO_URI="http://svn.mythtv.org/svn/branches/release-${FIXES_VER}-fixes/${MY_PN}" - fi - fi -fi - -ESVN_OPTIONS="-r ${SVNREV}" +case "${PN}" in + mythtv) MY_PN="mythtv";; + mythtv-themes) MY_PN="myththemes";; + *) MY_PN="mythplugins";; +esac + +# _pre is from SVN trunk while _p and _beta are from SVN ${MY_PV}-fixes +# TODO: probably ought to do something smart if the regex doesn't match anything +[[ "${PV}" =~ (_beta|_pre|_p)([0-9]+) ]] || { + eerror "Invalid version requested (_beta|_pre|_p) only" + exit 1 +} + +REV_PREFIX="${BASH_REMATCH[1]}" # _beta, _pre, or _p +MYTHTV_REV="${BASH_REMATCH[2]}" # revision number + +case $REV_PREFIX in + _pre) MYTHTV_REPO="trunk/${MY_PN}";; + _p|_beta) VER_COMP=( $(get_version_components ${MY_PV}) ) + FIXES_VER="${VER_COMP[0]}-${VER_COMP[1]}" + MYTHTV_REPO="branches/release-${FIXES_VER}-fixes/${MY_PN}";; +esac + +ESVN_REPO_URI="http://svn.mythtv.org/svn/${MYTHTV_REPO}" +ESVN_OPTIONS="-r ${MYTHTV_REV}" HOMEPAGE="http://www.mythtv.org" LICENSE="GPL-2" SRC_URI="" -if [[ -z ${SVNREV} ]] ; then - SRC_URI="${SRC_URI} mirror://gentoo/${MY_PN}-${MY_PV}.tar.bz2" -fi -if [[ -n ${PATCHREV} ]] ; then - SRC_URI="${SRC_URI} - http://dev.gentoo.org/~cardoe/files/mythtv/${MY_PN}-${MY_PV}_svn${PATCHREV}.patch.bz2" -fi - -mythtv-fixes_patch() { - if [[ -n ${PATCHREV} ]]; then - epatch "${WORKDIR}/${MY_PN}-${MY_PV}_svn${PATCHREV}.patch" - fi -}