Gentoo Archives: gentoo-commits

From: Joerg Bornkessel <hd_brummy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 29 May 2016 19:50:25
Message-Id: 1464551408.3c5063885e42c71193fda807bb74715ca25c5795.hd_brummy@gentoo
1 commit: 3c5063885e42c71193fda807bb74715ca25c5795
2 Author: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 29 19:48:04 2016 +0000
4 Commit: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
5 CommitDate: Sun May 29 19:50:08 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c506388
7
8 vdr-plugin-2.eclass: added prefix vdr_ to some function to make it exclusiv for vdr-plugin-2.eclass
9
10 eclass/vdr-plugin-2.eclass | 56 +++++++++++++++++++++-------------------------
11 1 file changed, 25 insertions(+), 31 deletions(-)
12
13 diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
14 index 48106d2..fa52e4e 100644
15 --- a/eclass/vdr-plugin-2.eclass
16 +++ b/eclass/vdr-plugin-2.eclass
17 @@ -57,7 +57,7 @@
18 # @ECLASS-VARIABLE: VDR_MAINTAINER_MODE
19 # @DEFAULT_UNSET
20 # @DESCRIPTION:
21 -# Output from function dev_check if it is defined in ebuild or eclass,
22 +# Output from function vdr_dev_check if it is defined in ebuild or eclass,
23 # helpfull for gentoo ebuild developer
24 #
25 # This will also install any debug files in /usr/share/vdr/maintainer-data
26 @@ -141,8 +141,7 @@ fi
27 # New method of storing plugindb
28 # Called from src_install
29 # file maintained by normal portage-methods
30 -create_plugindb_file() {
31 - #ToDo: rename this to vdr_...
32 +vdr_create_plugindb_file() {
33 local NEW_VDRPLUGINDB_DIR=/usr/share/vdr/vdrplugin-rebuild/
34 local DB_FILE="${NEW_VDRPLUGINDB_DIR}/${CATEGORY}-${PF}"
35 insinto "${NEW_VDRPLUGINDB_DIR}"
36 @@ -164,8 +163,7 @@ create_plugindb_file() {
37 } > "${D}/${DB_FILE}"
38 }
39
40 -create_header_checksum_file() {
41 - #ToDo: rename this to vdr_...
42 +vdr_create_header_checksum_file() {
43 # Danger: Not using $ROOT here, as compile will also not use it !!!
44 # If vdr in $ROOT and / differ, plugins will not run anyway
45
46 @@ -190,7 +188,7 @@ create_header_checksum_file() {
47 }
48
49 fix_vdr_libsi_include() {
50 - dev_check "Fixing include of libsi-headers"
51 + vdr_dev_check "Fixing include of libsi-headers"
52 local f
53 for f; do
54 sed -i "${f}" \
55 @@ -260,8 +258,7 @@ vdr_patchmakefile() {
56 touch "${WORKDIR}"/.vdr-plugin_makefile_patched
57 }
58
59 -dev_check() {
60 - # ToDo: rename this to vdr_...; IMPORTANT: check availabel plugins, if we use this function in the tree...
61 +vdr_dev_check() {
62 # A lot useful debug infos
63 # set VDR_MAINTAINER_MODE="1" in make.conf
64 if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
65 @@ -269,18 +266,16 @@ dev_check() {
66 fi
67 }
68
69 -gettext_missing() {
70 - #ToDo: rename this to vdr_...
71 +vdr_gettext_missing() {
72 # plugins without converting to gettext
73
74 local GETTEXT_MISSING=$( grep xgettext Makefile )
75 if [[ -z ${GETTEXT_MISSING} ]]; then
76 - dev_check "Plugin isn't converted to gettext handling \n"
77 + vdr_dev_check "Plugin isn't converted to gettext handling \n"
78 fi
79 }
80
81 -detect_po_dir() {
82 - # ToDo: rename this to vdr_...
83 +vdr_detect_po_dir() {
84 # helper function
85
86 [[ -f po ]] && local po_dir="${S}"
87 @@ -290,8 +285,7 @@ detect_po_dir() {
88 pofile_dir=( ${po_dir} ${po_subdir[*]} )
89 }
90
91 -linguas_support() {
92 - # ToDo: rename this to vdr_...
93 +vdr_linguas_support() {
94 # Patching Makefile for linguas support.
95 # Only locales, enabled through the LINGUAS (make.conf) variable will be
96 # compiled and installed.
97 @@ -299,7 +293,7 @@ linguas_support() {
98 einfo "Patching for Linguas support"
99 einfo "available Languages for ${P} are:"
100
101 - detect_po_dir
102 + vdr_detect_po_dir
103
104 for f in ${pofile_dir[*]}; do
105 PLUGIN_LINGUAS=$( ls ${f}/po --ignore="*.pot" | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
106 @@ -320,32 +314,32 @@ vdr_i18n() {
107 # Simply remove the i18n.o object from Makefile (OBJECT) and
108 # remove "static const tI18nPhrase*" from i18n.h.
109
110 - gettext_missing
111 + vdr_gettext_missing
112
113 local I18N_OBJECT=$( grep i18n.o Makefile )
114 if [[ -n ${I18N_OBJECT} ]]; then
115
116 if [[ "${KEEP_I18NOBJECT:-no}" = "yes" ]]; then
117 - dev_check "Forced to keep i18n.o"
118 + vdr_dev_check "Forced to keep i18n.o"
119 else
120 sed -i "s:i18n.o::g" Makefile
121 - dev_check "OBJECT i18n.o found"
122 - dev_check "removed per sed \n"
123 + vdr_dev_check "OBJECT i18n.o found"
124 + vdr_dev_check "removed per sed \n"
125 fi
126
127 else
128 - dev_check "OBJECT i18n.o not found in Makefile"
129 - dev_check "all fine or manual review needed? \n"
130 + vdr_dev_check "OBJECT i18n.o not found in Makefile"
131 + vdr_dev_check "all fine or manual review needed? \n"
132 fi
133
134 local I18N_STRING=$( [[ -e i18n.h ]] && grep tI18nPhrase i18n.h )
135 if [[ -n ${I18N_STRING} ]]; then
136 sed -i "s:^extern[[:space:]]*const[[:space:]]*tI18nPhrase://static const tI18nPhrase:" i18n.h
137 - dev_check "obsolete tI18nPhrase found"
138 - dev_check "disabled per sed, please recheck \n"
139 + vdr_dev_check "obsolete tI18nPhrase found"
140 + vdr_dev_check "disabled per sed, please recheck \n"
141 else
142 - dev_check "obsolete tI18nPhrase not found, fine..."
143 - dev_check "please review, may be in subdir... \n"
144 + vdr_dev_check "obsolete tI18nPhrase not found, fine..."
145 + vdr_dev_check "please review, may be in subdir... \n"
146 fi
147 }
148
149 @@ -359,7 +353,7 @@ remove_i18n_include() {
150 -e "s:^#include[[:space:]]*\"i18n.h\"://:"
151 done
152
153 - dev_check "removed i18n.h include in ${@}"
154 + vdr_dev_check "removed i18n.h include in ${@}"
155 }
156
157 vdr-plugin-2_print_enable_command() {
158 @@ -471,7 +465,7 @@ vdr-plugin-2_src_util() {
159 vdr_i18n
160 ;;
161 linguas_patch)
162 - linguas_support
163 + vdr_linguas_support
164 ;;
165 esac
166
167 @@ -580,7 +574,7 @@ vdr-plugin-2_src_install() {
168 DESTDIR="${D}" \
169 || die "emake install (makefile target) failed"
170 else
171 - dev_check "Plugin use still the old Makefile handling"
172 + vdr_dev_check "Plugin use still the old Makefile handling"
173 insinto "${VDR_PLUGIN_DIR}"
174 doins libvdr-*.so.*
175 fi
176 @@ -609,8 +603,8 @@ vdr-plugin-2_src_install() {
177
178 cd "${S}" || die "could not change to plugin source directory (src_install)"
179
180 - create_header_checksum_file ${vdr_plugin_list}
181 - create_plugindb_file ${vdr_plugin_list}
182 + vdr_create_header_checksum_file ${vdr_plugin_list}
183 + vdr_create_plugindb_file ${vdr_plugin_list}
184
185 if [[ ${EAPI} != [45] ]]; then
186 einstalldocs