summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2018-03-14 13:31:50 +0100
committerUlrich Müller <ulm@gentoo.org>2018-03-14 13:31:50 +0100
commit34fb871502ff7941c54b6058727caf3ef563dc39 (patch)
treee9814c0da2b2ae0a176f78b6050519cac53bac8d /media-libs/fontconfig/files/fontconfig-2.13.0-locale.patch
parentsys-kernel/rt-sources: remove old (diff)
downloadgentoo-34fb871502ff7941c54b6058727caf3ef563dc39.tar.gz
gentoo-34fb871502ff7941c54b6058727caf3ef563dc39.tar.bz2
gentoo-34fb871502ff7941c54b6058727caf3ef563dc39.zip
media-libs/fontconfig: Fix handling of locale and of font weights.
Non-maintainer commit. Patches from upstream. Closes: https://bugs.gentoo.org/650332 Closes: https://bugs.gentoo.org/650370 Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'media-libs/fontconfig/files/fontconfig-2.13.0-locale.patch')
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.13.0-locale.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/media-libs/fontconfig/files/fontconfig-2.13.0-locale.patch b/media-libs/fontconfig/files/fontconfig-2.13.0-locale.patch
new file mode 100644
index 000000000000..70868b1abc11
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.13.0-locale.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/650332
+
+From 923b5be626a6e03fbaeee0b5cd6d0246c2f8f36f Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Wed, 14 Mar 2018 12:35:05 +0900
+Subject: [PATCH] Do not override locale if already set by app
+
+https://bugs.freedesktop.org/show_bug.cgi?id=105492
+---
+ src/fccfg.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/fccfg.c b/src/fccfg.c
+index eb0b76d..e311f17 100644
+--- a/src/fccfg.c
++++ b/src/fccfg.c
+@@ -45,11 +45,16 @@ retry_locale:
+ is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized);
+ if (!is_locale_initialized)
+ {
++ char *loc;
++
+ is_locale_initialized = FcTrue;
+ if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL,
+ (void *)(intptr_t) is_locale_initialized))
+ goto retry_locale;
+- setlocale (LC_ALL, "");
++
++ loc = setlocale (LC_ALL, NULL);
++ if (!loc || strcmp (loc, "C") == 0)
++ setlocale (LC_ALL, "");
+ }
+ retry_config:
+ config = fc_atomic_ptr_get (&_fcConfig);
+--
+2.16.2
+