From 7e46fa79b3fb7cda201274b9db3a2f441dfa74b0 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Fri, 30 May 2025 16:36:21 -0700 Subject: [PATCH 1/2] gz-msgs11: fix rpath, test executable Signed-off-by: Steve Peters --- Formula/gz-msgs11.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Formula/gz-msgs11.rb b/Formula/gz-msgs11.rb index 230e5e69c..f675c6f25 100644 --- a/Formula/gz-msgs11.rb +++ b/Formula/gz-msgs11.rb @@ -4,6 +4,7 @@ class GzMsgs11 < Formula url "https://osrf-distributions.s3.amazonaws.com/gz-msgs/releases/gz-msgs-11.1.0.tar.bz2" sha256 "2343f0975d00fb21dd87de15603161981c920e0e4b33e735863a259f488f36d0" license "Apache-2.0" + revision 1 head "https://github.com/gazebosim/gz-msgs.git", branch: "gz-msgs11" @@ -36,9 +37,13 @@ def python_cmake_arg(python = Formula["python@3.13"]) end def install + rpaths = [ + rpath, + rpath(source: libexec/"gz/msgs11", target: lib), + ] cmake_args = std_cmake_args cmake_args << "-DBUILD_TESTING=Off" - cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpath}" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}" cmake_args << python_cmake_arg mkdir "build" do @@ -58,6 +63,7 @@ def install end test do + system libexec/"gz/msgs11/gz-msgs" (testpath/"test.cpp").write <<-EOS #include int main() { From 688b5edec9056d9b7f56c93283c832f9f0f9a9dc Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Fri, 30 May 2025 16:38:50 -0700 Subject: [PATCH 2/2] gz-msgs11: test gz msg command Signed-off-by: Steve Peters --- Formula/gz-msgs11.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Formula/gz-msgs11.rb b/Formula/gz-msgs11.rb index f675c6f25..f7adef9c0 100644 --- a/Formula/gz-msgs11.rb +++ b/Formula/gz-msgs11.rb @@ -100,5 +100,8 @@ def install pythons.each do |python| system python.opt_libexec/"bin/python", "-c", "import gz.msgs11" end + # check gz msg command + ENV["GZ_CONFIG_PATH"] = "#{opt_share}/gz" + system Formula["gz-tools2"].opt_bin/"gz", "msg" end end