28 lines
752 B
Ruby
28 lines
752 B
Ruby
|
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
|