guix-devel
[Top][All Lists]
Advanced

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

Re: 01/01: gnu: evolution-data-server: Fix locale handling.


From: Mark H Weaver
Subject: Re: 01/01: gnu: evolution-data-server: Fix locale handling.
Date: Wed, 17 Jul 2019 14:34:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Hi Timothy,

address@hidden writes:

> samplet pushed a commit to branch core-updates
> in repository guix.
>
> commit d619686250d8bb15bf67031f8ac80f9cfb400a26
> Author: Timothy Sample <address@hidden>
> Date:   Sun Jul 14 23:47:44 2019 -0400
>
>     gnu: evolution-data-server: Fix locale handling.
>     
>     * gnu/packages/gnome.scm (evolution-data-server)[arguments]: Add a phase
>     that patches the source code to fix a locale handling issue.
> ---
>  gnu/packages/gnome.scm | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index ae5b85d..f42b506 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -5211,6 +5211,22 @@ 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"

IMO, we should use patches for things like this.  Most importantly, the
'substitute*' may silently do the wrong thing, or perhaps do nothing at
all, when the relevant code changes.  The 'patch' program is far more
robust in such scenarios.  Also, it would be good for fixes like this to
be included in the result of "guix build --source".

What do you think?

Anyway, thanks for working on it.

    Regards,
      Mark



reply via email to

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