guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: evolution-data-server: Use a proper patch for locales.


From: guix-commits
Subject: 01/02: gnu: evolution-data-server: Use a proper patch for locales.
Date: Fri, 19 Jul 2019 13:10:40 -0400 (EDT)

samplet pushed a commit to branch core-updates
in repository guix.

commit e1f174ae284d9954840f1723ac012c0d3fbcecb4
Author: Timothy Sample <address@hidden>
Date:   Fri Jul 19 10:36:21 2019 -0400

    gnu: evolution-data-server: Use a proper patch for locales.
    
    See <https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00265.html>.
    
    * gnu/packages/patches/evolution-data-server-locales.patch: New file.
    * gnu/local.mk: Add it.
    * gnu/packages/gnome.scm (evolution-data-server): Replace the
    'patch-locale-canonicalization' phase with the new patch.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/gnome.scm                             | 17 +----------
 .../patches/evolution-data-server-locales.patch    | 33 ++++++++++++++++++++++
 3 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 528ad70..c95a5c8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -780,6 +780,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/erlang-man-path.patch                   \
   %D%/packages/patches/eudev-rules-directory.patch             \
   %D%/packages/patches/evilwm-lost-focus-bug.patch             \
+  %D%/packages/patches/evolution-data-server-locales.patch     \
   %D%/packages/patches/exiv2-CVE-2017-14860.patch              \
   %D%/packages/patches/exiv2-CVE-2017-14859-14862-14864.patch  \
   %D%/packages/patches/extundelete-e2fsprogs-1.44.patch                \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index beaba3b..9190301 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5162,6 +5162,7 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.")
               (uri (string-append "mirror://gnome/sources/" name "/"
                                   (version-major+minor version) "/"
                                   name "-" version ".tar.xz"))
+              (patches (search-patches "evolution-data-server-locales.patch"))
               (sha256
                (base32
                 "1s952wyhgcbmq9nfgk75v15zdy1h3wy5p5rmkqibaavmc0pk3mli"))))
@@ -5205,22 +5206,6 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.")
                            "tests/libedata-cal/test-cal-cache-utils.c")
               (("/bin/rm") (which "rm")))
             #t))
-         ;; This phase fixes locale canonicalization when using newer
-         ;; versions of ICU.  The bug has been fixed upstream, and
-         ;; should appear starting in version 3.33.5.
-         ;; <https://gitlab.gnome.org/GNOME/evolution-data-server/issues/137>.
-         (add-after 'unpack 'patch-locale-canonicalization
-           (lambda _
-             (substitute* "src/libedataserver/e-collator.c"
-               (("len = uloc_canonicalize \\(posix_locale,.*" x)
-                ((lambda (xs) (string-join xs "\n" 'suffix))
-                 (list
-                  "if (posix_locale && ("
-                  "    g_ascii_strcasecmp(posix_locale, \"C\") == 0 ||"
-                  "    g_ascii_strcasecmp(posix_locale, \"POSIX\") == 0))"
-                  "  posix_locale = \"en_US_POSIX\";"
-                  x))))
-             #t))
          (add-before 'configure 'dont-override-rpath
            (lambda _
              (substitute* "CMakeLists.txt"
diff --git a/gnu/packages/patches/evolution-data-server-locales.patch 
b/gnu/packages/patches/evolution-data-server-locales.patch
new file mode 100644
index 0000000..48baefb
--- /dev/null
+++ b/gnu/packages/patches/evolution-data-server-locales.patch
@@ -0,0 +1,33 @@
+This patch fixes locale canonicalization when using newer versions of
+ICU.  It comes from the upstream repo, and should appear starting in
+version 3.33.5.
+
+From fe4ac94ce3c14f200e049a5d102fc0e4b811c71e Mon Sep 17 00:00:00 2001
+From: Milan Crha <address@hidden>
+Date: Tue, 16 Jul 2019 07:22:07 +0200
+Subject: [PATCH] I#137 - POSIX locale tests fail with ICU 64.x
+
+Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/137
+---
+ src/libedataserver/e-collator.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/libedataserver/e-collator.c b/src/libedataserver/e-collator.c
+index 718eac5da..ec2cf7951 100644
+--- a/src/libedataserver/e-collator.c
++++ b/src/libedataserver/e-collator.c
+@@ -132,6 +132,11 @@ canonicalize_locale (const gchar *posix_locale,
+       gint   len;
+       const gchar *collation_type = NULL;
+ 
++      if (posix_locale && (
++          g_ascii_strcasecmp (posix_locale, "C") == 0 ||
++          g_ascii_strcasecmp (posix_locale, "POSIX") == 0))
++              posix_locale = "en_US_POSIX";
++
+       len = uloc_canonicalize (posix_locale, locale_buffer, 
LOCALE_BUFFER_LEN, &status);
+ 
+       if (U_FAILURE (status)) {
+-- 
+2.22.0
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]