game-music-emu 0.6.0 (new formula)
Closes Homebrew/homebrew#35057. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
This commit is contained in:
parent
655fdbccbe
commit
8ff517e224
2 changed files with 41 additions and 0 deletions
1
Aliases/libgme
Symbolic link
1
Aliases/libgme
Symbolic link
|
@ -0,0 +1 @@
|
|||
../Formula/game-music-emu.rb
|
40
Formula/game-music-emu.rb
Normal file
40
Formula/game-music-emu.rb
Normal file
|
@ -0,0 +1,40 @@
|
|||
require "formula"
|
||||
|
||||
class GameMusicEmu < Formula
|
||||
homepage "https://code.google.com/p/game-music-emu/"
|
||||
url "https://game-music-emu.googlecode.com/files/game-music-emu-0.6.0.tar.bz2"
|
||||
sha1 "53f9af30dc1c8110135207c9ca35c1fa6716ddcf"
|
||||
|
||||
head "http://game-music-emu.googlecode.com/svn/trunk/"
|
||||
|
||||
depends_on "cmake" => :build
|
||||
|
||||
def install
|
||||
system "cmake", ".", *std_cmake_args
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<-EOS.undent
|
||||
#include <gme/gme.h>
|
||||
int main(void)
|
||||
{
|
||||
Music_Emu* emu;
|
||||
gme_err_t error;
|
||||
|
||||
error = gme_open_data((void*)0, 0, &emu, 44100);
|
||||
|
||||
if (error == gme_wrong_file_type) {
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
EOS
|
||||
|
||||
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}",
|
||||
"-lgme", "-o", "test", *ENV.cflags.to_s.split
|
||||
|
||||
system "./test"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue