homebrew-core/Formula/file-roller.rb
2016-05-12 16:15:45 -07:00

58 lines
2.3 KiB
Ruby

class FileRoller < Formula
desc "GNOME archive manager"
homepage "https://wiki.gnome.org/Apps/FileRoller"
url "https://download.gnome.org/sources/file-roller/3.20/file-roller-3.20.2.tar.xz"
sha256 "93188a7ac9285cb85551c327082aeaeb51ac39a9722cb96b0e29d5ec2ae353c6"
bottle do
sha256 "c3a021b0f45d4a9f15ba04761fa9789bbec8b47ae2ee5501316003ce5a756451" => :el_capitan
sha256 "3c85ae1f3273a240c1ac4963b41f4807db644523e6df0a444c33e8a18d4b5549" => :yosemite
sha256 "7955d920d08916cb076e4e26d75f475d2e6b93f7d225ba435a377cba562e4046" => :mavericks
end
depends_on "pkg-config" => :build
depends_on "intltool" => :build
depends_on "itstool" => :build
depends_on "libxml2" => ["with-python", :build]
depends_on "gtk+3"
depends_on "json-glib"
depends_on "libmagic"
depends_on "libarchive"
depends_on "hicolor-icon-theme"
depends_on "gnome-icon-theme"
# Add linked-library dependencies
depends_on "atk"
depends_on "cairo"
depends_on "gdk-pixbuf"
depends_on "gettext"
depends_on "glib"
depends_on "pango"
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"
ENV.append "CFLAGS", "-I#{Formula["libmagic"].opt_include}"
ENV.append "LIBS", "-L#{Formula["libmagic"].opt_lib}"
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--disable-schemas-compile",
"--disable-packagekit",
"--enable-magic"
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"
end
test do
assert_match version.to_s, shell_output("#{bin}/file-roller --version 2>&1")
end
end