diff options
author | Markus Volk <f_l_k@t-online.de> | 2025-05-09 14:26:54 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-05-09 16:23:04 -0700 |
commit | 92cfdce17471bc42df8016a8ce0dda147d752b5c (patch) | |
tree | f4fbfad9bda7a8feeb25fa0d7873c8d5804ad124 | |
parent | 90e2f77ce10393b57a30539107d8a2196dc10fc6 (diff) | |
download | meta-openembedded-92cfdce17471bc42df8016a8ce0dda147d752b5c.tar.gz |
gimp: fix build with gcc-15
Add a backport patch to fix:
| ../gimp-3.0.2/libgimpconfig/gimpconfig-serialize.c: In function 'gimp_config_serialize_value':
| ../gimp-3.0.2/libgimpconfig/gimpconfig-serialize.c:526:29: error: expected expression before 'bool'
| 526 | g_string_append (str, bool ? "yes" : "no");
| | ^~~~
| ../recipe-sysroot/usr/include/glib-2.0/glib/gstring.h:269:26: note: in definition of macro 'g_string_append'
| 269 | (__builtin_constant_p (val) ? \
| | ^~~
| ../gimp-3.0.2/libgimpconfig/gimpconfig-serialize.c:526:34: error: expected ')' before '?' token
| 526 | g_string_append (str, bool ? "yes" : "no");
| | ^
| ../recipe-sysroot/usr/include/glib-2.0/glib/gstring.h:271:35: note: in definition of macro 'g_string_append'
| 271 | const char * const __val = (val); \
| | ^~~
| ../recipe-sysroot/usr/include/glib-2.0/glib/gstring.h:271:34: note: to match this '('
| 271 | const char * const __val = (val); \
| | ^
| ../gimp-3.0.2/libgimpconfig/gimpconfig-serialize.c:526:7: note: in expansion of macro 'g_string_append'
| 526 | g_string_append (str, bool ? "yes" : "no");
| | ^~~~~~~~~~~~~~~
| ../recipe-sysroot/usr/include/glib-2.0/glib/gstring.h:271:39: error: expected expression before ';' token
| 271 | const char * const __val = (val); \
| | ^
| ../gimp-3.0.2/libgimpconfig/gimpconfig-serialize.c:526:7: note: in expansion of macro 'g_string_append'
| 526 | g_string_append (str, bool ? "yes" : "no");
| | ^~~~~~~~~~~~~~~
| ../gimp-3.0.2/libgimpconfig/gimpconfig-serialize.c:526:29: error: expected expression before 'bool'
| 526 | g_string_append (str, bool ? "yes" : "no");
| | ^~~~
| ../recipe-sysroot/usr/include/glib-2.0/glib/gstring.h:251:37: note: in definition of macro 'g_string_append_len'
| 251 | g_string_append_len_inline (gstr, val, len)
| | ^~~
| ../gimp-3.0.2/libgimpconfig/gimpconfig-serialize.c:526:7: note: in expansion of macro 'g_string_append'
| 526 | g_string_append (str, bool ? "yes" : "no");
| | ^~~~~~~~~~~~~~~
| ../recipe-sysroot/usr/include/glib-2.0/glib/gstring.h:251:3: error: too few arguments to function 'g_string_append_len_inline'; expected 3, have 2
| 251 | g_string_append_len_inline (gstr, val, len)
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~
| ../recipe-sysroot/usr/include/glib-2.0/glib/gstring.h:278:5: note: in expansion of macro 'g_string_append_len'
| 278 | g_string_append_len (gstr, val, (gssize) -1))
| | ^~~~~~~~~~~~~~~~~~~
| ../gimp-3.0.2/libgimpconfig/gimpconfig-serialize.c:526:7: note: in expansion of macro 'g_string_append'
| 526 | g_string_append (str, bool ? "yes" : "no");
| | ^~~~~~~~~~~~~~~
| ../recipe-sysroot/usr/include/glib-2.0/glib/gstring.h:218:1: note: declared here
| 218 | g_string_append_len_inline (GString *gstring,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~
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-gimp/gimp/gimp/85bdad2b2ca7ba36a01bef945b1c4b193a2fa9d0.patch | 62 | ||||
-rw-r--r-- | meta-gnome/recipes-gimp/gimp/gimp_3.0.2.bb | 1 |
2 files changed, 63 insertions, 0 deletions
diff --git a/meta-gnome/recipes-gimp/gimp/gimp/85bdad2b2ca7ba36a01bef945b1c4b193a2fa9d0.patch b/meta-gnome/recipes-gimp/gimp/gimp/85bdad2b2ca7ba36a01bef945b1c4b193a2fa9d0.patch new file mode 100644 index 0000000000..3a2bf27616 --- /dev/null +++ b/meta-gnome/recipes-gimp/gimp/gimp/85bdad2b2ca7ba36a01bef945b1c4b193a2fa9d0.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From 85bdad2b2ca7ba36a01bef945b1c4b193a2fa9d0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nils Philippsen <nils@tiptoe.de> | ||
3 | Date: Wed, 29 Jan 2025 12:51:53 +0100 | ||
4 | Subject: [PATCH] Avoid type names and keywords | ||
5 | |||
6 | This fixes various errors when compiling with current toolchains and/or | ||
7 | -std=c23. | ||
8 | |||
9 | Signed-off-by: Nils Philippsen <nils@tiptoe.de> | ||
10 | |||
11 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gimp/-/commit/85bdad2b2ca7ba36a01bef945b1c4b193a2fa9d0.patch] | ||
12 | Signed-off-by: Markus Volk <f_l_k@t-online.de> | ||
13 | --- | ||
14 | libgimpconfig/gimpconfig-serialize.c | 6 +++--- | ||
15 | plug-ins/selection-to-path/types.h | 13 ++++--------- | ||
16 | 2 files changed, 7 insertions(+), 12 deletions(-) | ||
17 | |||
18 | diff --git a/libgimpconfig/gimpconfig-serialize.c b/libgimpconfig/gimpconfig-serialize.c | ||
19 | index 377b2371630..b3abca229d1 100644 | ||
20 | --- a/libgimpconfig/gimpconfig-serialize.c | ||
21 | +++ b/libgimpconfig/gimpconfig-serialize.c | ||
22 | @@ -522,10 +522,10 @@ gimp_config_serialize_value (const GValue *value, | ||
23 | |||
24 | if (G_VALUE_HOLDS_BOOLEAN (value)) | ||
25 | { | ||
26 | - gboolean bool; | ||
27 | + gboolean boolean; | ||
28 | |||
29 | - bool = g_value_get_boolean (value); | ||
30 | - g_string_append (str, bool ? "yes" : "no"); | ||
31 | + boolean = g_value_get_boolean (value); | ||
32 | + g_string_append (str, boolean ? "yes" : "no"); | ||
33 | return TRUE; | ||
34 | } | ||
35 | |||
36 | diff --git a/plug-ins/selection-to-path/types.h b/plug-ins/selection-to-path/types.h | ||
37 | index 9b040fa3a19..1521937b15e 100644 | ||
38 | --- a/plug-ins/selection-to-path/types.h | ||
39 | +++ b/plug-ins/selection-to-path/types.h | ||
40 | @@ -19,15 +19,10 @@ | ||
41 | #ifndef TYPES_H | ||
42 | #define TYPES_H | ||
43 | |||
44 | -/* Booleans. */ | ||
45 | -typedef enum { false = 0, true = 1 } boolean; | ||
46 | - | ||
47 | -/* The X11 library defines `FALSE' and `TRUE', and so we only want to | ||
48 | - define them if necessary. */ | ||
49 | -#ifndef FALSE | ||
50 | -#define FALSE false | ||
51 | -#define TRUE true | ||
52 | -#endif /* FALSE */ | ||
53 | +/* Cope with C23 */ | ||
54 | +typedef int boolean; | ||
55 | +#define false FALSE | ||
56 | +#define true TRUE | ||
57 | |||
58 | /* The usual null-terminated string. */ | ||
59 | typedef char *string; | ||
60 | -- | ||
61 | GitLab | ||
62 | |||
diff --git a/meta-gnome/recipes-gimp/gimp/gimp_3.0.2.bb b/meta-gnome/recipes-gimp/gimp/gimp_3.0.2.bb index b1e61bf4ec..25a91ed1a5 100644 --- a/meta-gnome/recipes-gimp/gimp/gimp_3.0.2.bb +++ b/meta-gnome/recipes-gimp/gimp/gimp_3.0.2.bb | |||
@@ -61,6 +61,7 @@ SRC_URI += "file://0001-gimp-cross-compile-fix-for-bz2.patch" | |||
61 | SRC_URI += "file://0002-meson.build-reproducibility-fix.patch" | 61 | SRC_URI += "file://0002-meson.build-reproducibility-fix.patch" |
62 | SRC_URI += "file://0001-meson.build-dont-check-for-lgi.patch" | 62 | SRC_URI += "file://0001-meson.build-dont-check-for-lgi.patch" |
63 | SRC_URI += "file://0001-meson.build-require-iso-codes-native.patch" | 63 | SRC_URI += "file://0001-meson.build-require-iso-codes-native.patch" |
64 | SRC_URI += "file://85bdad2b2ca7ba36a01bef945b1c4b193a2fa9d0.patch" | ||
64 | SRC_URI[sha256sum] = "546ddc30cb2d0e79123c7fcb4d78211e1ee7a6aace91a6a0ad8cbcbf6ea571a2" | 65 | SRC_URI[sha256sum] = "546ddc30cb2d0e79123c7fcb4d78211e1ee7a6aace91a6a0ad8cbcbf6ea571a2" |
65 | 66 | ||
66 | PACKAGECONFIG[aa] = "-Daa=enabled,-Daa=disabled,aalib" | 67 | PACKAGECONFIG[aa] = "-Daa=enabled,-Daa=disabled,aalib" |