homebrew-core/Formula/schismtracker.rb
2018-02-10 18:21:22 +01:00

50 lines
1.9 KiB
Ruby

class Schismtracker < Formula
desc "Portable reimplementation of Impulse Tracker"
homepage "http://schismtracker.org/"
url "https://github.com/schismtracker/schismtracker/archive/20180209.tar.gz"
sha256 "260d7ef333e740adb0293b2ca21447db81595f277b1151108020723ef1f31f9b"
head "https://github.com/schismtracker/schismtracker.git"
bottle do
cellar :any
sha256 "21d1920a28276e4ff416000decc452fe51d092e9de47ad1e3c563c0abea61cb1" => :high_sierra
sha256 "84bc0f506bd91c86c0d60efcfee9366a2a5a488381ccf2ed0716c0c2f8ed6a55" => :sierra
sha256 "e1d0f44a61bb7bcd306368ac51e147be6598a990a8b0b0c60084a49495e115bd" => :el_capitan
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "sdl"
# CC BY-NC-ND licensed set of five mods by Keith Baylis/Vim! for testing purposes
# Mods from Mod Soul Brother: https://web.archive.org/web/20120215215707/www.mono211.com/modsoulbrother/vim.html
resource "demo_mods" do
url "https://files.scene.org/get:us-http/mirrors/modsoulbrother/vim/vim-best-of.zip"
sha256 "df8fca29ba116b10485ad4908cea518e0f688850b2117b75355ed1f1db31f580"
end
def install
system "autoreconf", "-ivf"
mkdir "build" do
# Makefile fails to create this directory before dropping files in it
mkdir "auto"
system "../configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "install"
end
end
test do
testpath.install resource("demo_mods")
test_wav = testpath/"test.wav"
system "#{bin}/schismtracker", "-p", "#{testpath}/give-me-an-om.mod",
"--diskwrite=#{test_wav}"
assert_predicate test_wav, :exist?
assert_match /RIFF \(little-endian\) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz/,
shell_output("/usr/bin/file '#{test_wav}'")
end
end