homebrew-core/Formula/evince.rb
2017-07-22 04:06:18 -07:00

56 lines
2.3 KiB
Ruby

class Evince < Formula
desc "GNOME document viewer"
homepage "https://wiki.gnome.org/Apps/Evince"
url "https://download.gnome.org/sources/evince/3.24/evince-3.24.1.tar.xz"
sha256 "9ca0c5213407b37be55fddb04a85d9301b692c4412c5920319d975403bff0f37"
bottle do
sha256 "4cbb7f508c87d1ef3ba4b27baca1b4353b1ae74ae2ca582522328b0e84583fc1" => :sierra
sha256 "c32de417ba33dd67c695a9f264f8ea8611f4afe7ebcda603b2f93b3b8eb8882f" => :el_capitan
sha256 "b9c3d3453757830baaff3e0f77045527ca9e6c80e4f76d20ce1c1d3adc417119" => :yosemite
end
depends_on "pkg-config" => :build
depends_on "intltool" => :build
depends_on "itstool" => :build
depends_on "poppler"
depends_on "libxml2"
depends_on "gtk+3"
depends_on "hicolor-icon-theme"
depends_on "gnome-icon-theme"
depends_on "libsecret"
depends_on "libspectre"
depends_on "gobject-introspection"
depends_on "shared-mime-info"
depends_on "djvulibre"
depends_on :python if MacOS.version <= :snow_leopard
def install
# forces use of gtk3-update-icon-cache instead of gtk-update-icon-cache. No bugreport should
# be filed for this since it only occurs because Homebrew renames gtk+3's gtk-update-icon-cache
# to gtk3-update-icon-cache in order to avoid a collision between gtk+ and gtk+3.
inreplace "data/Makefile.in", "gtk-update-icon-cache", "gtk3-update-icon-cache"
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--disable-nautilus",
"--disable-schemas-compile",
"--enable-introspection",
"--enable-djvu",
"--disable-browser-plugin"
ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].opt_lib}/python2.7/site-packages"
system "make", "install"
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"
system "#{Formula["shared-mime-info"].opt_bin}/update-mime-database", "#{HOMEBREW_PREFIX}/share/mime"
end
test do
assert_match version.to_s, shell_output("#{bin}/evince --version")
end
end