2020-02-22 09:22:53 +00:00
|
|
|
class Biosig < Formula
|
|
|
|
desc "Tools for biomedical signal processing and data conversion"
|
|
|
|
homepage "https://biosig.sourceforge.io"
|
2020-10-18 15:48:40 +00:00
|
|
|
url "https://downloads.sourceforge.net/project/biosig/BioSig%20for%20C_C%2B%2B/src/biosig-2.1.0.src.tar.gz"
|
|
|
|
sha256 "562ff3d5aee834dc7d676128e769c8762e23a40e0c18e6995628ffdcaa3e1c7e"
|
|
|
|
license "GPL-3.0-or-later"
|
2020-02-22 09:22:53 +00:00
|
|
|
|
2020-08-28 15:36:02 +00:00
|
|
|
livecheck do
|
|
|
|
url :stable
|
|
|
|
regex(%r{url=.*?/(?:biosig|biosig4c[^-]*?)[._-]v?(\d+(?:\.\d+)+)\.src\.t}i)
|
|
|
|
end
|
|
|
|
|
2020-02-22 09:40:33 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2020-11-16 03:53:21 +00:00
|
|
|
sha256 "3d9649438fd9e04c97bee4ad9595bfcbbe09ae83f914e8ddd011fef0705b5544" => :big_sur
|
2020-10-19 08:21:18 +00:00
|
|
|
sha256 "7ddfff1529286000cd32a28ce1bf735cfe810804c08b20eaa2fe39a587f8b73b" => :catalina
|
|
|
|
sha256 "4786b282a950d325f91d681615a9d60cc8335703f818d527c5d55f7718b206e9" => :mojave
|
|
|
|
sha256 "0818b0bdfe19286f9d18de35d5fa72981b4b1e1403083c92136c7d5c937dbe6f" => :high_sierra
|
2020-02-22 09:40:33 +00:00
|
|
|
end
|
|
|
|
|
2020-02-22 09:22:53 +00:00
|
|
|
depends_on "gawk" => :build
|
|
|
|
depends_on "gnu-tar" => :build
|
|
|
|
depends_on "dcmtk"
|
|
|
|
depends_on "libb64"
|
2020-10-18 15:48:40 +00:00
|
|
|
depends_on "numpy"
|
2020-02-22 09:22:53 +00:00
|
|
|
depends_on "suite-sparse"
|
|
|
|
depends_on "tinyxml"
|
|
|
|
|
|
|
|
resource "test" do
|
|
|
|
url "https://pub.ist.ac.at/~schloegl/download/TEST_44x86_e1.GDF"
|
|
|
|
sha256 "75df4a79b8d3d785942cbfd125ce45de49c3e7fa2cd19adb70caf8c4e30e13f0"
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--disable-debug",
|
2020-10-18 15:48:40 +00:00
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--disable-silent-rules",
|
|
|
|
"--prefix=#{prefix}"
|
2020-02-22 09:22:53 +00:00
|
|
|
system "make"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match "usage: save2gdf [OPTIONS] SOURCE DEST", shell_output("#{bin}/save2gdf -h").strip
|
|
|
|
assert_match "mV\t4274\t0x10b2\t0.001\tV", shell_output("#{bin}/physicalunits mV").strip
|
2020-03-12 17:29:19 +00:00
|
|
|
assert_match "biosig_fhir provides fhir binary template for biosignal data",
|
2020-10-18 15:48:40 +00:00
|
|
|
shell_output("#{bin}/biosig_fhir 2>&1").strip
|
2020-02-22 09:22:53 +00:00
|
|
|
testpath.install resource("test")
|
|
|
|
assert_match "NumberOfChannels", shell_output("#{bin}/save2gdf -json TEST_44x86_e1.GDF").strip
|
|
|
|
assert_match "NumberOfChannels", shell_output("#{bin}/biosig_fhir TEST_44x86_e1.GDF").strip
|
|
|
|
end
|
|
|
|
end
|