2013-03-31 17:07:39 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Timidity < Formula
|
|
|
|
homepage 'http://timidity.sourceforge.net/'
|
2013-06-20 23:08:35 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/timidity/TiMidity++/TiMidity++-2.14.0/TiMidity++-2.14.0.tar.bz2'
|
2013-03-31 17:07:39 +00:00
|
|
|
sha1 '3d1d18ddf3e52412985af9a49dbe7ad345b478a8'
|
|
|
|
|
2013-11-03 04:27:18 +00:00
|
|
|
option "without-darwin", "Build without Darwin CoreAudio support"
|
|
|
|
option "without-freepats", "Build without the Freepats instrument patches from http://freepats.zenvoid.org/"
|
|
|
|
|
|
|
|
depends_on 'libogg' => :recommended
|
|
|
|
depends_on 'libvorbis' => :recommended
|
|
|
|
depends_on 'flac' => :recommended
|
|
|
|
depends_on 'speex' => :recommended
|
|
|
|
|
|
|
|
resource 'freepats' do
|
|
|
|
url 'http://freepats.zenvoid.org/freepats-20060219.zip'
|
|
|
|
sha1 '8b798940dc581f025effead75428dfaaba356afe'
|
|
|
|
end
|
|
|
|
|
2013-03-31 17:07:39 +00:00
|
|
|
def install
|
2013-11-03 04:27:18 +00:00
|
|
|
args = ["--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--mandir=#{man}"
|
|
|
|
]
|
|
|
|
|
|
|
|
formats = []
|
|
|
|
formats << 'darwin' if build.with? 'darwin'
|
|
|
|
formats << 'vorbis' if build.with? 'libogg' and build.with? 'libvorbis'
|
|
|
|
formats << 'flac' if build.with? 'flac'
|
|
|
|
formats << 'speex' if build.with? 'speex'
|
|
|
|
|
|
|
|
if formats.any?
|
|
|
|
args << "--enable-audio=" + formats.join(",")
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
2013-03-31 17:07:39 +00:00
|
|
|
system "make install"
|
2013-11-03 04:27:18 +00:00
|
|
|
|
|
|
|
if build.with? 'freepats'
|
|
|
|
(share/'freepats').install resource('freepats')
|
|
|
|
(share/'timidity/').install_symlink share/'freepats/Tone_000', share/'freepats/Drum_000'
|
|
|
|
File.symlink share/'freepats/freepats.cfg', share/'timidity/timidity.cfg'
|
|
|
|
end
|
2013-03-31 17:07:39 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/timidity"
|
|
|
|
end
|
|
|
|
end
|