diff --git a/gdm-2.23.2-unknown-lang.patch b/gdm-2.23.2-unknown-lang.patch new file mode 100644 index 0000000..93a4b66 --- /dev/null +++ b/gdm-2.23.2-unknown-lang.patch @@ -0,0 +1,55 @@ +diff -up gdm-2.23.2/gui/simple-greeter/gdm-language-chooser-widget.c.unknown-lang gdm-2.23.2/gui/simple-greeter/gdm-language-chooser-widget.c +--- gdm-2.23.2/gui/simple-greeter/gdm-language-chooser-widget.c.unknown-lang 2008-08-14 15:26:43.000000000 -0400 ++++ gdm-2.23.2/gui/simple-greeter/gdm-language-chooser-widget.c 2008-08-14 15:26:50.000000000 -0400 +@@ -133,6 +133,7 @@ gdm_language_chooser_widget_add_language + static gboolean + language_has_font (const char *locale) + { ++ const FcCharSet *charset; + FcPattern *pattern; + FcObjectSet *object_set; + FcFontSet *font_set; +@@ -146,22 +147,30 @@ language_has_font (const char *locale) + + gdm_parse_language_name (locale, &language_code, NULL, NULL, NULL); + +- pattern = FcPatternBuild (NULL, FC_LANG, FcTypeString, language_code, NULL); ++ charset = FcLangGetCharSet ((FcChar8 *) language_code); ++ if (!charset) ++ /* fontconfig does not know about this language */ ++ is_displayable = TRUE; ++ else ++ { ++ /* see if any fonts support rendering it */ ++ pattern = FcPatternBuild (NULL, FC_LANG, FcTypeString, language_code, NULL); ++ ++ if (pattern == NULL) ++ goto done; ++ ++ object_set = FcObjectSetCreate (); ++ ++ if (object_set == NULL) ++ goto done; + +- if (pattern == NULL) +- goto done; ++ font_set = FcFontList (NULL, pattern, object_set); + +- object_set = FcObjectSetBuild (NULL, NULL); ++ if (font_set == NULL) ++ goto done; + +- if (object_set == NULL) +- goto done; +- +- font_set = FcFontList (NULL, pattern, object_set); +- +- if (font_set == NULL) +- goto done; +- +- is_displayable = (font_set->nfont > 0); ++ is_displayable = (font_set->nfont > 0); ++ } + + done: + diff --git a/gdm.spec b/gdm.spec index 5bfcd4a..205d63a 100644 --- a/gdm.spec +++ b/gdm.spec @@ -11,11 +11,12 @@ %define polkit_version 0.7 %define consolekit_version 0.2.7 %define hal_version 0.5.9 +%define fontconfig_version 2.6.0 Summary: The GNOME Display Manager Name: gdm Version: 2.23.2 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 License: GPLv2+ Group: User Interface/X @@ -53,7 +54,7 @@ BuildRequires: gtk2-devel >= 0:%{gtk2_version} BuildRequires: libglade2-devel >= 0:%{libglade2_version} BuildRequires: libgnomeui-devel >= 0:%{libgnomeui_version} BuildRequires: pam-devel >= 0:%{pam_version} -BuildRequires: fontconfig +BuildRequires: fontconfig >= 0:%{fontconfig_version} BuildRequires: desktop-file-utils >= %{desktop_file_utils_version} BuildRequires: gail-devel >= 0:%{gail_version} BuildRequires: libtool automake autoconf @@ -79,6 +80,9 @@ BuildRequires: libxklavier-devel Requires: audit-libs >= %{libauditver} Patch1: xkb-groups.patch +# Upstreamed +Patch2: gdm-2.23.2-unknown-lang.patch + # Fedora-specific Patch99: gdm-2.23.1-fedora-logo.patch @@ -100,6 +104,7 @@ multiple simulanteous logged in users. %prep %setup -q %patch1 -p1 -b .xkb-groups +%patch2 -p1 -b .unknown-lang %patch99 -p1 -b .fedora-logo autoreconf @@ -299,6 +304,9 @@ fi %{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml %changelog +* Thu Aug 14 2008 Behdad Esfahbod - 1:2.23.2-3 +- Add upstreamed patch gdm-2.23.2-unknown-lang.patch + * Wed Aug 13 2008 Ray Strode - 1:2.23.2-2 - Require plymouth-gdm-hooks so plymouth-log-viewer gets pulled in on upgrades