aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorNicolas Ojeda Bar2014-08-21 15:57:12 +0100
committerMike McQuaid2014-08-30 08:14:29 +0100
commit071da798fb2bb67273f3199a41c2b6bf7623297c (patch)
tree206eca42109429b6a87615e9b0f7de4508c4325b /Library
parent07e3d2005605a138b382eee7c7d36eaf380c4f0c (diff)
downloadhomebrew-071da798fb2bb67273f3199a41c2b6bf7623297c.tar.bz2
csfml 2.0 (new formula)
CSFML are the C bindings to the SFML library (already present in Homebrew).
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/csfml.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/Library/Formula/csfml.rb b/Library/Formula/csfml.rb
new file mode 100644
index 000000000..714041388
--- /dev/null
+++ b/Library/Formula/csfml.rb
@@ -0,0 +1,30 @@
+require "formula"
+
+class Csfml < Formula
+ homepage "http://www.sfml-dev.org/"
+ url "http://www.sfml-dev.org/download/csfml/CSFML-2.0-sources.zip"
+ sha1 "6d831634a558593580296209af278322523f1e43"
+
+ depends_on "cmake" => :build
+ depends_on "sfml"
+
+ def install
+ cp_r "#{Formula["sfml"].share}/SFML/cmake/Modules/", "cmake"
+ system "cmake", ".", *std_cmake_args
+ system "make", "install"
+ end
+
+ test do
+ fixture = <<-EOS.undent
+ #include <SFML/Window.h>
+
+ int main (void)
+ {
+ sfWindow * w = sfWindow_create (sfVideoMode_getDesktopMode (), "Test", 0, NULL);
+ return 0;
+ }
+ EOS
+ (testpath/'test.c').write(fixture)
+ system ENV.cc, "-c", "test.c"
+ end
+end