Skip to content

Commit

Permalink
net/rubygem-grpc: Update to 1.60.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sunpoet committed Dec 14, 2023
1 parent 14a6315 commit 3d479e9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 27 deletions.
8 changes: 4 additions & 4 deletions net/rubygem-grpc/Makefile
@@ -1,5 +1,5 @@
PORTNAME= grpc
PORTVERSION= 1.59.0
PORTVERSION= 1.60.0
CATEGORIES= net rubygems
MASTER_SITES= RG

Expand All @@ -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
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions 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
10 changes: 5 additions & 5 deletions 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.
Expand All @@ -9,14 +9,14 @@
(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 */
-static VALUE grpc_rb_event_thread(VALUE arg) {
+static VALUE grpc_rb_event_thread(void *arg) {
grpc_rb_event* event;
(void)arg;
grpc_ruby_init();
while (true) {
24 changes: 9 additions & 15 deletions 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)
Expand All @@ -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

Expand All @@ -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())
Expand Down

0 comments on commit 3d479e9

Please sign in to comment.