homebrew-core/Formula/evince.rb

68 lines
1.9 KiB
Ruby

class Evince < Formula
desc "GNOME document viewer"
homepage "https://wiki.gnome.org/Apps/Evince"
url "https://download.gnome.org/sources/evince/3.38/evince-3.38.1.tar.xz"
sha256 "00f6d6689cc22de3c005bd87d4c2ebf720064cb8dc6a1887816f8b7e082b2e63"
license "GPL-2.0-or-later"
livecheck do
url :stable
end
bottle do
sha256 "d933c0ca5a4093c159cc5ca792399650da74f0064ee23fd9aa5e09bcca8ec373" => :big_sur
sha256 "4a439a49655288679024251e580de7fbfd34ccaf1a075c0f4eb66279d5139128" => :arm64_big_sur
sha256 "9ad3478e5b27d2d513875c107dd9823947df4d4258678da7a4ce7c4da7812558" => :catalina
sha256 "b9f92de5c2032ebcea7ab7d4f1a70a2b4f15fa2cd3db57e483a5e3ed4986fe99" => :mojave
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.9"
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
-Dps=enabled
]
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