git: af8f5b478f7d - main - net/rubygem-grpc: Update to 1.52.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 21 Mar 2023 19:33:27 UTC
The branch main has been updated by sunpoet:

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

commit af8f5b478f7deac48306a19868eef596a73bf860
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-03-21 18:51:59 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:22:07 +0000

    net/rubygem-grpc: Update to 1.52.0
    
    Changes:        https://github.com/grpc/grpc/releases
                    https://github.com/grpc/grpc/commits/master/src/ruby
---
 net/rubygem-grpc/Makefile                              |  5 ++---
 net/rubygem-grpc/distinfo                              |  6 +++---
 .../files/patch-src_ruby_ext_grpc_extconf.rb           | 18 ++++++++++++------
 3 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/net/rubygem-grpc/Makefile b/net/rubygem-grpc/Makefile
index 27c8500e1676..a1bbef1f1f7e 100644
--- a/net/rubygem-grpc/Makefile
+++ b/net/rubygem-grpc/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	grpc
-PORTVERSION=	1.48.0
-PORTREVISION=	1
+PORTVERSION=	1.52.0
 CATEGORIES=	net rubygems
 MASTER_SITES=	RG
 
@@ -13,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.19<4:devel/rubygem-google-protobuf \
+		rubygem-google-protobuf>=3.21<4:devel/rubygem-google-protobuf \
 		rubygem-googleapis-common-protos-types>=1.0<2:devel/rubygem-googleapis-common-protos-types
 
 USES=		cpe gem gmake pkgconfig
diff --git a/net/rubygem-grpc/distinfo b/net/rubygem-grpc/distinfo
index c180ef412773..fa03c1c71c25 100644
--- a/net/rubygem-grpc/distinfo
+++ b/net/rubygem-grpc/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1660576896
-SHA256 (rubygem/grpc-1.48.0.gem) = e82889a676e19cfc2b08883694d97c05666e318d355e7398d7dbf686060f42a5
-SIZE (rubygem/grpc-1.48.0.gem) = 5637120
+TIMESTAMP = 1677771663
+SHA256 (rubygem/grpc-1.52.0.gem) = 7ed34993c54f0c56d2121182307fee6433edd3beeaa4120bfa3f90b186877b07
+SIZE (rubygem/grpc-1.52.0.gem) = 5824512
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 e9c3881e6c81..c325a069f189 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,11 +1,11 @@
---- src/ruby/ext/grpc/extconf.rb.orig	2022-07-30 16:45:00 UTC
+--- src/ruby/ext/grpc/extconf.rb.orig	2023-02-26 18:56:37 UTC
 +++ src/ruby/ext/grpc/extconf.rb
-@@ -68,11 +68,11 @@ if apple_toolchain && !cross_compiling
+@@ -69,11 +69,11 @@ if apple_toolchain && !cross_compiling
  end
  
  # Don't embed on TruffleRuby (constant-time crypto is unsafe with Sulong, slow build times)
 -ENV['EMBED_OPENSSL'] = (RUBY_ENGINE != 'truffleruby').to_s
-+ENV['EMBED_OPENSSL'] = 'false'
++ENV['EMBED_OPENSSL'] =  'false'
  # Don't embed on TruffleRuby (the system zlib is already linked for the zlib C extension, slow build times)
 -ENV['EMBED_ZLIB'] = (RUBY_ENGINE != 'truffleruby').to_s
 +ENV['EMBED_ZLIB'] = 'false'
@@ -15,7 +15,7 @@
  
  ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG']
  if apple_toolchain && !cross_compiling
-@@ -93,30 +93,10 @@ output_dir = File.expand_path(RbConfig::CONFIG['topdir
+@@ -94,25 +94,6 @@ output_dir = File.expand_path(RbConfig::CONFIG['topdir
  grpc_lib_dir = File.join(output_dir, 'libs', grpc_config)
  ENV['BUILDDIR'] = output_dir
  
@@ -35,10 +35,16 @@
 -  exit 1 unless $? == 0
 -end
 -
+-$CFLAGS << ' -DGRPC_RUBY_WINDOWS_UCRT' if windows_ucrt
 -$CFLAGS << ' -I' + File.join(grpc_root, 'include')
 -
- ext_export_file = File.join(grpc_root, 'src', 'ruby', 'ext', 'grpc', 'ext-export')
- ext_export_file += '-truffleruby' if RUBY_ENGINE == 'truffleruby'
+ 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
+@@ -141,10 +122,8 @@ def ext_export_filename()
+ end
+ 
+ ext_export_file = File.join(grpc_root, 'src', 'ruby', 'ext', 'grpc', ext_export_filename())
 -$LDFLAGS << ' -Wl,--version-script="' + ext_export_file + '.gcc"' if linux
 -$LDFLAGS << ' -Wl,-exported_symbols_list,"' + ext_export_file + '.clang"' if apple_toolchain