From 04b274c685272d95d3a5c6eb561ca69fe4ac9043 Mon Sep 17 00:00:00 2001 From: osrfbuild Date: Mon, 9 Oct 2023 17:55:56 -0700 Subject: [PATCH 01/19] gazebo11 11.14.0 (#2461) * gazebo11: remove old patches * update bottle. Co-authored-by: Steve Peters --- Formula/gazebo11.rb | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/Formula/gazebo11.rb b/Formula/gazebo11.rb index 94e0c61fa..823427f3b 100644 --- a/Formula/gazebo11.rb +++ b/Formula/gazebo11.rb @@ -1,13 +1,18 @@ class Gazebo11 < Formula desc "Gazebo robot simulator" homepage "https://gazebosim.org" - url "https://osrf-distributions.s3.amazonaws.com/gazebo/releases/gazebo-11.13.0.tar.bz2" - sha256 "2f65b98fe652a574e01b7cae6cf12e14a9dd29343fde99e066ac5193a8d03e71" + url "https://osrf-distributions.s3.amazonaws.com/gazebo/releases/gazebo-11.14.0.tar.bz2" + sha256 "7e9842c046c9e0755355b274c240a8abbf4e962be7ce7b7f59194e5f4b584f45" license "Apache-2.0" - revision 11 head "https://github.com/osrf/gazebo.git", branch: "gazebo11" + bottle do + root_url "https://osrf-distributions.s3.amazonaws.com/bottles-simulation" + sha256 ventura: "3a267f123ae273a9fbf49041bd50063001b9934ca55dd5862752fc70cb1ff625" + sha256 monterey: "e312b30bdfba329583462c1806623ee3d9a2b76b1ff477fb8651c456713dd0a7" + end + depends_on "cmake" => :build depends_on "pkg-config" => :build @@ -43,18 +48,6 @@ class Gazebo11 < Formula conflicts_with "gazebo9", because: "differing version of the same formula" conflicts_with "gz-tools2", because: "both install bin/gz" - patch do - # Fix for compatibility with graphviz 9.0 - url "https://github.com/gazebosim/gazebo-classic/commit/ba2cbd532a8ba47972cf9f0c3dbc32a5757cab2a.patch?full_index=1" - sha256 "a9cca7d59663fd45bab74e044c817600d24028e80ad2871107a34e8a3bebab2a" - end - - patch do - # Fix for compatibility with protobuf 23.2 - url "https://github.com/gazebosim/gazebo-classic/commit/17e09f574a4f39caff279cd70364cd1a3ea46f70.patch?full_index=1" - sha256 "b50f4cbfe92d3ded2dd7117696cf6a049f0bbdcdb9ef8f54bbc6bde7670f51b3" - end - patch do # Fix build when homebrew python is installed # keep this patch From 76b1bb48e0de64bfca0b6d4432a8910dc36b8cb4 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Tue, 10 Oct 2023 11:22:05 -0500 Subject: [PATCH 02/19] gz-cmake4: new formula for ionic (#2450) Signed-off-by: Addisu Z. Taddese Co-authored-by: Steve Peters --- Aliases/gz-cmake4 | 1 - Formula/gz-cmake4.rb | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-cmake4 create mode 100644 Formula/gz-cmake4.rb diff --git a/Aliases/gz-cmake4 b/Aliases/gz-cmake4 deleted file mode 120000 index 9f6438c5a..000000000 --- a/Aliases/gz-cmake4 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-cmake3.rb \ No newline at end of file diff --git a/Formula/gz-cmake4.rb b/Formula/gz-cmake4.rb new file mode 100644 index 000000000..f19ed3079 --- /dev/null +++ b/Formula/gz-cmake4.rb @@ -0,0 +1,44 @@ +class GzCmake4 < Formula + desc "CMake helper functions for building robotic applications" + homepage "https://gazebosim.org" + url "https://github.com/gazebosim/gz-cmake.git", branch: "main" + version "3.999.999-0-20231006" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-cmake.git", branch: "gz-cmake4" + + depends_on "cmake" + depends_on "pkg-config" + + def install + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=OFF" + + # Use build folder + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + end + + test do + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR) + project(gz-test VERSION 0.1.0) + find_package(gz-cmake4 REQUIRED) + gz_configure_project() + gz_configure_build(QUIT_IF_BUILD_ERRORS) + EOS + %w[doc include src test].each do |dir| + mkdir dir do + touch "CMakeLists.txt" + end + end + mkdir "build" do + system "cmake", ".." + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + end +end From b78831652c8fc2c188a2ce2b0d701df5f8b9ecc8 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Wed, 11 Oct 2023 14:17:21 -0500 Subject: [PATCH 03/19] Add aliases for libraries that are being bumped for Ionic (#2466) Signed-off-by: Addisu Z. Taddese --- Aliases/gz-fuel-tools10 | 1 + Aliases/gz-gui9 | 1 + Aliases/gz-launch8 | 1 + Aliases/gz-physics8 | 1 + Aliases/gz-rendering9 | 1 + Aliases/gz-sensors9 | 1 + Aliases/gz-sim9 | 1 + Aliases/gz-transport14 | 1 + Aliases/sdformat15 | 1 + 9 files changed, 9 insertions(+) create mode 120000 Aliases/gz-fuel-tools10 create mode 120000 Aliases/gz-gui9 create mode 120000 Aliases/gz-launch8 create mode 120000 Aliases/gz-physics8 create mode 120000 Aliases/gz-rendering9 create mode 120000 Aliases/gz-sensors9 create mode 120000 Aliases/gz-sim9 create mode 120000 Aliases/gz-transport14 create mode 120000 Aliases/sdformat15 diff --git a/Aliases/gz-fuel-tools10 b/Aliases/gz-fuel-tools10 new file mode 120000 index 000000000..38c9bfeb6 --- /dev/null +++ b/Aliases/gz-fuel-tools10 @@ -0,0 +1 @@ +../Formula/gz-fuel-tools9.rb \ No newline at end of file diff --git a/Aliases/gz-gui9 b/Aliases/gz-gui9 new file mode 120000 index 000000000..26841f5e0 --- /dev/null +++ b/Aliases/gz-gui9 @@ -0,0 +1 @@ +../Formula/gz-gui8.rb \ No newline at end of file diff --git a/Aliases/gz-launch8 b/Aliases/gz-launch8 new file mode 120000 index 000000000..7f8978b1f --- /dev/null +++ b/Aliases/gz-launch8 @@ -0,0 +1 @@ +../Formula/gz-launch7.rb \ No newline at end of file diff --git a/Aliases/gz-physics8 b/Aliases/gz-physics8 new file mode 120000 index 000000000..fb7a25c64 --- /dev/null +++ b/Aliases/gz-physics8 @@ -0,0 +1 @@ +../Formula/gz-physics7.rb \ No newline at end of file diff --git a/Aliases/gz-rendering9 b/Aliases/gz-rendering9 new file mode 120000 index 000000000..e97c5be00 --- /dev/null +++ b/Aliases/gz-rendering9 @@ -0,0 +1 @@ +../Formula/gz-rendering8.rb \ No newline at end of file diff --git a/Aliases/gz-sensors9 b/Aliases/gz-sensors9 new file mode 120000 index 000000000..d6b08123c --- /dev/null +++ b/Aliases/gz-sensors9 @@ -0,0 +1 @@ +../Formula/gz-sensors8.rb \ No newline at end of file diff --git a/Aliases/gz-sim9 b/Aliases/gz-sim9 new file mode 120000 index 000000000..35f69d73d --- /dev/null +++ b/Aliases/gz-sim9 @@ -0,0 +1 @@ +../Formula/gz-sim8.rb \ No newline at end of file diff --git a/Aliases/gz-transport14 b/Aliases/gz-transport14 new file mode 120000 index 000000000..db444c952 --- /dev/null +++ b/Aliases/gz-transport14 @@ -0,0 +1 @@ +../Formula/gz-transport13.rb \ No newline at end of file diff --git a/Aliases/sdformat15 b/Aliases/sdformat15 new file mode 120000 index 000000000..387195e61 --- /dev/null +++ b/Aliases/sdformat15 @@ -0,0 +1 @@ +../Formula/sdformat14.rb \ No newline at end of file From 2099bd8c6ed0d14f1289d1129f19df3b8debf248 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Thu, 12 Oct 2023 14:51:36 -0500 Subject: [PATCH 04/19] gz-ionic: alias to gz-harmonic (#2468) Signed-off-by: Addisu Z. Taddese --- Aliases/gz-ionic | 1 + 1 file changed, 1 insertion(+) create mode 120000 Aliases/gz-ionic diff --git a/Aliases/gz-ionic b/Aliases/gz-ionic new file mode 120000 index 000000000..af9222caa --- /dev/null +++ b/Aliases/gz-ionic @@ -0,0 +1 @@ +../Formula/gz-harmonic.rb \ No newline at end of file From ff24f85c455b9e3aaeb9dbba2d32167eff751131 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Thu, 12 Oct 2023 16:49:49 -0500 Subject: [PATCH 05/19] gz-utils3: new formula for ionic (#2454) Signed-off-by: Addisu Z. Taddese Signed-off-by: Steve Peters Co-authored-by: Steve Peters --- Aliases/gz-utils3 | 1 - Formula/gz-utils3.rb | 64 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-utils3 create mode 100644 Formula/gz-utils3.rb diff --git a/Aliases/gz-utils3 b/Aliases/gz-utils3 deleted file mode 120000 index 662cee2fb..000000000 --- a/Aliases/gz-utils3 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-utils2.rb \ No newline at end of file diff --git a/Formula/gz-utils3.rb b/Formula/gz-utils3.rb new file mode 100644 index 000000000..9cf819a8d --- /dev/null +++ b/Formula/gz-utils3.rb @@ -0,0 +1,64 @@ +class GzUtils3 < Formula + desc "General purpose classes and functions designed for robotic applications" + homepage "https://github.com/gazebosim/gz-utils" + url "https://github.com/gazebosim/gz-utils.git", branch: "main" + version "2.999.999-0-20231011" + license "Apache-2.0" + + depends_on "cmake" => [:build, :test] + depends_on "pkg-config" => [:build, :test] + depends_on "gz-cmake4" + + def install + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=OFF" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpath}" + + # Use build folder + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + end + + test do + (testpath/"test.cpp").write <<-EOS + #include + class SomeClassPrivate + { + }; + class SomeClass + { + private: gz::utils::ImplPtr dataPtr = + gz::utils::MakeImpl(); + }; + int main() { + SomeClass object; + return 0; + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + find_package(gz-utils3 QUIET REQUIRED) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake gz-utils3::gz-utils3) + EOS + system "pkg-config", "gz-utils3" + cflags = `pkg-config --cflags gz-utils3`.split + ldflags = `pkg-config --libs gz-utils3`.split + system ENV.cxx, "test.cpp", + *cflags, + *ldflags, + "-o", "test" + system "./test" + # test building with cmake + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + end +end From 7964c3cb13652ff8aeead7a9bdda6fcb3feefa91 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Fri, 13 Oct 2023 12:09:34 -0500 Subject: [PATCH 06/19] gz-math8: new formula for ionic (#2452) Signed-off-by: Addisu Z. Taddese Co-authored-by: Steve Peters --- Aliases/gz-math8 | 1 - Formula/gz-math8.rb | 71 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-math8 create mode 100644 Formula/gz-math8.rb diff --git a/Aliases/gz-math8 b/Aliases/gz-math8 deleted file mode 120000 index da5511f8a..000000000 --- a/Aliases/gz-math8 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-math7.rb \ No newline at end of file diff --git a/Formula/gz-math8.rb b/Formula/gz-math8.rb new file mode 100644 index 000000000..e132d0883 --- /dev/null +++ b/Formula/gz-math8.rb @@ -0,0 +1,71 @@ +class GzMath8 < Formula + desc "Math API for robotic applications" + homepage "https://gazebosim.org" + url "https://github.com/gazebosim/gz-math.git", branch: "main" + version "7.999.999-0-20231006" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-math.git", branch: "gz-math8" + + depends_on "cmake" => :build + depends_on "doxygen" => :build + depends_on "pybind11" => :build + depends_on "eigen" + depends_on "gz-cmake4" + depends_on "gz-utils3" + depends_on "python@3.11" + depends_on "ruby" + + def install + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=OFF" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpath}" + + # Use build folder + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + + (lib/"python3.11/site-packages").install Dir[lib/"python/*"] + rmdir prefix/"lib/python" + end + + test do + (testpath/"test.cpp").write <<-EOS + #include "gz/math/SignalStats.hh" + int main() { + gz::math::SignalMean mean; + mean.InsertData(1.0); + mean.InsertData(-1.0); + return static_cast(mean.Value()); + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + find_package(gz-math8 QUIET REQUIRED) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake gz-math8::gz-math8) + EOS + # test building with manual compiler flags + system ENV.cc, "test.cpp", + "--std=c++14", + "-I#{include}/gz/math8", + "-L#{lib}", + "-lgz-math8", + "-lc++", + "-o", "test" + system "./test" + # test building with cmake + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + # check python import + system Formula["python@3.11"].opt_bin/"python3.11", "-c", "import gz.math8" + end +end From 76e0920949bf377ebccbec123241b15e6713ca5b Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Fri, 13 Oct 2023 13:43:40 -0500 Subject: [PATCH 07/19] sdformat15: new formula for ionic (#2465) Signed-off-by: Addisu Z. Taddese Signed-off-by: Steve Peters Co-authored-by: Steve Peters --- Aliases/sdformat15 | 1 - Formula/sdformat15.rb | 83 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) delete mode 120000 Aliases/sdformat15 create mode 100644 Formula/sdformat15.rb diff --git a/Aliases/sdformat15 b/Aliases/sdformat15 deleted file mode 120000 index 387195e61..000000000 --- a/Aliases/sdformat15 +++ /dev/null @@ -1 +0,0 @@ -../Formula/sdformat14.rb \ No newline at end of file diff --git a/Formula/sdformat15.rb b/Formula/sdformat15.rb new file mode 100644 index 000000000..e05b0a6fb --- /dev/null +++ b/Formula/sdformat15.rb @@ -0,0 +1,83 @@ +class Sdformat15 < Formula + desc "Simulation Description Format" + homepage "http://sdformat.org" + url "https://github.com/gazebosim/sdformat.git", branch: "main" + version "14.999.999-0-20231011" + license "Apache-2.0" + + head "https://github.com/gazebosim/sdformat.git", branch: "main" + + depends_on "cmake" => [:build, :test] + depends_on "pkg-config" => [:build, :test] + depends_on "pybind11" => :build + + depends_on "doxygen" + depends_on "gz-cmake3" + depends_on "gz-math7" + depends_on "gz-tools2" + depends_on "gz-utils2" + depends_on macos: :mojave # c++17 + depends_on "python@3.11" + depends_on "tinyxml2" + depends_on "urdfdom" + + def install + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=Off" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpath}" + + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + + (lib/"python3.11/site-packages").install Dir[lib/"python/*"] + rmdir prefix/"lib/python" + end + + test do + (testpath/"test.cpp").write <<-EOS + #include + #include "sdf/sdf.hh" + const std::string sdfString( + "" + " " + " " + " " + " " + " " + ""); + int main() { + sdf::SDF modelSDF; + modelSDF.SetFromString(sdfString); + std::cout << modelSDF.ToString() << std::endl; + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + find_package(sdformat15 QUIET REQUIRED) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake ${SDFormat_LIBRARIES}) + EOS + system "pkg-config", "sdformat15" + cflags = `pkg-config --cflags sdformat15`.split + system ENV.cc, "test.cpp", + *cflags, + "-L#{lib}", + "-lsdformat15", + "-lc++", + "-o", "test" + system "./test" + # test building with cmake + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + # check python import + system Formula["python@3.11"].opt_bin/"python3.11", "-c", "import sdformat15" + end +end From 16d4e41fa67157ac65d0d5d0772139c811f743ad Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Fri, 13 Oct 2023 15:34:17 -0500 Subject: [PATCH 08/19] gz-plugin3: new formula for ionic (#2453) * Bumps in ionic : ci_matching_branch/bump_ionic_gz-plugin3 * Use - in version string * Use gz-tools2, fix `head` --------- Signed-off-by: Addisu Z. Taddese Co-authored-by: Steve Peters --- Aliases/gz-plugin3 | 1 - Formula/gz-plugin3.rb | 69 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-plugin3 create mode 100644 Formula/gz-plugin3.rb diff --git a/Aliases/gz-plugin3 b/Aliases/gz-plugin3 deleted file mode 120000 index c7e255013..000000000 --- a/Aliases/gz-plugin3 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-plugin2.rb \ No newline at end of file diff --git a/Formula/gz-plugin3.rb b/Formula/gz-plugin3.rb new file mode 100644 index 000000000..fc51f4bdb --- /dev/null +++ b/Formula/gz-plugin3.rb @@ -0,0 +1,69 @@ +class GzPlugin3 < Formula + desc "Plugin libraries for robotics applications" + homepage "https://github.com/gazebosim/gz-plugin" + url "https://github.com/gazebosim/gz-plugin.git", branch: "main" + version "2.999.999-0-20231006" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-plugin.git", branch: "main" + + depends_on "cmake" + depends_on "gz-cmake4" + depends_on "gz-tools2" + depends_on "gz-utils3" + depends_on macos: :high_sierra # c++17 + depends_on "pkg-config" + + def install + rpaths = [ + rpath, + rpath(source: libexec/"gz/plugin3", target: lib), + ] + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=OFF" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}" + + # Use build folder + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + end + + test do + # test CLI executable + system libexec/"gz/plugin3/gz-plugin" + # build against API + (testpath/"test.cpp").write <<-EOS + #include + int main() { + gz::plugin::Loader loader; + return loader.InterfacesImplemented().size(); + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + find_package(gz-plugin3 QUIET REQUIRED COMPONENTS loader) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake gz-plugin3::loader) + EOS + system "pkg-config", "gz-plugin3-loader" + cflags = `pkg-config --cflags gz-plugin3-loader`.split + system ENV.cc, "test.cpp", + *cflags, + "-L#{lib}", + "-lgz-plugin3-loader", + "-lc++", + "-o", "test" + system "./test" + # test building with cmake + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + end +end From 02c46126181ee21e9b839dd0cc92676165c7dc65 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Sat, 14 Oct 2023 00:39:08 +0000 Subject: [PATCH 09/19] gz-msgs11: new formula for ionic (#2476) Signed-off-by: Ian Chen --- Aliases/gz-msgs11 | 1 - Formula/gz-msgs11.rb | 70 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-msgs11 create mode 100644 Formula/gz-msgs11.rb diff --git a/Aliases/gz-msgs11 b/Aliases/gz-msgs11 deleted file mode 120000 index 6f5b01b03..000000000 --- a/Aliases/gz-msgs11 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-msgs10.rb \ No newline at end of file diff --git a/Formula/gz-msgs11.rb b/Formula/gz-msgs11.rb new file mode 100644 index 000000000..a78b96695 --- /dev/null +++ b/Formula/gz-msgs11.rb @@ -0,0 +1,70 @@ +class GzMsgs11 < Formula + desc "Middleware protobuf messages for robotics" + homepage "https://gazebosim.org" + url "https://github.com/gazebosim/gz-msgs.git", branch: "main" + version "10.999.999-0-20231013" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-msgs.git", branch: "main" + + depends_on "cmake" + depends_on "gz-cmake4" + depends_on "gz-math8" + depends_on "gz-tools2" + depends_on macos: :high_sierra # c++17 + depends_on "pkg-config" + depends_on "protobuf" + depends_on "python@3.11" + depends_on "tinyxml2" + + def install + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=Off" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpath}" + + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + + (lib/"python3.11/site-packages").install Dir[lib/"python/*"] + rmdir prefix/"lib/python" + end + + test do + (testpath/"test.cpp").write <<-EOS + #include + int main() { + gz::msgs::UInt32; + return 0; + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.10 FATAL_ERROR) + find_package(gz-msgs11 QUIET REQUIRED) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake gz-msgs11::gz-msgs11) + EOS + # test building with pkg-config + system "pkg-config", "gz-msgs11" + cflags = `pkg-config --cflags gz-msgs11`.split + system ENV.cc, "test.cpp", + *cflags, + "-L#{lib}", + "-lgz-msgs11", + "-lc++", + "-o", "test" + system "./test" + # test building with cmake + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + # check python import + system Formula["python@3.11"].opt_bin/"python3.11", "-c", "import gz.msgs11" + end +end From 54e7f8efe6fee3dd03fb7d75848e8296c105e8c0 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Mon, 16 Oct 2023 18:39:29 -0500 Subject: [PATCH 10/19] gz-common6: new formula for ionic (#2451) * gz-common6: use - in version string --------- Signed-off-by: Addisu Z. Taddese Co-authored-by: Steve Peters --- Aliases/gz-common6 | 1 - Formula/gz-common6.rb | 76 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-common6 create mode 100644 Formula/gz-common6.rb diff --git a/Aliases/gz-common6 b/Aliases/gz-common6 deleted file mode 120000 index f5b16c572..000000000 --- a/Aliases/gz-common6 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-common5.rb \ No newline at end of file diff --git a/Formula/gz-common6.rb b/Formula/gz-common6.rb new file mode 100644 index 000000000..58f361393 --- /dev/null +++ b/Formula/gz-common6.rb @@ -0,0 +1,76 @@ +class GzCommon6 < Formula + desc "Common libraries for robotics applications" + homepage "https://gazebosim.org" + url "https://github.com/gazebosim/gz-common.git", branch: "main" + version "5.999.999-0-20231009" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-common.git", branch: "gz-common6" + + depends_on "assimp" + depends_on "cmake" + depends_on "ffmpeg" + depends_on "freeimage" + depends_on "gdal" + depends_on "gts" + depends_on "gz-cmake4" + depends_on "gz-math8" + depends_on "gz-utils3" + depends_on macos: :high_sierra # c++17 + depends_on "ossp-uuid" + depends_on "pkg-config" + depends_on "tinyxml2" + + def install + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=OFF" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpath}" + + # Use build folder + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + end + + test do + (testpath/"test.cpp").write <<-EOS + #include + #include + int main() { + gzdbg << "debug" << std::endl; + gzwarn << "warn" << std::endl; + gzerr << "error" << std::endl; + return 0; + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + find_package(gz-common6 QUIET REQUIRED) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake gz-common6::gz-common6) + EOS + system "pkg-config", "gz-common6" + cflags = `pkg-config --cflags gz-common6`.split + system ENV.cc, "test.cpp", + *cflags, + "-L#{lib}", + "-lgz-common6", + "-lc++", + "-o", "test" + system "./test" + # test building with cmake + mkdir "build" do + ENV.append "LIBRARY_PATH", Formula["gettext"].opt_lib + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + # ! requires system with single argument, which uses standard shell + # put in variable to avoid audit complaint + # enclose / in [] so the following line won't match itself + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + end +end From 4261c540597c5428dc27daf859ff736c228d7d30 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Mon, 16 Oct 2023 19:54:55 -0700 Subject: [PATCH 11/19] Bumps in ionic : ci_matching_branch/bump_ionic_gz-rendering9 (#2467) Signed-off-by: Ian Chen Signed-off-by: Addisu Z. Taddese Co-authored-by: Addisu Z. Taddese --- Aliases/gz-rendering9 | 1 - Formula/gz-rendering9.rb | 90 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-rendering9 create mode 100644 Formula/gz-rendering9.rb diff --git a/Aliases/gz-rendering9 b/Aliases/gz-rendering9 deleted file mode 120000 index e97c5be00..000000000 --- a/Aliases/gz-rendering9 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-rendering8.rb \ No newline at end of file diff --git a/Formula/gz-rendering9.rb b/Formula/gz-rendering9.rb new file mode 100644 index 000000000..ce153ac81 --- /dev/null +++ b/Formula/gz-rendering9.rb @@ -0,0 +1,90 @@ +class GzRendering9 < Formula + desc "Rendering library for robotics applications" + homepage "https://gazebosim.org" + url "https://github.com/gazebosim/gz-rendering.git", branch: "main" + version "8.999.999-0-20231016" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-rendering.git", branch: "main" + + depends_on "cmake" => [:build, :test] + depends_on "pkg-config" => [:build, :test] + + depends_on "freeimage" + depends_on "gz-cmake4" + depends_on "gz-common6" + depends_on "gz-math8" + depends_on "gz-plugin3" + depends_on "gz-utils3" + depends_on macos: :mojave # c++17 + depends_on "ogre1.9" + depends_on "ogre2.3" + + def install + rpaths = [ + rpath, + rpath(source: lib/"gz-rendering-9/engine-plugins", target: lib), + ] + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=OFF" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}" + + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + end + + test do + # test plugins in subfolders + ["ogre", "ogre2"].each do |engine| + p = lib/"gz-rendering-9/engine-plugins/libgz-rendering-#{engine}.dylib" + # Use gz-plugin --info command to check plugin linking + cmd = Formula["gz-plugin3"].opt_libexec/"gz/plugin3/gz-plugin" + args = ["--info", "--plugin"] << p + # print command and check return code + system cmd, *args + # check that library was loaded properly + _, stderr = system_command(cmd, args: args) + error_string = "Error while loading the library" + assert stderr.exclude?(error_string), error_string + end + # build against API + github_actions = ENV["HOMEBREW_GITHUB_ACTIONS"].present? + (testpath/"test.cpp").write <<-EOS + #include + #include + int main(int _argc, char** _argv) + { + gz::rendering::RenderEngine *engine = + gz::rendering::engine("ogre"); + return engine == nullptr; + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) + find_package(gz-rendering9 REQUIRED COMPONENTS ogre ogre2) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake gz-rendering9::gz-rendering9) + EOS + # test building with pkg-config + system "pkg-config", "gz-rendering9" + cflags = `pkg-config --cflags gz-rendering9`.split + ldflags = `pkg-config --libs gz-rendering9`.split + system ENV.cc, "test.cpp", + *cflags, + *ldflags, + "-lc++", + "-o", "test" + system "./test" unless github_actions + # test building with cmake + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" unless github_actions + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + end +end From 71fe2dd4947b4b59f287fb26a3fba11216923b35 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Tue, 17 Oct 2023 14:17:49 -0500 Subject: [PATCH 12/19] Bumps in ionic : ci_matching_branch/bump_ionic_sdformat15 (#2477) Signed-off-by: Addisu Z. Taddese --- Formula/sdformat15.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Formula/sdformat15.rb b/Formula/sdformat15.rb index e05b0a6fb..f90ce523b 100644 --- a/Formula/sdformat15.rb +++ b/Formula/sdformat15.rb @@ -2,7 +2,7 @@ class Sdformat15 < Formula desc "Simulation Description Format" homepage "http://sdformat.org" url "https://github.com/gazebosim/sdformat.git", branch: "main" - version "14.999.999-0-20231011" + version "14.999.999-0-20231016" license "Apache-2.0" head "https://github.com/gazebosim/sdformat.git", branch: "main" @@ -12,10 +12,10 @@ class Sdformat15 < Formula depends_on "pybind11" => :build depends_on "doxygen" - depends_on "gz-cmake3" - depends_on "gz-math7" + depends_on "gz-cmake4" + depends_on "gz-math8" depends_on "gz-tools2" - depends_on "gz-utils2" + depends_on "gz-utils3" depends_on macos: :mojave # c++17 depends_on "python@3.11" depends_on "tinyxml2" From b2e7e7f76726df121844fc4cae2609217c53dfa6 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 17 Oct 2023 13:19:15 -0700 Subject: [PATCH 13/19] Bumps in ionic : ci_matching_branch/bump_ionic_gz-transport14 (#2474) Signed-off-by: Ian Chen Signed-off-by: Addisu Z. Taddese Co-authored-by: Addisu Z. Taddese --- Aliases/gz-transport14 | 1 - Formula/gz-transport14.rb | 85 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-transport14 create mode 100644 Formula/gz-transport14.rb diff --git a/Aliases/gz-transport14 b/Aliases/gz-transport14 deleted file mode 120000 index db444c952..000000000 --- a/Aliases/gz-transport14 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-transport13.rb \ No newline at end of file diff --git a/Formula/gz-transport14.rb b/Formula/gz-transport14.rb new file mode 100644 index 000000000..786abbddd --- /dev/null +++ b/Formula/gz-transport14.rb @@ -0,0 +1,85 @@ +class GzTransport14 < Formula + desc "Transport middleware for robotics" + homepage "https://gazebosim.org" + url "https://github.com/gazebosim/gz-transport.git", branch: "main" + version "13.999.999-0-20231016" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-transport.git", branch: "main" + + depends_on "doxygen" => [:build, :optional] + depends_on "pybind11" => :build + + depends_on "cmake" + depends_on "cppzmq" + depends_on "gz-cmake4" + depends_on "gz-msgs11" + depends_on "gz-tools2" + depends_on "gz-utils3" + depends_on macos: :mojave # c++17 + depends_on "ossp-uuid" + depends_on "pkg-config" + depends_on "protobuf" + depends_on "python@3.11" + depends_on "zeromq" + + def install + rpaths = [ + rpath, + rpath(source: libexec/"gz/transport14", target: lib), + ] + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=OFF" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}" + + # Use build folder + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + + (lib/"python3.11/site-packages").install Dir[lib/"python/*"] + rmdir prefix/"lib/python" + end + + test do + # test CLI executables + system libexec/"gz/transport14/gz-transport-service" + system libexec/"gz/transport14/gz-transport-topic" + # build against API + (testpath/"test.cpp").write <<-EOS + #include + #include + int main() { + gz::transport::NodeOptions options; + return 0; + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.10 FATAL_ERROR) + find_package(gz-transport14 QUIET REQUIRED) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake gz-transport14::gz-transport14) + EOS + system "pkg-config", "gz-transport14" + cflags = `pkg-config --cflags gz-transport14`.split + system ENV.cc, "test.cpp", + *cflags, + "-L#{lib}", + "-lgz-transport14", + "-lc++", + "-o", "test" + ENV["GZ_PARTITION"] = rand((1 << 32) - 1).to_s + system "./test" + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + # check python import + system Formula["python@3.11"].opt_bin/"python3.11", "-c", "import gz.transport14" + end +end From e0f6be6ac46dcedbd3b6a5e37e15b1b8ffcb913d Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Tue, 17 Oct 2023 16:11:31 -0500 Subject: [PATCH 14/19] Bumps in ionic : ci_matching_branch/bump_ionic_gz-fuel-tools10 (#2464) Signed-off-by: Addisu Z. Taddese --- Aliases/gz-fuel-tools10 | 1 - Formula/gz-fuel-tools10.rb | 66 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-fuel-tools10 create mode 100644 Formula/gz-fuel-tools10.rb diff --git a/Aliases/gz-fuel-tools10 b/Aliases/gz-fuel-tools10 deleted file mode 120000 index 38c9bfeb6..000000000 --- a/Aliases/gz-fuel-tools10 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-fuel-tools9.rb \ No newline at end of file diff --git a/Formula/gz-fuel-tools10.rb b/Formula/gz-fuel-tools10.rb new file mode 100644 index 000000000..0bc3e0aad --- /dev/null +++ b/Formula/gz-fuel-tools10.rb @@ -0,0 +1,66 @@ +class GzFuelTools10 < Formula + desc "Tools for using Fuel API to download robot models" + homepage "https://gazebosim.org" + url "https://github.com/gazebosim/gz-fuel-tools.git", branch: "main" + version "9.999.999-0-20231011" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-fuel-tools.git", branch: "gz-fuel-tools10" + + depends_on "cmake" + depends_on "gz-cmake4" + depends_on "gz-common6" + depends_on "gz-msgs11" + depends_on "jsoncpp" + depends_on "libyaml" + depends_on "libzip" + depends_on macos: :high_sierra # c++17 + depends_on "pkg-config" + depends_on "protobuf" + + def install + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=Off" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpath}" + + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + end + + test do + (testpath/"test.cpp").write <<-EOS + #include + int main() { + gz::fuel_tools::ServerConfig srv; + return 0; + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 2.8 FATAL_ERROR) + find_package(gz-fuel_tools10 QUIET REQUIRED) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake gz-fuel_tools10::gz-fuel_tools10) + EOS + # test building with pkg-config + system "pkg-config", "gz-fuel_tools10" + cflags = `pkg-config --cflags gz-fuel_tools10`.split + system ENV.cc, "test.cpp", + *cflags, + "-L#{lib}", + "-lgz-fuel_tools10", + "-lc++", + "-o", "test" + system "./test" + # test building with cmake + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + end +end From c75bf7bbe7db2d64e4ade34ff9815ffd26b6c0e4 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 17 Oct 2023 15:46:53 -0700 Subject: [PATCH 15/19] Bumps in ionic : ci_matching_branch/bump_ionic_gz-gui9 (#2471) Signed-off-by: Ian Chen Signed-off-by: Addisu Z. Taddese Co-authored-by: Addisu Z. Taddese --- Aliases/gz-gui9 | 1 - Formula/gz-gui9.rb | 119 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-gui9 create mode 100644 Formula/gz-gui9.rb diff --git a/Aliases/gz-gui9 b/Aliases/gz-gui9 deleted file mode 120000 index 26841f5e0..000000000 --- a/Aliases/gz-gui9 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-gui8.rb \ No newline at end of file diff --git a/Formula/gz-gui9.rb b/Formula/gz-gui9.rb new file mode 100644 index 000000000..df36a1187 --- /dev/null +++ b/Formula/gz-gui9.rb @@ -0,0 +1,119 @@ +class GzGui9 < Formula + desc "Common libraries for robotics applications. GUI Library" + homepage "https://github.com/gazebosim/gz-gui" + url "https://github.com/gazebosim/gz-gui.git", branch: "main" + version "8.999.999-0-20231016" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-gui.git", branch: "main" + + depends_on "cmake" => [:build, :test] + depends_on "pkg-config" => [:build, :test] + depends_on "gz-cmake4" + depends_on "gz-common6" + depends_on "gz-msgs11" + depends_on "gz-plugin3" + depends_on "gz-rendering9" + depends_on "gz-transport14" + depends_on macos: :mojave # c++17 + depends_on "protobuf" + depends_on "qt@5" + depends_on "tinyxml2" + + def install + rpaths = [ + rpath, + rpath(source: lib/"gz-gui-8/plugins", target: lib), + ] + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=Off" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}" + + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + end + + test do + # test some plugins in subfolders + %w[CameraFps Publisher TopicViewer WorldStats].each do |plugin| + p = lib/"gz-gui-8/plugins/lib#{plugin}.dylib" + # Use gz-plugin --info command to check plugin linking + cmd = Formula["gz-plugin3"].opt_libexec/"gz/plugin3/gz-plugin" + args = ["--info", "--plugin"] << p + # print command and check return code + system cmd, *args + # check that library was loaded properly + _, stderr = system_command(cmd, args: args) + error_string = "Error while loading the library" + assert stderr.exclude?(error_string), error_string + end + # build against API + (testpath/"test.cpp").write <<-EOS + #include + + #ifndef Q_MOC_RUN + #include + #include + #include + #endif + + ////////////////////////////////////////////////// + int main(int _argc, char **_argv) + { + std::cout << "Hello, GUI!" << std::endl; + + // Increase verboosity so we see all messages + gz::common::Console::SetVerbosity(4); + + // Create app + gz::gui::Application app(_argc, _argv); + + // Load plugins / config + if (!app.LoadPlugin("Publisher")) + { + return 1; + } + + // Customize main window + auto win = app.findChild()->QuickWindow(); + win->setProperty("title", "Hello Window!"); + + // Run window + // app.exec(); + + std::cout << "After run" << std::endl; + + return 0; + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + find_package(gz-gui9 QUIET REQUIRED) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake gz-gui9::gz-gui9) + EOS + ENV.append_path "PKG_CONFIG_PATH", Formula["qt@5"].opt_lib/"pkgconfig" + system "pkg-config", "gz-gui9" + cflags = `pkg-config --cflags gz-gui9`.split + ldflags = `pkg-config --libs gz-gui9`.split + system ENV.cc, "test.cpp", + *cflags, + *ldflags, + "-lc++", + "-o", "test" + ENV["GZ_PARTITION"] = rand((1 << 32) - 1).to_s + system "./test" + # test building with cmake + ENV.append_path "CMAKE_PREFIX_PATH", Formula["qt@5"].opt_prefix + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + end +end From afc7fa4219c300d942d51981a1780738cbe27cc1 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 17 Oct 2023 15:48:08 -0700 Subject: [PATCH 16/19] Bumps in ionic : ci_matching_branch/bump_ionic_gz-sensors9 (#2472) Signed-off-by: Ian Chen Signed-off-by: Addisu Z. Taddese Co-authored-by: Addisu Z. Taddese --- Aliases/gz-sensors9 | 1 - Formula/gz-sensors9.rb | 70 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-sensors9 create mode 100644 Formula/gz-sensors9.rb diff --git a/Aliases/gz-sensors9 b/Aliases/gz-sensors9 deleted file mode 120000 index d6b08123c..000000000 --- a/Aliases/gz-sensors9 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-sensors8.rb \ No newline at end of file diff --git a/Formula/gz-sensors9.rb b/Formula/gz-sensors9.rb new file mode 100644 index 000000000..635cb4cc8 --- /dev/null +++ b/Formula/gz-sensors9.rb @@ -0,0 +1,70 @@ +class GzSensors9 < Formula + desc "Sensors library for robotics applications" + homepage "https://github.com/gazebosim/gz-sensors" + url "https://github.com/gazebosim/gz-sensors.git", branch: "main" + version "8.999.999-0-20231016" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-sensors.git", branch: "main" + + depends_on "cmake" => [:build, :test] + depends_on "pkg-config" => [:build, :test] + + depends_on "gz-cmake4" + depends_on "gz-common6" + depends_on "gz-math8" + depends_on "gz-msgs11" + depends_on "gz-rendering9" + depends_on "gz-transport14" + depends_on "protobuf" + depends_on "sdformat15" + + def install + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=OFF" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpath}" + + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + end + + test do + (testpath/"test.cpp").write <<-EOS + #include + + int main() + { + gz::sensors::Noise noise(gz::sensors::NoiseType::NONE); + + return 0; + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) + find_package(gz-sensors9 QUIET REQUIRED) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake gz-sensors9::gz-sensors9) + EOS + # test building with pkg-config + system "pkg-config", "gz-sensors9" + cflags = `pkg-config --cflags gz-sensors9`.split + ldflags = `pkg-config --libs gz-sensors9`.split + system ENV.cc, "test.cpp", + *cflags, + *ldflags, + "-lc++", + "-o", "test" + system "./test" + # test building with cmake + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + end +end From 5e340d1a1ec92571a63ef6505430dde0666ddff4 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 17 Oct 2023 16:14:08 -0700 Subject: [PATCH 17/19] gz-physics8: new formula for ionic (#2473) Signed-off-by: Ian Chen Signed-off-by: Addisu Z. Taddese Co-authored-by: Steve Peters Co-authored-by: Addisu Z. Taddese --- Aliases/gz-physics8 | 1 - Formula/gz-physics8.rb | 104 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-physics8 create mode 100644 Formula/gz-physics8.rb diff --git a/Aliases/gz-physics8 b/Aliases/gz-physics8 deleted file mode 120000 index fb7a25c64..000000000 --- a/Aliases/gz-physics8 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-physics7.rb \ No newline at end of file diff --git a/Formula/gz-physics8.rb b/Formula/gz-physics8.rb new file mode 100644 index 000000000..289346441 --- /dev/null +++ b/Formula/gz-physics8.rb @@ -0,0 +1,104 @@ +class GzPhysics8 < Formula + desc "Physics library for robotics applications" + homepage "https://github.com/gazebosim/gz-physics" + url "https://github.com/gazebosim/gz-physics.git", branch: "main" + version "7.999.999-0-20231016" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-physics.git", branch: "main" + + depends_on "cmake" => [:build, :test] + + depends_on "bullet" + depends_on "dartsim" + depends_on "google-benchmark" + depends_on "gz-cmake4" + depends_on "gz-common6" + depends_on "gz-math8" + depends_on "gz-plugin3" + depends_on "gz-utils3" + depends_on macos: :mojave # c++17 + depends_on "pkg-config" + depends_on "sdformat15" + + def install + rpaths = [ + rpath, + rpath(source: lib/"gz-physics-8/engine-plugins", target: lib), + ] + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=OFF" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}" + + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + end + + test do + # test plugins in subfolders + %w[bullet-featherstone bullet dartsim tpe].each do |engine| + p = lib/"gz-physics-8/engine-plugins/libgz-physics-#{engine}-plugin.dylib" + # Use gz-plugin --info command to check plugin linking + cmd = Formula["gz-plugin3"].opt_libexec/"gz/plugin3/gz-plugin" + args = ["--info", "--plugin"] << p + # print command and check return code + system cmd, *args + # check that library was loaded properly + _, stderr = system_command(cmd, args: args) + error_string = "Error while loading the library" + assert stderr.exclude?(error_string), error_string + end + # build against API + (testpath/"test.cpp").write <<-EOS + #include "gz/plugin/Loader.hh" + #include "gz/physics/ConstructEmpty.hh" + #include "gz/physics/RequestEngine.hh" + int main() + { + gz::plugin::Loader loader; + loader.LoadLib("#{opt_lib}/libgz-physics8-dartsim-plugin.dylib"); + gz::plugin::PluginPtr dartsim = + loader.Instantiate("gz::physics::dartsim::Plugin"); + using featureList = gz::physics::FeatureList< + gz::physics::ConstructEmptyWorldFeature>; + auto engine = + gz::physics::RequestEngine3d::From(dartsim); + return engine == nullptr; + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) + find_package(gz-physics8 REQUIRED) + find_package(gz-plugin3 REQUIRED COMPONENTS all) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake + gz-physics8::gz-physics8 + gz-plugin3::loader) + EOS + system "pkg-config", "gz-physics8" + cflags = `pkg-config --cflags gz-physics8`.split + ldflags = `pkg-config --libs gz-physics8`.split + system "pkg-config", "gz-plugin3-loader" + loader_cflags = `pkg-config --cflags gz-plugin3-loader`.split + loader_ldflags = `pkg-config --libs gz-plugin3-loader`.split + system ENV.cc, "test.cpp", + *cflags, + *ldflags, + *loader_cflags, + *loader_ldflags, + "-lc++", + "-o", "test" + system "./test" + # test building with cmake + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + end +end From 3a3def5ce59f1fc24be676b29eaf5a87e14f914f Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Wed, 18 Oct 2023 12:54:41 -0700 Subject: [PATCH 18/19] Bumps in ionic : ci_matching_branch/bump_ionic_gz-sim9 (#2470) Signed-off-by: Ian Chen Signed-off-by: Addisu Z. Taddese Co-authored-by: Addisu Z. Taddese --- Aliases/gz-sim9 | 1 - Formula/gz-sim9.rb | 137 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-sim9 create mode 100644 Formula/gz-sim9.rb diff --git a/Aliases/gz-sim9 b/Aliases/gz-sim9 deleted file mode 120000 index 35f69d73d..000000000 --- a/Aliases/gz-sim9 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-sim8.rb \ No newline at end of file diff --git a/Formula/gz-sim9.rb b/Formula/gz-sim9.rb new file mode 100644 index 000000000..73740be08 --- /dev/null +++ b/Formula/gz-sim9.rb @@ -0,0 +1,137 @@ +class GzSim9 < Formula + desc "Gazebo Sim robot simulator" + homepage "https://github.com/gazebosim/gz-sim" + url "https://github.com/gazebosim/gz-sim.git", branch: "main" + version "8.999.999-0-20231016" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-sim.git", branch: "main" + + depends_on "cmake" => :build + depends_on "pybind11" => :build + depends_on "ffmpeg" + depends_on "gflags" + depends_on "google-benchmark" + depends_on "gz-cmake4" + depends_on "gz-common6" + depends_on "gz-fuel-tools10" + depends_on "gz-gui9" + depends_on "gz-math8" + depends_on "gz-msgs11" + depends_on "gz-physics8" + depends_on "gz-plugin3" + depends_on "gz-rendering9" + depends_on "gz-sensors9" + depends_on "gz-tools2" + depends_on "gz-transport14" + depends_on "gz-utils3" + depends_on macos: :mojave # c++17 + depends_on "pkg-config" + depends_on "protobuf" + depends_on "ruby" + depends_on "sdformat15" + + def install + rpaths = [ + rpath, + rpath(source: lib/"gz-sim-8/plugins", target: lib), + rpath(source: lib/"gz-sim-8/plugins/gui", target: lib), + rpath(source: lib/"gz-sim-8/plugins/gui/GzSim", target: lib), + ] + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=OFF" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}" + + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + end + + test do + # test some plugins in subfolders + plugin_info = lambda { |p| + # Use gz-plugin --info command to check plugin linking + cmd = Formula["gz-plugin3"].opt_libexec/"gz/plugin3/gz-plugin" + args = ["--info", "--plugin"] << p + # print command and check return code + system cmd, *args + # check that library was loaded properly + _, stderr = system_command(cmd, args: args) + error_string = "Error while loading the library" + assert stderr.exclude?(error_string), error_string + } + %w[altimeter log physics sensors].each do |system| + plugin_info.call lib/"gz-sim-8/plugins/libgz-sim-#{system}-system.dylib" + end + ["libAlignTool", "libEntityContextMenuPlugin", "libGzSceneManager", "GzSim/libEntityContextMenu"].each do |p| + plugin_info.call lib/"gz-sim-8/plugins/gui/#{p}.dylib" + end + # test gz sim CLI tool + ENV["GZ_CONFIG_PATH"] = "#{opt_share}/gz" + system Formula["gz-tools2"].opt_bin/"gz", + "sim", "-s", "--iterations", "5", "-r", "-v", "4" + # build against API + (testpath/"test.cpp").write <<-EOS + #include + #include + #include + #include + #include + + using namespace gz; + using namespace sim; + + ////////////////////////////////////////////////// + int main(int argc, char **argv) + { + // Warm start. Initial allocation of resources can throw off calculations. + { + // Create the entity component manager + EntityComponentManager mgr; + + // Create the matching entities + for (int i = 0; i < 100; ++i) + { + Entity entity = mgr.CreateEntity(); + mgr.CreateComponent(entity, components::World()); + mgr.CreateComponent(entity, components::Name("world_name")); + } + + mgr.Each( + [&](const Entity &, const components::World *, + const components::Name *)->bool {return true;}); + } + + return 0; + } + EOS + (testpath/"CMakeLists.txt").write <<-EOS + cmake_minimum_required(VERSION 3.5 FATAL_ERROR) + find_package(gz-sim9 QUIET REQUIRED) + add_executable(test_cmake test.cpp) + target_link_libraries(test_cmake gz-sim9::core) + EOS + # ENV.append_path "PKG_CONFIG_PATH", Formula["qt@5"].opt_lib/"pkgconfig" + # system "pkg-config", "--cflags", "gz-sim9" + # cflags = `pkg-config --cflags gz-sim9`.split + # ldflags = `pkg-config --libs gz-sim9`.split + # system ENV.cc, "test.cpp", + # *cflags, + # *ldflags, + # "-lc++", + # "-o", "test" + # system "./test" + # test building with cmake + ENV.append_path "CMAKE_PREFIX_PATH", Formula["ffmpeg@4"].opt_prefix + ENV.append_path "CMAKE_PREFIX_PATH", Formula["qt@5"].opt_prefix + mkdir "build" do + system "cmake", ".." + system "make" + system "./test_cmake" + end + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + end +end From 96a3723d6ca8d8dd54465185ad83959b0d29a0e2 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Mon, 23 Oct 2023 23:12:01 -0700 Subject: [PATCH 19/19] gz-launch8: new formula in ionic (#2469) Signed-off-by: Ian Chen Signed-off-by: Addisu Z. Taddese Co-authored-by: Addisu Z. Taddese --- Aliases/gz-launch8 | 1 - Formula/gz-launch8.rb | 64 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) delete mode 120000 Aliases/gz-launch8 create mode 100644 Formula/gz-launch8.rb diff --git a/Aliases/gz-launch8 b/Aliases/gz-launch8 deleted file mode 120000 index 7f8978b1f..000000000 --- a/Aliases/gz-launch8 +++ /dev/null @@ -1 +0,0 @@ -../Formula/gz-launch7.rb \ No newline at end of file diff --git a/Formula/gz-launch8.rb b/Formula/gz-launch8.rb new file mode 100644 index 000000000..db73fc4cf --- /dev/null +++ b/Formula/gz-launch8.rb @@ -0,0 +1,64 @@ +class GzLaunch8 < Formula + desc "Launch libraries for robotics applications" + homepage "https://github.com/gazebosim/gz-launch" + url "https://github.com/gazebosim/gz-launch.git", branch: "main" + version "7.999.999-0-20231016" + license "Apache-2.0" + + head "https://github.com/gazebosim/gz-launch.git", branch: "main" + + depends_on "cmake" => :build + depends_on "pkg-config" => :build + + depends_on "ffmpeg" + depends_on "gz-cmake4" + depends_on "gz-common6" + depends_on "gz-gui9" + depends_on "gz-msgs11" + depends_on "gz-plugin3" + depends_on "gz-sim9" + depends_on "gz-tools2" + depends_on "gz-transport14" + depends_on "protobuf" + depends_on "qt@5" + depends_on "tinyxml2" + + def install + rpaths = [ + rpath, + rpath(source: lib/"gz/launch8", target: lib), + rpath(source: lib/"gz-launch-7/plugins", target: lib), + ] + cmake_args = std_cmake_args + cmake_args << "-DBUILD_TESTING=OFF" + cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpaths.join(";")}" + + mkdir "build" do + system "cmake", "..", *cmake_args + system "make", "install" + end + end + + test do + # test CLI executable + system lib/"gz/launch8/gz-launch" + # test plugins in subfolders + %w[joytotwist sim-factory sim simgui].each do |plugin| + p = lib/"gz-launch-7/plugins/libgz-launch-#{plugin}.dylib" + # Use gz-plugin --info command to check plugin linking + cmd = Formula["gz-plugin3"].opt_libexec/"gz/plugin3/gz-plugin" + args = ["--info", "--plugin"] << p + # print command and check return code + system cmd, *args + # check that library was loaded properly + _, stderr = system_command(cmd, args: args) + error_string = "Error while loading the library" + assert stderr.exclude?(error_string), error_string + end + ENV["GZ_CONFIG_PATH"] = "#{opt_share}/gz" + system "gz", "launch", "--versions" + # check for Xcode frameworks in bottle + cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" + system cmd_not_grep_xcode + end +end