class Tectonic < Formula desc "Modernized, complete, self-contained TeX/LaTeX engine" homepage "https://tectonic-typesetting.github.io/" url "https://github.com/tectonic-typesetting/tectonic/archive/v0.1.11.tar.gz" sha256 "e700dc691dfd092adfe098b716992136343ddfac5eaabb1e8cfae4e63f8454c7" revision 3 bottle do cellar :any rebuild 1 sha256 "f0ca20c3fb6590fc243d4d10b4c7441f0f9f2db02dc094bcc6b79f9b00021712" => :catalina sha256 "444c5e60329bda85226028b831b300c46620fc7ffb398767bd55e657dc13b8c7" => :mojave sha256 "73e06f54020a87762d6126205d26c7d50d216e3cbdb3778ed0828d32a89ef032" => :high_sierra end depends_on "pkg-config" => :build depends_on "rust" => :build depends_on "freetype" depends_on "graphite2" depends_on "harfbuzz" depends_on "icu4c" depends_on "libpng" depends_on "openssl@1.1" def install ENV.cxx11 ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version # needed for CLT-only builds # Ensure that the `openssl` crate picks up the intended library. # https://crates.io/crates/openssl#manual-configuration ENV["OPENSSL_DIR"] = Formula["openssl@1.1"].opt_prefix system "cargo", "install", "--locked", "--root", prefix, "--path", "." end test do (testpath/"test.tex").write 'Hello, World!\bye' system bin/"tectonic", "-o", testpath, "--format", "plain", testpath/"test.tex" assert_predicate testpath/"test.pdf", :exist?, "Failed to create test.pdf" assert_match "PDF document", shell_output("file test.pdf") end end