Date: Mon, 24 Jul 2017 12:56:07 +0000 (UTC) From: Ben Woods <woodsb02@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r446525 - in branches/2017Q3/x11: lightdm lightdm-gtk-greeter lightdm-gtk-greeter/files lightdm/files Message-ID: <201707241256.v6OCu7oP094428@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: woodsb02 Date: Mon Jul 24 12:56:07 2017 New Revision: 446525 URL: https://svnweb.freebsd.org/changeset/ports/446525 Log: MFH: r446523 x11/lightdm: Fix locale selection - Allow locale selection on login screen. First, lightdm must be patched to correctly detect utf8 locales, which have a UTF-8 suffix on FreeBSD instead of utf8 like on Linux systems. Secondly, we have to use locale codes in the language menuitem as FreeBSD doesn't have support for locale naming (missing _NL_IDENTIFICATION_LANGUAGE implementation). - Use @sample for lightdm-gtk-greeter config file to prevent it from being overwritten when the package is reinstalled / upgraded. PR: 220614 Submitted by: pawel Approved by: ports-secteam blanket Added: branches/2017Q3/x11/lightdm-gtk-greeter/files/ - copied from r446523, head/x11/lightdm-gtk-greeter/files/ Modified: branches/2017Q3/x11/lightdm-gtk-greeter/Makefile branches/2017Q3/x11/lightdm-gtk-greeter/pkg-plist branches/2017Q3/x11/lightdm/Makefile branches/2017Q3/x11/lightdm/files/patch-liblightdm-gobject_language.c Directory Properties: branches/2017Q3/ (props changed) Modified: branches/2017Q3/x11/lightdm-gtk-greeter/Makefile ============================================================================== --- branches/2017Q3/x11/lightdm-gtk-greeter/Makefile Mon Jul 24 12:48:20 2017 (r446524) +++ branches/2017Q3/x11/lightdm-gtk-greeter/Makefile Mon Jul 24 12:56:07 2017 (r446525) @@ -3,6 +3,7 @@ PORTNAME= lightdm-gtk-greeter PORTVERSION= 2.0.2 +PORTREVISION= 1 CATEGORIES= x11 MASTER_SITES= https://launchpad.net/${PORTNAME}/${PORTVERSION:R}/${PORTVERSION}/+download/ @@ -19,5 +20,9 @@ GNU_CONFIGURE= yes USE_GNOME= cairo gdkpixbuf2 gtk30 intltool USE_XFCE= libexo USE_XORG= x11 + +post-install: + (cd ${STAGEDIR}${PREFIX}/etc/lightdm && ${MV} lightdm-gtk-greeter.conf \ + lightdm-gtk-greeter.conf.sample) .include <bsd.port.mk> Modified: branches/2017Q3/x11/lightdm-gtk-greeter/pkg-plist ============================================================================== --- branches/2017Q3/x11/lightdm-gtk-greeter/pkg-plist Mon Jul 24 12:48:20 2017 (r446524) +++ branches/2017Q3/x11/lightdm-gtk-greeter/pkg-plist Mon Jul 24 12:56:07 2017 (r446525) @@ -1,4 +1,4 @@ -etc/lightdm/lightdm-gtk-greeter.conf +@sample etc/lightdm/lightdm-gtk-greeter.conf.sample sbin/lightdm-gtk-greeter %%PORTDOCS%%%%DOCSDIR%%/sample-lightdm-gtk-greeter.css share/icons/hicolor/scalable/places/budgie-desktop_badge-symbolic.svg Modified: branches/2017Q3/x11/lightdm/Makefile ============================================================================== --- branches/2017Q3/x11/lightdm/Makefile Mon Jul 24 12:48:20 2017 (r446524) +++ branches/2017Q3/x11/lightdm/Makefile Mon Jul 24 12:56:07 2017 (r446525) @@ -3,7 +3,7 @@ PORTNAME= lightdm PORTVERSION= 1.20.0 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11 MASTER_SITES= https://launchpad.net/${PORTNAME}/${PORTVERSION:R}/${PORTVERSION}/+download/ Modified: branches/2017Q3/x11/lightdm/files/patch-liblightdm-gobject_language.c ============================================================================== --- branches/2017Q3/x11/lightdm/files/patch-liblightdm-gobject_language.c Mon Jul 24 12:48:20 2017 (r446524) +++ branches/2017Q3/x11/lightdm/files/patch-liblightdm-gobject_language.c Mon Jul 24 12:56:07 2017 (r446525) @@ -1,8 +1,52 @@ https://bugs.launchpad.net/lightdm/+bug/790186 ---- liblightdm-gobject/language.c.orig 2016-12-09 01:04:48 UTC +--- liblightdm-gobject/language.c.orig 2016-09-30 03:23:52 UTC +++ liblightdm-gobject/language.c -@@ -248,10 +248,16 @@ lightdm_language_get_name (LightDMLangua +@@ -36,6 +36,12 @@ G_DEFINE_TYPE (LightDMLanguage, lightdm_language, G_TY + static gboolean have_languages = FALSE; + static GList *languages = NULL; + ++static gboolean ++is_utf8 (const gchar *code) ++{ ++ return g_strrstr (code, ".utf8") || g_strrstr (code, ".UTF-8"); ++} ++ + static void + update_languages (void) + { +@@ -72,7 +78,7 @@ update_languages (void) + continue; + + /* Ignore the non-interesting languages */ +- if (strcmp (command, "locale -a") == 0 && !g_strrstr (code, ".utf8")) ++ if (strcmp (command, "locale -a") == 0 && !is_utf8 (code)) + continue; + + language = g_object_new (LIGHTDM_TYPE_LANGUAGE, "code", code, NULL); +@@ -88,12 +94,6 @@ update_languages (void) + have_languages = TRUE; + } + +-static gboolean +-is_utf8 (const gchar *code) +-{ +- return g_strrstr (code, ".utf8") || g_strrstr (code, ".UTF-8"); +-} +- + /* Get a valid locale name that can be passed to setlocale(), so we always can use nl_langinfo() to get language and country names. */ + static gchar * + get_locale_name (const gchar *code) +@@ -133,7 +133,7 @@ get_locale_name (const gchar *code) + for (i = 0; avail_locales[i]; i++) + { + gchar *loc = avail_locales[i]; +- if (!g_strrstr (loc, ".utf8")) ++ if (!is_utf8 (loc)) + continue; + if (g_str_has_prefix (loc, language)) + { +@@ -227,10 +227,16 @@ lightdm_language_get_name (LightDMLanguage *language) if (locale) { gchar *current = setlocale (LC_ALL, NULL); @@ -19,7 +63,7 @@ https://bugs.launchpad.net/lightdm/+bug/790186 if (language_en && strlen (language_en) > 0) priv->name = g_strdup (dgettext ("iso_639_3", language_en)); -@@ -291,10 +297,16 @@ lightdm_language_get_territory (LightDML +@@ -270,10 +276,16 @@ lightdm_language_get_territory (LightDMLanguage *langu if (locale) { gchar *current = setlocale (LC_ALL, NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707241256.v6OCu7oP094428>