50 lines
1.9 KiB
Ruby
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/20170910.tar.gz"
|
|
sha256 "9f32fa71878237267c83279816d6bcccc311c64496cac2933f68dff5ac64ee05"
|
|
head "https://bitbucket.org/Storlek/schismtracker", :using => :hg
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "5cf292781c27417dbf1946e72384d2ff4954326ddfedbd61167d6e5f504a0d91" => :high_sierra
|
|
sha256 "5266ea6d5b5b8f11d3b0805129be7e9583c4816318bfe43bc163cc39c4fd994c" => :sierra
|
|
sha256 "dabf74cac1dbb1d7f78f739a755764f313e1a1d99e719924c93b5b49e60dcb6e" => :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
|