40 lines
1.4 KiB
Ruby
40 lines
1.4 KiB
Ruby
class Field3d < Formula
|
|
desc "Library for storing voxel data on disk and in memory"
|
|
homepage "https://sites.google.com/site/field3d/"
|
|
url "https://github.com/imageworks/Field3D/archive/v1.7.2.tar.gz"
|
|
sha256 "8f7c33ecb4489ed626455cf3998d911a079b4f137f86814d9c37c5765bf4b020"
|
|
revision 7
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "f5a6126c0162963b17c417d684772838d2570151b2cff63844fd1f62b7067782" => :mojave
|
|
sha256 "221ce973f5f17205c65c17fac42af14eb4007fd5f17d0109603380bff752fbac" => :high_sierra
|
|
sha256 "2e9676f02dda92d18c8749e1327bfddc72329c5d837b9c1af760f3892d47339a" => :sierra
|
|
sha256 "c013231f4ebc05974b0f9f7eb481b15bcb562261f6ef59d541015df88d89f24b" => :el_capitan
|
|
end
|
|
|
|
depends_on "scons" => :build
|
|
depends_on "boost"
|
|
depends_on "hdf5"
|
|
depends_on "ilmbase"
|
|
|
|
def install
|
|
scons
|
|
include.install Dir["install/**/**/release/include/*"]
|
|
lib.install Dir["install/**/**/release/lib/*"]
|
|
man1.install "man/f3dinfo.1"
|
|
pkgshare.install "contrib", "test", "apps/sample_code"
|
|
end
|
|
|
|
test do
|
|
system ENV.cxx, "-I#{include}", "-L#{lib}", "-lField3D",
|
|
"-I#{Formula["boost"].opt_include}",
|
|
"-L#{Formula["boost"].opt_lib}", "-lboost_system",
|
|
"-I#{Formula["hdf5"].opt_include}",
|
|
"-L#{Formula["hdf5"].opt_lib}", "-lhdf5",
|
|
"-I#{Formula["ilmbase"].opt_include}",
|
|
pkgshare/"sample_code/create_and_write/main.cpp",
|
|
"-o", "test"
|
|
system "./test"
|
|
end
|
|
end
|