forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcollada-dom.rb
43 lines (36 loc) · 1.3 KB
/
collada-dom.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class ColladaDom < Formula
desc "C++ library for loading and saving COLLADA data"
homepage "https://www.khronos.org/collada/wiki/Portal:COLLADA_DOM"
url "https://github.com/rdiankov/collada-dom/archive/v2.5.0.tar.gz"
sha256 "3be672407a7aef60b64ce4b39704b32816b0b28f61ebffd4fbd02c8012901e0d"
head "https://github.com/rdiankov/collada-dom.git"
bottle do
sha256 "67da6177f67deeba4a08cc0648766856f647eb54ca9cfdf8fd61a2e665330614" => :mojave
sha256 "a88714bbcd001a475d4222407031997af3cb34fe6214352a562021770a09a560" => :high_sierra
sha256 "69a6c5f038f7d622130b272ac2c3b35beffb11b5ab0c4b080de422b68ebd7466" => :sierra
end
depends_on "cmake" => :build
depends_on "boost"
depends_on "pcre"
def install
system "cmake", ".", *std_cmake_args
system "make", "install"
end
test do
(testpath/"test.cpp").write <<~EOS
#include <iostream>
#include <dae.h>
#include <dae/daeDom.h>
using namespace std;
int main()
{
cout << GetCOLLADA_VERSION() << endl;
return 0;
}
EOS
system ENV.cxx, "test.cpp", "-I#{include}/collada-dom2.5",
"-L#{lib}", "-lcollada-dom2.5-dp", "-o", "test"
# This is the DAE file version, not the package version
assert_equal "1.5.0", shell_output("./test").chomp
end
end