Skip to content

Commit

Permalink
Bumps in fortress : ign-msgs (#1423)
Browse files Browse the repository at this point in the history
* Bumps in fortress : ign-msgs

Signed-off-by: Louise Poubel <[email protected]>

* update  bottle.

Co-authored-by: OSRF Build Bot <[email protected]>
  • Loading branch information
chapulina and osrfbuild authored Apr 14, 2021
1 parent 7e4baa2 commit d0c4761
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
1 change: 0 additions & 1 deletion Aliases/ignition-msgs8

This file was deleted.

72 changes: 72 additions & 0 deletions Formula/ignition-msgs8.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
class IgnitionMsgs8 < Formula
desc "Middleware protobuf messages for robotics"
homepage "https:/ignitionrobotics/ign-msgs"
url "https:/ignitionrobotics/ign-msgs/archive/9fb08e926cd3a7b75cdd5706ccc9ae3ca4dfc457.tar.gz"
version "7.999.999~0~20210413~9fb08e"
sha256 "1493d7024f0615bc147bf6b79c3e959b2ac4cd81362ae63ea9266f3166a47177"
license "Apache-2.0"

head "https:/ignitionrobotics/ign-msgs.git", branch: "main"

bottle do
root_url "https://osrf-distributions.s3.amazonaws.com/bottles-simulation"
sha256 cellar: :any, catalina: "3885af366e231f256c0c683c66cc0e52421ddee9edb8e089f1341207d9ea7121"
sha256 cellar: :any, mojave: "0420836e67b7dd4172cd9a126bb81892c53b076f9e5406cea55ab5d9bb2ad0c3"
end

depends_on "protobuf-c" => :build
depends_on "cmake"
depends_on "ignition-cmake2"
depends_on "ignition-math6"
depends_on "ignition-tools"
depends_on macos: :high_sierra # c++17
depends_on "pkg-config"
depends_on "protobuf"
depends_on "tinyxml2"

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/msgs.hh>
int main() {
ignition::msgs::UInt32;
return 0;
}
EOS
(testpath/"CMakeLists.txt").write <<-EOS
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
find_package(ignition-msgs8 QUIET REQUIRED)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNITION-MSGS_CXX_FLAGS}")
include_directories(${IGNITION-MSGS_INCLUDE_DIRS})
link_directories(${IGNITION-MSGS_LIBRARY_DIRS})
add_executable(test_cmake test.cpp)
target_link_libraries(test_cmake ignition-msgs8::ignition-msgs8)
EOS
# test building with pkg-config
system "pkg-config", "ignition-msgs8"
cflags = `pkg-config --cflags ignition-msgs8`.split
system ENV.cc, "test.cpp",
*cflags,
"-L#{lib}",
"-lignition-msgs8",
"-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 d0c4761

Please sign in to comment.