53 lines
1.7 KiB
Ruby
53 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.7.2.tar.gz"
|
|
sha256 "ddbad97af41730ac084ab87153614a13bd6f17ae98e192a994eee0a466746ed7"
|
|
|
|
bottle do
|
|
sha256 "170fdec69d1d6e217cab43d1fca384453b9d34daca6fe072a073553406e95fd1" => :mojave
|
|
sha256 "0b10cb797219b5d137f9489b5622da70a87c90d67e490d93bb625476e49428c4" => :high_sierra
|
|
sha256 "e220c3dfdb7b3dcc546d77050efa862050e3986237be2349237feafc20cf5831" => :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 "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++11", "-o", "test"
|
|
system "./test"
|
|
end
|
|
end
|