55 lines
2.4 KiB
Ruby
55 lines
2.4 KiB
Ruby
class Evince < Formula
|
|
desc "GNOME document viewer"
|
|
homepage "https://wiki.gnome.org/Apps/Evince"
|
|
url "https://download.gnome.org/sources/evince/3.20/evince-3.20.1.tar.xz"
|
|
sha256 "fc7ac23036939c24f02e9fed6dd6e28a85b4b00b60fa4b591b86443251d20055"
|
|
|
|
bottle do
|
|
sha256 "5fc0afcbb58e4a64c5c4075610f22f6acff6dd62d86b3dc5bf754cd48f440f19" => :el_capitan
|
|
sha256 "0b99ed070eafbaf115b09c6382e9c4d85115056e4d8c7c4b9fcef5a193d05004" => :yosemite
|
|
sha256 "c8fb40e626420261e73dfddda4da797747855645efce1705adc598c172c92154" => :mavericks
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "intltool" => :build
|
|
depends_on "itstool" => :build
|
|
depends_on "poppler"
|
|
depends_on "libxml2" => "with-python"
|
|
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
|