Skip to content

Commit 20b8231

Browse files
authored
gz-fuel-tools11: Bump gz-cmake and others in jetty (#3034)
Bumping gz-cmake and others except gz-tools. Signed-off-by: Steve Peters <[email protected]>
1 parent 4093321 commit 20b8231

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

Aliases/gz-fuel-tools11

-1
This file was deleted.

Formula/gz-fuel-tools11.rb

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
class GzFuelTools11 < Formula
2+
desc "Tools for using Fuel API to download robot models"
3+
homepage "https://gazebosim.org"
4+
url "https://github.com/gazebosim/gz-fuel-tools.git", branch: "main"
5+
version "10.999.999-0-20250502"
6+
license "Apache-2.0"
7+
8+
head "https://github.com/gazebosim/gz-fuel-tools.git", branch: "gz-fuel-tools11"
9+
10+
depends_on "abseil"
11+
depends_on "cmake"
12+
depends_on "gz-cmake5"
13+
depends_on "gz-common7"
14+
depends_on "gz-math9"
15+
depends_on "gz-msgs12"
16+
depends_on "gz-utils4"
17+
depends_on "jsoncpp"
18+
depends_on "libyaml"
19+
depends_on "libzip"
20+
depends_on macos: :high_sierra # c++17
21+
depends_on "pkgconf"
22+
depends_on "protobuf"
23+
depends_on "tinyxml2"
24+
25+
def install
26+
cmake_args = std_cmake_args
27+
cmake_args << "-DBUILD_TESTING=Off"
28+
cmake_args << "-DCMAKE_INSTALL_RPATH=#{rpath}"
29+
30+
mkdir "build" do
31+
system "cmake", "..", *cmake_args
32+
system "make", "install"
33+
end
34+
end
35+
36+
test do
37+
(testpath/"test.cpp").write <<-EOS
38+
#include <gz/fuel_tools.hh>
39+
int main() {
40+
gz::fuel_tools::ServerConfig srv;
41+
return 0;
42+
}
43+
EOS
44+
(testpath/"CMakeLists.txt").write <<-EOS
45+
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
46+
find_package(gz-fuel_tools QUIET REQUIRED)
47+
add_executable(test_cmake test.cpp)
48+
target_link_libraries(test_cmake gz-fuel_tools::gz-fuel_tools)
49+
EOS
50+
# test building with pkg-config
51+
system "pkg-config", "gz-fuel_tools"
52+
cflags = `pkg-config --cflags gz-fuel_tools`.split
53+
system ENV.cc, "test.cpp",
54+
*cflags,
55+
"-L#{lib}",
56+
"-lgz-fuel_tools",
57+
"-lc++",
58+
"-o", "test"
59+
system "./test"
60+
# test building with cmake
61+
mkdir "build" do
62+
system "cmake", ".."
63+
system "make"
64+
system "./test_cmake"
65+
end
66+
# check for Xcode frameworks in bottle
67+
cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}"
68+
system cmd_not_grep_xcode
69+
end
70+
end

0 commit comments

Comments
 (0)