aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2015-04-04 11:44:53 -0700
committerMisty De Meo2015-04-04 12:00:47 -0700
commitbb1c396af11d05c828610262917e9140d03a3ac4 (patch)
tree14471d2834f507b22c6df4d2fb072678e39b53b5 /Library
parent7e5e8fb15a4543fb67ada88150c7cdc961eee003 (diff)
downloadhomebrew-bb1c396af11d05c828610262917e9140d03a3ac4.tar.bz2
libxmp 4.3.8
Closes #38367. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/libxmp.rb41
1 files changed, 39 insertions, 2 deletions
diff --git a/Library/Formula/libxmp.rb b/Library/Formula/libxmp.rb
index 0664a2ff1..6f150288a 100644
--- a/Library/Formula/libxmp.rb
+++ b/Library/Formula/libxmp.rb
@@ -1,7 +1,7 @@
class Libxmp < Formula
homepage "http://xmp.sourceforge.net"
- url "https://downloads.sourceforge.net/project/xmp/libxmp/4.3.6/libxmp-4.3.6.tar.gz"
- sha256 "9894456dd3a8cea9b77de084c29f7cbb6ec16fd4d0005389913e8b205c02b750"
+ url "https://downloads.sourceforge.net/project/xmp/libxmp/4.3.8/libxmp-4.3.8.tar.gz"
+ sha256 "de9a25b5f28e5f82010ade423bb63adc6ad235c2aeca4b7433ec5d0a43020640"
bottle do
cellar :any
@@ -10,6 +10,13 @@ class Libxmp < Formula
sha256 "615b556b2c0cb26f624c483db529a29add9cfe44ec168a562d90705a09af9d7d" => :mountain_lion
end
+ # CC BY-NC-ND licensed set of five mods by Keith Baylis/Vim! for testing purposes
+ # Mods from Mod Soul Brother: http://web.archive.org/web/20120215215707/http://www.mono211.com/modsoulbrother/vim.html
+ resource "demo_mods" do
+ url "https://files.scene.org/get:us-http/mirrors/modsoulbrother/vim/vim-best-of.zip"
+ sha256 "df8fca29ba116b10485ad4908cea518e0f688850b2117b75355ed1f1db31f580"
+ end
+
head do
url "git://git.code.sf.net/p/xmp/libxmp"
depends_on "autoconf" => :build
@@ -19,5 +26,35 @@ class Libxmp < Formula
system "autoconf" if build.head?
system "./configure", "--prefix=#{prefix}"
system "make install"
+
+ (share/"libxmp").install resource("demo_mods")
+ end
+
+ test do
+ test_mod = share/"libxmp/give-me-an-om.mod"
+ (testpath/"libxmp_test.c").write <<-EOS.undent
+ #include <stdio.h>
+ #include "xmp.h"
+
+ int main(int argc, char** argv)
+ {
+ char* mod = argv[1];
+ xmp_context context;
+ struct xmp_module_info mi;
+
+ context = xmp_create_context();
+ if (xmp_load_module(context, mod) != 0) {
+ puts("libxmp failed to open module!");
+ return 1;
+ }
+
+ xmp_get_module_info(context, &mi);
+ puts(mi.mod->name);
+ return 0;
+ }
+ EOS
+
+ system ENV.cc, "libxmp_test.c", "-lxmp", "-o", "libxmp_test"
+ assert_equal "give me an om", shell_output("\"#{testpath}/libxmp_test\" #{test_mod}").chomp
end
end