rpms/xscreensaver/devel xscreensaver-5.00-localefix-restrict.patch, NONE, 1.1 xscreensaver.spec, 1.3, 1.4
Mamoru Tasaka (mtasaka)
fedora-extras-commits at redhat.com
Thu Jun 1 03:26:28 UTC 2006
Author: mtasaka
Update of /cvs/extras/rpms/xscreensaver/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7761
Modified Files:
xscreensaver.spec
Added Files:
xscreensaver-5.00-localefix-restrict.patch
Log Message:
* Thu Jun 1 2006 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.00-4
- Rewrite the patch for decimal separator as discussed with jwz.
- Change default not by patch but by function.
xscreensaver-5.00-localefix-restrict.patch:
--- NEW FILE xscreensaver-5.00-localefix-restrict.patch ---
--- xscreensaver-5.00/hacks/screenhack.c.localefix2 2006-05-24 07:09:58.000000000 +0900
+++ xscreensaver-5.00/hacks/screenhack.c 2006-06-01 08:06:32.000000000 +0900
@@ -166,19 +166,39 @@
reset_locale (void)
{
#ifdef HAVE_SETLOCALE
- const char *current_locale = setlocale(LC_ALL, "");
- const char *cmp_locale;
- int j = 0;
+ /* What locale should be checked??
+ */
+ const int examine_locale[] = {
+#ifdef LC_TIME
+ LC_TIME,
+#endif
+ 0
+ };
+ int j;
- while ((cmp_locale = change_locale[j]))
+ for (j = 0; examine_locale[j]; j++)
{
- if (!strncmp(current_locale, cmp_locale, strlen(cmp_locale)))
+ const char *current_locale = setlocale(examine_locale[j], NULL);
+ const char *env_locale = setlocale(examine_locale[j], "");
+ const char *cmp_locale;
+
+ if (!env_locale || !*env_locale)
{
- setlocale(LC_ALL, "C");
- break;
+ setlocale(examine_locale[j], current_locale);
+ continue;
+ }
+
+ while ((cmp_locale = change_locale[j]))
+ {
+ if (!strncmp(env_locale, cmp_locale, strlen(cmp_locale)))
+ {
+ (void) setlocale(examine_locale[j], "C");
+ continue;
+ }
+ j++;
}
- j++;
}
+
#endif /* HAVE_SETLOCALE */
}
Index: xscreensaver.spec
===================================================================
RCS file: /cvs/extras/rpms/xscreensaver/devel/xscreensaver.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- xscreensaver.spec 31 May 2006 15:41:54 -0000 1.3
+++ xscreensaver.spec 1 Jun 2006 03:26:28 -0000 1.4
@@ -1,7 +1,7 @@
%define name xscreensaver
%define version 5.00
-%define fedora_rel 3
+%define fedora_rel 4
%define fedora_ver 5.89
%define default_text %{_datadir}/doc/fedora-release-%{fedora_ver}/eula.txt
@@ -21,11 +21,8 @@
Patch1: xscreensaver-5.00b5-sanitize-hacks.patch
Patch5: xscreensaver-5.00-rootpasswd.patch
Patch8: xscreensaver-5.00b5-include-directory.patch
-Patch101: xscreensaver-5.00-locale-safety.patch
+Patch101: xscreensaver-5.00-localfix-restrict.patch
Patch102: xscreensaver-5.00-matherr-utils.patch
-Patch103: xscreensaver-5.00-change-defaults.patch
-Patch104: xscreensaver-5.00-locale-decimal.patch
-
# find_lang
BuildRequires: gettext
@@ -95,10 +92,29 @@
%patch1 -p1 -b .sanitize-hacks
%patch5 -p1 -b .rootpasswd
%patch8 -p1 -b .include-dir
-%patch101 -p1 -b .locale-safety
+%patch101 -p1 -b .locale-fix-restrict
%patch102 -p1 -b .matherr2
-%patch103 -p1 -b .change-defaults
-%patch104 -p1 -b .locale-decimal
+
+fix_adfile(){
+ ADFILE=$1
+ shift
+
+ while [ $# -ge 1 ] ; do
+ ARG=$1
+ TYPE=`echo $ARG | sed -e 's|=.*$||'`
+ VALUE=`echo $ARG | sed -e 's|^.*=||'`
+
+ eval sed -i -e \'s\|\^\\\*$TYPE\:\[ \\t\]\.\*\$\|\*${TYPE}:\\t$VALUE\|\' \
+ $ADFILE
+
+ shift
+ done
+}
+
+fix_adfile driver/XScreenSaver.ad.in \
+ grabDesktopImages=False lock=True \
+ splash=False ignoreUninstalledPrograms=True \
+ passwd.heading.label=Screen\ Locked
sed -i -e 's|version [45].[0-9a-z][0-9a-z]*|version %{version}|' \
driver/XScreenSaver.ad.in
@@ -237,6 +253,10 @@
%defattr(-,root,root)
%changelog
+* Thu Jun 1 2006 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.00-4
+- Rewrite the patch for decimal separator as discussed with jwz.
+- Change default not by patch but by function.
+
* Wed May 31 2006 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.00-3
- Fix browser option patch.
More information about the fedora-extras-commits
mailing list