2009-10-21 03:11:35 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libmikmod < Formula
|
2012-04-10 23:22:08 +00:00
|
|
|
homepage 'http://mikmod.shlomifish.org'
|
2012-08-01 20:39:13 +00:00
|
|
|
url 'http://mikmod.shlomifish.org/files/libmikmod-3.2.0.tar.gz'
|
|
|
|
sha256 '734c8490bbf9b0c587920b92414dcfa3c2267838a0cdf698d5f1fb6bba8f661e'
|
2011-10-24 09:02:15 +00:00
|
|
|
|
2012-08-13 00:02:43 +00:00
|
|
|
option 'with-debug', 'Enable debugging symbols'
|
2012-03-17 19:27:45 +00:00
|
|
|
|
2009-10-21 03:11:35 +00:00
|
|
|
def install
|
2012-08-13 00:02:43 +00:00
|
|
|
if build.include? 'with-debug'
|
2012-04-10 23:22:08 +00:00
|
|
|
(ENV.compiler == :clang) ? ENV.Og : ENV.O2
|
|
|
|
end
|
2011-10-24 09:02:15 +00:00
|
|
|
|
|
|
|
# OSX has CoreAudio, but ALSA is not for this OS nor is SAM9407 nor ULTRA.
|
2012-04-10 23:22:08 +00:00
|
|
|
args = %W[
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--disable-alsa
|
|
|
|
--disable-sam9407
|
|
|
|
--disable-ultra
|
|
|
|
]
|
2012-08-13 00:02:43 +00:00
|
|
|
args << '--with-debug' if build.include? 'with-debug'
|
2012-02-22 04:48:36 +00:00
|
|
|
mkdir 'macbuild' do
|
2011-10-24 09:02:15 +00:00
|
|
|
system "../configure", *args
|
|
|
|
system "make install"
|
|
|
|
end
|
2009-10-21 03:11:35 +00:00
|
|
|
end
|
2012-09-02 08:04:12 +00:00
|
|
|
|
|
|
|
def test
|
|
|
|
system "#{bin}/libmikmod-config", "--version"
|
|
|
|
end
|
2009-10-21 03:11:35 +00:00
|
|
|
end
|