From a88cb753b63b520fb71caeb4025bb87a72cde37f Mon Sep 17 00:00:00 2001 From: Kevin Li Date: Tue, 23 Jul 2024 12:56:32 +0800 Subject: [PATCH] add brpc 1.10.0 to registry --- registry/modules/brpc/1.10.0/MODULE.bazel | 32 +++++++++++++++++++ .../brpc/1.10.0/patches/osx-darwin.patch | 31 ++++++++++++++++++ registry/modules/brpc/1.10.0/source.json | 9 ++++++ 3 files changed, 72 insertions(+) create mode 100644 registry/modules/brpc/1.10.0/MODULE.bazel create mode 100644 registry/modules/brpc/1.10.0/patches/osx-darwin.patch create mode 100644 registry/modules/brpc/1.10.0/source.json diff --git a/registry/modules/brpc/1.10.0/MODULE.bazel b/registry/modules/brpc/1.10.0/MODULE.bazel new file mode 100644 index 00000000..d7e8a969 --- /dev/null +++ b/registry/modules/brpc/1.10.0/MODULE.bazel @@ -0,0 +1,32 @@ +module( + name = 'brpc', + version = '1.10.0', + compatibility_level = 1, +) + +# https://bcr.bazel.build +bazel_dep(name = 'abseil-cpp', version = '20210324.2', repo_name = 'com_google_absl') +bazel_dep(name = 'bazel_skylib', version = '1.0.3') +bazel_dep(name = 'boringssl', version = '0.0.0-20211025-d4f1ab9') +bazel_dep(name = 'protobuf', version = '3.19.6', repo_name = 'com_google_protobuf') +bazel_dep(name = 'gflags', version = '2.2.2', repo_name = 'com_github_gflags_gflags') +bazel_dep(name = 'glog', version = '0.5.0', repo_name = 'com_github_google_glog') +bazel_dep(name = 'platforms', version = '0.0.4') +bazel_dep(name = 'rules_cc', version = '0.0.1') +bazel_dep(name = 'rules_proto', version = '4.0.0') +bazel_dep(name = 'zlib', version = '1.2.13', repo_name = 'com_github_madler_zlib') + +# https://baidu.github.io/babylon/registry +# https://raw.githubusercontent.com/bazelboost/registry/main +bazel_dep(name = 'leveldb', version = '1.23', repo_name = 'com_github_google_leveldb') +bazel_dep(name = 'openssl', version = '3.3.1') +bazel_dep(name = 'thrift', version = '0.20.0', repo_name = 'org_apache_thrift') + +# test only +bazel_dep(name = 'googletest', version = '1.14.0.bcr.1', repo_name = 'com_google_googletest', dev_dependency = True) +bazel_dep(name = 'hedron_compile_commands', dev_dependency = True) +git_override( + module_name = 'hedron_compile_commands', + remote = 'https://github.com/hedronvision/bazel-compile-commands-extractor.git', + commit = '1e08f8e0507b6b6b1f4416a9a22cf5c28beaba93', # Jun 28, 2024 +) diff --git a/registry/modules/brpc/1.10.0/patches/osx-darwin.patch b/registry/modules/brpc/1.10.0/patches/osx-darwin.patch new file mode 100644 index 00000000..d9ec1856 --- /dev/null +++ b/registry/modules/brpc/1.10.0/patches/osx-darwin.patch @@ -0,0 +1,31 @@ +diff --git a/BUILD.bazel b/BUILD.bazel +index b2a453e0..795e392e 100644 +--- a/BUILD.bazel ++++ b/BUILD.bazel +@@ -51,7 +51,7 @@ LINKOPTS = [ + "-pthread", + "-ldl", + ] + select({ +- "@bazel_tools//tools/osx:darwin": [ ++ "@bazel_tools//tools/osx:darwin_x86_64": [ + "-framework CoreFoundation", + "-framework CoreGraphics", + "-framework CoreData", +@@ -218,7 +218,7 @@ BUTIL_SRCS = [ + "src/butil/recordio.cc", + "src/butil/popen.cpp", + ] + select({ +- "@bazel_tools//tools/osx:darwin": [ ++ "@bazel_tools//tools/osx:darwin_x86_64": [ + "src/butil/time/time_mac.cc", + "src/butil/mac/scoped_mach_port.cc", + ], +@@ -333,7 +333,7 @@ cc_library( + "//bazel/config:brpc_with_glog": ["@com_github_google_glog//:glog"], + "//conditions:default": [], + }) + select({ +- "@bazel_tools//tools/osx:darwin": [":macos_lib"], ++ "@bazel_tools//tools/osx:darwin_x86_64": [":macos_lib"], + "//conditions:default": [], + }) + select({ + "//bazel/config:brpc_with_boringssl": ["@boringssl//:ssl", "@boringssl//:crypto"], diff --git a/registry/modules/brpc/1.10.0/source.json b/registry/modules/brpc/1.10.0/source.json new file mode 100644 index 00000000..a3cd5eb4 --- /dev/null +++ b/registry/modules/brpc/1.10.0/source.json @@ -0,0 +1,9 @@ +{ + "url": "https://github.com/apache/brpc/archive/refs/tags/1.10.0.tar.gz", + "strip_prefix": "brpc-1.10.0", + "integrity": "sha256-/k6xC0yhpZ4PcQhlUrLYiXr9Zt+TtTwYrYP2qTcXzC0=", + "patch_strip": 1, + "patches": { + "osx-darwin.patch": "sha256-HhiWH/lqS3TLLzHDJ5aPrEM9m6qXuUncIKRv5ii8zC4=" + } +}