comparison src/glib-2-optional-gettext.patch @ 978:750e3f9eec37

improved patches for package glib
author Volker Grabsch <vog@notjusthosting.com>
date Sun, 16 May 2010 17:04:07 +0200
parents dd1f42da3294
children 3678e84e0238
comparison
equal deleted inserted replaced
977:ca52d9f7559d 978:750e3f9eec37
1 This file is part of mingw-cross-env. 1 This file is part of mingw-cross-env.
2 See doc/index.html for further information. 2 See doc/index.html for further information.
3 3
4 diff -r 0afda95c1aa4 configure.in 4 diff -r 3241a43cfc79 configure.in
5 --- a/configure.in Sun May 16 15:54:15 2010 +0200 5 --- a/configure.in Sun May 16 16:38:34 2010 +0200
6 +++ b/configure.in Sun May 16 16:07:08 2010 +0200 6 +++ b/configure.in Sun May 16 17:02:59 2010 +0200
7 @@ -477,8 +477,8 @@ 7 @@ -477,8 +477,8 @@
8 GLIB_GNU_GETTEXT 8 GLIB_GNU_GETTEXT
9 9
10 if test "$gt_cv_have_gettext" != "yes" ; then 10 if test "$gt_cv_have_gettext" != "yes" ; then
11 - AC_MSG_ERROR([ 11 - AC_MSG_ERROR([
13 + AC_MSG_WARN([ 13 + AC_MSG_WARN([
14 +*** You should either have gettext support in your C library, or use the 14 +*** You should either have gettext support in your C library, or use the
15 *** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html 15 *** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
16 ]) 16 ])
17 fi 17 fi
18 diff -r f084585629df gio/gsettings.c 18 diff -r 3241a43cfc79 gio/gsettings.c
19 --- a/gio/gsettings.c Tue Apr 27 23:13:34 2010 +0200 19 --- a/gio/gsettings.c Sun May 16 16:38:34 2010 +0200
20 +++ b/gio/gsettings.c Tue Apr 27 23:17:47 2010 +0200 20 +++ b/gio/gsettings.c Sun May 16 17:02:59 2010 +0200
21 @@ -782,16 +782,13 @@ 21 @@ -782,16 +782,13 @@
22 const gchar *translated; 22 const gchar *translated;
23 GError *error = NULL; 23 GError *error = NULL;
24 const gchar *domain; 24 const gchar *domain;
25 - gint lc_category; 25 - gint lc_category;
35 - translated = dcgettext (domain, unparsed, lc_category); 35 - translated = dcgettext (domain, unparsed, lc_category);
36 + translated = dgettext (domain, unparsed); 36 + translated = dgettext (domain, unparsed);
37 37
38 if (translated != unparsed) 38 if (translated != unparsed)
39 /* it was translated, so we need to re-parse it */ 39 /* it was translated, so we need to re-parse it */
40 diff -r 3241a43cfc79 glib/gi18n.h
41 --- a/glib/gi18n.h Sun May 16 16:38:34 2010 +0200
42 +++ b/glib/gi18n.h Sun May 16 17:02:59 2010 +0200
43 @@ -22,7 +22,12 @@
44
45 #include <glib.h>
46
47 +#ifdef ENABLE_NLS
48 #include <libintl.h>
49 +#else
50 +#define gettext(String) (String)
51 +#endif
52 +
53 #include <string.h>
54
55 #define _(String) gettext (String)