* [gentoo-commits] repo/proj/guru:dev commit in: gui-libs/text-engine/, gui-libs/text-engine/files/
@ 2022-07-30 15:49 Yuan Liao
0 siblings, 0 replies; 2+ messages in thread
From: Yuan Liao @ 2022-07-30 15:49 UTC (permalink / raw
To: gentoo-commits
commit: bf56e3422de54df5b8a9b518d8a1d866f76a6093
Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
AuthorDate: Sat Jul 30 15:39:01 2022 +0000
Commit: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
CommitDate: Sat Jul 30 15:39:01 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bf56e342
gui-libs/text-engine: Correct package version in meson.build for 0.1.1
Closes: https://bugs.gentoo.org/860015
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
.../text-engine-0.1.1-fix-package-version.patch | 25 ++++++++++++++++++++++
...ne-0.1.1.ebuild => text-engine-0.1.1-r1.ebuild} | 4 ++++
2 files changed, 29 insertions(+)
diff --git a/gui-libs/text-engine/files/text-engine-0.1.1-fix-package-version.patch b/gui-libs/text-engine/files/text-engine-0.1.1-fix-package-version.patch
new file mode 100644
index 000000000..21fe6e5a3
--- /dev/null
+++ b/gui-libs/text-engine/files/text-engine-0.1.1-fix-package-version.patch
@@ -0,0 +1,25 @@
+From aac86863fbbf31c5ef557e5030e7a87f85db79af Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Sat, 30 Jul 2022 07:24:51 -0700
+Subject: [PATCH] meson.build: Correct package version
+
+Bug: https://bugs.gentoo.org/860015
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index dab9b8a..80a505b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1,5 +1,5 @@
+ project('text-engine', 'c',
+- version: '0.1.0',
++ version: '0.1.1',
+ meson_version: '>= 0.50.0',
+ default_options: [ 'warning_level=2',
+ 'c_std=gnu11',
+--
+2.35.1
+
diff --git a/gui-libs/text-engine/text-engine-0.1.1.ebuild b/gui-libs/text-engine/text-engine-0.1.1-r1.ebuild
similarity index 93%
rename from gui-libs/text-engine/text-engine-0.1.1.ebuild
rename to gui-libs/text-engine/text-engine-0.1.1-r1.ebuild
index 3d0af284c..d4e525e9c 100644
--- a/gui-libs/text-engine/text-engine-0.1.1.ebuild
+++ b/gui-libs/text-engine/text-engine-0.1.1-r1.ebuild
@@ -39,6 +39,10 @@ RDEPEND="
x11-libs/pango
"
+PATCHES=(
+ "${FILESDIR}/${P}-fix-package-version.patch"
+)
+
src_prepare() {
default
sed -i -e "/subdir('demo')/d" meson.build ||
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: gui-libs/text-engine/, gui-libs/text-engine/files/
@ 2024-07-07 13:46 Yuan Liao
0 siblings, 0 replies; 2+ messages in thread
From: Yuan Liao @ 2024-07-07 13:46 UTC (permalink / raw
To: gentoo-commits
commit: 26e924746223c82bb63533f72fa3e2990d0a8f16
Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
AuthorDate: Sun Jul 7 13:38:25 2024 +0000
Commit: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
CommitDate: Sun Jul 7 13:44:11 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=26e92474
gui-libs/text-engine: Backport upstream -Wincompatible-pointer-types fix
Closes: https://bugs.gentoo.org/921918
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
...ine-0.1.1-fix-Wincompatible-pointer-types.patch | 183 +++++++++++++++++++++
...0.1.1-r2.ebuild => text-engine-0.1.1-r3.ebuild} | 3 +-
2 files changed, 185 insertions(+), 1 deletion(-)
diff --git a/gui-libs/text-engine/files/text-engine-0.1.1-fix-Wincompatible-pointer-types.patch b/gui-libs/text-engine/files/text-engine-0.1.1-fix-Wincompatible-pointer-types.patch
new file mode 100644
index 000000000..77c3b1840
--- /dev/null
+++ b/gui-libs/text-engine/files/text-engine-0.1.1-fix-Wincompatible-pointer-types.patch
@@ -0,0 +1,183 @@
+From 4190331e437081017296033b1202731302771726 Mon Sep 17 00:00:00 2001
+From: oscfdezdz <42654671+oscfdezdz@users.noreply.github.com>
+Date: Fri, 24 May 2024 20:12:19 +0200
+Subject: [PATCH 1/2] display: Fix incompatible pointer types
+
+---
+ src/ui/display.c | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/src/ui/display.c b/src/ui/display.c
+index cea11b9..a9c65f9 100644
+--- a/src/ui/display.c
++++ b/src/ui/display.c
+@@ -29,7 +29,7 @@ struct _TextDisplay
+
+ TextFrame *frame;
+ TextLayout *layout;
+- TextLayoutBox *layout_tree;
++ TextNode *layout_tree;
+ };
+
+ G_DEFINE_FINAL_TYPE (TextDisplay, text_display, GTK_TYPE_WIDGET)
+@@ -120,7 +120,7 @@ layout_snapshot_recursive (GtkWidget *widget,
+ g_assert (TEXT_IS_LAYOUT_BOX (node));
+
+ int delta_height;
+- layout_snapshot_recursive (widget, node, snapshot, fg_color, &delta_height);
++ layout_snapshot_recursive (widget, TEXT_LAYOUT_BOX (node), snapshot, fg_color, &delta_height);
+ offset += delta_height;
+ }
+
+@@ -158,17 +158,17 @@ text_display_snapshot (GtkWidget *widget,
+
+ // TODO: Don't recreate this each time - do in size allocate instead?
+ g_clear_object (&self->layout_tree);
+- self->layout_tree = text_layout_build_layout_tree (self->layout,
+- gtk_widget_get_pango_context (GTK_WIDGET (self)),
+- self->frame,
+- gtk_widget_get_width (GTK_WIDGET (self)));
++ self->layout_tree = TEXT_NODE (text_layout_build_layout_tree (self->layout,
++ gtk_widget_get_pango_context (GTK_WIDGET (self)),
++ self->frame,
++ gtk_widget_get_width (GTK_WIDGET (self))));
+
+ GdkRGBA fg_color;
+ gtk_style_context_get_color (gtk_widget_get_style_context (widget), &fg_color);
+
+ // Display the layout tree
+ int delta_height;
+- layout_snapshot_recursive (widget, self->layout_tree, snapshot, &fg_color, &delta_height);
++ layout_snapshot_recursive (widget, TEXT_LAYOUT_BOX (self->layout_tree), snapshot, &fg_color, &delta_height);
+ }
+
+ static GtkSizeRequestMode
+@@ -192,12 +192,12 @@ text_display_measure (GtkWidget *widget,
+ PangoContext *context = gtk_widget_get_pango_context (widget);
+
+ g_clear_object (&self->layout_tree);
+- self->layout_tree = text_layout_build_layout_tree (self->layout,
+- context,
+- self->frame,
+- for_size);
++ self->layout_tree = TEXT_NODE (text_layout_build_layout_tree (self->layout,
++ context,
++ self->frame,
++ for_size));
+
+- *minimum = *natural = text_layout_box_get_bbox (self->layout_tree)->height;
++ *minimum = *natural = text_layout_box_get_bbox (TEXT_LAYOUT_BOX (self->layout_tree))->height;
+
+ g_debug ("Height: %d\n", *minimum);
+ }
+--
+2.44.2
+
+
+From 3defd388148f0ac72a7af995adc632efdf2ba40c Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Sun, 7 Jul 2024 09:10:51 -0400
+Subject: [PATCH 2/2] layout: Clean g_debug statements to fix
+ -Wincompatible-pointer-types
+
+These statements have already been removed in upstream commits
+221a5f9480b6ba861e1e53cfbc81f4bdbb821406 and
+be5def2b352227c54bf03e68c01596ffa66fd6f8 after v0.1.1 release. These
+statements should be for logging purposes only, and their removal should
+not affect the package's functionality.
+---
+ src/layout/layout-box.c | 12 ------------
+ src/layout/layout.c | 4 ----
+ 2 files changed, 16 deletions(-)
+
+diff --git a/src/layout/layout-box.c b/src/layout/layout-box.c
+index 9c635c9..b93df38 100644
+--- a/src/layout/layout-box.c
++++ b/src/layout/layout-box.c
+@@ -111,11 +111,6 @@ text_layout_box_layout (TextLayoutBox *self,
+
+ int height = 0;
+
+- g_debug ("Starting for %s\n", g_type_name_from_instance (self));
+-
+- g_debug ("Has item: %d\n", priv->item != NULL);
+- g_debug ("Has paragraph: %d\n", TEXT_IS_PARAGRAPH (priv->item));
+-
+ if (priv->item && TEXT_IS_PARAGRAPH (priv->item))
+ {
+ GString *str = g_string_new ("");
+@@ -126,11 +121,9 @@ text_layout_box_layout (TextLayoutBox *self,
+ const gchar *run_text;
+ g_object_get (run, "text", &run_text, NULL);
+ g_string_append (str, run_text);
+- g_debug (" - Counting run\n");
+ }
+
+ gchar *text = g_string_free (str, FALSE);
+- g_debug (" - String %s\n", text);
+
+ if (!priv->layout)
+ priv->layout = pango_layout_new (context);
+@@ -139,7 +132,6 @@ text_layout_box_layout (TextLayoutBox *self,
+ pango_layout_set_wrap (priv->layout, PANGO_WRAP_WORD_CHAR);
+ pango_layout_set_width (priv->layout, PANGO_SCALE * width);
+ pango_layout_get_pixel_size (priv->layout, NULL, &height);
+- g_debug (" - Height %d\n", height);
+
+ g_free (text);
+ }
+@@ -153,14 +145,11 @@ text_layout_box_layout (TextLayoutBox *self,
+ {
+ TextLayoutBox *child_box = TEXT_LAYOUT_BOX (node);
+
+- g_debug (" - Found child\n");
+-
+ // We can assume bbox already exists by now, as the layout() method
+ // has been called already in the layout manager.
+
+ TextLayoutBoxPrivate *priv = text_layout_box_get_instance_private (child_box);
+ height += priv->bbox.height;
+- g_debug (" - Child height %d\n", height);
+ }
+
+ priv->bbox.x = 0;
+@@ -175,7 +164,6 @@ text_layout_box_set_item (TextLayoutBox *self,
+ {
+ TextLayoutBoxPrivate *priv = text_layout_box_get_instance_private (self);
+ priv->item = item;
+- g_debug ("Set item to non null: %d\n", priv->item != NULL);
+ }
+
+ TextItem *
+diff --git a/src/layout/layout.c b/src/layout/layout.c
+index b730455..04cf458 100644
+--- a/src/layout/layout.c
++++ b/src/layout/layout.c
+@@ -96,8 +96,6 @@ do_layout_recursive (TextLayout *self,
+ {
+ g_assert (TEXT_IS_ITEM (node));
+
+- g_debug ("Counting child %s\n", g_type_name_from_instance (node));
+-
+ // Let's treat paragraphs opaquely for now. In the future, we need
+ // to manually consider each text run in order for inline equations
+ // and images.
+@@ -107,7 +105,6 @@ do_layout_recursive (TextLayout *self,
+ text_layout_box_set_item (box, TEXT_ITEM (node));
+
+ text_node_append_child (TEXT_NODE (parent), TEXT_NODE (box));
+- g_debug ("Added child %s\n", g_type_name_from_instance (node));
+
+ // TODO: This function should be properly recursive in the future,
+ // so avoid calling it here. Below should be the only time it is
+@@ -117,7 +114,6 @@ do_layout_recursive (TextLayout *self,
+ }
+
+ text_layout_box_layout (parent, context, width);
+- g_debug ("Layout for %s\n", g_type_name_from_instance (parent));
+ }
+
+ TextLayoutBox *
+--
+2.44.2
+
diff --git a/gui-libs/text-engine/text-engine-0.1.1-r2.ebuild b/gui-libs/text-engine/text-engine-0.1.1-r3.ebuild
similarity index 90%
rename from gui-libs/text-engine/text-engine-0.1.1-r2.ebuild
rename to gui-libs/text-engine/text-engine-0.1.1-r3.ebuild
index bd3411bfe..396604643 100644
--- a/gui-libs/text-engine/text-engine-0.1.1-r2.ebuild
+++ b/gui-libs/text-engine/text-engine-0.1.1-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -42,6 +42,7 @@ RDEPEND="
PATCHES=(
"${FILESDIR}/${P}-fix-package-version.patch"
"${FILESDIR}/${P}-fix-Wreturn-type.patch"
+ "${FILESDIR}/${P}-fix-Wincompatible-pointer-types.patch"
)
src_prepare() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-07 13:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-07 13:46 [gentoo-commits] repo/proj/guru:dev commit in: gui-libs/text-engine/, gui-libs/text-engine/files/ Yuan Liao
-- strict thread matches above, loose matches on Subject: below --
2022-07-30 15:49 Yuan Liao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox