52 lines
1.9 KiB
Ruby
52 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.1.2.src.tar.gz"
|
|
sha256 "1b5bf62739faf3caef7cb7fbb14c7f1dea352caa548b08c7bb5adaaef2f4d1b4"
|
|
license "GPL-3.0-or-later"
|
|
revision 2
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(%r{url=.*?/(?:biosig|biosig4c[^-]*?)[._-]v?(\d+(?:\.\d+)+)\.src\.t}i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, big_sur: "8eea298d7b6d510592668e4c904e31d53eb99b57614d5f397d4112f18bc2a4c8"
|
|
sha256 cellar: :any, catalina: "2b255420ed05ad1e67f4e8096696a7867dd0e210b5132bcc2a064a6ffca3849a"
|
|
sha256 cellar: :any, mojave: "58d8121bd53ea37a6cdd74f11f534cc862fa645dfa5d0bbffbf269c8600b19bb"
|
|
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
|