-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbx.rb
34 lines (26 loc) · 835 Bytes
/
bx.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
class Bx < Formula
homepage "https://github.com/bkaradzic/bx"
head "https://github.com/bkaradzic/bx.git", :using => :git
depends_on "make" => :build
def install
# Deparallelize
ENV.deparallelize
# Make target directories
bin.mkdir
lib.mkdir
include.mkdir
(include/"bx").mkdir
(include/"compat").mkdir
(include/"tinystl").mkdir
# Build project
system "gmake", "test", "tools"
# Install include files
(include/"bx").install Dir["include/bx/*"]
(include/"compat").install Dir["include/compat/*"]
(include/"tinystl").install Dir["include/tinystl/*"]
# Copy build artifacts
artifacts = buildpath/".build/osx64_clang/bin/"
cp artifacts/"bin2cRelease", bin/"bin2c"
cp artifacts/"libbxRelease.a", lib/"libbx.a"
end
end