]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/bazel/repository.bzl
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / bazel / repository.bzl
1 load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
2 load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
3 load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
4
5 _ALL_CONTENT = """
6 filegroup(
7 name = "all_srcs",
8 srcs = glob(["**"]),
9 visibility = ["//visibility:public"],
10 )
11 """
12
13 #
14 # MAINTAINER
15 #
16 # This file is used for the Bazel build.
17 #
18 # When changing (add, upgrade, remove) dependencies
19 # please update:
20 # - the CMake build, see file
21 # <root>/third_party_release
22 # - git submodule, see command
23 # git submodule status
24 #
25
26 def opentelemetry_cpp_deps():
27 """Loads dependencies need to compile the opentelemetry-cpp library."""
28
29 # Google Benchmark library.
30 # Only needed for benchmarks, not to build the OpenTelemetry library.
31 maybe(
32 http_archive,
33 name = "com_github_google_benchmark",
34 sha256 = "1f71c72ce08d2c1310011ea6436b31e39ccab8c2db94186d26657d41747c85d6",
35 strip_prefix = "benchmark-1.6.0",
36 urls = [
37 "https://github.com/google/benchmark/archive/v1.6.0.tar.gz",
38 ],
39 )
40
41 # GoogleTest framework.
42 # Only needed for tests, not to build the OpenTelemetry library.
43 maybe(
44 http_archive,
45 name = "com_google_googletest",
46 sha256 = "a03a7b24b3a0766dc823c9008dd32c56a1183889c04f084653266af22289ab0c",
47 strip_prefix = "googletest-a6dfd3aca7f2f91f95fc7ab650c95a48420d513d",
48 urls = [
49 "https://github.com/google/googletest/archive/a6dfd3aca7f2f91f95fc7ab650c95a48420d513d.tar.gz",
50 ],
51 )
52
53 # Load abseil dependency(optional)
54 maybe(
55 http_archive,
56 name = "com_google_absl",
57 sha256 = "dd7db6815204c2a62a2160e32c55e97113b0a0178b2f090d6bab5ce36111db4b",
58 strip_prefix = "abseil-cpp-20210324.0",
59 urls = [
60 "https://github.com/abseil/abseil-cpp/archive/20210324.0.tar.gz",
61 ],
62 )
63
64 # Load gRPC dependency
65 maybe(
66 http_archive,
67 name = "com_github_grpc_grpc_legacy",
68 sha256 = "024118069912358e60722a2b7e507e9c3b51eeaeee06e2dd9d95d9c16f6639ec",
69 strip_prefix = "grpc-1.39.1",
70 urls = [
71 "https://github.com/grpc/grpc/archive/v1.39.1.tar.gz",
72 ],
73 )
74
75 maybe(
76 http_archive,
77 name = "com_github_grpc_grpc",
78 sha256 = "b74ce7d26fe187970d1d8e2c06a5d3391122f7bc1fdce569aff5e435fb8fe780",
79 strip_prefix = "grpc-1.43.2",
80 urls = [
81 "https://github.com/grpc/grpc/archive/v1.43.2.tar.gz",
82 ],
83 )
84
85 # OTLP Protocol definition
86 maybe(
87 http_archive,
88 name = "com_github_opentelemetry_proto",
89 build_file = "@io_opentelemetry_cpp//bazel:opentelemetry_proto.BUILD",
90 sha256 = "f269fbcb30e17b03caa1decd231ce826e59d7651c0f71c3b28eb5140b4bb5412",
91 strip_prefix = "opentelemetry-proto-0.17.0",
92 urls = [
93 "https://github.com/open-telemetry/opentelemetry-proto/archive/v0.17.0.tar.gz",
94 ],
95 )
96
97 # JSON library
98 maybe(
99 http_archive,
100 name = "github_nlohmann_json",
101 build_file = "@io_opentelemetry_cpp//bazel:nlohmann_json.BUILD",
102 sha256 = "b94997df68856753b72f0d7a3703b7d484d4745c567f3584ef97c96c25a5798e",
103 urls = [
104 "https://github.com/nlohmann/json/releases/download/v3.10.5/include.zip",
105 ],
106 )
107
108 # C++ Prometheus Client library.
109 maybe(
110 http_archive,
111 name = "com_github_jupp0r_prometheus_cpp",
112 sha256 = "07018db604ea3e61f5078583e87c80932ea10c300d979061490ee1b7dc8e3a41",
113 strip_prefix = "prometheus-cpp-1.0.0",
114 urls = [
115 "https://github.com/jupp0r/prometheus-cpp/archive/refs/tags/v1.0.0.tar.gz",
116 ],
117 )
118
119 # libcurl (optional)
120 maybe(
121 http_archive,
122 name = "curl",
123 build_file = "@io_opentelemetry_cpp//bazel:curl.BUILD",
124 sha256 = "ba98332752257b47b9dea6d8c0ad25ec1745c20424f1dd3ff2c99ab59e97cf91",
125 strip_prefix = "curl-7.73.0",
126 urls = ["https://curl.haxx.se/download/curl-7.73.0.tar.gz"],
127 )
128
129 # libthrift (optional)
130 maybe(
131 http_archive,
132 name = "com_github_thrift",
133 build_file_content = _ALL_CONTENT,
134 sha256 = "5ae1c4d16452a22eaf9d802ba7489907147c2b316ff38c9758918552fae5132c",
135 strip_prefix = "thrift-0.14.1",
136 urls = [
137 "https://github.com/apache/thrift/archive/refs/tags/v0.14.1.tar.gz",
138 ],
139 )
140
141 # rules foreign cc
142 maybe(
143 http_archive,
144 name = "rules_foreign_cc",
145 sha256 = "69023642d5781c68911beda769f91fcbc8ca48711db935a75da7f6536b65047f",
146 strip_prefix = "rules_foreign_cc-0.6.0",
147 url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.6.0.tar.gz",
148 )
149
150 # bazel skylib
151 maybe(
152 http_archive,
153 name = "bazel_skylib",
154 sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
155 urls = [
156 "https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
157 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
158 ],
159 )
160
161 # boost headers from vcpkg
162 maybe(
163 native.new_local_repository,
164 name = "boost_all_hdrs",
165 build_file_content = """
166 package(default_visibility = ["//visibility:public"])
167 cc_library(
168 name = "boost_all_hdrs",
169 hdrs = glob(
170 ["include/**/*.h*"],
171 ),
172 strip_include_prefix = "include",
173 copts = [
174 "-isystem include",
175 "-fexceptions",
176 ],
177 visibility = ["//visibility:public"],
178 )
179 """,
180 path = "tools/vcpkg/installed/x64-windows/",
181 )