forked from osrf/homebrew-simulation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathignition-transport2.rb
53 lines (47 loc) · 1.61 KB
/
ignition-transport2.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 IgnitionTransport2 < Formula
desc "Transport middleware for robotics"
homepage "http://ignitionrobotics.org"
url "http://gazebosim.org/distributions/ign-transport/releases/ignition-transport2-2.1.0.tar.bz2"
sha256 "f1190ee6a880962b9083328efcaf4c8fe4e9f00504da4432cde69820edbc212e"
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 "ad7376794cb89ba6115b9d3522378c71edac795ce2b6fbecef3e5d566f9a9249" => :el_capitan
sha256 "dc23d41f22d4053989c1f8b4862f21000bd90c9530993a33d477f495a6186045" => :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-transport2"
cflags = `pkg-config --cflags ignition-transport2`.split(" ")
system ENV.cc, "test.cpp",
*cflags,
"-L#{lib}",
"-lignition-transport2",
"-lc++",
"-o", "test"
system "./test"
end
end