public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: gui-libs/libhandy/files/, gui-libs/libhandy/
@ 2020-08-23 20:09 Mart Raudsepp
  0 siblings, 0 replies; 2+ messages in thread
From: Mart Raudsepp @ 2020-08-23 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     8d8a3892c9a16b39689ab274474c12362e191d14
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 23 20:07:49 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Aug 23 20:08:02 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d8a3892

gui-libs/libhandy: fix USE=glade build against newer dev-util/glade

Closes: https://bugs.gentoo.org/737600
Package-Manager: Portage-2.3.103, Repoman-2.3.20
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 .../libhandy/files/0.0.13-glade3.36-compat1.patch  | 40 ++++++++++++++++
 .../libhandy/files/0.0.13-glade3.36-compat2.patch  | 56 ++++++++++++++++++++++
 gui-libs/libhandy/libhandy-0.0.13.ebuild           |  4 ++
 3 files changed, 100 insertions(+)

diff --git a/gui-libs/libhandy/files/0.0.13-glade3.36-compat1.patch b/gui-libs/libhandy/files/0.0.13-glade3.36-compat1.patch
new file mode 100644
index 00000000000..13321778ff2
--- /dev/null
+++ b/gui-libs/libhandy/files/0.0.13-glade3.36-compat1.patch
@@ -0,0 +1,40 @@
+From c5ada7063a68cc05ed1b783a9769557b8e2a83ed Mon Sep 17 00:00:00 2001
+From: Alberto Fanjul <albertofanjul@gmail.com>
+Date: Thu, 7 May 2020 12:43:51 +0200
+Subject: [PATCH 1/2] glade: Adapt to Glade 3.36 API changes
+
+Fixes https://source.puri.sm/Librem5/libhandy/issues/267.
+---
+ glade/glade-hdy-header-group.c | 2 +-
+ glade/glade-hdy-swipe-group.c  | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/glade/glade-hdy-header-group.c b/glade/glade-hdy-header-group.c
+index be6a9de..aa83c6b 100644
+--- a/glade/glade-hdy-header-group.c
++++ b/glade/glade-hdy-header-group.c
+@@ -43,7 +43,7 @@ glade_hdy_header_group_read_widgets (GladeWidget *widget, GladeXmlNode *node)
+         string = widget_name;
+       } else if (widget_name != NULL) {
+         tmp =
+-          g_strdup_printf ("%s%s%s", string, GPC_OBJECT_DELIMITER,
++          g_strdup_printf ("%s%s%s", string, GLADE_PROPERTY_DEF_OBJECT_DELIMITER,
+                            widget_name);
+         string = (g_free (string), tmp);
+         g_free (widget_name);
+diff --git a/glade/glade-hdy-swipe-group.c b/glade/glade-hdy-swipe-group.c
+index 0b42798..ff909b0 100644
+--- a/glade/glade-hdy-swipe-group.c
++++ b/glade/glade-hdy-swipe-group.c
+@@ -45,7 +45,7 @@ glade_hdy_swipe_group_read_widgets (GladeWidget  *widget,
+         string = widget_name;
+       } else if (widget_name != NULL) {
+         tmp =
+-          g_strdup_printf ("%s%s%s", string, GPC_OBJECT_DELIMITER,
++          g_strdup_printf ("%s%s%s", string, GLADE_PROPERTY_DEF_OBJECT_DELIMITER,
+                            widget_name);
+         string = (g_free (string), tmp);
+         g_free (widget_name);
+-- 
+2.20.1
+

diff --git a/gui-libs/libhandy/files/0.0.13-glade3.36-compat2.patch b/gui-libs/libhandy/files/0.0.13-glade3.36-compat2.patch
new file mode 100644
index 00000000000..a3b2f891499
--- /dev/null
+++ b/gui-libs/libhandy/files/0.0.13-glade3.36-compat2.patch
@@ -0,0 +1,56 @@
+From 2fb8c6a62b52aa85266f1cf0e8cf6dfa1a7f194f Mon Sep 17 00:00:00 2001
+From: Adrien Plazas <kekun.plazas@laposte.net>
+Date: Mon, 11 May 2020 13:38:36 +0200
+Subject: [PATCH 2/2] glade: Support both 3.24 and 3.36
+
+leio: Backported to 0.0.13
+---
+ glade/glade-hdy-header-group.c |  9 +++++++++
+ glade/glade-hdy-swipe-group.c  | 11 +++++++++++
+ 2 files changed, 20 insertions(+)
+
+diff --git a/glade/glade-hdy-header-group.c b/glade/glade-hdy-header-group.c
+index aa83c6b..bd620ad 100644
+--- a/glade/glade-hdy-header-group.c
++++ b/glade/glade-hdy-header-group.c
+@@ -14,6 +14,15 @@
+ #include <glib/gi18n-lib.h>
+ #include <gladeui/glade.h>
+ 
++/* Guess wether we are using a Glade version older than 3.36.
++ *
++ * If yes, redefine some symbols which got renamed.
++ */
++#ifndef GLADE_PROPERTY_DEF_OBJECT_DELIMITER
++#define GLADE_PROPERTY_DEF_OBJECT_DELIMITER GPC_OBJECT_DELIMITER
++#define glade_widget_action_get_def glade_widget_action_get_class
++#endif
++
+ #define GLADE_TAG_HEADERGROUP_WIDGETS "headerbars"
+ #define GLADE_TAG_HEADERGROUP_WIDGET  "headerbar"
+ 
+diff --git a/glade/glade-hdy-swipe-group.c b/glade/glade-hdy-swipe-group.c
+index ff909b0..5b165a2 100644
+--- a/glade/glade-hdy-swipe-group.c
++++ b/glade/glade-hdy-swipe-group.c
+@@ -15,6 +15,17 @@
+ #include <glib/gi18n-lib.h>
+ #include <gladeui/glade.h>
+ 
++/* Guess wether we are using a Glade version older than 3.36.
++ *
++ * If yes, redefine some symbols which got renamed.
++ */
++#ifndef GLADE_PROPERTY_DEF_OBJECT_DELIMITER
++#define GLADE_PROPERTY_DEF_OBJECT_DELIMITER GPC_OBJECT_DELIMITER
++#define glade_widget_action_get_def glade_widget_action_get_class
++#endif
++
++#define GLADE_TAG_HEADERGROUP_WIDGETS "headerbars"
++#define GLADE_TAG_HEADERGROUP_WIDGET  "headerbar"
+ #define PROP_SWIPEABLES "swipeables"
+ #define GLADE_TAG_SWIPEGROUP_SWIPEABLES "swipeables"
+ #define GLADE_TAG_SWIPEGROUP_SWIPEABLE "swipeable"
+-- 
+2.20.1
+

diff --git a/gui-libs/libhandy/libhandy-0.0.13.ebuild b/gui-libs/libhandy/libhandy-0.0.13.ebuild
index 4f69d327c06..07b2ca7fab2 100644
--- a/gui-libs/libhandy/libhandy-0.0.13.ebuild
+++ b/gui-libs/libhandy/libhandy-0.0.13.ebuild
@@ -37,6 +37,10 @@ BDEPEND="
 		app-text/docbook-xml-dtd:4.3 )
 "
 
+PATCHES=(
+	"${FILESDIR}"/${PV}-glade3.36-compat{1,2}.patch
+)
+
 src_prepare() {
 	use vala && vala_src_prepare
 	xdg_src_prepare


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: gui-libs/libhandy/files/, gui-libs/libhandy/
@ 2021-04-21 15:11 Matt Turner
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Turner @ 2021-04-21 15:11 UTC (permalink / raw
  To: gentoo-commits

commit:     5758d2b4d21e7cf60aa631523411480f8b39f0e8
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 21 14:58:43 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Apr 21 15:07:28 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5758d2b4

gui-libs/libhandy: Add patch to build with glade >= 3.37

Closes: https://bugs.gentoo.org/784068
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 .../libhandy/files/0.0.13-glade3.37-compat.patch   | 173 +++++++++++++++++++++
 gui-libs/libhandy/libhandy-0.0.13.ebuild           |   1 +
 2 files changed, 174 insertions(+)

diff --git a/gui-libs/libhandy/files/0.0.13-glade3.37-compat.patch b/gui-libs/libhandy/files/0.0.13-glade3.37-compat.patch
new file mode 100644
index 00000000000..63568496d63
--- /dev/null
+++ b/gui-libs/libhandy/files/0.0.13-glade3.37-compat.patch
@@ -0,0 +1,173 @@
+From dfb9322ae70236edd45fad695dd6c24517f2ceaf Mon Sep 17 00:00:00 2001
+From: James Westman <james@flyingpimonster.net>
+Date: Wed, 23 Sep 2020 13:14:07 -0500
+Subject: [PATCH] glade: Fix macro renamed in GladeUI 3.37
+
+Glade 3.37 renamed the macro GWA_GET_CLASS to
+GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS [1]. This commit switches to use the new
+macro name, and for older versions of Glade, defines the new name as the old
+one for compatibility.
+
+Fixes #335 and obsoletes !607.
+
+[1]: https://gitlab.gnome.org/GNOME/glade/-/commit/bb626dd41d93c92b587b37f03d295356e39a7d04
+
+mattst88: Backported to 0.0.13
+---
+ glade/glade-hdy-header-group.c | 14 +++++++++++---
+ glade/glade-hdy-paginator.c    | 18 +++++++++++++-----
+ glade/glade-hdy-swipe-group.c  | 14 +++++++++++---
+ 3 files changed, 35 insertions(+), 11 deletions(-)
+
+diff --git a/glade/glade-hdy-header-group.c b/glade/glade-hdy-header-group.c
+index bd620ad..11c3aad 100644
+--- a/glade/glade-hdy-header-group.c
++++ b/glade/glade-hdy-header-group.c
+@@ -14,6 +14,14 @@
+ #include <glib/gi18n-lib.h>
+ #include <gladeui/glade.h>
+ 
++/*
++ * Another macro got renamed in GladeUI 3.38. For older versions of GladeUI,
++ * define the new macro as the old one.
++ */
++#ifndef GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS
++#define GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS GWA_GET_CLASS
++#endif
++
+ /* Guess wether we are using a Glade version older than 3.36.
+  *
+  * If yes, redefine some symbols which got renamed.
+@@ -83,7 +91,7 @@ glade_hdy_header_group_read_widget (GladeWidgetAdaptor *adaptor,
+     return;
+ 
+   /* First chain up and read in all the normal properties.. */
+-  GWA_GET_CLASS (G_TYPE_OBJECT)->read_widget (adaptor, widget, node);
++  GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (G_TYPE_OBJECT)->read_widget (adaptor, widget, node);
+ 
+   glade_hdy_header_group_read_widgets (widget, node);
+ }
+@@ -129,7 +137,7 @@ glade_hdy_header_group_write_widget (GladeWidgetAdaptor *adaptor,
+     return;
+ 
+   /* First chain up and read in all the normal properties.. */
+-  GWA_GET_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
++  GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
+ 
+   glade_hdy_header_group_write_widgets (widget, context, node);
+ }
+@@ -163,7 +171,7 @@ glade_hdy_header_group_set_property (GladeWidgetAdaptor *adaptor,
+                                          GTK_HEADER_BAR (list->data));
+     }
+   } else {
+-    GWA_GET_CLASS (G_TYPE_OBJECT)->set_property (adaptor, object,
++    GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (G_TYPE_OBJECT)->set_property (adaptor, object,
+                                                  property_name, value);
+   }
+ }
+diff --git a/glade/glade-hdy-paginator.c b/glade/glade-hdy-paginator.c
+index cce9abf..f34acc8 100644
+--- a/glade/glade-hdy-paginator.c
++++ b/glade/glade-hdy-paginator.c
+@@ -16,6 +16,14 @@
+ 
+ #include <math.h>
+ 
++/*
++ * Another macro got renamed in GladeUI 3.38. For older versions of GladeUI,
++ * define the new macro as the old one.
++ */
++#ifndef GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS
++#define GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS GWA_GET_CLASS
++#endif
++
+ #define CENTER_CONTENT_INSENSITIVE_MSG _("This property does not apply unless Show Indicators is set.")
+ 
+ static gint
+@@ -231,7 +239,7 @@ glade_hdy_paginator_child_action_activate (GladeWidgetAdaptor *adaptor,
+ 
+     glade_command_pop_group ();
+   } else
+-    GWA_GET_CLASS (GTK_TYPE_CONTAINER)->child_action_activate (adaptor,
++    GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->child_action_activate (adaptor,
+                                                                container,
+                                                                object,
+                                                                action_path);
+@@ -315,7 +323,7 @@ glade_hdy_paginator_set_property (GladeWidgetAdaptor *adaptor,
+     if (!strcmp (id, "indicator-style"))
+       set_indicator_style (object, value);
+ 
+-    GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
++    GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
+   }
+ }
+ 
+@@ -332,7 +340,7 @@ glade_hdy_paginator_get_property (GladeWidgetAdaptor *adaptor,
+     g_value_reset (value);
+     g_value_set_int (value, hdy_paginator_get_page (HDY_PAGINATOR (object)));
+   } else {
+-    GWA_GET_CLASS (GTK_TYPE_CONTAINER)->get_property (adaptor, object, id, value);
++    GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->get_property (adaptor, object, id, value);
+   }
+ }
+ 
+@@ -370,8 +378,8 @@ glade_hdy_paginator_verify_property (GladeWidgetAdaptor *adaptor,
+     return glade_hdy_paginator_verify_n_pages (object, value);
+   else if (!strcmp (id, "page"))
+     return glade_hdy_paginator_verify_page (object, value);
+-  else if (GWA_GET_CLASS (GTK_TYPE_CONTAINER)->verify_property)
+-    return GWA_GET_CLASS (GTK_TYPE_CONTAINER)->verify_property (adaptor, object,
++  else if (GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->verify_property)
++    return GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->verify_property (adaptor, object,
+                                                                 id, value);
+ 
+   return TRUE;
+diff --git a/glade/glade-hdy-swipe-group.c b/glade/glade-hdy-swipe-group.c
+index 5b165a2..927dea0 100644
+--- a/glade/glade-hdy-swipe-group.c
++++ b/glade/glade-hdy-swipe-group.c
+@@ -15,6 +15,14 @@
+ #include <glib/gi18n-lib.h>
+ #include <gladeui/glade.h>
+ 
++/*
++ * Another macro got renamed in GladeUI 3.38. For older versions of GladeUI,
++ * define the new macro as the old one.
++ */
++#ifndef GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS
++#define GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS GWA_GET_CLASS
++#endif
++
+ /* Guess wether we are using a Glade version older than 3.36.
+  *
+  * If yes, redefine some symbols which got renamed.
+@@ -87,7 +95,7 @@ glade_hdy_swipe_group_read_widget (GladeWidgetAdaptor *adaptor,
+     return;
+ 
+   /* First chain up and read in all the normal properties.. */
+-  GWA_GET_CLASS (G_TYPE_OBJECT)->read_widget (adaptor, widget, node);
++  GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (G_TYPE_OBJECT)->read_widget (adaptor, widget, node);
+ 
+   glade_hdy_swipe_group_read_widgets (widget, node);
+ }
+@@ -131,7 +139,7 @@ glade_hdy_swipe_group_write_widget (GladeWidgetAdaptor *adaptor,
+     return;
+ 
+   /* First chain up and read in all the normal properties.. */
+-  GWA_GET_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
++  GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
+ 
+   glade_hdy_swipe_group_write_widgets (widget, context, node);
+ }
+@@ -164,7 +172,7 @@ glade_hdy_swipe_group_set_property (GladeWidgetAdaptor *adaptor,
+                                        HDY_SWIPEABLE (list->data));
+     }
+   } else {
+-    GWA_GET_CLASS (G_TYPE_OBJECT)->set_property (adaptor, object,
++    GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (G_TYPE_OBJECT)->set_property (adaptor, object,
+                                                  property_name, value);
+   }
+ }
+-- 
+2.26.3
+

diff --git a/gui-libs/libhandy/libhandy-0.0.13.ebuild b/gui-libs/libhandy/libhandy-0.0.13.ebuild
index 5d6f3c895bc..751616d2f13 100644
--- a/gui-libs/libhandy/libhandy-0.0.13.ebuild
+++ b/gui-libs/libhandy/libhandy-0.0.13.ebuild
@@ -39,6 +39,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PV}-glade3.36-compat{1,2}.patch
+	"${FILESDIR}"/${PV}-glade3.37-compat.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-21 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-21 15:11 [gentoo-commits] repo/gentoo:master commit in: gui-libs/libhandy/files/, gui-libs/libhandy/ Matt Turner
  -- strict thread matches above, loose matches on Subject: below --
2020-08-23 20:09 Mart Raudsepp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox