class FileRoller < Formula desc "GNOME archive manager" homepage "https://wiki.gnome.org/Apps/FileRoller" url "https://download.gnome.org/sources/file-roller/3.22/file-roller-3.22.1.tar.xz" sha256 "8106791dcecbd2ab64194f4aeb5cb709a15e9e0d28e6470528c7bf56969be552" bottle do sha256 "ffaef3125371d96b231e1eb6cf0cb36aabe8e874ecc121bae47bceafd9877e21" => :sierra sha256 "cf20b7712a5c21e0d4be366b12c3fb98f6f08ad472608596676faa9050c77d9a" => :el_capitan sha256 "22f435f69cbe6f112cce25429b8beb5037c7837eb364c0b8a866b7c80a3a6872" => :yosemite 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 system bin/"file-roller", "--help" end end