Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "cppzmq" 4.10.0 and a header only target for "libzmq" 4.3.5.bcr.1. #2425

Merged
merged 8 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions modules/cppzmq/4.10.0/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""cppzmq is a C++ binding for libzmq."""

module(
name = "cppzmq",
version = "4.10.0",
compatibility_level = 4,
)

bazel_dep(name = "libzmq", version = "4.3.5.bcr.1")
10 changes: 10 additions & 0 deletions modules/cppzmq/4.10.0/patches/add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,7 @@
+""" Builds cppzmq."""
+cc_library(
+ name = "cppzmq",
+ hdrs = glob(["*.hpp"]),
+ visibility = ["//visibility:public"],
+ deps = ["@libzmq//:libzmq_headers_only"],
+)
12 changes: 12 additions & 0 deletions modules/cppzmq/4.10.0/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- /dev/null
+++ MODULE.bazel
@@ -0,0 +1,9 @@
+"""cppzmq is a C++ binding for libzmq."""
+
+module(
+ name = "cppzmq",
+ version = "4.10.0",
+ compatibility_level = 4,
+)
+
+bazel_dep(name = "libzmq", version = "4.3.5.bcr.1")
17 changes: 17 additions & 0 deletions modules/cppzmq/4.10.0/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
- windows
bazel:
- 7.x
- 6.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@cppzmq'
10 changes: 10 additions & 0 deletions modules/cppzmq/4.10.0/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/zeromq/cppzmq/archive/refs/tags/v4.10.0.tar.gz",
"integrity": "sha256-yByBu6inZEyEkyIl8Bi1CIdDoimZxtgqK19c0eaUK3Q=",
"strip_prefix": "cppzmq-4.10.0",
"patch_strip": 0,
"patches": {
"add_build_file.patch": "sha256-ZzJqhqtYIENHu1c9cGtT7LAG7kq4dBTsb6OI12vvYyY=",
"module_dot_bazel.patch": "sha256-vHfFQXdCxh98DPj9OOBemKICfd+NSzNs+b+NF237WG8="
}
}
16 changes: 16 additions & 0 deletions modules/cppzmq/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://www.zeromq.org/",
"maintainers": [
{
"email": "[email protected]",
"name": "No Maintainer Specified"
}
],
"repository": [
"github:zeromq/cppzmq"
],
"versions": [
"4.10.0"
],
"yanked_versions": {}
}
13 changes: 13 additions & 0 deletions modules/libzmq/4.3.5.bcr.1/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
The ZeroMQ lightweight messaging kernel is a library which extends the
standard socket interfaces with features traditionally provided by
specialised messaging middleware products.
"""

module(
name = "libzmq",
version = "4.3.5.bcr.1",
compatibility_level = 4,
)

bazel_dep(name = "rules_foreign_cc", version = "0.10.1")
27 changes: 27 additions & 0 deletions modules/libzmq/4.3.5.bcr.1/patches/add_build_file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,24 @@
+""" Builds libzmq.
+"""
+load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
+
+filegroup(
+ name = "srcs",
+ srcs = glob(["**"]),
+)
+
+cmake(
+ name = "libzmq",
+ env = {"CMAKE_BUILD_TYPE": "Release"},
+ lib_source = ":srcs",
+ out_include_dir = "include",
+ out_static_libs = ["libzmq.a"],
+ visibility = ["//visibility:public"],
+)
+
+cc_library(
+ name = "libzmq_headers_only",
+ hdrs = glob(["include/*.h"]),
+ strip_include_prefix = "include",
+ visibility = ["//visibility:public"],
+)
16 changes: 16 additions & 0 deletions modules/libzmq/4.3.5.bcr.1/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--- /dev/null
+++ MODULE.bazel
@@ -0,0 +1,13 @@
+"""
+The ZeroMQ lightweight messaging kernel is a library which extends the
+standard socket interfaces with features traditionally provided by
+specialised messaging middleware products.
+"""
+
+module(
+ name = "libzmq",
+ version = "4.3.5.bcr.1",
+ compatibility_level = 4,
+)
+
+bazel_dep(name = "rules_foreign_cc", version = "0.10.1")
17 changes: 17 additions & 0 deletions modules/libzmq/4.3.5.bcr.1/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
# - macos_arm64
# - windows
bazel:
- 7.x
- 6.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@libzmq'
10 changes: 10 additions & 0 deletions modules/libzmq/4.3.5.bcr.1/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz",
"integrity": "sha256-ZlPvWRDxeVSGH+cjMuaLA8puTZxxYOs6jeWlqRO/q0M=",
"strip_prefix": "zeromq-4.3.5",
"patch_strip": 0,
"patches": {
"add_build_file.patch": "sha256-YpAn1nkWTR2mna+Cgx9TtHG6Y7mMum3nAVa73RJhFbQ=",
"module_dot_bazel.patch": "sha256-qBWgWwH10wWBjANRdTK8/Z9HoDTiFS87qoios+T7dO8="
}
}
3 changes: 2 additions & 1 deletion modules/libzmq/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"github:zeromq/libzmq"
],
"versions": [
"4.3.5"
"4.3.5",
"4.3.5.bcr.1"
],
"yanked_versions": {}
}
Loading