Gentoo Archives: gentoo-commits

From: "Matthias Schwarzott (zzam)" <zzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-vdr r636 - in gentoo-vdr-scripts/trunk: . usr/share/vdr/rcscript
Date: Tue, 29 Jul 2008 22:19:49
Message-Id: E1KNxXm-0000L5-KR@stork.gentoo.org
1 Author: zzam
2 Date: 2008-07-29 22:19:45 +0000 (Tue, 29 Jul 2008)
3 New Revision: 636
4
5 Added:
6 gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-locales.sh
7 Removed:
8 gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh
9 Modified:
10 gentoo-vdr-scripts/trunk/ChangeLog
11 Log:
12 Renamed file that handles locales to reflect that.
13
14 Modified: gentoo-vdr-scripts/trunk/ChangeLog
15 ===================================================================
16 --- gentoo-vdr-scripts/trunk/ChangeLog 2008-07-07 15:49:41 UTC (rev 635)
17 +++ gentoo-vdr-scripts/trunk/ChangeLog 2008-07-29 22:19:45 UTC (rev 636)
18 @@ -1,6 +1,10 @@
19 # ChangeLog for gentoo-vdr-scripts
20 # $Id$
21
22 + 29 Jul 2008; Matthias Schwarzott <zzam@g.o>
23 + -usr/share/vdr/rcscript/pre-start-45-utf8-check.sh, ++:
24 + Renamed file that handles locales to reflect that.
25 +
26 *gentoo-vdr-scripts-0.4.5_pre1 (07 Jul 2008)
27
28 06 Jul 2008; Matthias Schwarzott <zzam@g.o> etc/init.d/vdr:
29
30 Copied: gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-locales.sh (from rev 635, gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh)
31 ===================================================================
32 --- gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-locales.sh (rev 0)
33 +++ gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-locales.sh 2008-07-29 22:19:45 UTC (rev 636)
34 @@ -0,0 +1,75 @@
35 +# $Id$
36 +
37 +# disable all locale settings from the system
38 +# mostly used to get away from utf8 if vdr does
39 +# not support it
40 +unset_all_locale_settings() {
41 + local LOCALE_VARS="LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY
42 + LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE
43 + LC_MEASUREMENT LC_IDENTIFICATION LC_ALL"
44 +
45 +
46 + # clear out all locale-variables if not already done by baselayout
47 + local var
48 + for var in $LOCALE_VARS; do
49 + unset $var
50 + done
51 +}
52 +
53 +
54 +addon_main() {
55 + if [ -n "${CAP_UTF8}" ]; then
56 + # vdr supports utf8 :)
57 +
58 + # export LANG if it is set (before calling locale, Bug #217906)
59 + [ -n "${LANG}" ] && export LANG
60 +
61 + local charmap=$(locale charmap)
62 +
63 + if [ "${charmap}" = "ANSI_X3.4-1968" ]; then
64 + # User has not set any locale stuff
65 +
66 + ewarn "Your local charmap is ANSI_X3.4-1968."
67 + if [ -n "${LANG}" ]; then
68 + ewarn "It seems the locale you chose does not exist on your system [LANG=${LANG}]"
69 + ewarn "Please have a look at /etc/locale.gen"
70 + else
71 + ewarn "You have not set a charmap! (LANG in /etc/env.d/02locale or /etc/conf.d/vdr)"
72 + fi
73 +
74 + # Lets guess
75 +
76 + # try an english utf8 locale first
77 + local l="$(locale -a|grep utf8|grep ^en|head -n 1)"
78 +
79 + if [ "${l}" = "" ]; then
80 + # none found
81 + # try any existing utf8 locale
82 + l="$(locale -a|grep utf8|head -n 1)"
83 + fi
84 +
85 + if [ "${l}" != "" ]; then
86 + export LANG="${l}"
87 + ewarn "Automatically using locale ${l} to get most of vdr utf8 support."
88 + else
89 + ewarn "Not found any utf8 locale, you will have problems with chars extending ASCII"
90 + fi
91 +
92 + fi
93 + else
94 + # vdr does not support utf8
95 + # lets force it off
96 + unset_all_locale_settings
97 + fi
98 +
99 + # set sort-order if specified in conf-file
100 + if [ -n "${VDR_SORT_ORDER}" ]; then
101 + export LC_COLLATE="${VDR_SORT_ORDER}"
102 + fi
103 +
104 + # get error messages in english
105 + export LC_MESSAGES="C"
106 +
107 + return 0
108 +}
109 +
110
111
112 Property changes on: gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-locales.sh
113 ___________________________________________________________________
114 Name: svn:keywords
115 + Id
116 Name: svn:mergeinfo
117 +
118
119 Deleted: gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh
120 ===================================================================
121 --- gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh 2008-07-07 15:49:41 UTC (rev 635)
122 +++ gentoo-vdr-scripts/trunk/usr/share/vdr/rcscript/pre-start-45-utf8-check.sh 2008-07-29 22:19:45 UTC (rev 636)
123 @@ -1,75 +0,0 @@
124 -# $Id$
125 -
126 -# disable all locale settings from the system
127 -# mostly used to get away from utf8 if vdr does
128 -# not support it
129 -unset_all_locale_settings() {
130 - local LOCALE_VARS="LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY
131 - LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE
132 - LC_MEASUREMENT LC_IDENTIFICATION LC_ALL"
133 -
134 -
135 - # clear out all locale-variables if not already done by baselayout
136 - local var
137 - for var in $LOCALE_VARS; do
138 - unset $var
139 - done
140 -}
141 -
142 -
143 -addon_main() {
144 - if [ -n "${CAP_UTF8}" ]; then
145 - # vdr supports utf8 :)
146 -
147 - # export LANG if it is set (before calling locale, Bug #217906)
148 - [ -n "${LANG}" ] && export LANG
149 -
150 - local charmap=$(locale charmap)
151 -
152 - if [ "${charmap}" = "ANSI_X3.4-1968" ]; then
153 - # User has not set any locale stuff
154 -
155 - ewarn "Your local charmap is ANSI_X3.4-1968."
156 - if [ -n "${LANG}" ]; then
157 - ewarn "It seems the locale you chose does not exist on your system [LANG=${LANG}]"
158 - ewarn "Please have a look at /etc/locale.gen"
159 - else
160 - ewarn "You have not set a charmap! (LANG in /etc/env.d/02locale or /etc/conf.d/vdr)"
161 - fi
162 -
163 - # Lets guess
164 -
165 - # try an english utf8 locale first
166 - local l="$(locale -a|grep utf8|grep ^en|head -n 1)"
167 -
168 - if [ "${l}" = "" ]; then
169 - # none found
170 - # try any existing utf8 locale
171 - l="$(locale -a|grep utf8|head -n 1)"
172 - fi
173 -
174 - if [ "${l}" != "" ]; then
175 - export LANG="${l}"
176 - ewarn "Automatically using locale ${l} to get most of vdr utf8 support."
177 - else
178 - ewarn "Not found any utf8 locale, you will have problems with chars extending ASCII"
179 - fi
180 -
181 - fi
182 - else
183 - # vdr does not support utf8
184 - # lets force it off
185 - unset_all_locale_settings
186 - fi
187 -
188 - # set sort-order if specified in conf-file
189 - if [ -n "${VDR_SORT_ORDER}" ]; then
190 - export LC_COLLATE="${VDR_SORT_ORDER}"
191 - fi
192 -
193 - # get error messages in english
194 - export LC_MESSAGES="C"
195 -
196 - return 0
197 -}
198 -