commit:     d4c5deba4d44b226cb48342e673f79f782cfd50e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 28 17:07:04 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 28 17:07:04 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4c5deba

gnome-base/gdm: backport C23 fix

Bug: https://bugs.gentoo.org/944223
Signed-off-by: Sam James <sam <AT> gentoo.org>

 gnome-base/gdm/files/47.0-c23.patch | 55 +++++++++++++++++++++++++++++++++++++
 gnome-base/gdm/gdm-47.0.ebuild      |  7 ++---
 2 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/gnome-base/gdm/files/47.0-c23.patch 
b/gnome-base/gdm/files/47.0-c23.patch
new file mode 100644
index 000000000000..f2a48d7334c1
--- /dev/null
+++ b/gnome-base/gdm/files/47.0-c23.patch
@@ -0,0 +1,55 @@
+https://bugs.gentoo.org/944223
+https://gitlab.gnome.org/GNOME/gdm/-/issues/964
+https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/273
+
+From a5f9f274c9c902519336a489cfed0548206d2bca Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <[email protected]>
+Date: Mon, 27 Jan 2025 14:01:23 +0100
+Subject: [PATCH] gdm-settings-utils: rename variable to fix build with gcc 15
+
+In GNU23 C++, bool is a keyword. Rename the variable to avoid syntax error.
+---
+ common/gdm-settings-utils.c | 8 ++++----
+ common/gdm-settings-utils.h | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/common/gdm-settings-utils.c b/common/gdm-settings-utils.c
+index 636be3a9e..da4c7aefb 100644
+--- a/common/gdm-settings-utils.c
++++ b/common/gdm-settings-utils.c
+@@ -287,16 +287,16 @@ gdm_settings_parse_boolean_as_value  (gboolean boolval)
+ /* adapted from GKeyFile */
+ gboolean
+ gdm_settings_parse_value_as_boolean (const char *value,
+-                                     gboolean   *bool)
++                                     gboolean   *boolval)
+ {
+         g_return_val_if_fail (value != NULL, FALSE);
+-        g_return_val_if_fail (bool != NULL, FALSE);
++        g_return_val_if_fail (boolval != NULL, FALSE);
+ 
+         if (g_ascii_strcasecmp (value, "true") == 0 || strcmp (value, "1") == 
0) {
+-                *bool = TRUE;
++                *boolval = TRUE;
+                 return TRUE;
+         } else if (g_ascii_strcasecmp (value, "false") == 0 || strcmp (value, 
"0") == 0) {
+-                *bool = FALSE;
++                *boolval = FALSE;
+                 return TRUE;
+         } else {
+                 return FALSE;
+diff --git a/common/gdm-settings-utils.h b/common/gdm-settings-utils.h
+index 4f2362ce7..734d625c7 100644
+--- a/common/gdm-settings-utils.h
++++ b/common/gdm-settings-utils.h
+@@ -44,7 +44,7 @@ gboolean                  gdm_settings_parse_schemas         
  (const char  *fil
+                                                                 GSList     
**list);
+ 
+ gboolean                  gdm_settings_parse_value_as_boolean  (const char 
*value,
+-                                                                gboolean   
*bool);
++                                                                gboolean   
*boolval);
+ gboolean                  gdm_settings_parse_value_as_integer  (const char 
*value,
+                                                                 int        
*intval);
+ gboolean                  gdm_settings_parse_value_as_double   (const char 
*value,
+-- 
+GitLab

diff --git a/gnome-base/gdm/gdm-47.0.ebuild b/gnome-base/gdm/gdm-47.0.ebuild
index bad5110649c1..9a2ee26825b0 100644
--- a/gnome-base/gdm/gdm-47.0.ebuild
+++ b/gnome-base/gdm/gdm-47.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit desktop flag-o-matic gnome.org gnome2-utils meson pam readme.gentoo-r1 
systemd udev xdg
+inherit desktop gnome.org gnome2-utils meson pam readme.gentoo-r1 systemd udev 
xdg
 
 DESCRIPTION="GNOME Display Manager for managing graphical display servers and 
user logins"
 HOMEPAGE="https://gitlab.gnome.org/GNOME/gdm";
@@ -116,12 +116,11 @@ src_prepare() {
 
        # Show logo when branding is enabled
        use branding && eapply "${FILESDIR}/${PN}-3.30.3-logo.patch"
+
+       eapply "${FILESDIR}/47.0-c23.patch"
 }
 
 src_configure() {
-       # https://gitlab.gnome.org/GNOME/gdm/-/issues/964 (bug #944223)
-       append-cflags -std=gnu17
-
        # --with-initial-vt=7 conflicts with plymouth, bug #453392
        # gdm-3.30 now reaps (stops) the login screen when the login VT isn't 
active, which
        # saves on memory. However this means if we don't start on VT1, gdm 
doesn't start up

Reply via email to