1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

Fix grpc issue in gitlab-ce

- While I'm here, use = instead of ?= because gitlab-ce does not have slave port
- Bump PORTREVISION for dependency change

gitlab-ce has some runtime issue with grpc versions, especially upb stuff.
Move all gitlab-ce dependencies to specific grpc/rubygem-grpc versions in order
to keep gitlab-ce port more robust.

The changes are as follows:
- Add devel/grpc134 (copied from devel/grpc)
- Add net/rubygem-grpc130 (copied from net/rubygem-grpc)
- Move gitlab-ce and its dependencies to grpc134 and rubygem-grpc130

Differential Revision:	https://reviews.freebsd.org/D28491
Submitted by:	sunpoet (myself)
Approved by:	mfechner
Tested by:	mfechner
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2021-02-06 01:22:51 +00:00
parent ed2fad0bff
commit d3932e0e48
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=564168
18 changed files with 527 additions and 12 deletions

View File

@ -887,6 +887,7 @@
SUBDIR += grcov
SUBDIR += grex
SUBDIR += grpc
SUBDIR += grpc134
SUBDIR += grv
SUBDIR += gsettings-desktop-schemas
SUBDIR += gsoap

View File

@ -2,7 +2,7 @@
PORTNAME= gitaly
DISTVERSION= 13.8.1
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= devel
MAINTAINER= mfechner@FreeBSD.org
@ -21,7 +21,7 @@ MY_DEPENDS= git>=2.29:devel/git \
rubygem-rdoc>=6.1<7.0:devel/rubygem-rdoc \
rubygem-gitlab-gollum-lib>=4.2.7.9<4.2.8:www/rubygem-gitlab-gollum-lib \
rubygem-gitlab-gollum-rugged_adapter>=0.4.4.2<0.4.5.0:www/rubygem-gitlab-gollum-rugged_adapter \
rubygem-grpc>=1.30.2<1.31:net/rubygem-grpc \
rubygem-grpc130>=1.30.2<1.31:net/rubygem-grpc130 \
rubygem-sentry-raven>=3.0<4:devel/rubygem-sentry-raven \
rubygem-faraday>=1.0.1<2:www/rubygem-faraday \
rubygem-rbtrace>=0.4.14:devel/rubygem-rbtrace \

43
devel/grpc134/Makefile Normal file
View File

@ -0,0 +1,43 @@
# Created by: vanilla@
# $FreeBSD$
PORTNAME= grpc
PORTVERSION= 1.34.0
DISTVERSIONPREFIX= v
CATEGORIES= devel
PKGNAMESUFFIX= 134
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= HTTP/2-based RPC framework
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libabsl_base.so:devel/abseil \
libbenchmark.so:devel/benchmark \
libcares.so:dns/c-ares \
libgflags.so:devel/gflags \
libprotobuf.so:devel/protobuf \
libre2.so:devel/re2
USES= cmake compiler:c++17-lang localbase:ldflags pkgconfig ssl
USE_GITHUB= yes
CMAKE_ARGS= -DCMAKE_CXX_STANDARD=17 \
-DgRPC_ABSL_PROVIDER=package \
-DgRPC_BENCHMARK_PROVIDER=package \
-DgRPC_CARES_PROVIDER=package \
-DgRPC_GFLAGS_PROVIDER=package \
-DgRPC_PROTOBUF_PROVIDER=package \
-DgRPC_RE2_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
-DgRPC_ZLIB_PROVIDER=package
CMAKE_ON= BUILD_SHARED_LIBS
USE_LDCONFIG= yes
PLIST_SUB= PORTVERSION=${PORTVERSION}
CONFLICTS_INSTALL= grpc
.include <bsd.port.mk>

3
devel/grpc134/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1609277768
SHA256 (grpc-grpc-v1.34.0_GH0.tar.gz) = 7372a881122cd85a7224435a1d58bc5e11c88d4fb98a64b83f36f3d1c2f16d39
SIZE (grpc-grpc-v1.34.0_GH0.tar.gz) = 7723327

View File

@ -0,0 +1,11 @@
--- src/core/lib/security/credentials/jwt/jwt_verifier.cc.orig 2020-12-01 19:24:28 UTC
+++ src/core/lib/security/credentials/jwt/jwt_verifier.cc
@@ -472,7 +472,7 @@ static BIGNUM* bignum_from_base64(const char* b64) {
return result;
}
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
// Provide compatibility across OpenSSL 1.02 and 1.1.
static int RSA_set0_key(RSA* r, BIGNUM* n, BIGNUM* e, BIGNUM* d) {

View File

@ -0,0 +1,11 @@
--- src/core/tsi/alts/crypt/aes_gcm.cc.orig 2020-12-01 19:24:28 UTC
+++ src/core/tsi/alts/crypt/aes_gcm.cc
@@ -185,7 +185,7 @@ static grpc_status_code aes_gcm_derive_aead_key(uint8_
const uint8_t* kdf_counter) {
unsigned char buf[EVP_MAX_MD_SIZE];
unsigned char ctr = 1;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
HMAC_CTX hmac;
HMAC_CTX_init(&hmac);
if (!HMAC_Init_ex(&hmac, kdf_key, kKdfKeyLen, EVP_sha256(), nullptr) ||

View File

@ -0,0 +1,35 @@
--- src/core/tsi/ssl_transport_security.cc.orig 2020-12-01 19:24:28 UTC
+++ src/core/tsi/ssl_transport_security.cc
@@ -19,7 +19,7 @@
#include <grpc/support/port_platform.h>
#include "src/core/tsi/ssl_transport_security.h"
-
+#include <sys/socket.h>
#include <limits.h>
#include <string.h>
@@ -70,11 +70,10 @@ extern "C" {
#define TSI_SSL_MAX_PROTECTED_FRAME_SIZE_LOWER_BOUND 1024
#define TSI_SSL_HANDSHAKER_OUTGOING_BUFFER_INITIAL_SIZE 1024
-/* Putting a macro like this and littering the source file with #if is really
- bad practice.
- TODO(jboeuf): refactor all the #if / #endif in a separate module. */
-#ifndef TSI_OPENSSL_ALPN_SUPPORT
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L
#define TSI_OPENSSL_ALPN_SUPPORT 1
+#else
+#define TSI_OPENSSL_ALPN_SUPPORT 0
#endif
/* TODO(jboeuf): I have not found a way to get this number dynamically from the
@@ -1930,7 +1929,7 @@ tsi_result tsi_create_ssl_client_handshaker_factory_wi
options->cipher_suites);
if (result != TSI_OK) break;
-#if OPENSSL_VERSION_NUMBER >= 0x10100000
+#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
// X509_STORE_up_ref is only available since OpenSSL 1.1.
if (options->root_store != nullptr) {
X509_STORE_up_ref(options->root_store->store);

5
devel/grpc134/pkg-descr Normal file
View File

@ -0,0 +1,5 @@
gRPC is a modern, open source, high-performance remote procedure call (RPC)
framework that can run anywhere, enables client and server applications to
communicate transparently, and simplifies the building of connected systems.
WWW: https://grpc.io/

300
devel/grpc134/pkg-plist Normal file
View File

@ -0,0 +1,300 @@
bin/grpc_cpp_plugin
bin/grpc_csharp_plugin
bin/grpc_node_plugin
bin/grpc_objective_c_plugin
bin/grpc_php_plugin
bin/grpc_python_plugin
bin/grpc_ruby_plugin
include/grpc++/alarm.h
include/grpc++/channel.h
include/grpc++/client_context.h
include/grpc++/completion_queue.h
include/grpc++/create_channel.h
include/grpc++/create_channel_posix.h
include/grpc++/ext/health_check_service_server_builder_option.h
include/grpc++/ext/proto_server_reflection_plugin.h
include/grpc++/generic/async_generic_service.h
include/grpc++/generic/generic_stub.h
include/grpc++/grpc++.h
include/grpc++/health_check_service_interface.h
include/grpc++/impl/call.h
include/grpc++/impl/channel_argument_option.h
include/grpc++/impl/client_unary_call.h
include/grpc++/impl/codegen/async_stream.h
include/grpc++/impl/codegen/async_unary_call.h
include/grpc++/impl/codegen/byte_buffer.h
include/grpc++/impl/codegen/call.h
include/grpc++/impl/codegen/call_hook.h
include/grpc++/impl/codegen/channel_interface.h
include/grpc++/impl/codegen/client_context.h
include/grpc++/impl/codegen/client_unary_call.h
include/grpc++/impl/codegen/completion_queue.h
include/grpc++/impl/codegen/completion_queue_tag.h
include/grpc++/impl/codegen/config.h
include/grpc++/impl/codegen/config_protobuf.h
include/grpc++/impl/codegen/core_codegen.h
include/grpc++/impl/codegen/core_codegen_interface.h
include/grpc++/impl/codegen/create_auth_context.h
include/grpc++/impl/codegen/grpc_library.h
include/grpc++/impl/codegen/metadata_map.h
include/grpc++/impl/codegen/method_handler_impl.h
include/grpc++/impl/codegen/proto_utils.h
include/grpc++/impl/codegen/rpc_method.h
include/grpc++/impl/codegen/rpc_service_method.h
include/grpc++/impl/codegen/security/auth_context.h
include/grpc++/impl/codegen/serialization_traits.h
include/grpc++/impl/codegen/server_context.h
include/grpc++/impl/codegen/server_interface.h
include/grpc++/impl/codegen/service_type.h
include/grpc++/impl/codegen/slice.h
include/grpc++/impl/codegen/status.h
include/grpc++/impl/codegen/status_code_enum.h
include/grpc++/impl/codegen/string_ref.h
include/grpc++/impl/codegen/stub_options.h
include/grpc++/impl/codegen/sync_stream.h
include/grpc++/impl/codegen/time.h
include/grpc++/impl/grpc_library.h
include/grpc++/impl/method_handler_impl.h
include/grpc++/impl/rpc_method.h
include/grpc++/impl/rpc_service_method.h
include/grpc++/impl/serialization_traits.h
include/grpc++/impl/server_builder_option.h
include/grpc++/impl/server_builder_plugin.h
include/grpc++/impl/server_initializer.h
include/grpc++/impl/service_type.h
include/grpc++/resource_quota.h
include/grpc++/security/auth_context.h
include/grpc++/security/auth_metadata_processor.h
include/grpc++/security/credentials.h
include/grpc++/security/server_credentials.h
include/grpc++/server.h
include/grpc++/server_builder.h
include/grpc++/server_context.h
include/grpc++/server_posix.h
include/grpc++/support/async_stream.h
include/grpc++/support/async_unary_call.h
include/grpc++/support/byte_buffer.h
include/grpc++/support/channel_arguments.h
include/grpc++/support/config.h
include/grpc++/support/error_details.h
include/grpc++/support/slice.h
include/grpc++/support/status.h
include/grpc++/support/status_code_enum.h
include/grpc++/support/string_ref.h
include/grpc++/support/stub_options.h
include/grpc++/support/sync_stream.h
include/grpc++/support/time.h
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/census.h
include/grpc/compression.h
include/grpc/fork.h
include/grpc/grpc.h
include/grpc/grpc_posix.h
include/grpc/grpc_security.h
include/grpc/grpc_security_constants.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h
include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/fork.h
include/grpc/impl/codegen/gpr_slice.h
include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/log.h
include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/slice.h
include/grpc/impl/codegen/status.h
include/grpc/impl/codegen/sync.h
include/grpc/impl/codegen/sync_abseil.h
include/grpc/impl/codegen/sync_custom.h
include/grpc/impl/codegen/sync_generic.h
include/grpc/impl/codegen/sync_posix.h
include/grpc/impl/codegen/sync_windows.h
include/grpc/load_reporting.h
include/grpc/slice.h
include/grpc/slice_buffer.h
include/grpc/status.h
include/grpc/support/alloc.h
include/grpc/support/atm.h
include/grpc/support/atm_gcc_atomic.h
include/grpc/support/atm_gcc_sync.h
include/grpc/support/atm_windows.h
include/grpc/support/cpu.h
include/grpc/support/log.h
include/grpc/support/log_windows.h
include/grpc/support/port_platform.h
include/grpc/support/string_util.h
include/grpc/support/sync.h
include/grpc/support/sync_abseil.h
include/grpc/support/sync_custom.h
include/grpc/support/sync_generic.h
include/grpc/support/sync_posix.h
include/grpc/support/sync_windows.h
include/grpc/support/thd_id.h
include/grpc/support/time.h
include/grpc/support/workaround_list.h
include/grpcpp/alarm.h
include/grpcpp/channel.h
include/grpcpp/client_context.h
include/grpcpp/completion_queue.h
include/grpcpp/create_channel.h
include/grpcpp/create_channel_posix.h
include/grpcpp/ext/channelz_service_plugin.h
include/grpcpp/ext/health_check_service_server_builder_option.h
include/grpcpp/ext/proto_server_reflection_plugin.h
include/grpcpp/generic/async_generic_service.h
include/grpcpp/generic/generic_stub.h
include/grpcpp/grpcpp.h
include/grpcpp/health_check_service_interface.h
include/grpcpp/impl/call.h
include/grpcpp/impl/channel_argument_option.h
include/grpcpp/impl/client_unary_call.h
include/grpcpp/impl/codegen/async_generic_service.h
include/grpcpp/impl/codegen/async_stream.h
include/grpcpp/impl/codegen/async_unary_call.h
include/grpcpp/impl/codegen/byte_buffer.h
include/grpcpp/impl/codegen/call.h
include/grpcpp/impl/codegen/call_hook.h
include/grpcpp/impl/codegen/call_op_set.h
include/grpcpp/impl/codegen/call_op_set_interface.h
include/grpcpp/impl/codegen/callback_common.h
include/grpcpp/impl/codegen/channel_interface.h
include/grpcpp/impl/codegen/client_callback.h
include/grpcpp/impl/codegen/client_context.h
include/grpcpp/impl/codegen/client_interceptor.h
include/grpcpp/impl/codegen/client_unary_call.h
include/grpcpp/impl/codegen/completion_queue.h
include/grpcpp/impl/codegen/completion_queue_tag.h
include/grpcpp/impl/codegen/config.h
include/grpcpp/impl/codegen/config_protobuf.h
include/grpcpp/impl/codegen/core_codegen.h
include/grpcpp/impl/codegen/core_codegen_interface.h
include/grpcpp/impl/codegen/create_auth_context.h
include/grpcpp/impl/codegen/delegating_channel.h
include/grpcpp/impl/codegen/grpc_library.h
include/grpcpp/impl/codegen/intercepted_channel.h
include/grpcpp/impl/codegen/interceptor.h
include/grpcpp/impl/codegen/interceptor_common.h
include/grpcpp/impl/codegen/message_allocator.h
include/grpcpp/impl/codegen/metadata_map.h
include/grpcpp/impl/codegen/method_handler.h
include/grpcpp/impl/codegen/proto_buffer_reader.h
include/grpcpp/impl/codegen/proto_buffer_writer.h
include/grpcpp/impl/codegen/proto_utils.h
include/grpcpp/impl/codegen/rpc_method.h
include/grpcpp/impl/codegen/rpc_service_method.h
include/grpcpp/impl/codegen/security/auth_context.h
include/grpcpp/impl/codegen/serialization_traits.h
include/grpcpp/impl/codegen/server_callback.h
include/grpcpp/impl/codegen/server_callback_handlers.h
include/grpcpp/impl/codegen/server_context.h
include/grpcpp/impl/codegen/server_interceptor.h
include/grpcpp/impl/codegen/server_interface.h
include/grpcpp/impl/codegen/service_type.h
include/grpcpp/impl/codegen/slice.h
include/grpcpp/impl/codegen/status.h
include/grpcpp/impl/codegen/status_code_enum.h
include/grpcpp/impl/codegen/string_ref.h
include/grpcpp/impl/codegen/stub_options.h
include/grpcpp/impl/codegen/sync.h
include/grpcpp/impl/codegen/sync_stream.h
include/grpcpp/impl/codegen/time.h
include/grpcpp/impl/grpc_library.h
include/grpcpp/impl/method_handler_impl.h
include/grpcpp/impl/rpc_method.h
include/grpcpp/impl/rpc_service_method.h
include/grpcpp/impl/serialization_traits.h
include/grpcpp/impl/server_builder_option.h
include/grpcpp/impl/server_builder_plugin.h
include/grpcpp/impl/server_initializer.h
include/grpcpp/impl/service_type.h
include/grpcpp/resource_quota.h
include/grpcpp/security/alts_context.h
include/grpcpp/security/alts_util.h
include/grpcpp/security/auth_context.h
include/grpcpp/security/auth_metadata_processor.h
include/grpcpp/security/credentials.h
include/grpcpp/security/server_credentials.h
include/grpcpp/security/tls_certificate_provider.h
include/grpcpp/security/tls_credentials_options.h
include/grpcpp/server.h
include/grpcpp/server_builder.h
include/grpcpp/server_context.h
include/grpcpp/server_posix.h
include/grpcpp/support/async_stream.h
include/grpcpp/support/async_unary_call.h
include/grpcpp/support/byte_buffer.h
include/grpcpp/support/channel_arguments.h
include/grpcpp/support/client_callback.h
include/grpcpp/support/client_interceptor.h
include/grpcpp/support/config.h
include/grpcpp/support/error_details.h
include/grpcpp/support/interceptor.h
include/grpcpp/support/message_allocator.h
include/grpcpp/support/method_handler.h
include/grpcpp/support/proto_buffer_reader.h
include/grpcpp/support/proto_buffer_writer.h
include/grpcpp/support/server_callback.h
include/grpcpp/support/server_interceptor.h
include/grpcpp/support/slice.h
include/grpcpp/support/status.h
include/grpcpp/support/status_code_enum.h
include/grpcpp/support/string_ref.h
include/grpcpp/support/stub_options.h
include/grpcpp/support/sync_stream.h
include/grpcpp/support/time.h
include/grpcpp/support/validate_service_config.h
lib/cmake/grpc/gRPCConfig.cmake
lib/cmake/grpc/gRPCConfigVersion.cmake
lib/cmake/grpc/gRPCTargets-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/grpc/gRPCTargets.cmake
lib/cmake/grpc/modules/Findc-ares.cmake
lib/cmake/grpc/modules/Findre2.cmake
lib/libaddress_sorting.so
lib/libaddress_sorting.so.14
lib/libaddress_sorting.so.14.0.0
lib/libgpr.so
lib/libgpr.so.14
lib/libgpr.so.14.0.0
lib/libgrpc++.so
lib/libgrpc++.so.1
lib/libgrpc++.so.%%PORTVERSION%%
lib/libgrpc++_alts.so
lib/libgrpc++_alts.so.1
lib/libgrpc++_alts.so.%%PORTVERSION%%
lib/libgrpc++_error_details.so
lib/libgrpc++_error_details.so.1
lib/libgrpc++_error_details.so.%%PORTVERSION%%
lib/libgrpc++_reflection.so
lib/libgrpc++_reflection.so.1
lib/libgrpc++_reflection.so.%%PORTVERSION%%
lib/libgrpc++_unsecure.so
lib/libgrpc++_unsecure.so.1
lib/libgrpc++_unsecure.so.%%PORTVERSION%%
lib/libgrpc.so
lib/libgrpc.so.14
lib/libgrpc.so.14.0.0
lib/libgrpc_plugin_support.so
lib/libgrpc_plugin_support.so.1
lib/libgrpc_plugin_support.so.%%PORTVERSION%%
lib/libgrpc_unsecure.so
lib/libgrpc_unsecure.so.14
lib/libgrpc_unsecure.so.14.0.0
lib/libgrpcpp_channelz.so
lib/libgrpcpp_channelz.so.1
lib/libgrpcpp_channelz.so.%%PORTVERSION%%
lib/libupb.so
lib/libupb.so.14
lib/libupb.so.14.0.0
libdata/pkgconfig/gpr.pc
libdata/pkgconfig/grpc++.pc
libdata/pkgconfig/grpc++_unsecure.pc
libdata/pkgconfig/grpc.pc
libdata/pkgconfig/grpc_unsecure.pc
%%DATADIR%%/roots.pem

View File

@ -3,7 +3,7 @@
PORTNAME= gitlab-labkit
PORTVERSION= 0.14.0
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= devel rubygems
MASTER_SITES= RG
@ -16,7 +16,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= rubygem-actionpack60>=5<7:www/rubygem-actionpack60 \
rubygem-activesupport60>=5<7:devel/rubygem-activesupport60 \
rubygem-gitlab-pg_query>=1.3<2:databases/rubygem-gitlab-pg_query \
rubygem-grpc>=1.19<2:net/rubygem-grpc \
rubygem-grpc130>=1.19<2:net/rubygem-grpc130 \
rubygem-jaeger-client>=1.1<2:devel/rubygem-jaeger-client \
rubygem-opentracing>=0.4<1.0:devel/rubygem-opentracing \
rubygem-redis>3.0.0<5.0.0:databases/rubygem-redis

View File

@ -1257,6 +1257,7 @@
SUBDIR += rubygem-google-cloud-storage
SUBDIR += rubygem-grpc
SUBDIR += rubygem-grpc124
SUBDIR += rubygem-grpc130
SUBDIR += rubygem-hangouts-chat
SUBDIR += rubygem-http-parser
SUBDIR += rubygem-http_parser.rb

View File

@ -2,7 +2,7 @@
PORTNAME= gitaly
PORTVERSION= 13.8.0.pre.rc2
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= net rubygems
MASTER_SITES= RG
@ -11,7 +11,7 @@ COMMENT= Auto-generated gRPC client for gitaly
LICENSE= MIT
RUN_DEPENDS= rubygem-grpc>=1.0<2.0:net/rubygem-grpc \
RUN_DEPENDS= rubygem-grpc130>=1.0<2.0:net/rubygem-grpc130 \
gitaly>=13.8:devel/gitaly
USES= gem

View File

@ -0,0 +1,37 @@
# $FreeBSD$
PORTNAME= grpc
PORTVERSION= 1.30.2
PORTREVISION= 1
CATEGORIES= net rubygems
MASTER_SITES= RG
PKGNAMESUFFIX= 130
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Ruby implementation of gRPC
LICENSE= BSD3CLAUSE
LIB_DEPENDS= libcares.so:dns/c-ares \
libgrpc.so:devel/grpc134
RUN_DEPENDS= ca_root_nss>=0:security/ca_root_nss \
rubygem-google-protobuf>=3.12<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
PORTSCOUT= limit:^1\.30\.
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>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1596962194
SHA256 (rubygem/grpc-1.30.2.gem) = 85fa136f37dd9ee06e0e4ba73d09bd59d83b10a7fb38178b21f684a78ea34fe7
SIZE (rubygem/grpc-1.30.2.gem) = 3876864

View File

@ -0,0 +1,51 @@
--- src/ruby/ext/grpc/extconf.rb.orig 2019-11-22 13:44:33 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,23 @@ 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
- 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 << ' -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 << ' -lgrpc' unless windows
-$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'

View File

@ -0,0 +1,11 @@
--- src/ruby/lib/grpc.rb.orig 2020-09-23 17:48:57 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'

View File

@ -0,0 +1,3 @@
A Ruby implementation of gRPC.
WWW: https://github.com/grpc/grpc/tree/master/src/ruby

View File

@ -1,13 +1,13 @@
# Created by: Torsten Zuehlsdorff <tz@FreeBSD.org>
# $FreeBSD$
PORTNAME?= gitlab-ce
PORTVERSION?= 13.8.1
PORTREVISION?= 1
PORTNAME= gitlab-ce
PORTVERSION= 13.8.1
PORTREVISION= 2
CATEGORIES= www devel
MAINTAINER?= mfechner@FreeBSD.org
COMMENT?= Web GUI for managing git repositories
MAINTAINER= mfechner@FreeBSD.org
COMMENT= Web GUI for managing git repositories
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
@ -219,7 +219,7 @@ MY_DEPENDS= git>=2.29:devel/git \
rubygem-ed25519>=1.2<2.0:security/rubygem-ed25519 \
rubygem-bcrypt_pbkdf>=1.0<2.0:security/rubygem-bcrypt_pbkdf \
rubygem-gitaly>=13.8.0.pre.rc2<13.9.0:net/rubygem-gitaly \
rubygem-grpc>=1.30.2<1.31:net/rubygem-grpc \
rubygem-grpc130>=1.30.2<1.31:net/rubygem-grpc130 \
rubygem-google-protobuf>=3.12<4:devel/rubygem-google-protobuf \
rubygem-toml-rb10>=1.0.0<1.1.0:www/rubygem-toml-rb10 \
rubygem-flipper017>=0.17.1<0.18.0:devel/rubygem-flipper017 \