From aae0b5c5e2854e784440dea4e0d17fe6c623a57d Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 27 Jan 2016 22:10:22 +0100 Subject: [PATCH] nixio 1.1.0 (new formula) Closes #3264. Signed-off-by: Tim D. Smith --- nixio.rb | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 nixio.rb diff --git a/nixio.rb b/nixio.rb new file mode 100644 index 0000000000..302a7f7235 --- /dev/null +++ b/nixio.rb @@ -0,0 +1,40 @@ +class Nixio < Formula + desc "C++ library for the NIX scientific data format and model" + homepage "http://www.g-node.org/nix" + url "https://github.com/G-Node/nix/archive/1.1.0.tar.gz" + sha256 "d607d96117621e5cc563002c4c161913d95db36eeb7c4e6f51afca5f6b788fcc" + + head "https://github.com/G-Node/nix.git" + + depends_on "cmake" => :build + depends_on "hdf5" + depends_on "cppunit" + + if OS.mac? && MacOS.version < :mavericks + depends_on "boost" => "c++11" + else + depends_on "boost" + end + + needs :cxx11 + + resource "demofile" do + url "https://raw.githubusercontent.com/G-Node/nix-demo/master/data/spike_features.h5" + sha256 "b486202df0527545cd53968545d5fb3700567dbf10fbf7d9ca9d9a98fe2998ac" + end + + def install + ENV.cxx11 + + system "cmake", ".", *std_cmake_args + system "make" + system "make", "test" + system "make", "install" + end + + test do + resource("demofile").stage do + system bin/"nix-tool", "dump", "spike_features.h5" + end + end +end