-
Notifications
You must be signed in to change notification settings - Fork 0
/
rmf.rb
81 lines (72 loc) · 2.74 KB
/
rmf.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
require "formula"
class Rmf < Formula
desc "Rich Molecular Format library"
homepage "https://integrativemodeling.org/rmf/"
url "https://github.com/salilab/rmf/archive/refs/tags/1.7.0.tar.gz"
sha256 "37997f189702b4705f69b2db5f64cef31cfa9ab9eb151dfc0457c72dba422345"
license "Apache-2.0"
revision 1
bottle do
root_url "https://salilab.org/homebrew/bottles"
sha256 arm64_sequoia: "32fa931edab2bbd21e645fddf3a2dc61f5bbf7a23f3b9da842055254aec07468"
sha256 arm64_sonoma: "1b67f9dd85eaf7d7e6a6c9c99c8eae1df48fd0e63380b299b90a032c9985c824"
sha256 arm64_ventura: "c42533bb6685c59c8b0d89ffc2b06eec2b3dcd703b0164713e35347047201ea6"
sha256 sequoia: "01ca71e1061a9969aaf8542ef3532ff1dad9c4a8605633962aae95d9fabb90ad"
sha256 sonoma: "1ec43efe30c743064b652c0be562d850a0582c660a97dd6e8e6ff7dae0dbb472"
sha256 ventura: "5dee0b03c7a74b9f7b86fe6b5dc014dcef8a6fc71c82c6f976402c8d920d1cb5"
end
depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "swig" => :build
depends_on "boost"
depends_on "hdf5"
depends_on "[email protected]"
depends_on "numpy"
on_big_sur :or_older do
patch :DATA
end
def install
ENV.cxx11
pybin = Formula["[email protected]"].opt_bin/"python3.13"
pyver = Language::Python.major_minor_version pybin
args = std_cmake_args
args << ".."
args << "-DCMAKE_INSTALL_PYTHONDIR=#{lib}/python#{pyver}/site-packages"
# Don't install in lib64 on Linux systems
args << "-DCMAKE_INSTALL_LIBDIR=#{lib}"
# Don't link against log4cxx, even if available, since then the
# bottle won't work on systems without log4cxx installed
args << "-DLog4CXX_LIBRARY=Log4CXX_LIBRARY-NOTFOUND"
args << "-DPython3_EXECUTABLE:FILEPATH=#{pybin}"
# Work around boost/clang incompatibility
args << "-DCMAKE_CXX_FLAGS=-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION"
mkdir "build" do
system "cmake", *args
system "make"
system "make", "install"
end
end
test do
pythons = [Formula["[email protected]"].opt_bin/"python3.13"]
pythons.each do |python|
system python, "-c", "import RMF; assert(RMF.__version__ == '1.7.0')"
system python, "-c", "import RMF; assert(hasattr(RMF, 'get_all_global_coordinates'))"
end
system "rmf3_dump", "--version"
end
end
__END__
--- a/include/RMF/HDF5/handle.h
+++ b/include/RMF/HDF5/handle.h
@@ -70,9 +70,9 @@ class RMFEXPORT Handle : public boost::noncopyable {
}
h_ = -1;
}
-// Older clang does not like exception specification in combination
+// Many clang/macOS versions do not like exception specification in combination
// with std::shared_ptr
-#if defined(__clang__) && __clang_major__ <= 7
+#if defined(__clang__)
~Handle() {
#else
~Handle() noexcept(false) {