2011-11-07 04:04:44 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Mdxmini < Formula
|
|
|
|
homepage 'http://clogging.web.fc2.com/psp/'
|
2013-03-29 20:29:20 +00:00
|
|
|
url 'https://github.com/BouKiCHi/mdxplayer/archive/9afbc01f60a12052817cb14a81a8c3c976953506.tar.gz'
|
2013-01-16 05:09:33 +00:00
|
|
|
version '20130115'
|
2013-03-29 20:29:20 +00:00
|
|
|
sha1 '8ca3b597f009ee7de697329e26b9f3c402dda173'
|
2011-11-07 04:04:44 +00:00
|
|
|
|
2012-08-26 06:08:00 +00:00
|
|
|
option "lib-only", "Do not build commandline player"
|
2011-11-07 04:04:44 +00:00
|
|
|
|
2012-08-26 06:08:00 +00:00
|
|
|
depends_on 'sdl' unless build.include? "lib-only"
|
2011-11-07 04:04:44 +00:00
|
|
|
|
|
|
|
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
|
2012-08-26 06:08:00 +00:00
|
|
|
if build.include? "lib-only"
|
2012-02-21 06:04:21 +00:00
|
|
|
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-08-26 06:08:00 +00:00
|
|
|
bin.install "mdxplay" unless build.include? "lib-only"
|
2012-02-21 06:04:21 +00:00
|
|
|
lib.install "libmdxmini.a", "libmdxmini.dylib"
|
|
|
|
(include+'libmdxmini').install Dir['src/*.h']
|
|
|
|
end
|
2011-11-07 04:04:44 +00:00
|
|
|
end
|
|
|
|
end
|