aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Dunn2015-04-23 22:21:54 -0700
committerMike McQuaid2015-04-24 18:25:59 +0100
commit6fed44973a12744fd7762baf7e3ee9f028b3f511 (patch)
tree61da9be506a5f2b20372a39401e067ee6588877e
parent9b53e2d22bece7d382499ef84f63c1c729db28cd (diff)
downloadhomebrew-6fed44973a12744fd7762baf7e3ee9f028b3f511.tar.bz2
glm 0.9.6.3
Closes #38994. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/glm.rb40
1 files changed, 36 insertions, 4 deletions
diff --git a/Library/Formula/glm.rb b/Library/Formula/glm.rb
index bf7d66d0f..d7e7c99aa 100644
--- a/Library/Formula/glm.rb
+++ b/Library/Formula/glm.rb
@@ -1,12 +1,44 @@
-require "formula"
-
class Glm < Formula
homepage "http://glm.g-truc.net/"
- url "https://downloads.sourceforge.net/project/ogl-math/glm-0.9.6.1/glm-0.9.6.1.zip"
- sha1 "9ce9ee54eebed923416ae8269e7afb9aa7e75b46"
+ url "https://mirrors.kernel.org/debian/pool/main/g/glm/glm_0.9.6.3.orig.tar.xz"
+ mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/g/glm/glm_0.9.6.3.orig.tar.xz"
+ sha256 "f9ab688bd6af1e0c454d887e1f5506518f2530d195ce057d96be1a769d42dfbb"
+
head "https://github.com/g-truc/glm.git"
+ option "with-doxygen", "Build documentation"
+ depends_on "doxygen" => [:build, :optional]
+
def install
include.install "glm"
+
+ if build.with? "doxygen"
+ cd "doc" do
+ system "doxygen", "man.doxy"
+ man.install "html"
+ end
+ end
+ doc.install Dir["doc/*"]
+ end
+
+ test do
+ (testpath/"test.cpp").write <<-EOS.undent
+ #include <glm/vec2.hpp>// glm::vec2
+ int main()
+ {
+ std::size_t const VertexCount = 4;
+ std::size_t const PositionSizeF32 = VertexCount * sizeof(glm::vec2);
+ glm::vec2 const PositionDataF32[VertexCount] =
+ {
+ glm::vec2(-1.0f,-1.0f),
+ glm::vec2( 1.0f,-1.0f),
+ glm::vec2( 1.0f, 1.0f),
+ glm::vec2(-1.0f, 1.0f)
+ };
+ return 0;
+ }
+ EOS
+ system ENV.cxx, "-I#{include}", testpath/"test.cpp", "-o", "test"
+ system "./test"
end
end