aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorPierre Pagnoux2014-07-24 17:16:48 +0200
committerMike McQuaid2014-07-25 10:56:55 +0100
commitd721cc8acbe6885a73b7ef77fe342506f8a0324c (patch)
tree14e6102cc443500cf17a376298496fba537b488b /Library/Formula
parente7ebdbe173f5bfb33e275c4ba26269a2b82e9bc3 (diff)
downloadhomebrew-d721cc8acbe6885a73b7ef77fe342506f8a0324c.tar.bz2
ocamlsdl 0.9.1 (new formula)
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/ocamlsdl.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/Library/Formula/ocamlsdl.rb b/Library/Formula/ocamlsdl.rb
new file mode 100644
index 000000000..8f968e4c2
--- /dev/null
+++ b/Library/Formula/ocamlsdl.rb
@@ -0,0 +1,32 @@
+require "formula"
+
+class Ocamlsdl < Formula
+ homepage "http://ocamlsdl.sourceforge.net/"
+ url "https://downloads.sourceforge.net/project/ocamlsdl/OCamlSDL/ocamlsdl-0.9.1/ocamlsdl-0.9.1.tar.gz"
+ sha1 "2e54f8984b06cede493c3ad29006dde17077a79a"
+
+ depends_on "sdl"
+ depends_on "sdl_mixer" => :recommended
+ depends_on "sdl_image" => :recommended
+ depends_on "sdl_gfx" => :recommended
+ depends_on "sdl_ttf" => :recommended
+ depends_on "objective-caml"
+
+ def install
+ system "./configure", "--prefix=#{prefix}",
+ "OCAMLLIB=#{lib}/ocaml"
+ system "make"
+ system "make", "install"
+ end
+
+ test do
+ (testpath/'test.ml').write <<-EOS.undent
+ let main () =
+ Sdl.init [`VIDEO];
+ Sdl.quit ()
+
+ let _ = main ()
+ EOS
+ system "ocamlopt", "-I", "+sdl", "sdl.cmxa", "-cclib", "-lSDLmain", "-cclib", "-lSDL", "-cclib", "-Wl,-framework,Cocoa", "-o", "test" "test.ml"
+ end
+end