forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libminc.rb
37 lines (29 loc) · 909 Bytes
/
libminc.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
class Libminc < Formula
desc "Medical Imaging file format and Toolbox"
homepage "https://en.wikibooks.org/wiki/MINC"
url "https://github.com/BIC-MNI/libminc/archive/libminc-2-3-00.tar.gz"
version "2.3.00"
sha256 "8c00e0383575ace1f941a5b35b99678db2a0dd5e023f8671d25debc949c7cf12"
revision 5
bottle :disable, "needs to be rebuilt with latest netcdf"
depends_on "hdf5"
depends_on "netcdf"
depends_on "cmake" => :build
def install
system "cmake", ".", "-DCMAKE_INSTALL_PREFIX:PATH=#{libexec}"
system "make", "install"
lib.mkdir
ln_sf Dir["#{libexec}/lib/*.a"], lib
ln_sf Dir["#{libexec}/lib/*.dylib"], lib
include.mkdir
ln_sf Dir["#{libexec}/includebrew "], include
cd "testdir" do
system "cmake", "."
end
pkgshare.install "testdir"
end
test do
cp_r "#{pkgshare}/testdir/.", testpath
system "./minc2-datatype-test"
end
end