homebrew-core/Formula/biosig.rb

51 lines
1.9 KiB
Ruby

class Biosig < Formula
desc "Tools for biomedical signal processing and data conversion"
homepage "https://biosig.sourceforge.io"
url "https://downloads.sourceforge.net/project/biosig/BioSig%20for%20C_C%2B%2B/src/biosig-2.2.1.src.tar.gz"
sha256 "4371eeaa92dca9069ab0ceea7ae48d41ad047e7c2e2674813c6678b88848c797"
license "GPL-3.0-or-later"
livecheck do
url :stable
regex(%r{url=.*?/(?:biosig|biosig4c[^-]*?)[._-]v?(\d+(?:\.\d+)+)\.src\.t}i)
end
bottle do
sha256 cellar: :any, big_sur: "8304675a1b5203cb2156d60acc522502234af872b9d8866481f3fda622dc39fc"
sha256 cellar: :any, catalina: "d22d443fe8cdf3ff28a519f5f119f0c9d040447d4fd5621715e14e7dd6205f95"
sha256 cellar: :any, mojave: "f2b22655eff227fd6f3ed20fde6d87b38308637d367a4f369d67f36e884f45b2"
end
depends_on "gawk" => :build
depends_on "libarchive" => :build
depends_on "dcmtk"
depends_on "libb64"
depends_on "numpy"
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",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
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
assert_match "biosig_fhir provides fhir binary template for biosignal data",
shell_output("#{bin}/biosig_fhir 2>&1").strip
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