git: 8283d190545f - main - x11-toolkits/rubygem-gtk3: Fix build with Clang 16 and remove the workaround
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Jun 2023 07:22:38 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=8283d190545f1f68ce3582f1190e70a655aee18f
commit 8283d190545f1f68ce3582f1190e70a655aee18f
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-06-30 07:08:01 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-06-30 07:08:01 +0000
x11-toolkits/rubygem-gtk3: Fix build with Clang 16 and remove the workaround
rb-gtk3-spin-button.c:70:15: error: incompatible function pointer types passing 'VALUE (VALUE)' (aka 'unsigned long (unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
rb_gtk3_spin_button_input_rescue, (VALUE)&input_data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-3.1/ruby/internal/iterator.h:364:62: note: passing argument to parameter 'r_proc' here
VALUE rb_rescue(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2);
^
1 error generated.
Reference: https://github.com/ruby/ruby/commit/5c7c2d9951f2512ca10ea38fecc48d8ac67502e6
---
x11-toolkits/rubygem-gtk3/Makefile | 6 ------
x11-toolkits/rubygem-gtk3/files/patch-clang16 | 11 +++++++++++
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/x11-toolkits/rubygem-gtk3/Makefile b/x11-toolkits/rubygem-gtk3/Makefile
index 331d91415cad..1a7dbc8b2720 100644
--- a/x11-toolkits/rubygem-gtk3/Makefile
+++ b/x11-toolkits/rubygem-gtk3/Makefile
@@ -17,10 +17,4 @@ RUN_DEPENDS= rubygem-atk>=${PORTVERSION}<${PORTVERSION}_99:accessibility/rubygem
USES= gem gnome
USE_GNOME= gtk30
-.include <bsd.port.options.mk>
-
-.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400091
-CONFIGURE_ARGS+= --with-cflags="-Wno-error=incompatible-function-pointer-types"
-.endif
-
.include <bsd.port.mk>
diff --git a/x11-toolkits/rubygem-gtk3/files/patch-clang16 b/x11-toolkits/rubygem-gtk3/files/patch-clang16
new file mode 100644
index 000000000000..9e4463820c87
--- /dev/null
+++ b/x11-toolkits/rubygem-gtk3/files/patch-clang16
@@ -0,0 +1,11 @@
+--- ext/gtk3/rb-gtk3-spin-button.c.orig 2023-06-24 10:51:13 UTC
++++ ext/gtk3/rb-gtk3-spin-button.c
+@@ -46,7 +46,7 @@ rb_gtk3_spin_button_input_body(VALUE user_data)
+ }
+
+ static VALUE
+-rb_gtk3_spin_button_input_rescue(VALUE user_data)
++rb_gtk3_spin_button_input_rescue(VALUE user_data, VALUE _)
+ {
+ InputData *input_data = (InputData *)user_data;
+ g_value_set_int(input_data->data->return_value, GTK_INPUT_ERROR);