diff options
author | Markus Volk <f_l_k@t-online.de> | 2023-11-13 02:13:35 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-11-12 23:35:22 -0800 |
commit | dba4071b696df1d399f9320fb40eb8b6eeae266c (patch) | |
tree | 33c2e9a9427405c8eb3b786be86e166001f2bd67 | |
parent | c23089715ea11e7e4b9ac3b3abe68d38ee47c1fa (diff) | |
download | meta-openembedded-dba4071b696df1d399f9320fb40eb8b6eeae266c.tar.gz |
ghex: backport patch to fix build for clang
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-gnome/recipes-gnome/ghex/ghex/0001-gtkhex-Local-variables-in-switch-statement-should-be.patch | 50 | ||||
-rw-r--r-- | meta-gnome/recipes-gnome/ghex/ghex_45.0.bb | 1 |
2 files changed, 51 insertions, 0 deletions
diff --git a/meta-gnome/recipes-gnome/ghex/ghex/0001-gtkhex-Local-variables-in-switch-statement-should-be.patch b/meta-gnome/recipes-gnome/ghex/ghex/0001-gtkhex-Local-variables-in-switch-statement-should-be.patch new file mode 100644 index 0000000000..61cd3b1809 --- /dev/null +++ b/meta-gnome/recipes-gnome/ghex/ghex/0001-gtkhex-Local-variables-in-switch-statement-should-be.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From b00b8332ab19e41c75ce143f45ab4585502c020b Mon Sep 17 00:00:00 2001 | ||
2 | From: Logan Rathbone <poprocks@gmail.com> | ||
3 | Date: Tue, 24 Oct 2023 14:06:04 -0400 | ||
4 | Subject: [PATCH] gtkhex: Local variables in switch statement should be in own | ||
5 | scope | ||
6 | |||
7 | Fixes: #74 | ||
8 | |||
9 | Thanks to: David C. Manuelda | ||
10 | |||
11 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/ghex/-/commit/b00b8332ab19e41c75ce143f45ab4585502c020b] | ||
12 | --- | ||
13 | src/gtkhex.c | 4 ++++ | ||
14 | 1 file changed, 4 insertions(+) | ||
15 | |||
16 | diff --git a/src/gtkhex.c b/src/gtkhex.c | ||
17 | index b401cd9..18e0433 100644 | ||
18 | --- a/src/gtkhex.c | ||
19 | +++ b/src/gtkhex.c | ||
20 | @@ -1941,6 +1941,7 @@ key_press_cb (GtkEventControllerKey *controller, | ||
21 | break; | ||
22 | |||
23 | case GDK_KEY_Home: | ||
24 | + { | ||
25 | gint64 line_beg = self->cursor_pos; | ||
26 | |||
27 | while (line_beg % self->cpl != 0) | ||
28 | @@ -1948,9 +1949,11 @@ key_press_cb (GtkEventControllerKey *controller, | ||
29 | |||
30 | hex_widget_set_cursor (self, line_beg); | ||
31 | ret = GDK_EVENT_STOP; | ||
32 | + } | ||
33 | break; | ||
34 | |||
35 | case GDK_KEY_End: | ||
36 | + { | ||
37 | gint64 line_end = self->cursor_pos; | ||
38 | |||
39 | while (line_end % self->cpl != self->cpl - 1) | ||
40 | @@ -1958,6 +1961,7 @@ key_press_cb (GtkEventControllerKey *controller, | ||
41 | |||
42 | hex_widget_set_cursor (self, MIN (line_end, payload_size)); | ||
43 | ret = GDK_EVENT_STOP; | ||
44 | + } | ||
45 | break; | ||
46 | |||
47 | default: | ||
48 | -- | ||
49 | 2.42.0 | ||
50 | |||
diff --git a/meta-gnome/recipes-gnome/ghex/ghex_45.0.bb b/meta-gnome/recipes-gnome/ghex/ghex_45.0.bb index 6d3e9b978c..42c53471bb 100644 --- a/meta-gnome/recipes-gnome/ghex/ghex_45.0.bb +++ b/meta-gnome/recipes-gnome/ghex/ghex_45.0.bb | |||
@@ -15,6 +15,7 @@ GIR_MESON_DISABLE_FLAG = 'disabled' | |||
15 | 15 | ||
16 | inherit gnomebase gsettings gtk-icon-cache gnome-help gettext gobject-introspection vala gi-docgen | 16 | inherit gnomebase gsettings gtk-icon-cache gnome-help gettext gobject-introspection vala gi-docgen |
17 | 17 | ||
18 | SRC_URI += "file://0001-gtkhex-Local-variables-in-switch-statement-should-be.patch" | ||
18 | SRC_URI[archive.sha256sum] = "05cecc4561ca40b257c5db31da9f68d696133efc0ae427ed82fb985a986e840e" | 19 | SRC_URI[archive.sha256sum] = "05cecc4561ca40b257c5db31da9f68d696133efc0ae427ed82fb985a986e840e" |
19 | 20 | ||
20 | FILES:${PN} += "${libdir} ${datadir}/metainfo" | 21 | FILES:${PN} += "${libdir} ${datadir}/metainfo" |