63 lines
1.9 KiB
Ruby
63 lines
1.9 KiB
Ruby
class Harfbuzz < Formula
|
|
desc "OpenType text shaping engine"
|
|
homepage "https://wiki.freedesktop.org/www/Software/HarfBuzz/"
|
|
url "https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-2.4.0.tar.bz2"
|
|
sha256 "b470eff9dd5b596edf078596b46a1f83c179449f051a469430afc15869db336f"
|
|
|
|
bottle do
|
|
cellar :any
|
|
rebuild 1
|
|
sha256 "bbb8ea12fd5704bbdcb7267439b59b08efa78ad0b7427ae86a5607e27269817f" => :mojave
|
|
sha256 "b589483aeb00f9687709c1460e6cc3fc80a55425884fdf8155ba76980e749c70" => :high_sierra
|
|
sha256 "6baeaade4ced9e77a2ba173cf55a999560ebe932ea9458b2c231ea5622c8272d" => :sierra
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/behdad/harfbuzz.git"
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
depends_on "ragel" => :build
|
|
end
|
|
|
|
depends_on "gobject-introspection" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "cairo"
|
|
depends_on "freetype"
|
|
depends_on "glib"
|
|
depends_on "graphite2"
|
|
depends_on "icu4c"
|
|
|
|
resource "ttf" do
|
|
url "https://github.com/behdad/harfbuzz/raw/fc0daafab0336b847ac14682e581a8838f36a0bf/test/shaping/fonts/sha1sum/270b89df543a7e48e206a2d830c0e10e5265c630.ttf"
|
|
sha256 "9535d35dab9e002963eef56757c46881f6b3d3b27db24eefcc80929781856c77"
|
|
end
|
|
|
|
def install
|
|
args = %W[
|
|
--disable-dependency-tracking
|
|
--prefix=#{prefix}
|
|
--enable-introspection=yes
|
|
--enable-static
|
|
--with-cairo=yes
|
|
--with-coretext=yes
|
|
--with-freetype=yes
|
|
--with-glib=yes
|
|
--with-gobject=yes
|
|
--with-graphite2=yes
|
|
--with-icu=yes
|
|
]
|
|
|
|
system "./autogen.sh" if build.head?
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
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
|