public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-perl/Glib-Object-Introspection/, dev-perl/Glib-Object-Introspection/files/
@ 2025-02-09  6:23 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2025-02-09  6:23 UTC (permalink / raw
  To: gentoo-commits

commit:     c8481d5434448df43c014c75af4dad9f07b47080
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  9 06:21:37 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb  9 06:21:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8481d54

dev-perl/Glib-Object-Introspection: fix compat w/ newer gobject-introspection

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../Glib-Object-Introspection-0.51.0-r1.ebuild     | 38 ++++++++++++++++
 ...spection-0.51.0-new-gobject-introspection.patch | 50 ++++++++++++++++++++++
 2 files changed, 88 insertions(+)

diff --git a/dev-perl/Glib-Object-Introspection/Glib-Object-Introspection-0.51.0-r1.ebuild b/dev-perl/Glib-Object-Introspection/Glib-Object-Introspection-0.51.0-r1.ebuild
new file mode 100644
index 000000000000..a4bf26867b85
--- /dev/null
+++ b/dev-perl/Glib-Object-Introspection/Glib-Object-Introspection-0.51.0-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=XAOC
+DIST_VERSION=0.051
+inherit perl-module xdg-utils
+
+DESCRIPTION="Dynamically create Perl language bindings"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86"
+
+RDEPEND="
+	>=dev-perl/glib-perl-1.320.0
+	>=dev-libs/gobject-introspection-1.0
+	>=dev-libs/libffi-3.0.0:=
+	>=dev-libs/glib-2.0.0
+"
+DEPEND="
+	${RDEPEND}
+"
+BDEPEND="
+	${RDEPEND}
+	>=dev-perl/ExtUtils-Depends-0.300.0
+	>=dev-perl/ExtUtils-PkgConfig-1.0.0
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-new-gobject-introspection.patch
+)
+
+pkg_setup() {
+	# bug #599128
+	xdg_environment_reset
+}

diff --git a/dev-perl/Glib-Object-Introspection/files/Glib-Object-Introspection-0.51.0-new-gobject-introspection.patch b/dev-perl/Glib-Object-Introspection/files/Glib-Object-Introspection-0.51.0-new-gobject-introspection.patch
new file mode 100644
index 000000000000..c0b6ac639be9
--- /dev/null
+++ b/dev-perl/Glib-Object-Introspection/files/Glib-Object-Introspection-0.51.0-new-gobject-introspection.patch
@@ -0,0 +1,50 @@
+https://gitlab.gnome.org/GNOME/perl-glib-object-introspection/-/commit/e5adffecdc9b321d1f8d91777b190b8ae08f8dd0
+
+From e5adffecdc9b321d1f8d91777b190b8ae08f8dd0 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Sat, 14 Sep 2024 13:09:59 +0100
+Subject: [PATCH] Handle pointer types
+
+Now that gobject-introspection pairs G_TYPE_POINTER types with their
+type registration function, we need to handle the case in which we are
+passed a pointer to a record that inherits from G_TYPE_POINTER. Since
+these types are basically plain pointers, we can reuse the sv_to_struct
+and struct_to_sv functions we use for untyped structures.
+
+Fixes: #7
+---
+ gperl-i11n-marshal-interface.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/gperl-i11n-marshal-interface.c b/gperl-i11n-marshal-interface.c
+index 2bef8eb..50cce51 100644
+--- a/gperl-i11n-marshal-interface.c
++++ b/gperl-i11n-marshal-interface.c
+@@ -41,6 +41,12 @@ instance_sv_to_pointer (GICallableInfo *info, SV *sv, GPerlI11nInvocationInfo *i
+ 				                        info_type,
+ 				                        sv);
+ 			}
++                } else if (g_type_is_a (type, G_TYPE_POINTER)) {
++                        dwarn ("  -> pointer\n");
++                        pointer = sv_to_struct (GI_TRANSFER_NOTHING,
++                                                container,
++                                                info_type,
++                                                sv);
+ 		} else {
+ 			dwarn ("  -> boxed: type=%s (%"G_GSIZE_FORMAT")\n",
+ 			       g_type_name (type), type);
+@@ -397,6 +403,12 @@ interface_to_sv (GITypeInfo* info,
+ 			}
+ 		}
+ 
++                else if (g_type_is_a (type, G_TYPE_POINTER)) {
++                        dwarn ("  -> pointer: pointer=%p, type=%"G_GSIZE_FORMAT" (%s), own=%d\n",
++                               arg->v_pointer, type, g_type_name (type), own);
++			sv = struct_to_sv (interface, info_type, arg->v_pointer, own);
++                }
++
+ #if GLIB_CHECK_VERSION (2, 24, 0)
+ 		else if (g_type_is_a (type, G_TYPE_VARIANT)) {
+ 			dwarn ("  -> variant\n");
+-- 
+GitLab


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-09  6:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-09  6:23 [gentoo-commits] repo/gentoo:master commit in: dev-perl/Glib-Object-Introspection/, dev-perl/Glib-Object-Introspection/files/ Sam James

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