commit:     3c5063885e42c71193fda807bb74715ca25c5795
Author:     Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
AuthorDate: Sun May 29 19:48:04 2016 +0000
Commit:     Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
CommitDate: Sun May 29 19:50:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c506388

vdr-plugin-2.eclass: added prefix vdr_ to some function to make it exclusiv for 
vdr-plugin-2.eclass

 eclass/vdr-plugin-2.eclass | 56 +++++++++++++++++++++-------------------------
 1 file changed, 25 insertions(+), 31 deletions(-)

diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
index 48106d2..fa52e4e 100644
--- a/eclass/vdr-plugin-2.eclass
+++ b/eclass/vdr-plugin-2.eclass
@@ -57,7 +57,7 @@
 # @ECLASS-VARIABLE: VDR_MAINTAINER_MODE
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# Output from function dev_check if it is defined in ebuild or eclass,
+# Output from function vdr_dev_check if it is defined in ebuild or eclass,
 # helpfull for gentoo ebuild developer
 #
 # This will also install any debug files in /usr/share/vdr/maintainer-data
@@ -141,8 +141,7 @@ fi
 # New method of storing plugindb
 #   Called from src_install
 #   file maintained by normal portage-methods
-create_plugindb_file() {
-       #ToDo: rename this to vdr_...
+vdr_create_plugindb_file() {
        local NEW_VDRPLUGINDB_DIR=/usr/share/vdr/vdrplugin-rebuild/
        local DB_FILE="${NEW_VDRPLUGINDB_DIR}/${CATEGORY}-${PF}"
        insinto "${NEW_VDRPLUGINDB_DIR}"
@@ -164,8 +163,7 @@ create_plugindb_file() {
        } > "${D}/${DB_FILE}"
 }
 
-create_header_checksum_file() {
-       #ToDo: rename this to vdr_...
+vdr_create_header_checksum_file() {
        # Danger: Not using $ROOT here, as compile will also not use it !!!
        # If vdr in $ROOT and / differ, plugins will not run anyway
 
@@ -190,7 +188,7 @@ create_header_checksum_file() {
 }
 
 fix_vdr_libsi_include() {
-       dev_check "Fixing include of libsi-headers"
+       vdr_dev_check "Fixing include of libsi-headers"
        local f
        for f; do
                sed -i "${f}" \
@@ -260,8 +258,7 @@ vdr_patchmakefile() {
        touch "${WORKDIR}"/.vdr-plugin_makefile_patched
 }
 
-dev_check() {
-       # ToDo: rename this to vdr_...; IMPORTANT: check availabel plugins, if 
we use this function in the tree...
+vdr_dev_check() {
        # A lot useful debug infos
        # set VDR_MAINTAINER_MODE="1" in make.conf
        if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
@@ -269,18 +266,16 @@ dev_check() {
        fi
 }
 
-gettext_missing() {
-       #ToDo: rename this to vdr_...
+vdr_gettext_missing() {
        # plugins without converting to gettext
 
        local GETTEXT_MISSING=$( grep xgettext Makefile )
        if [[ -z ${GETTEXT_MISSING} ]]; then
-               dev_check "Plugin isn't converted to gettext handling \n"
+               vdr_dev_check "Plugin isn't converted to gettext handling \n"
        fi
 }
 
-detect_po_dir() {
-       # ToDo: rename this to vdr_...
+vdr_detect_po_dir() {
        # helper function
 
        [[ -f po ]] && local po_dir="${S}"
@@ -290,8 +285,7 @@ detect_po_dir() {
        pofile_dir=( ${po_dir} ${po_subdir[*]} )
 }
 
-linguas_support() {
-       # ToDo: rename this to vdr_...
+vdr_linguas_support() {
 #      Patching Makefile for linguas support.
 #      Only locales, enabled through the LINGUAS (make.conf) variable will be
 #      compiled and installed.
@@ -299,7 +293,7 @@ linguas_support() {
        einfo "Patching for Linguas support"
        einfo "available Languages for ${P} are:"
 
-       detect_po_dir
+       vdr_detect_po_dir
 
        for f in ${pofile_dir[*]}; do
                PLUGIN_LINGUAS=$( ls ${f}/po --ignore="*.pot" | sed -e 
"s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
@@ -320,32 +314,32 @@ vdr_i18n() {
 #      Simply remove the i18n.o object from Makefile (OBJECT) and
 #      remove "static const tI18nPhrase*" from i18n.h.
 
-       gettext_missing
+       vdr_gettext_missing
 
        local I18N_OBJECT=$( grep i18n.o Makefile )
        if [[ -n ${I18N_OBJECT} ]]; then
 
                if [[ "${KEEP_I18NOBJECT:-no}" = "yes" ]]; then
-                       dev_check "Forced to keep i18n.o"
+                       vdr_dev_check "Forced to keep i18n.o"
                else
                        sed -i "s:i18n.o::g" Makefile
-                       dev_check "OBJECT i18n.o found"
-                       dev_check "removed per sed \n"
+                       vdr_dev_check "OBJECT i18n.o found"
+                       vdr_dev_check "removed per sed \n"
                fi
 
        else
-               dev_check "OBJECT i18n.o not found in Makefile"
-               dev_check "all fine or manual review needed? \n"
+               vdr_dev_check "OBJECT i18n.o not found in Makefile"
+               vdr_dev_check "all fine or manual review needed? \n"
        fi
 
        local I18N_STRING=$( [[ -e i18n.h ]] && grep tI18nPhrase i18n.h )
        if [[ -n ${I18N_STRING} ]]; then
                sed -i 
"s:^extern[[:space:]]*const[[:space:]]*tI18nPhrase://static const tI18nPhrase:" 
i18n.h
-               dev_check "obsolete tI18nPhrase found"
-               dev_check "disabled per sed, please recheck \n"
+               vdr_dev_check "obsolete tI18nPhrase found"
+               vdr_dev_check "disabled per sed, please recheck \n"
        else
-               dev_check "obsolete tI18nPhrase not found, fine..."
-               dev_check "please review, may be in subdir... \n"
+               vdr_dev_check "obsolete tI18nPhrase not found, fine..."
+               vdr_dev_check "please review, may be in subdir... \n"
        fi
 }
 
@@ -359,7 +353,7 @@ remove_i18n_include() {
                -e "s:^#include[[:space:]]*\"i18n.h\"://:"
        done
 
-       dev_check "removed i18n.h include in ${@}"
+       vdr_dev_check "removed i18n.h include in ${@}"
 }
 
 vdr-plugin-2_print_enable_command() {
@@ -471,7 +465,7 @@ vdr-plugin-2_src_util() {
                        vdr_i18n
                        ;;
                linguas_patch)
-                       linguas_support
+                       vdr_linguas_support
                        ;;
                esac
 
@@ -580,7 +574,7 @@ vdr-plugin-2_src_install() {
                DESTDIR="${D}" \
                || die "emake install (makefile target) failed"
        else
-               dev_check "Plugin use still the old Makefile handling"
+               vdr_dev_check "Plugin use still the old Makefile handling"
                insinto "${VDR_PLUGIN_DIR}"
                doins libvdr-*.so.*
        fi
@@ -609,8 +603,8 @@ vdr-plugin-2_src_install() {
 
        cd "${S}" || die "could not change to plugin source directory 
(src_install)"
 
-       create_header_checksum_file ${vdr_plugin_list}
-       create_plugindb_file ${vdr_plugin_list}
+       vdr_create_header_checksum_file ${vdr_plugin_list}
+       vdr_create_plugindb_file ${vdr_plugin_list}
 
        if [[ ${EAPI} != [45] ]]; then
                einstalldocs

Reply via email to