From 9742cc229c3f5c64b9a51435fba82ced42c3295b Mon Sep 17 00:00:00 2001 From: Carbo Kuo Date: Wed, 10 Jul 2024 12:09:25 -0400 Subject: [PATCH] Create 0.8.2.bcr.1 branch for websocketpp. --- modules/websocketpp/0.8.2.bcr.1/MODULE.bazel | 9 ++++++ .../0.8.2.bcr.1/patches/add_build_file.patch | 28 +++++++++++++++++++ .../patches/module_dot_bazel.patch | 12 ++++++++ modules/websocketpp/0.8.2.bcr.1/presubmit.yml | 14 ++++++++++ modules/websocketpp/0.8.2.bcr.1/source.json | 10 +++++++ modules/websocketpp/0.8.2/MODULE.bazel | 1 - .../0.8.2/patches/add_build_file.patch | 15 ++++------ .../0.8.2/patches/module_dot_bazel.patch | 3 +- 8 files changed, 79 insertions(+), 13 deletions(-) create mode 100644 modules/websocketpp/0.8.2.bcr.1/MODULE.bazel create mode 100644 modules/websocketpp/0.8.2.bcr.1/patches/add_build_file.patch create mode 100644 modules/websocketpp/0.8.2.bcr.1/patches/module_dot_bazel.patch create mode 100644 modules/websocketpp/0.8.2.bcr.1/presubmit.yml create mode 100644 modules/websocketpp/0.8.2.bcr.1/source.json diff --git a/modules/websocketpp/0.8.2.bcr.1/MODULE.bazel b/modules/websocketpp/0.8.2.bcr.1/MODULE.bazel new file mode 100644 index 00000000000..a6738e7c5a2 --- /dev/null +++ b/modules/websocketpp/0.8.2.bcr.1/MODULE.bazel @@ -0,0 +1,9 @@ +module( + name = "websocketpp", + version = "0.8.2", + compatibility_level = 1, +) +bazel_dep(name = "asio", version = "1.28.2") +bazel_dep(name = "rules_cc", version = "0.0.9") +bazel_dep(name = "zlib", version = "1.3") +bazel_dep(name = "platforms", version = "0.0.10") diff --git a/modules/websocketpp/0.8.2.bcr.1/patches/add_build_file.patch b/modules/websocketpp/0.8.2.bcr.1/patches/add_build_file.patch new file mode 100644 index 00000000000..699e064de9e --- /dev/null +++ b/modules/websocketpp/0.8.2.bcr.1/patches/add_build_file.patch @@ -0,0 +1,28 @@ +--- /dev/null ++++ BUILD.bazel +@@ -0,0 +1,25 @@ ++load("@rules_cc//cc:defs.bzl", "cc_library") ++ ++cc_library( ++ name = "websocketpp", ++ hdrs = glob(["websocketpp/**/*.hpp"]), ++ defines = [ ++ "ASIO_STANDALONE", ++ "_WEBSOCKETPP_CPP11_STL_", ++ ], ++ includes = ["."], ++ linkopts = select({ ++ "@platforms//os:osx": [ ++ "-lpthread", ++ ], ++ "//conditions:default": [ ++ "-lpthread", ++ "-lrt", ++ ], ++ }), ++ visibility = ["//visibility:public"], ++ deps = [ ++ "@asio", ++ "@zlib", ++ ], ++) diff --git a/modules/websocketpp/0.8.2.bcr.1/patches/module_dot_bazel.patch b/modules/websocketpp/0.8.2.bcr.1/patches/module_dot_bazel.patch new file mode 100644 index 00000000000..2bd2d5f3d2d --- /dev/null +++ b/modules/websocketpp/0.8.2.bcr.1/patches/module_dot_bazel.patch @@ -0,0 +1,12 @@ +--- /dev/null ++++ MODULE.bazel +@@ -0,0 +1,9 @@ ++module( ++ name = "websocketpp", ++ version = "0.8.2", ++ compatibility_level = 1, ++) ++bazel_dep(name = "asio", version = "1.28.2") ++bazel_dep(name = "rules_cc", version = "0.0.9") ++bazel_dep(name = "zlib", version = "1.3") ++bazel_dep(name = "platforms", version = "0.0.10") diff --git a/modules/websocketpp/0.8.2.bcr.1/presubmit.yml b/modules/websocketpp/0.8.2.bcr.1/presubmit.yml new file mode 100644 index 00000000000..6bfae8061f5 --- /dev/null +++ b/modules/websocketpp/0.8.2.bcr.1/presubmit.yml @@ -0,0 +1,14 @@ +matrix: + platform: + - debian10 + - ubuntu2004 + - macos + - macos_arm64 + bazel: [6.x, 7.x] +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - "@websocketpp" diff --git a/modules/websocketpp/0.8.2.bcr.1/source.json b/modules/websocketpp/0.8.2.bcr.1/source.json new file mode 100644 index 00000000000..5649507556b --- /dev/null +++ b/modules/websocketpp/0.8.2.bcr.1/source.json @@ -0,0 +1,10 @@ +{ + "url": "https://github.com/zaphoyd/websocketpp/archive/refs/tags/0.8.2.tar.gz", + "integrity": "sha256-bOiJ2F7Nwtj6B0CNZ4fnNSUQdQ2qZrWtRKrLR76nZ1U=", + "strip_prefix": "websocketpp-0.8.2", + "patches": { + "add_build_file.patch": "sha256-KhVOfO47POB3xqoHdeOs+dYbn0dp0aAQddYt8ZWZqcI=", + "module_dot_bazel.patch": "sha256-Bq9+2iYvtN8TR5zGaKTIdS3vYsx/gEP0pM2xLWuMO2U=" + }, + "patch_strip": 0 +} diff --git a/modules/websocketpp/0.8.2/MODULE.bazel b/modules/websocketpp/0.8.2/MODULE.bazel index a6738e7c5a2..75caa636f01 100644 --- a/modules/websocketpp/0.8.2/MODULE.bazel +++ b/modules/websocketpp/0.8.2/MODULE.bazel @@ -6,4 +6,3 @@ module( bazel_dep(name = "asio", version = "1.28.2") bazel_dep(name = "rules_cc", version = "0.0.9") bazel_dep(name = "zlib", version = "1.3") -bazel_dep(name = "platforms", version = "0.0.10") diff --git a/modules/websocketpp/0.8.2/patches/add_build_file.patch b/modules/websocketpp/0.8.2/patches/add_build_file.patch index 699e064de9e..5703aa28c6c 100644 --- a/modules/websocketpp/0.8.2/patches/add_build_file.patch +++ b/modules/websocketpp/0.8.2/patches/add_build_file.patch @@ -1,6 +1,6 @@ --- /dev/null +++ BUILD.bazel -@@ -0,0 +1,25 @@ +@@ -0,0 +1,20 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + +cc_library( @@ -11,15 +11,10 @@ + "_WEBSOCKETPP_CPP11_STL_", + ], + includes = ["."], -+ linkopts = select({ -+ "@platforms//os:osx": [ -+ "-lpthread", -+ ], -+ "//conditions:default": [ -+ "-lpthread", -+ "-lrt", -+ ], -+ }), ++ linkopts = [ ++ "-lpthread", ++ "-lrt", ++ ], + visibility = ["//visibility:public"], + deps = [ + "@asio", diff --git a/modules/websocketpp/0.8.2/patches/module_dot_bazel.patch b/modules/websocketpp/0.8.2/patches/module_dot_bazel.patch index 2bd2d5f3d2d..df159ba4d5e 100644 --- a/modules/websocketpp/0.8.2/patches/module_dot_bazel.patch +++ b/modules/websocketpp/0.8.2/patches/module_dot_bazel.patch @@ -1,6 +1,6 @@ --- /dev/null +++ MODULE.bazel -@@ -0,0 +1,9 @@ +@@ -0,0 +1,8 @@ +module( + name = "websocketpp", + version = "0.8.2", @@ -9,4 +9,3 @@ +bazel_dep(name = "asio", version = "1.28.2") +bazel_dep(name = "rules_cc", version = "0.0.9") +bazel_dep(name = "zlib", version = "1.3") -+bazel_dep(name = "platforms", version = "0.0.10")