summaryrefslogtreecommitdiffstats
path: root/x11-libs
diff options
context:
space:
mode:
authorIsmael Luceno2018-06-22 00:12:54 -0300
committerIsmael Luceno2018-06-22 00:46:44 -0300
commitf083cd8191c279c2daf1565b68e297be825c84b8 (patch)
tree4e5036e1429f710cd72a7a6a8bfd1603732be0f0 /x11-libs
parentd1d792860eb452e2e946a84453f5f885af90926c (diff)
fontconfig: Add patch for locale setup bug
Diffstat (limited to 'x11-libs')
-rwxr-xr-xx11-libs/fontconfig/DETAILS2
-rw-r--r--x11-libs/fontconfig/HISTORY4
-rwxr-xr-xx11-libs/fontconfig/PRE_BUILD3
-rw-r--r--x11-libs/fontconfig/fontconfig-2.13.0-locale.patch42
4 files changed, 51 insertions, 0 deletions
diff --git a/x11-libs/fontconfig/DETAILS b/x11-libs/fontconfig/DETAILS
index 4cd7dc532e..add84e6fd7 100755
--- a/x11-libs/fontconfig/DETAILS
+++ b/x11-libs/fontconfig/DETAILS
@@ -2,9 +2,11 @@
if [[ "$FONTCONFIG_BRANCH" == "devel" ]]; then
VERSION=2.13.0
SOURCE_HASH=sha512:f0ad8f2542c8b1e900f5c3d213466a31dd3785da726d6eb455b6734c71c6e5751b28172203e2f9668e9c8e1512072235ea46a1a5e6a85ec54ccc332adb4e5fbc
+ PATCHLEVEL=1
else
VERSION=2.13.0
SOURCE_HASH=sha512:f0ad8f2542c8b1e900f5c3d213466a31dd3785da726d6eb455b6734c71c6e5751b28172203e2f9668e9c8e1512072235ea46a1a5e6a85ec54ccc332adb4e5fbc
+ PATCHLEVEL=1
fi
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
diff --git a/x11-libs/fontconfig/HISTORY b/x11-libs/fontconfig/HISTORY
index 13e16be71e..2cc4c2abdf 100644
--- a/x11-libs/fontconfig/HISTORY
+++ b/x11-libs/fontconfig/HISTORY
@@ -1,3 +1,7 @@
+2018-06-22 Ismael Luceno <ismael@iodev.co.uk>
+ * PRE_BUILD, fontconfig-2.13.0-locale.patch: added locale setup bugfix
+ * DETAILS: PATCHLEVEL++
+
2018-03-06 Pavel Vinogradov <public@sourcemage.org>
* DETAILS: version 2.13.0
diff --git a/x11-libs/fontconfig/PRE_BUILD b/x11-libs/fontconfig/PRE_BUILD
new file mode 100755
index 0000000000..815336d1a0
--- /dev/null
+++ b/x11-libs/fontconfig/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+patch -fp1 -i "$SPELL_DIRECTORY"/fontconfig-2.13.0-locale.patch
diff --git a/x11-libs/fontconfig/fontconfig-2.13.0-locale.patch b/x11-libs/fontconfig/fontconfig-2.13.0-locale.patch
new file mode 100644
index 0000000000..c6df432e9f
--- /dev/null
+++ b/x11-libs/fontconfig/fontconfig-2.13.0-locale.patch
@@ -0,0 +1,42 @@
+Locale setup bugfix; leave the locale setting to applications
+
+Based on patches by Akira TAGOH <akira@tagoh.org>.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=105492
+
+---
+ fc-conflist/fc-conflist.c | 1 +
+ src/fccfg.c | 12 ------------
+ 2 files changed, 1 insertion(+), 12 deletions(-)
+
+--- a/fc-conflist/fc-conflist.c
++++ b/fc-conflist/fc-conflist.c
+@@ -102,6 +102,7 @@ main (int argc, char **argv)
+ #if HAVE_GETOPT_LONG || HAVE_GETOPT
+ int c;
+
++ setlocale (LC_ALL, "");
+ #if HAVE_GETOPT_LONG
+ while ((c = getopt_long (argc, argv, "Vh", longopts, NULL)) != -1)
+ #else
+--- a/src/fccfg.c
++++ b/src/fccfg.c
+@@ -39,18 +39,6 @@ static FcConfig *
+ FcConfigEnsure (void)
+ {
+ FcConfig *config;
+- FcBool is_locale_initialized;
+- static void *static_is_locale_initialized;
+-retry_locale:
+- is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized);
+- if (!is_locale_initialized)
+- {
+- 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, "");
+- }
+ retry_config:
+ config = fc_atomic_ptr_get (&_fcConfig);
+ if (!config)