2015-06-27 13:54:02 +00:00
|
|
|
class Graphite2 < Formula
|
|
|
|
desc "Smart font renderer for non-Roman scripts"
|
2015-07-04 12:43:18 +00:00
|
|
|
homepage "https://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_home"
|
2015-09-20 16:19:58 +00:00
|
|
|
url "https://downloads.sourceforge.net/project/silgraphite/graphite2/graphite2-1.3.2.tgz"
|
|
|
|
sha256 "97af064ff07828f8724b5a9c27d63e2df5aef69a742f0f67cc3f68c3f15d3850"
|
2015-06-27 13:54:02 +00:00
|
|
|
|
2015-06-28 08:48:24 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-09-20 22:13:05 +00:00
|
|
|
sha256 "aa87e2ced68634547500aa30334e3bd8168e13ec296f15852e456309c5998e47" => :el_capitan
|
|
|
|
sha256 "878420245b08827cceec2cb59c4763237ce60d1111d2419d142270cfd6402207" => :yosemite
|
|
|
|
sha256 "f1e3f1b646503b549dd04faa92a151134b37c484aa174395ebf01074b68238b2" => :mavericks
|
2015-06-28 08:48:24 +00:00
|
|
|
end
|
|
|
|
|
2015-06-27 13:54:02 +00:00
|
|
|
depends_on "cmake" => :build
|
|
|
|
|
|
|
|
resource "testfont" do
|
2015-07-04 12:43:18 +00:00
|
|
|
url "https://scripts.sil.org/pub/woff/fonts/Simple-Graphite-Font.ttf"
|
2015-06-27 13:54:02 +00:00
|
|
|
sha256 "7e573896bbb40088b3a8490f83d6828fb0fd0920ac4ccdfdd7edb804e852186a"
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2015-07-04 11:39:35 +00:00
|
|
|
system "cmake", *std_cmake_args
|
2015-06-27 13:54:02 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
resource("testfont").stage do
|
2015-07-04 11:39:35 +00:00
|
|
|
shape = shell_output("#{bin}/gr2fonttest Simple-Graphite-Font.ttf 'abcde'")
|
2015-06-27 13:54:02 +00:00
|
|
|
assert_match /67.*36.*37.*38.*71/m, shape
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|