ospray 1.8.4 (new formula)

Closes #38637.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Jamie Snape 2019-04-11 09:11:33 -04:00 committed by FX Coudert
parent 00df1420e6
commit 16583f9dfe

45
Formula/ospray.rb Normal file
View file

@ -0,0 +1,45 @@
class Ospray < Formula
desc "Ray-tracing-based rendering engine for high-fidelity visualization"
homepage "https://www.ospray.org/"
url "https://github.com/ospray/ospray/archive/v1.8.4.tar.gz"
sha256 "36527eb01a09b0f30608550373aa305ecbfa2faea23cd929cc731af5864ca326"
head "https://github.com/ospray/ospray.git"
depends_on "cmake" => :build
depends_on "ispc" => :build
depends_on "embree"
depends_on :macos => :mojave # Needs embree bottle built with SSE4.2.
depends_on "tbb"
def install
args = std_cmake_args + %w[
-DCMAKE_INSTALL_NAME_DIR=#{opt_lib}
-DCMAKE_INSTALL_RPATH=#{opt_lib}
-DOSPRAY_ENABLE_APPS=OFF
-DOSPRAY_ENABLE_TESTING=OFF
-DOSPRAY_ENABLE_TUTORIALS=OFF
]
mkdir "build" do
system "cmake", *args, ".."
system "make"
system "make", "install"
end
end
test do
(testpath/"test.c").write <<~EOS
#include <assert.h>
#include <ospray/ospray.h>
int main(int argc, const char **argv) {
OSPError error = ospInit(&argc, argv);
assert(error == OSP_NO_ERROR);
ospShutdown();
return 0;
}
EOS
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lospray"
system "./a.out"
end
end