git: 8051b84838dd - main - net/rubygem-grpc: Update to 1.45.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sat, 16 Apr 2022 04:24:15 UTC
The branch main has been updated by sunpoet:

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

commit 8051b84838dde1fb5b5f784f2fcad87b994ad1bf
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-04-16 04:00:27 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-04-16 04:19:40 +0000

    net/rubygem-grpc: Update to 1.45.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       | 26 +++++++++++++++++-----
 3 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/net/rubygem-grpc/Makefile b/net/rubygem-grpc/Makefile
index 4e525b90b978..76bfbce27cb1 100644
--- a/net/rubygem-grpc/Makefile
+++ b/net/rubygem-grpc/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	grpc
-PORTVERSION=	1.43.1
-PORTREVISION=	2
+PORTVERSION=	1.45.0
 CATEGORIES=	net rubygems
 MASTER_SITES=	RG
 
@@ -12,7 +11,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.18<4:devel/rubygem-google-protobuf \
+		rubygem-google-protobuf>=3.19<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 67941e8f3128..2b5c83311041 100644
--- a/net/rubygem-grpc/distinfo
+++ b/net/rubygem-grpc/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1643382630
-SHA256 (rubygem/grpc-1.43.1.gem) = 0abc081ae0ad2fa42689c6e2139f15f089d78d2e37b2a9e5055cab76c1c4dc87
-SIZE (rubygem/grpc-1.43.1.gem) = 5084672
+TIMESTAMP = 1649423952
+SHA256 (rubygem/grpc-1.45.0.gem) = 83e9ccf014d2b78ab372be19fb82617691c79cc4c9fc46fc5da272a6ce69f01e
+SIZE (rubygem/grpc-1.45.0.gem) = 5291008
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 868b2f64b09a..74acc4494991 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,4 +1,4 @@
---- src/ruby/ext/grpc/extconf.rb.orig	2021-12-04 03:53:02 UTC
+--- src/ruby/ext/grpc/extconf.rb.orig	2022-04-11 16:34:02 UTC
 +++ src/ruby/ext/grpc/extconf.rb
 @@ -45,9 +45,9 @@ if darwin && !cross_compiling
    ENV['ARFLAGS'] = '-o'
@@ -13,24 +13,38 @@
  
  ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG']
  if darwin && !cross_compiling
-@@ -66,22 +66,23 @@ output_dir = File.expand_path(RbConfig::CONFIG['topdir
+@@ -66,29 +66,30 @@ output_dir = File.expand_path(RbConfig::CONFIG['topdir
  grpc_lib_dir = File.join(output_dir, 'libs', grpc_config)
  ENV['BUILDDIR'] = output_dir
  
 -unless windows
 -  puts 'Building internal gRPC into ' + grpc_lib_dir
 -  nproc = 4
--  nproc = Etc.nprocessors * 2 if Etc.respond_to? :nprocessors
+-  nproc = Etc.nprocessors if Etc.respond_to? :nprocessors
+-  nproc_override = ENV['GRPC_RUBY_BUILD_PROCS']
+-  unless nproc_override.nil? or nproc_override.size == 0
+-    nproc = nproc_override
+-    puts "Overriding make parallelism to #{nproc}"
+-  end
 -  make = bsd ? 'gmake' : 'make'
--  system("#{make} -j#{nproc} -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config} Q=")
+-  cmd = "#{make} -j#{nproc} -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config} Q="
+-  puts "Building grpc native library: #{cmd}"
+-  system(cmd)
 -  exit 1 unless $? == 0
 -end
 +#unless windows
 +#  puts 'Building internal gRPC into ' + grpc_lib_dir
 +#  nproc = 4
-+#  nproc = Etc.nprocessors * 2 if Etc.respond_to? :nprocessors
++#  nproc = Etc.nprocessors if Etc.respond_to? :nprocessors
++#  nproc_override = ENV['GRPC_RUBY_BUILD_PROCS']
++#  unless nproc_override.nil? or nproc_override.size == 0
++#    nproc = nproc_override
++#    puts "Overriding make parallelism to #{nproc}"
++#  end
 +#  make = bsd ? 'gmake' : 'make'
-+#  system("#{make} -j#{nproc} -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config} Q=")
++#  cmd = "#{make} -j#{nproc} -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config} Q="
++#  puts "Building grpc native library: #{cmd}"
++#  system(cmd)
 +#  exit 1 unless $? == 0
 +#end