58 lines
1.8 KiB
Ruby
58 lines
1.8 KiB
Ruby
class Harfbuzz < Formula
|
|
desc "OpenType text shaping engine"
|
|
homepage "https://github.com/harfbuzz/harfbuzz"
|
|
url "https://github.com/harfbuzz/harfbuzz/archive/2.7.4.tar.gz"
|
|
sha256 "daff8a4003ac420a8550760ed303ce33b310c8ea17b7f15b307d1969cabcebcb"
|
|
license "MIT"
|
|
revision 1
|
|
head "https://github.com/harfbuzz/harfbuzz.git"
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "768bce735b26da9066463737bc21d6a309a854ae3b5d75fef3c06dd3fa4bc8f7"
|
|
sha256 cellar: :any, big_sur: "bc10664f8ad0182d37c11d5126c42c8a4d93169841debdb137ce2b1f6384a1d8"
|
|
sha256 cellar: :any, catalina: "9144906c46cc32dacfd8bc130f85ce5490d71548afd91177501eae5184ab35a8"
|
|
sha256 cellar: :any, mojave: "cfc349a24722526b838118c095a62526258e4fdf96a09ce248e75b291bd96b51"
|
|
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
|