diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2019-10-26 14:30:35 +0000 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2019-10-26 14:30:35 +0000 |
commit | 465e5df8343172b3b71c4200711b118cc356f231 (patch) | |
tree | c373afeb4610f1371a2de94d7d05ef94a0f52af8 /net | |
parent | a04b98b088bffa379a4752a2e3a3b520f8a0048a (diff) | |
download | ports-465e5df8343172b3b71c4200711b118cc356f231.tar.gz ports-465e5df8343172b3b71c4200711b118cc356f231.zip |
Add rubygem-grpc124 1.24.0 (copied from rubygem-grpc)
- Update version requirement of RUN_DEPENDS
Notes
Notes:
svn path=/head/; revision=515696
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/rubygem-grpc124/Makefile | 34 | ||||
-rw-r--r-- | net/rubygem-grpc124/distinfo | 3 | ||||
-rw-r--r-- | net/rubygem-grpc124/files/patch-src_ruby_ext_grpc_extconf.rb | 48 | ||||
-rw-r--r-- | net/rubygem-grpc124/files/patch-src_ruby_lib_grpc.rb | 11 | ||||
-rw-r--r-- | net/rubygem-grpc124/pkg-descr | 3 |
6 files changed, 100 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index a8462ecd337e..adbe33ce1664 100644 --- a/net/Makefile +++ b/net/Makefile @@ -1261,6 +1261,7 @@ SUBDIR += rubygem-google-cloud-logging SUBDIR += rubygem-google-cloud-storage SUBDIR += rubygem-grpc + SUBDIR += rubygem-grpc124 SUBDIR += rubygem-hangouts-chat SUBDIR += rubygem-http-parser SUBDIR += rubygem-http_parser.rb diff --git a/net/rubygem-grpc124/Makefile b/net/rubygem-grpc124/Makefile new file mode 100644 index 000000000000..ba85effb870c --- /dev/null +++ b/net/rubygem-grpc124/Makefile @@ -0,0 +1,34 @@ +# $FreeBSD$ + +PORTNAME= grpc +PORTVERSION= 1.24.0 +CATEGORIES= net rubygems +MASTER_SITES= RG +PKGNAMESUFFIX= 124 + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Ruby implementation of gRPC + +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.8<4:devel/rubygem-google-protobuf \ + rubygem-googleapis-common-protos-types>=1.0<2:devel/rubygem-googleapis-common-protos-types + +USES= gem gmake pkgconfig +USE_RUBY= yes + +MAKE_JOBS_UNSAFE= yes + +post-extract: + @${RM} ${WRKSRC}/Makefile ${WRKSRC}/.yardopts + @${RM} -r ${WRKSRC}/etc ${WRKSRC}/include ${WRKSRC}/third_party ${WRKSRC}/src/boringssl ${WRKSRC}/src/core + +post-patch: + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/src/ruby/lib/grpc.rb + @${REINPLACE_CMD} -Ee '/s\.files = /s;, "(Makefile|etc|include|third_party|src/boringssl|src/core)[^"]*"\.freeze;;g' ${WRKSRC}/${GEMSPEC} + @${REINPLACE_CMD} -e '/s\.files = /s|"\.yardopts"\.freeze, ||' ${WRKSRC}/${GEMSPEC} + +.include <bsd.port.mk> diff --git a/net/rubygem-grpc124/distinfo b/net/rubygem-grpc124/distinfo new file mode 100644 index 000000000000..543bfcc09273 --- /dev/null +++ b/net/rubygem-grpc124/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1571503064 +SHA256 (rubygem/grpc-1.24.0.gem) = eed268d73e455ed82df7e9a76a9575d11d3c1c139a95a227254b9286939c91a3 +SIZE (rubygem/grpc-1.24.0.gem) = 3264000 diff --git a/net/rubygem-grpc124/files/patch-src_ruby_ext_grpc_extconf.rb b/net/rubygem-grpc124/files/patch-src_ruby_ext_grpc_extconf.rb new file mode 100644 index 000000000000..d2bea8a9cd65 --- /dev/null +++ b/net/rubygem-grpc124/files/patch-src_ruby_ext_grpc_extconf.rb @@ -0,0 +1,48 @@ +--- src/ruby/ext/grpc/extconf.rb.orig 2019-10-19 19:28:47 UTC ++++ src/ruby/ext/grpc/extconf.rb +@@ -39,9 +39,9 @@ end + + ENV['AR'] = 'libtool -o' if RUBY_PLATFORM =~ /darwin/ + +-ENV['EMBED_OPENSSL'] = 'true' +-ENV['EMBED_ZLIB'] = 'true' +-ENV['EMBED_CARES'] = 'true' ++ENV['EMBED_OPENSSL'] = 'false' ++ENV['EMBED_ZLIB'] = 'false' ++ENV['EMBED_CARES'] = 'false' + ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG'] + ENV['ARCH_FLAGS'] = '-arch i386 -arch x86_64' if RUBY_PLATFORM =~ /darwin/ + ENV['CPPFLAGS'] = '-DGPR_BACKWARDS_COMPATIBILITY_MODE' +@@ -50,22 +50,22 @@ output_dir = File.expand_path(RbConfig:: + 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 +- make = bsd ? 'gmake' : 'make' +- system("#{make} -j#{nproc} -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config} Q=") +- 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 ++# make = bsd ? 'gmake' : 'make' ++# system("#{make} -j#{nproc} -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config} Q=") ++# exit 1 unless $? == 0 ++#end + +-$CFLAGS << ' -I' + File.join(grpc_root, 'include') ++#$CFLAGS << ' -I' + File.join(grpc_root, 'include') + + ext_export_file = File.join(grpc_root, 'src', 'ruby', 'ext', 'grpc', 'ext-export') + $LDFLAGS << ' -Wl,--version-script="' + ext_export_file + '.gcc"' if RUBY_PLATFORM =~ /linux/ + $LDFLAGS << ' -Wl,-exported_symbols_list,"' + ext_export_file + '.clang"' if RUBY_PLATFORM =~ /darwin/ + +-$LDFLAGS << ' ' + File.join(grpc_lib_dir, 'libgrpc.a') unless windows ++#$LDFLAGS << ' ' + File.join(grpc_lib_dir, 'libgrpc.a') unless windows + if grpc_config == 'gcov' + $CFLAGS << ' -O0 -fprofile-arcs -ftest-coverage' + $LDFLAGS << ' -fprofile-arcs -ftest-coverage -rdynamic' diff --git a/net/rubygem-grpc124/files/patch-src_ruby_lib_grpc.rb b/net/rubygem-grpc124/files/patch-src_ruby_lib_grpc.rb new file mode 100644 index 000000000000..b55c2dcbebc7 --- /dev/null +++ b/net/rubygem-grpc124/files/patch-src_ruby_lib_grpc.rb @@ -0,0 +1,11 @@ +--- src/ruby/lib/grpc.rb.orig 2019-10-19 19:28:47 UTC ++++ src/ruby/lib/grpc.rb +@@ -12,7 +12,7 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-ssl_roots_path = File.expand_path('../../../../etc/roots.pem', __FILE__) ++ssl_roots_path = '%%LOCALBASE%%/etc/ssl/cert.pem' + + require_relative 'grpc/errors' + require_relative 'grpc/structs' diff --git a/net/rubygem-grpc124/pkg-descr b/net/rubygem-grpc124/pkg-descr new file mode 100644 index 000000000000..a0a2df00d53f --- /dev/null +++ b/net/rubygem-grpc124/pkg-descr @@ -0,0 +1,3 @@ +A Ruby implementation of gRPC. + +WWW: https://github.com/grpc/grpc/tree/master/src/ruby |