homebrew-core/Formula/evince.rb

61 lines
1.7 KiB
Ruby

class Evince < Formula
desc "GNOME document viewer"
homepage "https://wiki.gnome.org/Apps/Evince"
url "https://download.gnome.org/sources/evince/3.36/evince-3.36.7.tar.xz"
sha256 "65d61a423e3fbbe07001f65e87422dfb7d2e42b9edf0ca6a1d427af9a04b8f32"
bottle do
sha256 "17282bdbdd4cd149f0c579ac15dd14f5702ae8331292363d01b20393e5cb0642" => :catalina
sha256 "d0337e37036d3b03fbb3b75e154d1860481a4a23d5a30232c6bb1191964123c8" => :mojave
sha256 "900f826de55376ab0b39514eb9b83030ea4ea0201d0b7a6a1722477d16c4e0b7" => :high_sierra
end
depends_on "gobject-introspection" => :build
depends_on "itstool" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "adwaita-icon-theme"
depends_on "djvulibre"
depends_on "gspell"
depends_on "gtk+3"
depends_on "hicolor-icon-theme"
depends_on "libarchive"
depends_on "libgxps"
depends_on "libsecret"
depends_on "libspectre"
depends_on "poppler"
depends_on "python@3.8"
def install
ENV["DESTDIR"] = "/"
args = %w[
-Dnautilus=false
-Ddjvu=enabled
-Dgxps=enabled
-Dcomics=enabled
-Dgtk_doc=false
-Dintrospection=true
-Dbrowser_plugin=false
-Dgspell=enabled
-Ddbus=false
]
mkdir "build" do
system "meson", *std_meson_args, *args, ".."
system "ninja", "-v"
system "ninja", "install", "-v"
end
end
def post_install
system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas"
system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/hicolor"
end
test do
assert_match version.to_s, shell_output("#{bin}/evince --version")
end
end