diff options
| author | heppstux | 2014-09-29 16:55:12 +0200 |
|---|---|---|
| committer | Jack Nagel | 2014-12-13 18:18:33 -0500 |
| commit | 74d9e46e6a048fc4c43bf59577766fcbecc9c450 (patch) | |
| tree | a933c554304b79000b28ba7f62bc2e5c7ba00f28 | |
| parent | 71904da614e6c0ba7fc98a85fb0848fc4e6964d8 (diff) | |
| download | homebrew-74d9e46e6a048fc4c43bf59577766fcbecc9c450.tar.bz2 | |
New formula: glbinding
Closes #32786.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Formula/glbinding.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Library/Formula/glbinding.rb b/Library/Formula/glbinding.rb new file mode 100644 index 000000000..825840848 --- /dev/null +++ b/Library/Formula/glbinding.rb @@ -0,0 +1,31 @@ +require "formula" + +class Glbinding < Formula + homepage "https://github.com/hpicgs/glbinding" + url "https://github.com/hpicgs/glbinding/archive/v1.0.2.tar.gz" + sha1 "19d6d143bd4106582af4c197e882222e86323820" + + depends_on "cmake" => :build + needs :cxx11 + + def install + ENV.cxx11 + system "cmake", ".", *std_cmake_args + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<-EOS.undent + #include <glbinding/gl/gl.h> + #include <glbinding/Binding.h> + int main(void) + { + glbinding::Binding::initialize(); + } + EOS + system ENV.cxx, "-o", "test", "test.cpp", "-std=c++11", "-stdlib=libc++", + "-I#{include}/glbinding", "-I#{lib}/glbinding", + "-lglbinding", *ENV.cflags.to_s.split + system "./test" + end +end |
