summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2006-09-14 05:18:02 +0000
committerDoug Goldstein <cardoe@gentoo.org>2006-09-14 05:18:02 +0000
commite08718b89af1b5c98f2b4946844341fd1ef4a1cd (patch)
treeac9dbb384ccacab1e2527da1bacba2c9dc0b27b4 /eclass/mythtv-plugins.eclass
parentBump to 1.0.22-r1 (diff)
downloadhistorical-e08718b89af1b5c98f2b4946844341fd1ef4a1cd.tar.gz
historical-e08718b89af1b5c98f2b4946844341fd1ef4a1cd.tar.bz2
historical-e08718b89af1b5c98f2b4946844341fd1ef4a1cd.zip
Refactored the MythTV plugins eclass a whole lot. The idea is it will have some upgradable life in it now. It also supports patch levels for each of the plugins.
Diffstat (limited to 'eclass/mythtv-plugins.eclass')
-rw-r--r--eclass/mythtv-plugins.eclass67
1 files changed, 53 insertions, 14 deletions
diff --git a/eclass/mythtv-plugins.eclass b/eclass/mythtv-plugins.eclass
index dd82ef4dcf32..4192b7cdd3ac 100644
--- a/eclass/mythtv-plugins.eclass
+++ b/eclass/mythtv-plugins.eclass
@@ -1,26 +1,58 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/mythtv-plugins.eclass,v 1.12 2006/02/27 07:59:57 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mythtv-plugins.eclass,v 1.13 2006/09/14 05:18:02 cardoe Exp $
#
# Author: Doug Goldstein <cardoe@gentoo.org>
#
+# Installs MythTV plugins along with patches from the release-${PV}-fixes branch
+#
+inherit eutils multilib qt3 versionator
+
+# Extra configure options to pass to econf
+MTVCONF=${MTVCONF:=""}
+
+# Release version
+MY_PV="${PV%_*}"
+
+# SVN revision number to increment from the released version
+if [ "x${MY_PV}" != "x${PV}" ]; then
+ PATCHREV="${PV##*_p}"
+fi
+
+DESCRIPTION=${DESCRIPTION:="MythTV plugin"}
+HOMEPAGE="http://www.mythtv.org"
+SRC_URI="http://ftp-osl.osuosl.org/pub/mythtv/mythplugins-${MY_PV}.tar.bz2"
+if [ -n "${PATCHREV}" ] ; then
+ SRC_URI="${SRC_URI} http://dev.gentoo.org/~cardoe/files/mythtv/mythplugins-${MY_PV}_svn${PATCHREV}.patch.bz2"
+fi
-inherit multilib
+LICENSE="GPL-2"
+SLOT="0"
IUSE="debug mmx"
-EXPORT_FUNCTIONS src_unpack src_compile src_install
-MYTHPLUGINS="mythbrowser mythcontrols mythdvd mythflix mythgallery mythgame mythmusic mythnews mythphone mythvideo mythweather mythweb"
-MTVCONF=""
-S="${WORKDIR}/mythplugins-${PV}"
+RDEPEND="${RDEPEND}
+ =media-tv/mythtv-${MY_PV}*"
+DEPEND="${DEPEND}
+ =media-tv/mythtv-${MY_PV}*
+ >=sys-apps/sed-4"
-RDEPEND="=media-tv/mythtv-${PV}*"
-DEPEND="${RDEPEND}
- >=sys-apps/sed-4"
+S="${WORKDIR}/mythplugins-${MY_PV}"
+
+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
+}
mythtv-plugins_src_unpack() {
unpack ${A}
- cd ${S}
+ cd "${S}"
sed -e 's!PREFIX = /usr/local!PREFIX = /usr!' \
-i 'settings.pro' || die "fixing PREFIX to /usr failed"
@@ -31,14 +63,18 @@ mythtv-plugins_src_unpack() {
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 \
+ find "${S}" -name '*.pro' -exec sed -i \
-e "s:\$\${PREFIX}/lib/:\$\${PREFIX}/$(get_libdir)/:g" \
-e "s:\$\${PREFIX}/lib$:\$\${PREFIX}/$(get_libdir):g" \
{} \;
+
+ if [ -n "$PATCHREV" ]; then
+ patch -p0 < ${WORKDIR}/mythplugins-${MY_PV}_svn${PATCHREV}.patch
+ fi
}
mythtv-plugins_src_compile() {
- cd ${S}
+ cd "${S}"
if use debug; then
sed -e 's!CONFIG += release!CONFIG += debug!' \
@@ -72,8 +108,9 @@ mythtv-plugins_src_compile() {
}
mythtv-plugins_src_install() {
+ debug-print ${MYTHPLUGINS}
if hasq ${PN} ${MYTHPLUGINS} ; then
- cd ${S}/${PN}
+ cd "${S}"/${PN}
else
die "Package ${PN} is unsupported"
fi
@@ -83,3 +120,5 @@ mythtv-plugins_src_install() {
test -e "${doc}" && dodoc ${doc}
done
}
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install