xref: /aosp_15_r20/external/private-join-and-compute/bazel/pjc_deps.bzl (revision a6aa18fbfbf9cb5cd47356a9d1b057768998488c)
1# Copyright 2019 Google LLC.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15""" Dependencies needed to compile and test the PJC library """
16
17load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
18
19def pjc_deps():
20    """Loads dependencies for the PJC library """
21
22    if "boringssl" not in native.existing_rules():
23        http_archive(
24            name = "boringssl",
25            sha256 = "d56ac3b83e7848e86a657f53c403a8f83f45d7eb2df22ffca5e8a25018af40d0",
26            strip_prefix = "boringssl-2fbdc3bf0113d72e1bba77f9b135e513ccd0eb4b",
27            urls = [
28                "https://github.com/google/boringssl/archive/2fbdc3bf0113d72e1bba77f9b135e513ccd0eb4b.tar.gz",
29            ],
30        )
31
32    if "com_google_absl" not in native.existing_rules():
33        http_archive(
34            name = "com_google_absl",
35            sha256 = "f7c2cb2c5accdcbbbd5c0c59f241a988c0b1da2a3b7134b823c0bd613b1a6880",
36            strip_prefix = "abseil-cpp-b971ac5250ea8de900eae9f95e06548d14cd95fe",
37            urls = [
38                "https://github.com/abseil/abseil-cpp/archive/b971ac5250ea8de900eae9f95e06548d14cd95fe.zip",
39            ],
40        )
41
42    # gtest.
43    if "com_github_google_googletest" not in native.existing_rules():
44        http_archive(
45            name = "com_github_google_googletest",
46            sha256 = "ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363",
47            strip_prefix = "googletest-1.13.0",
48            urls = [
49                "https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz",
50            ],
51        )
52
53    # Protobuf
54    if "com_google_protobuf" not in native.existing_rules():
55        http_archive(
56            name = "com_google_protobuf",
57            strip_prefix = "protobuf-f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c",
58            urls = [
59                "https://github.com/protocolbuffers/protobuf/archive/f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c.tar.gz",
60            ],
61        )
62
63
64    # Six (python compatibility)
65    if "six" not in native.existing_rules():
66        http_archive(
67            name = "six",
68            build_file = "@com_google_protobuf//:six.BUILD",
69            sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
70            url = "https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55",
71        )
72