From 10a5c1ce668fdea61ad087a646dd4e9b3f85607d Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Wed, 11 Oct 2023 13:40:32 -0500 Subject: [PATCH 1/2] Bumps in ionic : ci_matching_branch/bump_ionic_sdformat15 Signed-off-by: Addisu Z. Taddese --- Formula/sdformat15.rb | 83 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Formula/sdformat15.rb 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 8f627644155d255363e0eba382d523d036fbbe65 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Fri, 13 Oct 2023 10:58:06 -0700 Subject: [PATCH 2/2] remove sdformat15 alias Signed-off-by: Steve Peters --- Aliases/sdformat15 | 1 - 1 file changed, 1 deletion(-) delete mode 120000 Aliases/sdformat15 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