From 8966fb1ecadea084218b96723eb8ee65a028dec0 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Sat, 13 Apr 2024 13:21:37 +0200 Subject: [PATCH] google-cloud-cpp@2.16.0 --- modules/google-cloud-cpp/2.16.0/MODULE.bazel | 64 ++++++++++ .../2.16.0/patches/google-cloud-cpp.patch | 115 ++++++++++++++++++ .../2.16.0/patches/module_dot_bazel.patch | 67 ++++++++++ modules/google-cloud-cpp/2.16.0/presubmit.yml | 16 +++ modules/google-cloud-cpp/2.16.0/source.json | 10 ++ modules/google-cloud-cpp/metadata.json | 16 +++ 6 files changed, 288 insertions(+) create mode 100644 modules/google-cloud-cpp/2.16.0/MODULE.bazel create mode 100644 modules/google-cloud-cpp/2.16.0/patches/google-cloud-cpp.patch create mode 100644 modules/google-cloud-cpp/2.16.0/patches/module_dot_bazel.patch create mode 100644 modules/google-cloud-cpp/2.16.0/presubmit.yml create mode 100644 modules/google-cloud-cpp/2.16.0/source.json create mode 100644 modules/google-cloud-cpp/metadata.json diff --git a/modules/google-cloud-cpp/2.16.0/MODULE.bazel b/modules/google-cloud-cpp/2.16.0/MODULE.bazel new file mode 100644 index 0000000000..41beeb5794 --- /dev/null +++ b/modules/google-cloud-cpp/2.16.0/MODULE.bazel @@ -0,0 +1,64 @@ +module( + name = "google-cloud-cpp", + version = "2.16.0", + bazel_compatibility = [ + ">=7.0.0", + ], + compatibility_level = 1, + repo_name = "google_cloud_cpp", +) + +bazel_dep( + name = "abseil-cpp", + version = "20230802.1", + repo_name = "com_google_absl", +) +bazel_dep( + name = "bazel_skylib", + version = "1.5.0", +) +bazel_dep( + name = "boringssl", + version = "0.0.0-20230215-5c22014", +) +bazel_dep( + name = "curl", + version = "8.4.0.bcr.1", + repo_name = "com_github_curl_curl", +) +bazel_dep( + name = "googleapis", + version = "0.0.0-20240326-1c8d509c5", + repo_name = "com_google_googleapis", +) +bazel_dep( + name = "grpc", + version = "1.62.1", + repo_name = "com_github_grpc_grpc", +) +bazel_dep( + name = "nlohmann_json", + version = "3.11.2", + repo_name = "com_github_nlohmann_json", +) +bazel_dep( + name = "opentelemetry-cpp", + version = "1.14.2", + repo_name = "io_opentelemetry_cpp", +) +bazel_dep( + name = "platforms", + version = "0.0.9", +) +bazel_dep( + name = "rules_cc", + version = "0.0.9", +) +# -- bazel_dep definitions -- # + +switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules") +switched_rules.use_languages( + cc = True, + grpc = True, +) +use_repo(switched_rules, "com_google_googleapis_imports") diff --git a/modules/google-cloud-cpp/2.16.0/patches/google-cloud-cpp.patch b/modules/google-cloud-cpp/2.16.0/patches/google-cloud-cpp.patch new file mode 100644 index 0000000000..b5662d780b --- /dev/null +++ b/modules/google-cloud-cpp/2.16.0/patches/google-cloud-cpp.patch @@ -0,0 +1,115 @@ +diff --git a/bazel/google_cloud_cpp_deps.bzl b/bazel/google_cloud_cpp_deps.bzl +index c79b344d85..5d86658bc1 100644 +--- a/bazel/google_cloud_cpp_deps.bzl ++++ b/bazel/google_cloud_cpp_deps.bzl +@@ -247,7 +247,6 @@ def google_cloud_cpp_deps(name = None): + ], + sha256 = "d69f9deb6a75e2580465c6c4c5111b89c4dc2fa94e3a85fcd2ffcd9a143d9273", + strip_prefix = "json-3.11.2", +- build_file = Label("//bazel:nlohmann_json.BUILD"), + ) + + # Load google/crc32c, a library to efficiently compute CRC32C checksums. +diff --git a/bazel/nlohmann_json.BUILD b/bazel/nlohmann_json.BUILD +deleted file mode 100644 +index c59be3ccf0..0000000000 +--- a/bazel/nlohmann_json.BUILD ++++ /dev/null +@@ -1,27 +0,0 @@ +-# Copyright 2020 Google LLC +-# +-# Licensed under the Apache License, Version 2.0 (the "License"); +-# you may not use this file except in compliance with the License. +-# You may obtain a copy of the License at +-# +-# https://www.apache.org/licenses/LICENSE-2.0 +-# +-# Unless required by applicable law or agreed to in writing, software +-# distributed under the License is distributed on an "AS IS" BASIS, +-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-# See the License for the specific language governing permissions and +-# limitations under the License. +- +-package(default_visibility = ["//visibility:public"]) +- +-licenses(["notice"]) # Apache 2.0 +- +-cc_library( +- name = "nlohmann_json", +- hdrs = glob([ +- "include/nlohmann/*.hpp", +- "include/nlohmann/**/*.hpp", +- ]), +- includes = ["include"], +- visibility = ["//visibility:public"], +-) +diff --git a/docfx/BUILD.bazel b/docfx/BUILD.bazel +index dcb5eef07f..2960304936 100644 +--- a/docfx/BUILD.bazel ++++ b/docfx/BUILD.bazel +@@ -32,7 +32,7 @@ cc_library( + }), + deps = [ + "@com_github_jbeder_yaml_cpp//:yaml-cpp", +- "@com_github_nlohmann_json//:nlohmann_json", ++ "@com_github_nlohmann_json//:json", + "@com_github_zeux_pugixml//:pugixml", + ], + ) +@@ -50,7 +50,7 @@ cc_library( + deps = [ + ":docfx", + "@com_github_jbeder_yaml_cpp//:yaml-cpp", +- "@com_github_nlohmann_json//:nlohmann_json", ++ "@com_github_nlohmann_json//:json", + "@com_github_zeux_pugixml//:pugixml", + ], + ) +diff --git a/generator/BUILD.bazel b/generator/BUILD.bazel +index 60be2c158d..319b9a42da 100644 +--- a/generator/BUILD.bazel ++++ b/generator/BUILD.bazel +@@ -34,7 +34,7 @@ cc_library( + "//:common", + "//google/cloud:google_cloud_cpp_rest_internal", + "@com_github_jbeder_yaml_cpp//:yaml-cpp", +- "@com_github_nlohmann_json//:nlohmann_json", ++ "@com_github_nlohmann_json//:json", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:str_format", + "@com_google_googleapis//:googleapis_system_includes", +diff --git a/google/cloud/BUILD.bazel b/google/cloud/BUILD.bazel +index 848c715d73..8ee22312cf 100644 +--- a/google/cloud/BUILD.bazel ++++ b/google/cloud/BUILD.bazel +@@ -292,7 +292,7 @@ cc_library( + "@boringssl//:crypto", + "@boringssl//:ssl", + "@com_github_curl_curl//:curl", +- "@com_github_nlohmann_json//:nlohmann_json", ++ "@com_github_nlohmann_json//:json", + "@com_google_absl//absl/functional:function_ref", + "@com_google_absl//absl/types:span", + ], +diff --git a/google/cloud/storage/BUILD.bazel b/google/cloud/storage/BUILD.bazel +index 5f11ee1f22..95c813bfba 100644 +--- a/google/cloud/storage/BUILD.bazel ++++ b/google/cloud/storage/BUILD.bazel +@@ -63,7 +63,7 @@ cc_library( + "@boringssl//:ssl", + "@com_github_curl_curl//:curl", + "@com_github_google_crc32c//:crc32c", +- "@com_github_nlohmann_json//:nlohmann_json", ++ "@com_github_nlohmann_json//:json", + "@com_google_absl//absl/algorithm:container", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/time", +@@ -120,7 +120,7 @@ cc_library( + "@boringssl//:ssl", + "@com_github_curl_curl//:curl", + "@com_github_google_crc32c//:crc32c", +- "@com_github_nlohmann_json//:nlohmann_json", ++ "@com_github_nlohmann_json//:json", + "@com_google_absl//absl/strings:cord", + "@com_google_absl//absl/strings:str_format", + "@com_google_absl//absl/time", diff --git a/modules/google-cloud-cpp/2.16.0/patches/module_dot_bazel.patch b/modules/google-cloud-cpp/2.16.0/patches/module_dot_bazel.patch new file mode 100644 index 0000000000..6953928e7f --- /dev/null +++ b/modules/google-cloud-cpp/2.16.0/patches/module_dot_bazel.patch @@ -0,0 +1,67 @@ +--- a/MODULE.bazel ++++ a/MODULE.bazel +@@ -0,0 +1,64 @@ ++module( ++ name = "google-cloud-cpp", ++ version = "2.16.0", ++ bazel_compatibility = [ ++ ">=7.0.0", ++ ], ++ compatibility_level = 1, ++ repo_name = "google_cloud_cpp", ++) ++ ++bazel_dep( ++ name = "abseil-cpp", ++ version = "20230802.1", ++ repo_name = "com_google_absl", ++) ++bazel_dep( ++ name = "bazel_skylib", ++ version = "1.5.0", ++) ++bazel_dep( ++ name = "boringssl", ++ version = "0.0.0-20230215-5c22014", ++) ++bazel_dep( ++ name = "curl", ++ version = "8.4.0.bcr.1", ++ repo_name = "com_github_curl_curl", ++) ++bazel_dep( ++ name = "googleapis", ++ version = "0.0.0-20240326-1c8d509c5", ++ repo_name = "com_google_googleapis", ++) ++bazel_dep( ++ name = "grpc", ++ version = "1.62.1", ++ repo_name = "com_github_grpc_grpc", ++) ++bazel_dep( ++ name = "nlohmann_json", ++ version = "3.11.2", ++ repo_name = "com_github_nlohmann_json", ++) ++bazel_dep( ++ name = "opentelemetry-cpp", ++ version = "1.14.2", ++ repo_name = "io_opentelemetry_cpp", ++) ++bazel_dep( ++ name = "platforms", ++ version = "0.0.9", ++) ++bazel_dep( ++ name = "rules_cc", ++ version = "0.0.9", ++) ++# -- bazel_dep definitions -- # ++ ++switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules") ++switched_rules.use_languages( ++ cc = True, ++ grpc = True, ++) ++use_repo(switched_rules, "com_google_googleapis_imports") diff --git a/modules/google-cloud-cpp/2.16.0/presubmit.yml b/modules/google-cloud-cpp/2.16.0/presubmit.yml new file mode 100644 index 0000000000..266d4aa4fc --- /dev/null +++ b/modules/google-cloud-cpp/2.16.0/presubmit.yml @@ -0,0 +1,16 @@ +matrix: + platform: + - debian10 + - ubuntu2004 + - macos + - macos_arm64 + - windows + bazel: + - 7.x +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - '@google-cloud-cpp//:opentelemetry' diff --git a/modules/google-cloud-cpp/2.16.0/source.json b/modules/google-cloud-cpp/2.16.0/source.json new file mode 100644 index 0000000000..1f154bc453 --- /dev/null +++ b/modules/google-cloud-cpp/2.16.0/source.json @@ -0,0 +1,10 @@ +{ + "url": "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz", + "integrity": "sha256-fKf1g7YNKqEnRBH+07n7OIcRmy6EJEuz/GnqHbgZ5OU=", + "strip_prefix": "google-cloud-cpp-2.16.0", + "patches": { + "google-cloud-cpp.patch": "sha256-N2rycsdlm62VGsJNy1AUrKSpOoocof3JGjBZef28gLI=", + "module_dot_bazel.patch": "sha256-9eqL7nrJZBcCA+20vmMekCP1Fa04GNV1XjO2+Gs5dgs=" + }, + "patch_strip": 1 +} diff --git a/modules/google-cloud-cpp/metadata.json b/modules/google-cloud-cpp/metadata.json new file mode 100644 index 0000000000..ad474c28a3 --- /dev/null +++ b/modules/google-cloud-cpp/metadata.json @@ -0,0 +1,16 @@ +{ + "homepage": "https://github.com/googleapis/google-cloud-cpp", + "maintainers": [ + { + "email": "bcr-maintainers@bazel.build", + "name": "No Maintainer Specified" + } + ], + "repository": [ + "github:googleapis/google-cloud-cpp" + ], + "versions": [ + "2.16.0" + ], + "yanked_versions": {} +}