aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorprotomouse2014-12-17 17:05:18 +0100
committerMisty De Meo2014-12-17 08:53:55 -0800
commit240bdae05a244da1f08f4e9dbc6ec28976e1691a (patch)
tree37cff3368dd0badf20357b6e5c28a07208afd335 /Library
parent217f927452a5ff9454d5f0efa57f1eff1cacdd3a (diff)
downloadhomebrew-240bdae05a244da1f08f4e9dbc6ec28976e1691a.tar.bz2
game-music-emu 0.6.0 (new formula)
Closes #35057. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library')
l---------Library/Aliases/libgme1
-rw-r--r--Library/Formula/game-music-emu.rb40
2 files changed, 41 insertions, 0 deletions
diff --git a/Library/Aliases/libgme b/Library/Aliases/libgme
new file mode 120000
index 000000000..29eea7e17
--- /dev/null
+++ b/Library/Aliases/libgme
@@ -0,0 +1 @@
+../Formula/game-music-emu.rb \ No newline at end of file
diff --git a/Library/Formula/game-music-emu.rb b/Library/Formula/game-music-emu.rb
new file mode 100644
index 000000000..655df8d81
--- /dev/null
+++ b/Library/Formula/game-music-emu.rb
@@ -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