From 5c8e42ec148e325d182b9718649bb73bf22bba73 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Fri, 15 Nov 2024 15:50:08 +0100 Subject: [PATCH 1/2] feat: add libzenohcpp homebrew formula --- libzenohcpp.rb | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ release.json | 6 ++++ 2 files changed, 85 insertions(+) create mode 100644 libzenohcpp.rb diff --git a/libzenohcpp.rb b/libzenohcpp.rb new file mode 100644 index 0000000..8664a2e --- /dev/null +++ b/libzenohcpp.rb @@ -0,0 +1,79 @@ +require "json" + +class Libzenohc < Formula + release = JSON.parse(File.read("#{__dir__}/release.json"))[File.basename(__FILE__, ".rb")] + + desc "Zenoh-cpp API (geo-distributed pub/sub/query/storage of data)" + homepage "https://zenoh.io" + + on_macos do + on_intel do + url release["x86_64-url"] + sha256 release["x86_64-sha256"] + end + on_arm do + url release["aarch64-url"] + sha256 release["aarch64-sha256"] + end + end + + def install + lib.install "lib/pkgconfig/zenohcxx.pc" + lib.install "lib/cmake/zenohcxx/zenohcxxConfig.cmake" + lib.install "lib/cmake/zenohcxx/zenohcxxConfigVersion.cmake" + include.install "include/zenoh.hxx" + include.install "include/zenoh/zenohc.hxx" + include.install "include/zenoh/api.hxx" + include.install "include/zenoh/detail/closures.hxx" + include.install "include/zenoh/detail/closures_concrete.hxx" + include.install "include/zenoh/detail/commons.hxx" + include.install "include/zenoh/api/logging.hxx" + include.install "include/zenoh/api/closures.hxx" + include.install "include/zenoh/api/query.hxx" + include.install "include/zenoh/api/shm/provider/shm_provider_backend.hxx" + include.install "include/zenoh/api/shm/provider/types.hxx" + include.install "include/zenoh/api/shm/provider/alloc_layout.hxx" + include.install "include/zenoh/api/shm/provider/provider.hxx" + include.install "include/zenoh/api/shm/provider/chunk.hxx" + include.install "include/zenoh/api/shm/provider/shm_provider.hxx" + include.install "include/zenoh/api/shm/provider/types_impl.hxx" + include.install "include/zenoh/api/shm/common/types.hxx" + include.install "include/zenoh/api/shm/common/common.hxx" + include.install "include/zenoh/api/shm/shm.hxx" + include.install "include/zenoh/api/shm/cleanup.hxx" + include.install "include/zenoh/api/shm/protocol_implementations/posix/posix_shm_provider.hxx" + include.install "include/zenoh/api/shm/protocol_implementations/posix/posix.hxx" + include.install "include/zenoh/api/shm/protocol_implementations/posix/posix_shm_client.hxx" + include.install "include/zenoh/api/shm/protocol_implementations/protocol_implementations.hxx" + include.install "include/zenoh/api/shm/client_storage/client_storage.hxx" + include.install "include/zenoh/api/shm/client/client.hxx" + include.install "include/zenoh/api/shm/client/shm_client.hxx" + include.install "include/zenoh/api/shm/client/shm_segment.hxx" + include.install "include/zenoh/api/shm/buffer/buffer.hxx" + include.install "include/zenoh/api/shm/buffer/zshmmut.hxx" + include.install "include/zenoh/api/shm/buffer/zshm.hxx" + include.install "include/zenoh/api/scout.hxx" + include.install "include/zenoh/api/source_info.hxx" + include.install "include/zenoh/api/interop.hxx" + include.install "include/zenoh/api/hello.hxx" + include.install "include/zenoh/api/base.hxx" + include.install "include/zenoh/api/bytes.hxx" + include.install "include/zenoh/api/sample.hxx" + include.install "include/zenoh/api/ext/serialization.hxx" + include.install "include/zenoh/api/ext/publication_cache.hxx" + include.install "include/zenoh/api/subscriber.hxx" + include.install "include/zenoh/api/queryable.hxx" + include.install "include/zenoh/api/id.hxx" + include.install "include/zenoh/api/publisher.hxx" + include.install "include/zenoh/api/keyexpr.hxx" + include.install "include/zenoh/api/encoding.hxx" + include.install "include/zenoh/api/reply.hxx" + include.install "include/zenoh/api/channels.hxx" + include.install "include/zenoh/api/liveliness.hxx" + include.install "include/zenoh/api/config.hxx" + include.install "include/zenoh/api/query_consolidation.hxx" + include.install "include/zenoh/api/enums.hxx" + include.install "include/zenoh/api/session.hxx" + include.install "include/zenoh/api/timestamp.hxx" + end +end diff --git a/release.json b/release.json index 428b189..f344921 100644 --- a/release.json +++ b/release.json @@ -5,6 +5,12 @@ "aarch64-url": "https://download.eclipse.org/zenoh/homebrew-tap/zenoh-c-1.0.2-aarch64-apple-darwin-standalone.zip", "aarch64-sha256": "af3595fb6caf9fb5ed6ff07778d5cc8803eb7b7ecfe4e1ef265ccbe647a15c82" }, + "libzenohcpp": { + "x86_64-url": "", + "x86_64-sha256": "", + "aarch64-url": "", + "aarch64-sha256": "" + }, "zenoh": { "x86_64-url": "https://download.eclipse.org/zenoh/homebrew-tap/zenoh-1.0.2-x86_64-apple-darwin-standalone.zip", "x86_64-sha256": "b264a9f0dc504e19c56f914789c58d9b79ffe51f74b99379409793690906ebc3", From 3c25eb7ef1aab25f4e311293c413e937123b3dd4 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Fri, 15 Nov 2024 18:06:03 +0100 Subject: [PATCH 2/2] fix: install full include dir This way we don't have to keep track of individual files that needs installing. --- libzenohcpp.rb | 55 +------------------------------------------------- 1 file changed, 1 insertion(+), 54 deletions(-) diff --git a/libzenohcpp.rb b/libzenohcpp.rb index 8664a2e..0d6bc74 100644 --- a/libzenohcpp.rb +++ b/libzenohcpp.rb @@ -21,59 +21,6 @@ def install lib.install "lib/pkgconfig/zenohcxx.pc" lib.install "lib/cmake/zenohcxx/zenohcxxConfig.cmake" lib.install "lib/cmake/zenohcxx/zenohcxxConfigVersion.cmake" - include.install "include/zenoh.hxx" - include.install "include/zenoh/zenohc.hxx" - include.install "include/zenoh/api.hxx" - include.install "include/zenoh/detail/closures.hxx" - include.install "include/zenoh/detail/closures_concrete.hxx" - include.install "include/zenoh/detail/commons.hxx" - include.install "include/zenoh/api/logging.hxx" - include.install "include/zenoh/api/closures.hxx" - include.install "include/zenoh/api/query.hxx" - include.install "include/zenoh/api/shm/provider/shm_provider_backend.hxx" - include.install "include/zenoh/api/shm/provider/types.hxx" - include.install "include/zenoh/api/shm/provider/alloc_layout.hxx" - include.install "include/zenoh/api/shm/provider/provider.hxx" - include.install "include/zenoh/api/shm/provider/chunk.hxx" - include.install "include/zenoh/api/shm/provider/shm_provider.hxx" - include.install "include/zenoh/api/shm/provider/types_impl.hxx" - include.install "include/zenoh/api/shm/common/types.hxx" - include.install "include/zenoh/api/shm/common/common.hxx" - include.install "include/zenoh/api/shm/shm.hxx" - include.install "include/zenoh/api/shm/cleanup.hxx" - include.install "include/zenoh/api/shm/protocol_implementations/posix/posix_shm_provider.hxx" - include.install "include/zenoh/api/shm/protocol_implementations/posix/posix.hxx" - include.install "include/zenoh/api/shm/protocol_implementations/posix/posix_shm_client.hxx" - include.install "include/zenoh/api/shm/protocol_implementations/protocol_implementations.hxx" - include.install "include/zenoh/api/shm/client_storage/client_storage.hxx" - include.install "include/zenoh/api/shm/client/client.hxx" - include.install "include/zenoh/api/shm/client/shm_client.hxx" - include.install "include/zenoh/api/shm/client/shm_segment.hxx" - include.install "include/zenoh/api/shm/buffer/buffer.hxx" - include.install "include/zenoh/api/shm/buffer/zshmmut.hxx" - include.install "include/zenoh/api/shm/buffer/zshm.hxx" - include.install "include/zenoh/api/scout.hxx" - include.install "include/zenoh/api/source_info.hxx" - include.install "include/zenoh/api/interop.hxx" - include.install "include/zenoh/api/hello.hxx" - include.install "include/zenoh/api/base.hxx" - include.install "include/zenoh/api/bytes.hxx" - include.install "include/zenoh/api/sample.hxx" - include.install "include/zenoh/api/ext/serialization.hxx" - include.install "include/zenoh/api/ext/publication_cache.hxx" - include.install "include/zenoh/api/subscriber.hxx" - include.install "include/zenoh/api/queryable.hxx" - include.install "include/zenoh/api/id.hxx" - include.install "include/zenoh/api/publisher.hxx" - include.install "include/zenoh/api/keyexpr.hxx" - include.install "include/zenoh/api/encoding.hxx" - include.install "include/zenoh/api/reply.hxx" - include.install "include/zenoh/api/channels.hxx" - include.install "include/zenoh/api/liveliness.hxx" - include.install "include/zenoh/api/config.hxx" - include.install "include/zenoh/api/query_consolidation.hxx" - include.install "include/zenoh/api/enums.hxx" - include.install "include/zenoh/api/session.hxx" - include.install "include/zenoh/api/timestamp.hxx" + include.install Dir["include/*"] end end