55 lines
1.7 KiB
Ruby
55 lines
1.7 KiB
Ruby
class Dartsim < Formula
|
|
desc "Dynamic Animation and Robotics Toolkit"
|
|
homepage "https://dartsim.github.io/"
|
|
url "https://github.com/dartsim/dart/archive/v6.9.1.tar.gz"
|
|
sha256 "9e2954aaf2d4538a7e4aab5188f1061c3e216c8c0b72483c2d0b9e814525acd1"
|
|
revision 1
|
|
|
|
bottle do
|
|
sha256 "0f7eb772042921988f1e140c4e3e0a37d4b5a81b390711daf3220427b6f57465" => :mojave
|
|
sha256 "a0c2059ce68df576f10d76f86ff4354218ceefb0b0af5ef71b5501ccb956d9d6" => :high_sierra
|
|
sha256 "12ed3cfc2cb8767317fe3473a988ad5177c0a41c95bea85bf15e4fbf5aea12b9" => :sierra
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "assimp"
|
|
depends_on "boost"
|
|
depends_on "bullet"
|
|
depends_on "eigen"
|
|
depends_on "fcl"
|
|
depends_on "flann"
|
|
depends_on "ipopt"
|
|
depends_on "libccd"
|
|
depends_on "nlopt"
|
|
depends_on "ode"
|
|
depends_on "open-scene-graph"
|
|
depends_on "tinyxml2"
|
|
depends_on "urdfdom"
|
|
|
|
def install
|
|
ENV.cxx11
|
|
|
|
# Force to link to system GLUT (see: https://cmake.org/Bug/view.php?id=16045)
|
|
system "cmake", ".", "-DGLUT_glut_LIBRARY=/System/Library/Frameworks/GLUT.framework",
|
|
*std_cmake_args
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.cpp").write <<~EOS
|
|
#include <dart/dart.hpp>
|
|
int main() {
|
|
auto world = std::make_shared<dart::simulation::World>();
|
|
assert(world != nullptr);
|
|
return 0;
|
|
}
|
|
EOS
|
|
system ENV.cxx, "test.cpp", "-I#{Formula["eigen"].include}/eigen3",
|
|
"-I#{include}", "-L#{lib}", "-ldart",
|
|
"-L#{Formula["assimp"].opt_lib}", "-lassimp",
|
|
"-L#{Formula["boost"].opt_lib}", "-lboost_system",
|
|
"-std=c++14", "-o", "test"
|
|
system "./test"
|
|
end
|
|
end
|