forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
harfbuzz.rb
57 lines (51 loc) · 1.84 KB
/
harfbuzz.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
class Harfbuzz < Formula
desc "OpenType text shaping engine"
homepage "https://github.com/harfbuzz/harfbuzz"
url "https://github.com/harfbuzz/harfbuzz/archive/2.8.0.tar.gz"
sha256 "9444358d1d8c1884c3a25b02fe702bd244172c4fdd2e98f5a165bc0987ef34f6"
license "MIT"
revision 1
head "https://github.com/harfbuzz/harfbuzz.git"
bottle do
sha256 cellar: :any, arm64_big_sur: "d48cb4c08e239ac3ed692a1b250ee72ea453333636a5e6e27e2e3e491bd05eb0"
sha256 cellar: :any, big_sur: "e3178e18336e268c4f9e466427beb9004e8b75e265409ffb0c83c3e06f170ca6"
sha256 cellar: :any, catalina: "0b0222167471cb1bd9f0be23a837f410b97ea712d553ba96120f1dcc066a4c6b"
sha256 cellar: :any, mojave: "f67653f523872ddd3b344afd3b1d9ec7109c0c0660e39444012938e084163098"
end
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "cairo"
depends_on "freetype"
depends_on "glib"
depends_on "gobject-introspection"
depends_on "graphite2"
depends_on "icu4c"
resource "ttf" do
url "https://github.com/harfbuzz/harfbuzz/raw/fc0daafab0336b847ac14682e581a8838f36a0bf/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf"
sha256 "9535d35dab9e002963eef56757c46881f6b3d3b27db24eefcc80929781856c77"
end
def install
args = %w[
--default-library=both
-Dcairo=enabled
-Dcoretext=enabled
-Dfreetype=enabled
-Dglib=enabled
-Dgobject=enabled
-Dgraphite=enabled
-Dicu=enabled
-Dintrospection=enabled
]
mkdir "build" do
system "meson", *std_meson_args, *args, ".."
system "ninja"
system "ninja", "install"
end
end
test do
resource("ttf").stage do
shape = `echo 'സ്റ്റ്' | #{bin}/hb-shape 270b89df543a7e48e206a2d830c0e10e5265c630.ttf`.chomp
assert_equal "[glyph201=0+1183|U0D4D=0+0]", shape
end
end
end