git: 3d479e9a0c1c - main - net/rubygem-grpc: Update to 1.60.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Thu, 14 Dec 2023 06:08:17 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3d479e9a0c1c85c43dac838732750c2fa2d81b51

commit 3d479e9a0c1c85c43dac838732750c2fa2d81b51
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-12-14 05:39:58 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-12-14 05:48:53 +0000

    net/rubygem-grpc: Update to 1.60.0
    
    Changes:        https://github.com/grpc/grpc/releases
---
 net/rubygem-grpc/Makefile                          |  8 ++++----
 net/rubygem-grpc/distinfo                          |  6 +++---
 net/rubygem-grpc/files/patch-clang16               | 10 ++++-----
 .../files/patch-src_ruby_ext_grpc_extconf.rb       | 24 ++++++++--------------
 4 files changed, 21 insertions(+), 27 deletions(-)

diff --git a/net/rubygem-grpc/Makefile b/net/rubygem-grpc/Makefile
index 9996a9d9449f..91c9fa0a8317 100644
--- a/net/rubygem-grpc/Makefile
+++ b/net/rubygem-grpc/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	grpc
-PORTVERSION=	1.59.0
+PORTVERSION=	1.60.0
 CATEGORIES=	net rubygems
 MASTER_SITES=	RG
 
@@ -12,7 +12,7 @@ LICENSE=	BSD3CLAUSE
 LIB_DEPENDS=	libcares.so:dns/c-ares \
 		libgrpc.so:devel/grpc
 RUN_DEPENDS=	ca_root_nss>=0:security/ca_root_nss \
-		rubygem-google-protobuf>=3.24<4:devel/rubygem-google-protobuf \
+		rubygem-google-protobuf>=3.25<4:devel/rubygem-google-protobuf \
 		rubygem-googleapis-common-protos-types>=1.0<2:devel/rubygem-googleapis-common-protos-types
 
 USES=		cpe gem gmake pkgconfig
@@ -21,8 +21,8 @@ MAKE_JOBS_UNSAFE=	yes
 
 .include <bsd.port.options.mk>
 
-.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
-CONFIGURE_ARGS+=	--with-cflags="-Wno-error=incompatible-function-pointer-types"
+.if ${OPSYS} == FreeBSD && ((${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000) || ${OSVERSION} >= 1400091)
+CONFIGURE_ARGS+=--with-cflags="-Wno-error=incompatible-function-pointer-types"
 .endif
 
 post-patch:
diff --git a/net/rubygem-grpc/distinfo b/net/rubygem-grpc/distinfo
index 891b1e9d97c9..1cf61d9bc987 100644
--- a/net/rubygem-grpc/distinfo
+++ b/net/rubygem-grpc/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1698341277
-SHA256 (rubygem/grpc-1.59.0.gem) = 942db7814cb0eee0b72c4c4ac5eac5ce76275b314a327b952e580e8b5d1dd76a
-SIZE (rubygem/grpc-1.59.0.gem) = 6394368
+TIMESTAMP = 1702028282
+SHA256 (rubygem/grpc-1.60.0.gem) = 16bfba8b82e2032fa2b17fe7a4f4436540b257e28ef3842eb54811ef8b87f3af
+SIZE (rubygem/grpc-1.60.0.gem) = 6455808
diff --git a/net/rubygem-grpc/files/patch-clang16 b/net/rubygem-grpc/files/patch-clang16
index 9a16799fd3f6..2e466f457ec7 100644
--- a/net/rubygem-grpc/files/patch-clang16
+++ b/net/rubygem-grpc/files/patch-clang16
@@ -1,6 +1,6 @@
---- src/ruby/ext/grpc/rb_channel.c.orig	2023-05-20 19:48:13 UTC
+--- src/ruby/ext/grpc/rb_channel.c.orig	2023-12-08 17:22:30 UTC
 +++ src/ruby/ext/grpc/rb_channel.c
-@@ -694,7 +694,7 @@ static void run_poll_channels_loop_unblocking_func(voi
+@@ -726,7 +726,7 @@ static void run_poll_channels_loop_unblocking_func(voi
  }
  
  // Poll channel connectivity states in background thread without the GIL.
@@ -9,9 +9,9 @@
    (void)arg;
    gpr_log(
        GPR_DEBUG,
---- src/ruby/ext/grpc/rb_event_thread.c.orig	2023-05-20 19:51:52 UTC
+--- src/ruby/ext/grpc/rb_event_thread.c.orig	2023-12-08 17:22:30 UTC
 +++ src/ruby/ext/grpc/rb_event_thread.c
-@@ -114,7 +114,7 @@ static void grpc_rb_event_unblocking_func(void* arg) {
+@@ -116,7 +116,7 @@ static void grpc_rb_event_unblocking_func(void* arg) {
  
  /* This is the implementation of the thread that handles auth metadata plugin
   * events */
@@ -19,4 +19,4 @@
 +static VALUE grpc_rb_event_thread(void *arg) {
    grpc_rb_event* event;
    (void)arg;
-   grpc_ruby_init();
+   while (true) {
diff --git a/net/rubygem-grpc/files/patch-src_ruby_ext_grpc_extconf.rb b/net/rubygem-grpc/files/patch-src_ruby_ext_grpc_extconf.rb
index db889ea228a7..a0ef4a9b6749 100644
--- a/net/rubygem-grpc/files/patch-src_ruby_ext_grpc_extconf.rb
+++ b/net/rubygem-grpc/files/patch-src_ruby_ext_grpc_extconf.rb
@@ -1,6 +1,6 @@
---- src/ruby/ext/grpc/extconf.rb.orig	2023-10-29 03:53:23 UTC
+--- src/ruby/ext/grpc/extconf.rb.orig	2023-12-08 17:22:30 UTC
 +++ src/ruby/ext/grpc/extconf.rb
-@@ -68,11 +68,11 @@ if apple_toolchain && !cross_compiling
+@@ -96,11 +96,11 @@ if apple_toolchain && !cross_compiling
  end
  
  # Don't embed on TruffleRuby (constant-time crypto is unsafe with Sulong, slow build times)
@@ -15,7 +15,7 @@
  
  ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG']
  if apple_toolchain && !cross_compiling
-@@ -97,36 +97,6 @@ ENV['BUILDDIR'] = output_dir
+@@ -125,30 +125,10 @@ ENV['BUILDDIR'] = output_dir
  strip_tool = RbConfig::CONFIG['STRIP']
  strip_tool += ' -x' if apple_toolchain
  
@@ -33,26 +33,20 @@
 -  puts "Building grpc native library: #{cmd}"
 -  system(cmd)
 -  exit 1 unless $? == 0
--
--  if grpc_config == 'opt'
--    rm_obj_cmd = "rm -rf #{File.join(output_dir, 'objs')}"
--    puts "Removing grpc object files: #{rm_obj_cmd}"
--    system(rm_obj_cmd)
--    exit 1 unless $? == 0
--    strip_cmd = "#{strip_tool} #{grpc_lib_dir}/*.a"
--    puts "Stripping grpc native library: #{strip_cmd}"
--    system(strip_cmd)
--    exit 1 unless $? == 0
--  end
 -end
 -
+ # C-core built, generate Makefile for ruby extension
+ $LDFLAGS = maybe_remove_strip_all_linker_flag($LDFLAGS)
+ $DLDFLAGS = maybe_remove_strip_all_linker_flag($DLDFLAGS)
+ 
 -$CFLAGS << ' -DGRPC_RUBY_WINDOWS_UCRT' if windows_ucrt
 -$CFLAGS << ' -I' + File.join(grpc_root, 'include')
+-$CFLAGS << ' -g'
 -
  def have_ruby_abi_version()
    return true if RUBY_ENGINE == 'truffleruby'
    # ruby_abi_version is only available in development versions: https://github.com/ruby/ruby/pull/6231
-@@ -155,13 +125,12 @@ def ext_export_filename()
+@@ -177,13 +157,12 @@ def ext_export_filename()
  end
  
  ext_export_file = File.join(grpc_root, 'src', 'ruby', 'ext', 'grpc', ext_export_filename())