git: e8d4bd6fe9c6 - main - devel/rubygem-cool.io: Fix build with Clang 16 and remove the workaround
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Jul 2023 10:43:49 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e8d4bd6fe9c6704405448a394c932483603c69e2
commit e8d4bd6fe9c6704405448a394c932483603c69e2
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-07-09 10:25:23 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-07-09 10:25:23 +0000
devel/rubygem-cool.io: Fix build with Clang 16 and remove the workaround
./../libev/ev.c:3771:36: error: incompatible function pointer types passing 'VALUE (void *)' (aka 'unsigned long (void *)') to parameter of type 'void *(*)(void *)' [-Wincompatible-function-pointer-types]
rb_thread_call_without_gvl(ev_backend_poll, (void *)&poll_args, RUBY_UBF_IO, 0);
^~~~~~~~~~~~~~~
/usr/local/include/ruby-3.1/ruby/thread.h:130:42: note: passing argument to parameter 'func' here
void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1,
^
56 warnings and 1 error generated.
---
devel/rubygem-cool.io/Makefile | 6 ------
devel/rubygem-cool.io/files/patch-clang16 | 11 +++++++++++
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/devel/rubygem-cool.io/Makefile b/devel/rubygem-cool.io/Makefile
index d846ea2c9758..fbafd0c02372 100644
--- a/devel/rubygem-cool.io/Makefile
+++ b/devel/rubygem-cool.io/Makefile
@@ -14,10 +14,4 @@ RUN_DEPENDS= rubygem-iobuffer>=1.0.0:devel/rubygem-iobuffer
USES= gem
-.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/devel/rubygem-cool.io/files/patch-clang16 b/devel/rubygem-cool.io/files/patch-clang16
new file mode 100644
index 000000000000..dada59c2cba4
--- /dev/null
+++ b/devel/rubygem-cool.io/files/patch-clang16
@@ -0,0 +1,11 @@
+--- ext/libev/ev.c.orig 2023-07-03 15:07:15 UTC
++++ ext/libev/ev.c
+@@ -3768,7 +3768,7 @@ rb_thread_unsafe_dangerous_crazy_blocking_region_end(.
+ #if defined(HAVE_RB_THREAD_BLOCKING_REGION) || defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
+ poll_args.loop = loop;
+ poll_args.waittime = waittime;
+- rb_thread_call_without_gvl(ev_backend_poll, (void *)&poll_args, RUBY_UBF_IO, 0);
++ rb_thread_call_without_gvl((void *(*)(void *)) ev_backend_poll, (void *)&poll_args, RUBY_UBF_IO, 0);
+ #else
+ backend_poll (EV_A_ waittime);
+ #endif