2014-08-21 14:57:12 +00:00
|
|
|
class Csfml < Formula
|
2015-05-19 07:21:19 +00:00
|
|
|
# Don't update CSFML until there's a corresponding SFML release
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "SMFL bindings for C"
|
2014-08-21 14:57:12 +00:00
|
|
|
homepage "http://www.sfml-dev.org/"
|
2015-05-19 07:21:19 +00:00
|
|
|
url "https://github.com/SFML/CSFML/archive/2.3.tar.gz"
|
|
|
|
sha256 "ba8f5529fd264c2778844a8b1bb71ede7e902bbd6841275c344dc488ce7054cd"
|
|
|
|
|
|
|
|
head "https://github.com/SFML/CSFML.git"
|
2015-05-12 04:46:15 +00:00
|
|
|
|
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-05-25 20:55:24 +00:00
|
|
|
sha256 "0f080fd2c809a1c22ba10aee92ccc34b201458e98de3b8c973cdf9fa99d8cf3e" => :yosemite
|
|
|
|
sha256 "32e3cd01b497a73fb7d918841e4df0e980811270d92626d6399e47fae8291ea6" => :mavericks
|
|
|
|
sha256 "afbda33ded196a5dd39ecc68627e6fb6db156ec7a67f71fb16a6d6cb4cd40531" => :mountain_lion
|
2015-05-12 04:46:15 +00:00
|
|
|
end
|
2014-08-21 14:57:12 +00:00
|
|
|
|
|
|
|
depends_on "cmake" => :build
|
|
|
|
depends_on "sfml"
|
|
|
|
|
|
|
|
def install
|
2015-03-24 20:19:38 +00:00
|
|
|
system "cmake", ".", "-DCMAKE_MODULE_PATH=#{Formula["sfml"].share}/SFML/cmake/Modules/", *std_cmake_args
|
2014-08-21 14:57:12 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2014-08-30 07:16:04 +00:00
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
2014-08-21 14:57:12 +00:00
|
|
|
#include <SFML/Window.h>
|
|
|
|
|
|
|
|
int main (void)
|
|
|
|
{
|
|
|
|
sfWindow * w = sfWindow_create (sfVideoMode_getDesktopMode (), "Test", 0, NULL);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
2014-08-30 07:16:04 +00:00
|
|
|
system ENV.cc, "test.c", "-lcsfml-window", "-o", "test"
|
|
|
|
system "./test"
|
2014-08-21 14:57:12 +00:00
|
|
|
end
|
|
|
|
end
|