aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2024-05-06 11:07:54 +0200
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:45:02 +0200
commit5ae81761ab293c6463ef8c4060cc01c7e74540d8 (patch)
tree14fbae4a42cf6b89a7d2c23f3fd97b730bd1f0a6 /gnu
parent74e49ef9dcf430476c8ebe214bb67219e9bb7926 (diff)
downloadguix-5ae81761ab293c6463ef8c4060cc01c7e74540d8.tar.gz
guix-5ae81761ab293c6463ef8c4060cc01c7e74540d8.zip
gnu: epiphany: Fix encoding test.
* gnu/packages/patches/epiphany-fix-encoding-test.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/gnome.scm (epiphany): Use it. Change-Id: I5405d92d4b355471ce7d62aceebdcde1500716b1
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/gnome.scm3
-rw-r--r--gnu/packages/patches/epiphany-fix-encoding-test.patch40
3 files changed, 43 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 1fb301f34a..40d10db02c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1195,6 +1195,7 @@ dist_patch_DATA = \
%D%/packages/patches/enblend-enfuse-reproducible.patch \
%D%/packages/patches/enjarify-setup-py.patch \
%D%/packages/patches/enlightenment-fix-setuid-path.patch \
+ %D%/packages/patches/epiphany-fix-encoding-test.patch \
%D%/packages/patches/ergodox-firmware-fix-json-target.patch \
%D%/packages/patches/ergodox-firmware-fix-numpad.patch \
%D%/packages/patches/erlang-man-path.patch \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index bceb5e7b63..32bc228173 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7220,7 +7220,8 @@ almost all of them.")
"epiphany-" version ".tar.xz"))
(sha256
(base32
- "1n3df2skvgmjw9sybhn811l4b58ibwxc0dc208wpvxg060pyhpfk"))))
+ "1n3df2skvgmjw9sybhn811l4b58ibwxc0dc208wpvxg060pyhpfk"))
+ (patches (search-patches "epiphany-fix-encoding-test.patch"))))
(build-system meson-build-system)
(arguments
(list
diff --git a/gnu/packages/patches/epiphany-fix-encoding-test.patch b/gnu/packages/patches/epiphany-fix-encoding-test.patch
new file mode 100644
index 0000000000..a491053d06
--- /dev/null
+++ b/gnu/packages/patches/epiphany-fix-encoding-test.patch
@@ -0,0 +1,40 @@
+From 3b334ba2c9dc869dc84e4b2f84d00df972c0e734 Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro@redhat.com>
+Date: Fri, 10 Nov 2023 15:36:14 -0600
+Subject: [PATCH] Fix encodings test when running in non-English locale
+
+Let's force use of the C.UTF-8 locale, so the value of the collation key
+does not depend on the host locale.
+
+Fixes #1842
+
+Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1413>
+---
+ tests/ephy-encodings-test.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/ephy-encodings-test.c b/tests/ephy-encodings-test.c
+index a3ea7e781d..992d80d2c2 100644
+--- a/tests/ephy-encodings-test.c
++++ b/tests/ephy-encodings-test.c
+@@ -44,7 +44,7 @@ test_ephy_encodings_create (void)
+ g_assert_cmpstr (ephy_encoding_get_encoding (encoding), ==, "UTF-8");
+ g_assert_cmpstr (ephy_encoding_get_title (encoding), ==, "Unicode (UTF-8)");
+ g_assert_cmpstr (ephy_encoding_get_title_elided (encoding), ==, "Unicode (UTF-8)");
+- g_assert_cmpstr (ephy_encoding_get_collation_key (encoding), ==, "\311\263\307\276\307\205\305\271\310\215\306\202\306\216\311\263\311\250\306\245\305\237\001\035\035\035\035\035\035\035\035\035\035\035\001\007\002\002\002\002\002\002\007\007\007\002\001\001\346\244\273\001\346\215\264\001\346\211\243\001\346\204\235\001\346\216\257\001\346\205\217\001\346\206\212\001\343\265\233\001\343\265\242\001\346\244\273\001\346\244\231\001\346\234\257\001\343\265\247\001\345\277\241\001\343\265\243");
++ g_assert_cmpstr (ephy_encoding_get_collation_key (encoding), ==, "Unicode (UTF-8)");
+ g_assert_cmpint (ephy_encoding_get_language_groups (encoding), ==, LG_UNICODE);
+
+ g_object_unref (encoding);
+@@ -80,7 +80,7 @@ main (int argc,
+ int ret;
+
+ gtk_test_init (&argc, &argv);
+- setlocale (LC_ALL, "");
++ setlocale (LC_ALL, "C.UTF-8");
+
+ ephy_debug_init ();
+
+--
+GitLab
+