Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumps in fortress : ign-sensors #1430

Merged
merged 3 commits into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Aliases/ignition-sensors6

This file was deleted.

73 changes: 73 additions & 0 deletions Formula/ignition-sensors6.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
class IgnitionSensors6 < Formula
desc "Sensors library for robotics applications"
homepage "https://github.com/ignitionrobotics/ign-sensors"
url "https://github.com/ignitionrobotics/ign-sensors/archive/61f612cdccaeb7e71db05a7b969aec3509a6fd89.tar.gz"
version "5.999.999~0~20210413~61f612"
sha256 "d7a26ca97b617b43ff470e2f2c8134219d1557cf4bc7f3d9bdaacfea66a4b8f4"
license "Apache-2.0"

head "https://github.com/ignitionrobotics/ign-sensors.git", branch: "main"

bottle do
root_url "https://osrf-distributions.s3.amazonaws.com/bottles-simulation"
sha256 catalina: "09130ac8d35ed918dffd0358115e06fb7d60c2f83595fe4089dea27906283036"
sha256 mojave: "cce4847a8ec2cb8332ac26a6555bcef263f22b5a07c6eb2e36199990bf705d8b"
end

depends_on "cmake" => [:build, :test]
depends_on "pkg-config" => [:build, :test]

depends_on "ignition-cmake2"
depends_on "ignition-common4"
depends_on "ignition-math6"
depends_on "ignition-msgs8"
depends_on "ignition-rendering6"
depends_on "ignition-transport11"
depends_on "sdformat12"

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

system "cmake", ".", *cmake_args
system "make", "install"
end

test do
(testpath/"test.cpp").write <<-EOS
#include <ignition/sensors/Noise.hh>

int main()
{
ignition::sensors::Noise noise(ignition::sensors::NoiseType::NONE);

return 0;
}
EOS
(testpath/"CMakeLists.txt").write <<-EOS
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
find_package(ignition-sensors6 QUIET REQUIRED)
add_executable(test_cmake test.cpp)
target_link_libraries(test_cmake ignition-sensors6::ignition-sensors6)
EOS
# test building with pkg-config
system "pkg-config", "ignition-sensors6"
cflags = `pkg-config --cflags ignition-sensors6`.split
ldflags = `pkg-config --libs ignition-sensors6`.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