Skip to content

Commit

Permalink
ignition-fuel-tools6: new formula (#1272)
Browse files Browse the repository at this point in the history
* update  bottle.

Signed-off-by: Louise Poubel <[email protected]>
Co-authored-by: OSRF Build Bot <[email protected]>
Co-authored-by: Steve Peters <[email protected]>
  • Loading branch information
3 people authored Jan 12, 2021
1 parent 64c05ce commit a3d0092
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 1 deletion.
1 change: 0 additions & 1 deletion Aliases/ignition-fuel-tools6

This file was deleted.

73 changes: 73 additions & 0 deletions Formula/ignition-fuel-tools6.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
class IgnitionFuelTools6 < Formula
desc "Tools for using Fuel API to download robot models"
homepage "https://ignitionrobotics.org"
url "https://github.com/ignitionrobotics/ign-fuel-tools/archive/eea5e1d3c8ac1e18eb90e6a82fb7bdb4f566c495.tar.gz"
version "5.999.999~0~20210111~eea5e1"
sha256 "b868e39916dc21fc86e80c18d5004c0e7b26d7ac0a4af99eb8c77e72ea8bf5f1"
license "Apache-2.0"

head "https://github.com/ignitionrobotics/ign-fuel-tools", branch: "main"

bottle do
root_url "https://osrf-distributions.s3.amazonaws.com/bottles-simulation"
cellar :any
sha256 "b97407a88219f524c20f8caed4bafe44570db61fc2acd00302e10e2f6392f5bd" => :mojave
end

depends_on "cmake"
depends_on "ignition-cmake2"
depends_on "ignition-common3"
depends_on "ignition-msgs7"
depends_on "jsoncpp"
depends_on "libyaml"
depends_on "libzip"
depends_on macos: :high_sierra # c++17
depends_on "pkg-config"

def install
cmake_args = std_cmake_args
cmake_args << "-DBUILD_TESTING=Off"

mkdir "build" do
system "cmake", "..", *cmake_args
system "make", "install"
end
end

test do
(testpath/"test.cpp").write <<-EOS
#include <ignition/fuel_tools.hh>
int main() {
ignition::fuel_tools::ServerConfig srv;
return 0;
}
EOS
(testpath/"CMakeLists.txt").write <<-EOS
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
find_package(ignition-fuel_tools6 QUIET REQUIRED)
include_directories(${IGNITION-FUEL_TOOLS_INCLUDE_DIRS})
link_directories(${IGNITION-FUEL_TOOLS_LIBRARY_DIRS})
add_executable(test_cmake test.cpp)
target_link_libraries(test_cmake ignition-fuel_tools6::ignition-fuel_tools6)
EOS
# test building with pkg-config
system "pkg-config", "ignition-fuel_tools6"
cflags = `pkg-config --cflags ignition-fuel_tools6`.split
system ENV.cc, "test.cpp",
*cflags,
"-L#{lib}",
"-lignition-fuel_tools6",
"-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

0 comments on commit a3d0092

Please sign in to comment.