2011-11-07 04:04:44 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Mdxmini < Formula
|
|
|
|
homepage 'http://clogging.web.fc2.com/psp/'
|
2012-02-21 06:04:21 +00:00
|
|
|
url 'https://github.com/BouKiCHi/mdxplayer/tarball/3e60c12666cd4fb5fe17bc0651ff883bd54644ad'
|
2011-11-07 04:04:44 +00:00
|
|
|
version '20111115'
|
2012-02-21 06:04:21 +00:00
|
|
|
md5 '80a3f96dbe84c19bf7e2042e7b8e819a'
|
2011-11-07 04:04:44 +00:00
|
|
|
|
|
|
|
depends_on 'sdl' unless ARGV.include? "--lib-only"
|
|
|
|
|
|
|
|
def options
|
2012-02-21 06:04:21 +00:00
|
|
|
[["--lib-only", "Do not build commandline player"]]
|
2011-11-07 04:04:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2012-02-21 06:04:21 +00:00
|
|
|
cd "jni/mdxmini" do
|
|
|
|
# Specify Homebrew's cc
|
|
|
|
inreplace "mak/general.mak", "gcc", ENV.cc
|
|
|
|
if ARGV.include? "--lib-only"
|
|
|
|
system "make -f Makefile.lib"
|
|
|
|
else
|
|
|
|
system "make"
|
|
|
|
end
|
2011-11-07 04:04:44 +00:00
|
|
|
|
2012-02-21 06:04:21 +00:00
|
|
|
# Makefile doesn't build a dylib
|
|
|
|
system "#{ENV.cc} -dynamiclib -install_name #{lib}/libmdxmini.dylib -o libmdxmini.dylib -undefined dynamic_lookup obj/*.o"
|
2011-11-07 04:04:44 +00:00
|
|
|
|
2012-02-21 06:04:21 +00:00
|
|
|
bin.install "mdxplay" unless ARGV.include? "--lib-only"
|
|
|
|
lib.install "libmdxmini.a", "libmdxmini.dylib"
|
|
|
|
(include+'libmdxmini').install Dir['src/*.h']
|
|
|
|
end
|
2011-11-07 04:04:44 +00:00
|
|
|
end
|
|
|
|
end
|