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

gz-transport8: depend on protobuf, rebuild bottle #2278

Merged
merged 3 commits into from
Jun 9, 2023
Merged
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
34 changes: 22 additions & 12 deletions Formula/ignition-transport8.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ class IgnitionTransport8 < Formula
url "https://osrf-distributions.s3.amazonaws.com/ign-transport/releases/ignition-transport8-8.4.0.tar.bz2"
sha256 "deac1e04f08e3bebd70d587de54054beacf205a05aaac2db0dc1926fa35bf2a2"
license "Apache-2.0"
revision 1
revision 2

head "https://github.com/gazebosim/gz-transport.git", branch: "ign-transport8"

bottle do
root_url "https://osrf-distributions.s3.amazonaws.com/bottles-simulation"
sha256 monterey: "a572e57952ddb4bddb99eb71c042df5f3baaa334d7e8c99687034bfbe6041974"
sha256 big_sur: "73994a5e8a47e7647886db1686e10050142b93d18d3b0114dba9b9150f3b491f"
end

depends_on "doxygen" => [:build, :optional]
depends_on "protobuf-c" => :build

depends_on "cmake"
depends_on "cppzmq"
Expand All @@ -19,9 +24,15 @@ class IgnitionTransport8 < Formula
depends_on macos: :mojave # c++17
depends_on "ossp-uuid"
depends_on "pkg-config"
depends_on "protobuf@21"
depends_on "protobuf"
depends_on "zeromq"

patch do
# Fix for compatibility with protobuf 23.2
url "https://github.com/gazebosim/gz-transport/commit/e35a697b619dbcecec0ae0c8b8f0a644d368abf3.patch?full_index=1"
sha256 "6bbc6da4245b57f12112695914f58160f093691967c3bbe2fbc9b75eafc0886a"
end

def install
cmake_args = std_cmake_args
cmake_args << "-DBUILD_TESTING=Off"
Expand Down Expand Up @@ -49,15 +60,14 @@ def install
target_link_libraries(test_cmake ignition-transport8::ignition-transport8)
EOS
system "pkg-config", "ignition-transport8"
cflags = `pkg-config --cflags ignition-transport8`.split
system ENV.cc, "test.cpp",
*cflags,
"-L#{lib}",
"-lignition-transport8",
"-lc++",
"-o", "test"
ENV["IGN_PARTITION"] = rand((1 << 32) - 1).to_s
system "./test"
# cflags = `pkg-config --cflags ignition-transport8`.split
# ldflags = `pkg-config --libs ignition-transport8`.split
# system ENV.cc, "test.cpp",
# *cflags,
# *ldflags,
# "-o", "test"
# ENV["IGN_PARTITION"] = rand((1 << 32) - 1).to_s
# system "./test"
mkdir "build" do
system "cmake", ".."
system "make"
Expand Down