forked from osrf/homebrew-simulation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ignition-transport.rb
52 lines (46 loc) · 1.58 KB
/
ignition-transport.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
class IgnitionTransport < Formula
desc "Transport middleware for robotics"
homepage "http://ignitionrobotics.org"
url "http://gazebosim.org/distributions/ign-transport/releases/ignition-transport-1.4.0.tar.bz2"
sha256 "bc612e9781f9cab81cc4111ed0de07c4838303f67c25bc8b663d394b40a8f5d4"
revision 1
head "https://bitbucket.org/ignitionrobotics/ign-transport", :branch => "ign-transport1", :using => :hg
bottle do
root_url "http://gazebosim.org/distributions/ign-transport/releases"
cellar :any
sha256 "3b3e6700c8e3ae337ea2fbac9327282cc9706d23b132c0fc3e946c912b210251" => :el_capitan
sha256 "bee72083247413b7ccb888820a5c6e832a549656d70decf9ac9ad86cc7367cdd" => :yosemite
end
depends_on "cmake" => :build
depends_on "doxygen" => [:build, :optional]
depends_on "pkg-config" => :run
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-transport1"
cflags = `pkg-config --cflags ignition-transport1`.split(" ")
system ENV.cc, "test.cpp",
*cflags,
"-L#{lib}",
"-lignition-transport1",
"-lc++",
"-o", "test"
system "./test"
end
end