forked from osrf/homebrew-simulation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ignition-transport3.rb
53 lines (47 loc) · 1.61 KB
/
ignition-transport3.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
class IgnitionTransport3 < Formula
desc "Transport middleware for robotics"
homepage "http://ignitionrobotics.org"
url "http://gazebosim.org/distributions/ign-transport/releases/ignition-transport3-3.0.0.tar.bz2"
sha256 "687e81e4ed1c640bd6c2eabba7959572dad424ae6903cffd1b35cee780aa2192"
revision 1
head "https://bitbucket.org/ignitionrobotics/ign-transport", :branch => "default", :using => :hg
bottle do
root_url "http://gazebosim.org/distributions/ign-transport/releases"
cellar :any
sha256 "0102b4f37f4c802abdd33e1b9f8dd8b1232e7fb3ffb6d6f97c9376bb579bd452" => :el_capitan
sha256 "0222c705839cc65a56f8e79178501d0032749cf8b827d6cf558eb7af85f92b68" => :yosemite
end
depends_on "cmake" => :build
depends_on "doxygen" => [:build, :optional]
depends_on "pkg-config" => :run
depends_on "ignition-msgs"
depends_on "ignition-tools"
depends_on "protobuf"
depends_on "protobuf-c" => :build
depends_on "ossp-uuid"
depends_on "zeromq"
depends_on "cppzmq"
def install
system "cmake", ".", *std_cmake_args
system "make", "install"
end
test do
(testpath/"test.cpp").write <<-EOS.undent
#include <iostream>
#include <ignition/transport.hh>
int main() {
ignition::transport::Node node;
return 0;
}
EOS
system "pkg-config", "ignition-transport3"
cflags = `pkg-config --cflags ignition-transport3`.split(" ")
system ENV.cc, "test.cpp",
*cflags,
"-L#{lib}",
"-lignition-transport3",
"-lc++",
"-o", "test"
system "./test"
end
end