From 071da798fb2bb67273f3199a41c2b6bf7623297c Mon Sep 17 00:00:00 2001 From: Nicolas Ojeda Bar Date: Thu, 21 Aug 2014 15:57:12 +0100 Subject: csfml 2.0 (new formula) CSFML are the C bindings to the SFML library (already present in Homebrew). --- Library/Formula/csfml.rb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Library/Formula/csfml.rb (limited to 'Library/Formula') 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 + + 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 -- cgit v1.2.3