diff options
author | Matt Turner <mattst88@gentoo.org> | 2022-08-05 18:34:53 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2022-08-05 22:17:28 -0400 |
commit | 33e354c16be0dbd7b8033e4ae76e0800a78e6dde (patch) | |
tree | 24c3e570a0b0ba3b3ecdfa69d03e68e96182ce1d /gui-libs/libadwaita | |
parent | dev-scheme/gauche: drop old (diff) | |
download | gentoo-33e354c16be0dbd7b8033e4ae76e0800a78e6dde.tar.gz gentoo-33e354c16be0dbd7b8033e4ae76e0800a78e6dde.tar.bz2 gentoo-33e354c16be0dbd7b8033e4ae76e0800a78e6dde.zip |
gui-libs/libadwaita: Version bump to 1.1.4
Closes: https://bugs.gentoo.org/859466
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'gui-libs/libadwaita')
-rw-r--r-- | gui-libs/libadwaita/Manifest | 1 | ||||
-rw-r--r-- | gui-libs/libadwaita/files/1.1.4-fix-aliasing.patch | 204 | ||||
-rw-r--r-- | gui-libs/libadwaita/libadwaita-1.1.4.ebuild | 69 |
3 files changed, 274 insertions, 0 deletions
diff --git a/gui-libs/libadwaita/Manifest b/gui-libs/libadwaita/Manifest index d88f49c18c2b..41e4338d5650 100644 --- a/gui-libs/libadwaita/Manifest +++ b/gui-libs/libadwaita/Manifest @@ -1,2 +1,3 @@ DIST libadwaita-1.1.2.tar.xz 2731632 BLAKE2B e60201f6d2f51713350b3ec18dae10a5993c6fcea3491495b5e9878461a558609c306a418a59515f2b827b6ee8049ff09b710c4326a87e372e975519bec61274 SHA512 ae89c49986d1bddc5eacc736be8ff0842634bf564e73d4a456b6d899ecc0fcc337f27a17cbb5f8921009f45d82434ab22cf7c2bc9541c4179cd298c2d6706587 DIST libadwaita-1.1.3.tar.xz 2731856 BLAKE2B 743d238779da843935149871f476426933b2b27424d449a32f0ac8a844e4980d65946f9a9cc79480e688fdd73c0e43cfbbc547aef2605dc34c800977825f33a1 SHA512 ffe3f5d3277d243a17b27055856e8c111fd856c22f07e990aff5fb48cd760928ff9389943b118ffba6671655af670cd0f0b8d2d5b34ee2265ac37249ddcaca7c +DIST libadwaita-1.1.4.tar.xz 2733108 BLAKE2B 7a1dc225215f1090365a1ae7b4cd281c253699ee8e6dadbeb95ac0995688b5dd567af875b270cb8b537a0153c6d3204490c5fb38606fc7261c770ae4e27dfe73 SHA512 0e24fd2dff81eeabb658eca12e1a6065c97de9871b05e3eb2f305c789377c85d5719d70c3d4e69c42ef3b4474b6270055e0579dbafd1258a644d84879302e1ca diff --git a/gui-libs/libadwaita/files/1.1.4-fix-aliasing.patch b/gui-libs/libadwaita/files/1.1.4-fix-aliasing.patch new file mode 100644 index 000000000000..659d81b2713b --- /dev/null +++ b/gui-libs/libadwaita/files/1.1.4-fix-aliasing.patch @@ -0,0 +1,204 @@ +https://bugs.gentoo.org/859466 + +From 200c33021dbe93eae270aa1cc9a4428365a8d7a4 Mon Sep 17 00:00:00 2001 +From: Matt Turner <mattst88@gmail.com> +Date: Tue, 26 Jul 2022 11:00:18 -0400 +Subject: [PATCH 1/2] tab-view: Retype _AdwTabView::stack to fix aliasing + violation + +../src/adw-tab-view.c:1269:20: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] +| g_clear_pointer ((GtkWidget **) &self->stack, gtk_widget_unparent); + +Closes: https://gitlab.gnome.org/GNOME/libadwaita/-/issues/522 +(cherry picked from commit 5b6ea17d51a5b42a99128afa562f52aa32eff7b2) +--- + src/adw-tab-view.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/src/adw-tab-view.c b/src/adw-tab-view.c +index 26b64436..9c5fbe00 100644 +--- a/src/adw-tab-view.c ++++ b/src/adw-tab-view.c +@@ -115,7 +115,7 @@ struct _AdwTabView + { + GtkWidget parent_instance; + +- GtkStack *stack; ++ GtkWidget *stack; + GListStore *children; + + int n_pages; +@@ -763,7 +763,7 @@ page_belongs_to_this_view (AdwTabView *self, + if (!page) + return FALSE; + +- return gtk_widget_get_parent (page->child) == GTK_WIDGET (self->stack); ++ return gtk_widget_get_parent (page->child) == self->stack; + } + + static inline gboolean +@@ -786,7 +786,7 @@ attach_page (AdwTabView *self, + + g_list_store_insert (self->children, position, page); + +- gtk_stack_add_child (self->stack, child); ++ gtk_stack_add_child (GTK_STACK (self->stack), child); + + g_object_freeze_notify (G_OBJECT (self)); + +@@ -829,7 +829,7 @@ set_selected_page (AdwTabView *self, + if (notify_pages && self->pages) + new_position = adw_tab_view_get_page_position (self, self->selected_page); + +- gtk_stack_set_visible_child (self->stack, ++ gtk_stack_set_visible_child (GTK_STACK (self->stack), + adw_tab_page_get_child (selected_page)); + set_page_selected (self->selected_page, TRUE); + } +@@ -922,7 +922,7 @@ detach_page (AdwTabView *self, + + g_object_thaw_notify (G_OBJECT (self)); + +- gtk_stack_remove (self->stack, child); ++ gtk_stack_remove (GTK_STACK (self->stack), child); + + g_signal_emit (self, signals[SIGNAL_PAGE_DETACHED], 0, page, pos); + +@@ -1305,7 +1305,7 @@ adw_tab_view_dispose (GObject *object) + + g_clear_object (&self->children); + +- g_clear_pointer ((GtkWidget **) &self->stack, gtk_widget_unparent); ++ g_clear_pointer (&self->stack, gtk_widget_unparent); + + G_OBJECT_CLASS (adw_tab_view_parent_class)->dispose (object); + } +@@ -1737,9 +1737,9 @@ adw_tab_view_init (AdwTabView *self) + self->children = g_list_store_new (ADW_TYPE_TAB_PAGE); + self->default_icon = G_ICON (g_themed_icon_new ("adw-tab-icon-missing-symbolic")); + +- self->stack = GTK_STACK (gtk_stack_new ()); +- gtk_widget_show (GTK_WIDGET (self->stack)); +- gtk_widget_set_parent (GTK_WIDGET (self->stack), GTK_WIDGET (self)); ++ self->stack = gtk_stack_new (); ++ gtk_widget_show (self->stack); ++ gtk_widget_set_parent (self->stack, GTK_WIDGET (self)); + + g_object_bind_property (self, "is-transferring-page", + self->stack, "can-target", +@@ -2569,7 +2569,7 @@ adw_tab_view_get_page (AdwTabView *self, + + g_return_val_if_fail (ADW_IS_TAB_VIEW (self), NULL); + g_return_val_if_fail (GTK_IS_WIDGET (child), NULL); +- g_return_val_if_fail (gtk_widget_get_parent (child) == GTK_WIDGET (self->stack), NULL); ++ g_return_val_if_fail (gtk_widget_get_parent (child) == self->stack, NULL); + + for (i = 0; i < self->n_pages; i++) { + AdwTabPage *page = adw_tab_view_get_nth_page (self, i); +-- +2.35.1 + +From e6d911fae1cbebe3769ccfb0c665ce5162c86a24 Mon Sep 17 00:00:00 2001 +From: Matt Turner <mattst88@gmail.com> +Date: Tue, 26 Jul 2022 11:02:14 -0400 +Subject: [PATCH 2/2] tab-box: Retype _AdwTabBox::context_menu to fix aliasing + violation + +../src/adw-tab-box.c:3410:20: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] +| g_clear_pointer ((GtkWidget **) &self->context_menu, gtk_widget_unparent); + +Closes: https://gitlab.gnome.org/GNOME/libadwaita/-/issues/522 +(cherry picked from commit 33ab48efb62ae331f48521de1cf45960e609ff26) +--- + src/adw-tab-box.c | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c +index 54178555..2e0b62bf 100644 +--- a/src/adw-tab-box.c ++++ b/src/adw-tab-box.c +@@ -100,7 +100,7 @@ struct _AdwTabBox + GList *tabs; + int n_tabs; + +- GtkPopover *context_menu; ++ GtkWidget *context_menu; + GtkWidget *background; + + int allocated_width; +@@ -2618,7 +2618,7 @@ reset_setup_menu_cb (AdwTabBox *self) + static void + touch_menu_notify_visible_cb (AdwTabBox *self) + { +- if (!self->context_menu || gtk_widget_get_visible (GTK_WIDGET (self->context_menu))) ++ if (!self->context_menu || gtk_widget_get_visible (self->context_menu)) + return; + + self->hovering = FALSE; +@@ -2642,15 +2642,15 @@ do_popup (AdwTabBox *self, + g_signal_emit_by_name (self->view, "setup-menu", info->page); + + if (!self->context_menu) { +- self->context_menu = GTK_POPOVER (gtk_popover_menu_new_from_model (model)); +- gtk_widget_set_parent (GTK_WIDGET (self->context_menu), GTK_WIDGET (self)); +- gtk_popover_set_position (self->context_menu, GTK_POS_BOTTOM); +- gtk_popover_set_has_arrow (self->context_menu, FALSE); ++ self->context_menu = gtk_popover_menu_new_from_model (model); ++ gtk_widget_set_parent (self->context_menu, GTK_WIDGET (self)); ++ gtk_popover_set_position (GTK_POPOVER (self->context_menu), GTK_POS_BOTTOM); ++ gtk_popover_set_has_arrow (GTK_POPOVER (self->context_menu), FALSE); + + if (gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL) +- gtk_widget_set_halign (GTK_WIDGET (self->context_menu), GTK_ALIGN_END); ++ gtk_widget_set_halign (self->context_menu, GTK_ALIGN_END); + else +- gtk_widget_set_halign (GTK_WIDGET (self->context_menu), GTK_ALIGN_START); ++ gtk_widget_set_halign (self->context_menu, GTK_ALIGN_START); + + g_signal_connect_object (self->context_menu, "notify::visible", + G_CALLBACK (touch_menu_notify_visible_cb), self, +@@ -2672,9 +2672,9 @@ do_popup (AdwTabBox *self, + rect.width = 0; + rect.height = 0; + +- gtk_popover_set_pointing_to (self->context_menu, &rect); ++ gtk_popover_set_pointing_to (GTK_POPOVER (self->context_menu), &rect); + +- gtk_popover_popup (self->context_menu); ++ gtk_popover_popup (GTK_POPOVER (self->context_menu)); + } + + static void +@@ -2958,7 +2958,7 @@ adw_tab_box_size_allocate (GtkWidget *widget, + value = gtk_adjustment_get_value (self->adjustment); + + if (self->context_menu) +- gtk_popover_present (self->context_menu); ++ gtk_popover_present (GTK_POPOVER (self->context_menu)); + + if (!self->n_tabs) + return; +@@ -3169,7 +3169,7 @@ adw_tab_box_unrealize (GtkWidget *widget) + { + AdwTabBox *self = ADW_TAB_BOX (widget); + +- g_clear_pointer ((GtkWidget **) &self->context_menu, gtk_widget_unparent); ++ g_clear_pointer (&self->context_menu, gtk_widget_unparent); + + GTK_WIDGET_CLASS (adw_tab_box_parent_class)->unrealize (widget); + } +@@ -3213,9 +3213,9 @@ adw_tab_box_direction_changed (GtkWidget *widget, + + if (self->context_menu) { + if (gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL) +- gtk_widget_set_halign (GTK_WIDGET (self->context_menu), GTK_ALIGN_END); ++ gtk_widget_set_halign (self->context_menu, GTK_ALIGN_END); + else +- gtk_widget_set_halign (GTK_WIDGET (self->context_menu), GTK_ALIGN_START); ++ gtk_widget_set_halign (self->context_menu, GTK_ALIGN_START); + } + } + +-- +2.35.1 + diff --git a/gui-libs/libadwaita/libadwaita-1.1.4.ebuild b/gui-libs/libadwaita/libadwaita-1.1.4.ebuild new file mode 100644 index 000000000000..e7e4b05600de --- /dev/null +++ b/gui-libs/libadwaita/libadwaita-1.1.4.ebuild @@ -0,0 +1,69 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{8..11} ) +VALA_MIN_API_VERSION="0.52" +inherit gnome.org meson python-any-r1 vala virtualx + +DESCRIPTION="Building blocks for modern adaptive GNOME applications" +HOMEPAGE="https://gnome.pages.gitlab.gnome.org/libadwaita/ https://gitlab.gnome.org/GNOME/libadwaita" + +LICENSE="LGPL-2.1+" +SLOT="1" +IUSE="+introspection test +vala" +REQUIRED_USE="vala? ( introspection )" + +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +DEPEND=" + >=dev-libs/glib-2.66:2 + >=gui-libs/gtk-4.5.0:4[introspection?] + dev-libs/fribidi + introspection? ( >=dev-libs/gobject-introspection-1.54:= ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + vala? ( $(vala_depend) ) + >=dev-util/meson-0.59.0 + dev-util/glib-utils + sys-devel/gettext + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PV}-fix-aliasing.patch +) + +src_prepare() { + default + use vala && vala_setup +} + +src_configure() { + local emesonargs=( + # Never use gi-docgen subproject + --wrap-mode nofallback + + -Dprofiling=false + $(meson_feature introspection) + $(meson_use vala vapi) + -Dgtk_doc=false # we ship pregenerated docs + $(meson_use test tests) + -Dexamples=false + ) + meson_src_configure +} + +src_test() { + virtx meson_src_test --timeout-multiplier 2 +} + +src_install() { + meson_src_install + + insinto /usr/share/gtk-doc/html + # This will install libadwaita API docs unconditionally, but this is intentional + doins -r "${S}"/doc/libadwaita-1 +} |