forked from ziz/homebrew-games
-
Notifications
You must be signed in to change notification settings - Fork 0
/
c10t.rb
39 lines (33 loc) · 1.34 KB
/
c10t.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
require "formula"
class C10t < Formula
homepage "https://github.com/udoprog/c10t"
url "https://github.com/udoprog/c10t/archive/1.7.tar.gz"
sha1 "1419b0abd42b05c82cde39d02b4ffce1e77265d1"
depends_on "cmake" => :build
depends_on "boost"
depends_on "freetype"
# Needed to compile against newer boost
# Can be removed for next version of c10t after 1.7
# See: https://github.com/udoprog/c10t/pull/153
patch do
url "https://github.com/udoprog/c10t/commit/4a392b9f06d08c70290f4c7591e84ecdbc73d902.diff"
sha1 "e528aef909138a596ae0c7a48e84593b816a27f0"
end
# Fix freetype detection; adapted from this upstream commit:
# https://github.com/udoprog/c10t/commit/2a2b8e49d7ed4e51421cc71463c1c2404adc6ab1
patch do
url "https://gist.githubusercontent.com/mistydemeo/f7ab02089c43dd557ef4/raw/a0ae7974e635b8ebfd02e314cfca9aa8dc95029d/c10t-freetype.diff"
sha1 "088ba840b8f636aae62fd70cc32b963fedadf233"
end
# Ensure zlib header is included for libpng; fixed upstream
patch do
url "https://github.com/udoprog/c10t/commit/800977bb23e6b4f9da3ac850ac15dd216ece0cda.diff"
sha1 "706fc266f7ba064c3414f3ab6fef90301386cff0"
end
def install
inreplace "test/CMakeLists.txt", "boost_unit_test_framework", "boost_unit_test_framework-mt"
system "cmake", ".", *std_cmake_args
system "make"
bin.install "c10t"
end
end