summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2006-10-12 16:31:45 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2006-10-12 16:31:45 +0000
commit6ec8cd9e5b50d7701fcaa4caecec1433574314cd (patch)
treeb7a882cc19e9f46233410229e9e20cc102d4e219 /eclass
parentFix autotools regeneration and dependencies. Thanks to Patric Lauer for repor... (diff)
downloadgentoo-2-6ec8cd9e5b50d7701fcaa4caecec1433574314cd.tar.gz
gentoo-2-6ec8cd9e5b50d7701fcaa4caecec1433574314cd.tar.bz2
gentoo-2-6ec8cd9e5b50d7701fcaa4caecec1433574314cd.zip
Added interface to newer gentoo-vdr-scripts for pkg_config.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/vdr-plugin.eclass51
1 files changed, 49 insertions, 2 deletions
diff --git a/eclass/vdr-plugin.eclass b/eclass/vdr-plugin.eclass
index 86020f301e71..6836d0ab397b 100644
--- a/eclass/vdr-plugin.eclass
+++ b/eclass/vdr-plugin.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.35 2006/10/08 13:11:28 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.36 2006/10/12 16:31:45 zzam Exp $
#
# Author:
# Matthias Schwarzott <zzam@gentoo.org>
@@ -349,7 +349,8 @@ vdr-plugin_pkg_config_final() {
rm ${conf_orig}
}
-vdr-plugin_pkg_config() {
+vdr-plugin_pkg_config_old() {
+ einfo "Using interface of gentoo-vdr-scripts-0.3.6 and older"
if [[ -z "${INSTALLPLUGIN}" ]]; then
INSTALLPLUGIN="${VDRPLUGIN}"
fi
@@ -410,6 +411,52 @@ vdr-plugin_pkg_config() {
vdr-plugin_pkg_config_final
}
+vdr-plugin_pkg_config_new() {
+ einfo "Using interface introduced with gentoo-vdr-scripts-0.3.7"
+ if [[ -z "${INSTALLPLUGIN}" ]]; then
+ INSTALLPLUGIN="${VDRPLUGIN}"
+ fi
+
+ active=0
+ # First test if plugin is already inside PLUGINS
+ local conf=/etc/conf.d/vdr.plugins
+ exec 3<${conf}
+ while read -u 3 line; do
+ [[ ${line} == "" ]] && continue
+ [[ ${line:0:1} == "#" ]] && continue
+ set -- ${line}
+ [[ ${1} == ${INSTALLPLUGIN} ]] && active=1
+ done
+ exec 3<&-
+
+ if [[ $active == 0 ]]; then
+ einfo "Adding ${INSTALLPLUGIN} to active plugins."
+
+ # The pure edit process.
+ echo "${INSTALLPLUGIN}" >> "${conf}"
+ else
+ einfo "${INSTALLPLUGIN} already activated"
+ echo
+ read -p "Do you want to deactivate ${INSTALLPLUGIN} (yes/no) " answer
+ if [[ "${answer}" != "yes" ]]; then
+ einfo "aborted"
+ return
+ fi
+ einfo "Removing ${INSTALLPLUGIN} from active plugins."
+
+ # The pure edit process
+ sed -i "${conf}" -e "/^[[:space:]]*${INSTALLPLUGIN}[[:space:]]*\$/d"
+ fi
+}
+
+vdr-plugin_pkg_config() {
+ if has_version ">media-tv/gentoo-vdr-scripts-0.3.6"; then
+ vdr-plugin_pkg_config_new
+ else
+ vdr-plugin_pkg_config_old
+ fi
+}
+
fix_vdr_libsi_include()
{
einfo "Fixing include of libsi-headers"