summary refs log tree commit diff
path: root/pkgs/development/perl-modules
diff options
context:
space:
mode:
authorRandy Eckenrode <randy@largeandhighquality.com>2023-11-03 13:37:27 -0400
committerRandy Eckenrode <randy@largeandhighquality.com>2023-11-03 13:45:18 -0400
commit1a2c0b89c6b322ad62fe16ad2e9b450880662f72 (patch)
tree009583a3f161e4f2e2bfe09a951707d12f93f29a /pkgs/development/perl-modules
parent0dca32340c02f08e629388a5edddbd856a239780 (diff)
perlPackages.Gtk2: fix build with clang 16
Fix pointer casts to 32-bit integers.
Diffstat (limited to 'pkgs/development/perl-modules')
-rw-r--r--pkgs/development/perl-modules/Gtk2-fix-incompatible-pointer-conversion.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/pkgs/development/perl-modules/Gtk2-fix-incompatible-pointer-conversion.patch b/pkgs/development/perl-modules/Gtk2-fix-incompatible-pointer-conversion.patch
new file mode 100644
index 0000000000000..1ac68ee19d01c
--- /dev/null
+++ b/pkgs/development/perl-modules/Gtk2-fix-incompatible-pointer-conversion.patch
@@ -0,0 +1,86 @@
+diff -ur a/gdk.typemap b/gdk.typemap
+--- a/gdk.typemap	2017-05-21 15:02:54.000000000 -0400
++++ b/gdk.typemap	2023-11-03 13:17:43.717890172 -0400
+@@ -23,6 +23,7 @@
+ TYPEMAP
+ 
+ # can be either a pointer or an integer, this handles both cases
++uintptr_t		T_UV
+ GdkNativeWindow		T_UV
+ 
+ # GdkBitmap doesn't get its own type id, but needs to be treated separately.
+diff -ur a/xs/GdkDnd.xs b/xs/GdkDnd.xs
+--- a/xs/GdkDnd.xs	2017-05-21 15:02:54.000000000 -0400
++++ b/xs/GdkDnd.xs	2023-11-03 13:23:22.478329089 -0400
+@@ -142,12 +142,12 @@
+ void
+ gdk_drag_get_protocol_for_display (class, display, xid)
+ 	GdkDisplay *display
+-	guint32 xid
++	uintptr_t xid
+     PREINIT:
+ 	GdkDragProtocol protocol;
+-	guint32 ret;
++	uintptr_t ret;
+     PPCODE:
+-	ret = gdk_drag_get_protocol_for_display (display, xid, &protocol);
++	ret = (uintptr_t)gdk_drag_get_protocol_for_display (display, INT2PTR(GdkNativeWindow, xid), &protocol);
+ 	XPUSHs (sv_2mortal (newSVuv (ret)));
+ 	XPUSHs (sv_2mortal (ret 
+ 	                    ? newSVGdkDragProtocol (protocol)
+@@ -184,12 +184,12 @@
+ =cut
+ void
+ gdk_drag_get_protocol (class, xid)
+-	guint32 xid
++	uintptr_t xid
+     PREINIT:
+ 	GdkDragProtocol protocol;
+-	guint32 ret;
++	uintptr_t ret;
+     PPCODE:
+-	ret = gdk_drag_get_protocol (xid, &protocol);
++	ret = (uintptr_t)gdk_drag_get_protocol (INT2PTR(GdkNativeWindow, xid), &protocol);
+ 	XPUSHs (sv_2mortal (newSVuv (ret)));
+ 	XPUSHs (sv_2mortal (newSVGdkDragProtocol (protocol)));
+ 	
+diff -ur a/xs/GdkSelection.xs b/xs/GdkSelection.xs
+--- a/xs/GdkSelection.xs	2017-05-21 15:02:54.000000000 -0400
++++ b/xs/GdkSelection.xs	2023-11-03 13:26:58.976888906 -0400
+@@ -147,7 +147,7 @@
+ ##  void gdk_selection_send_notify (guint32 requestor, GdkAtom selection, GdkAtom target, GdkAtom property, guint32 time_) 
+ void
+ gdk_selection_send_notify (class, requestor, selection, target, property, time_)
+-	guint32 requestor
++	GdkNativeWindow requestor
+ 	GdkAtom selection
+ 	GdkAtom target
+ 	GdkAtom property
+@@ -161,7 +161,7 @@
+ void
+ gdk_selection_send_notify_for_display (class, display, requestor, selection, target, property, time_)
+ 	GdkDisplay *display
+-	guint32 requestor
++	GdkNativeWindow requestor
+ 	GdkAtom selection
+ 	GdkAtom target
+ 	GdkAtom property
+diff -ur a/xs/GtkWindow.xs b/xs/GtkWindow.xs
+--- a/xs/GtkWindow.xs	2017-05-21 15:02:54.000000000 -0400
++++ b/xs/GtkWindow.xs	2023-11-03 13:32:53.673168678 -0400
+@@ -581,13 +581,13 @@
+ void
+ gtk_window_remove_embedded_xid (window, xid)
+ 	GtkWindow * window
+-	guint       xid
++	GdkNativeWindow       xid
+ 
+ ## void gtk_window_add_embedded_xid (GtkWindow *window, guint xid)
+ void
+ gtk_window_add_embedded_xid (window, xid)
+ 	GtkWindow * window
+-	guint       xid
++	GdkNativeWindow       xid
+ 
+ ##void gtk_window_reshow_with_initial_size (GtkWindow *window)
+ void