homebrew-core/Formula/batik.rb
Alexander Bayandin ae6ddec546 Fix font path for Catalina ()
* batik: fix test for macOS Catalina

* go-statik: fix test for macOS Catalina

* ttf2eot: fix test for macOS Catalina

* lcdf-typetools: fix test for macOS Catalina
2019-10-19 10:44:43 +02:00

22 lines
882 B
Ruby

class Batik < Formula
desc "Java-based toolkit for SVG images"
homepage "https://xmlgraphics.apache.org/batik/"
url "https://www.apache.org/dist/xmlgraphics/batik/binaries/batik-bin-1.11.tar.gz"
sha256 "ba84f10c52e5471ddde1a1db8b2af9a056b31fd600dea803150fe9567b7426d1"
bottle :unneeded
def install
libexec.install "lib", Dir["*.jar"]
bin.write_jar_script libexec/"batik-rasterizer-#{version}.jar", "batik-rasterizer"
bin.write_jar_script libexec/"batik-#{version}.jar", "batik"
bin.write_jar_script libexec/"batik-ttf2svg-#{version}.jar", "batik-ttf2svg"
end
test do
font_name = (MacOS.version >= :catalina) ? "Arial Unicode.ttf" : "Arial.ttf"
system bin/"batik-ttf2svg", "/Library/Fonts/#{font_name}", "-autorange",
"-o", "Arial.svg", "-testcard"
assert_match "abcdefghijklmnopqrstuvwxyz", File.read("Arial.svg")
end
end