-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.88 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
require 'formula'
# This is just the regular hdf5 formula, but held at 1.8.18, to be consistent
# with the version that Modeller uses. We also disable the questionably-licensed
# szip compression.
class Hdf5AT1818 < Formula
desc "File format designed to store large amounts of data"
homepage 'http://www.hdfgroup.org/HDF5'
url 'https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.18/src/hdf5-1.8.18.tar.bz2'
sha256 '01c6deadf4211f86922400da82c7a8b5b50dc8fc1ce0b5912de3066af316a48c'
keg_only "Don't interfere with the regular HDF5 formula if installed."
bottle do
root_url "https://salilab.org/homebrew/bottles"
sha256 el_capitan: "509536d5800e1d3442f04f54d472da51bc8082ace8fa357d42c91169e690ec2e"
sha256 yosemite: "bc50428ce532696c15df19dfb9fc7247bb25ffc0a6c5710f844f6a17880a281e"
sha256 sierra: "27aca7c4a25b82ffd81e0f37ba6503aeb5d9537fe78fcf8aa8b2fb67a1d95b89"
end
# TODO - warn that these options conflict
option 'enable-fortran', 'Compile Fortran bindings'
option 'enable-threadsafe', 'Trade performance and C++ or Fortran support for thread safety'
def install
# The older gcc in OS X 10.6 doesn't like the use of #pragma pack()
if MacOS.version <= :snow_leopard
inreplace "hl/c++/test/ptableTest.cpp", "#pragma pack()", "#pragma pack(1)"
end
args = %W[
--prefix=#{prefix}
--enable-production
--enable-debug=no
--disable-dependency-tracking
--with-zlib=/usr
--with-szlib=no
--enable-filters=all
--enable-static=yes
--enable-shared=yes
]
if build.include? 'enable-threadsafe'
args.concat %w[--with-pthread=/usr --enable-threadsafe]
else
args << '--enable-cxx'
if build.include? 'enable-fortran'
args << '--enable-fortran'
ENV.fortran
end
end
system "./configure", *args
system "make install"
end
end