/[gentoo-x86]/eclass/vdr-plugin.eclass
Gentoo

Diff of /eclass/vdr-plugin.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.35 Revision 1.36
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/vdr-plugin.eclass,v 1.35 2006/10/08 13:11:28 zzam Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/vdr-plugin.eclass,v 1.36 2006/10/12 16:31:45 zzam Exp $
4# 4#
5# Author: 5# Author:
6# Matthias Schwarzott <zzam@gentoo.org> 6# Matthias Schwarzott <zzam@gentoo.org>
7# Joerg Bornkessel <hd_brummy@gentoo.org> 7# Joerg Bornkessel <hd_brummy@gentoo.org>
8 8
347vdr-plugin_pkg_config_final() { 347vdr-plugin_pkg_config_final() {
348 diff ${conf_orig} ${conf} 348 diff ${conf_orig} ${conf}
349 rm ${conf_orig} 349 rm ${conf_orig}
350} 350}
351 351
352vdr-plugin_pkg_config() { 352vdr-plugin_pkg_config_old() {
353 einfo "Using interface of gentoo-vdr-scripts-0.3.6 and older"
353 if [[ -z "${INSTALLPLUGIN}" ]]; then 354 if [[ -z "${INSTALLPLUGIN}" ]]; then
354 INSTALLPLUGIN="${VDRPLUGIN}" 355 INSTALLPLUGIN="${VDRPLUGIN}"
355 fi 356 fi
356 # First test if plugin is already inside PLUGINS 357 # First test if plugin is already inside PLUGINS
357 local conf=/etc/conf.d/vdr 358 local conf=/etc/conf.d/vdr
408 -e ${LINE}'s/" /"/g' 409 -e ${LINE}'s/" /"/g'
409 410
410 vdr-plugin_pkg_config_final 411 vdr-plugin_pkg_config_final
411} 412}
412 413
414vdr-plugin_pkg_config_new() {
415 einfo "Using interface introduced with gentoo-vdr-scripts-0.3.7"
416 if [[ -z "${INSTALLPLUGIN}" ]]; then
417 INSTALLPLUGIN="${VDRPLUGIN}"
418 fi
419
420 active=0
421 # First test if plugin is already inside PLUGINS
422 local conf=/etc/conf.d/vdr.plugins
423 exec 3<${conf}
424 while read -u 3 line; do
425 [[ ${line} == "" ]] && continue
426 [[ ${line:0:1} == "#" ]] && continue
427 set -- ${line}
428 [[ ${1} == ${INSTALLPLUGIN} ]] && active=1
429 done
430 exec 3<&-
431
432 if [[ $active == 0 ]]; then
433 einfo "Adding ${INSTALLPLUGIN} to active plugins."
434
435 # The pure edit process.
436 echo "${INSTALLPLUGIN}" >> "${conf}"
437 else
438 einfo "${INSTALLPLUGIN} already activated"
439 echo
440 read -p "Do you want to deactivate ${INSTALLPLUGIN} (yes/no) " answer
441 if [[ "${answer}" != "yes" ]]; then
442 einfo "aborted"
443 return
444 fi
445 einfo "Removing ${INSTALLPLUGIN} from active plugins."
446
447 # The pure edit process
448 sed -i "${conf}" -e "/^[[:space:]]*${INSTALLPLUGIN}[[:space:]]*\$/d"
449 fi
450}
451
452vdr-plugin_pkg_config() {
453 if has_version ">media-tv/gentoo-vdr-scripts-0.3.6"; then
454 vdr-plugin_pkg_config_new
455 else
456 vdr-plugin_pkg_config_old
457 fi
458}
459
413fix_vdr_libsi_include() 460fix_vdr_libsi_include()
414{ 461{
415 einfo "Fixing include of libsi-headers" 462 einfo "Fixing include of libsi-headers"
416 local f 463 local f
417 for f; do 464 for f; do

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

  ViewVC Help
Powered by ViewVC 1.1.20