From f2808ffb56407a45f0b68d1f6f8ba728ae3ae6a8 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Mon, 9 Oct 2023 16:56:28 -0500 Subject: [PATCH] Bumps in ionic : ci_matching_branch/bump_ionic_gz-tools3 Signed-off-by: Addisu Z. Taddese --- Aliases/gz-tools3 | 1 - Formula/gz-tools3.rb | 45 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-tools3 create mode 100644 Formula/gz-tools3.rb diff --git a/Aliases/gz-tools3 b/Aliases/gz-tools3 deleted file mode 120000 index 446fd1cf5..000000000 --- a/Aliases/gz-tools3 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-tools2.rb \ No newline at end of file diff --git a/Formula/gz-tools3.rb b/Formula/gz-tools3.rb new file mode 100644 index 000000000..dd32ecf15 --- /dev/null +++ b/Formula/gz-tools3.rb @@ -0,0 +1,45 @@ +class GzTools3 < Formula + desc "Entry point for Gazebo command-line tools" + homepage "https://gazebosim.org" + url "https://github.com/gazebosim/gz-tools.git", branch: "main" + version "2.999.999~0~20231009" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-tools.git", branch: "gz-tools3" + + depends_on "cmake" => :build + depends_on "libyaml" => :test + depends_on "ruby" => :test + depends_on "gz-cmake4" + + conflicts_with "gazebo9", because: "both install bin/gz" + conflicts_with "gazebo11", because: "both install bin/gz" + + def install + inreplace "src/gz.in" do |s| + s.gsub! "@CMAKE_INSTALL_PREFIX@", HOMEBREW_PREFIX + end + + # Use build folder + mkdir "build" do + system "cmake", "..", *std_cmake_args + system "make", "install" + end + end + + test do + mkdir testpath/"config" + (testpath/"config/test.yaml").write <<~EOS + --- # Test subcommand + format: 1.0.0 + library_name: test + library_path: path + library_version: 2.0.0 + commands: + - test : Test utility + --- + EOS + ENV["GZ_CONFIG_PATH"] = testpath/"config/" + system "#{bin}/gz", "test", "--versions" + end +end