homebrew-core/Formula/evince.rb

66 lines
1.8 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.0.tar.xz"
sha256 "26df897a417545b476d2606b14731122e84278ae994bd64ea535449c3cf01948"
license "GPL-2.0-or-later"
livecheck do
url :stable
end
bottle do
sha256 "d0442852daaaef0262801cab22f7e1f616058647fb3733114930927dd0401f6b" => :catalina
sha256 "a5b52193d61577a52bd7e4a17cacbcddcdbaeb2e6ca068d36c718a124c0ab125" => :mojave
sha256 "c63530ee5313d7b05f23cc550d31428dd97c3bb29f14bed72d70f965fe3c3d84" => :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