homebrew-core/Formula/mupdf.rb

28 lines
752 B
Ruby
Raw Normal View History

2017-01-25 10:24:17 +00:00
class Mupdf < Formula
desc "Lightweight PDF and XPS viewer"
homepage "https://mupdf.com"
url "https://mupdf.com/downloads/mupdf-1.10a-source.tar.gz"
sha256 "aacc1f36b9180f562022ef1ab3439b009369d944364f3cff8a2a898834e3a836"
depends_on :macos => :snow_leopard
depends_on :x11
depends_on "openssl"
conflicts_with "mupdf-tools",
:because => "mupdf and mupdf-tools install the same binaries."
def install
system "make", "install",
"build=release",
"verbose=yes",
"CC=#{ENV.cc}",
"prefix=#{prefix}"
bin.install_symlink "mutool" => "mudraw"
end
test do
pdf = test_fixtures("test.pdf")
assert_match /Homebrew test/, shell_output("#{bin}/mudraw -F txt #{pdf}")
end
end