class FileRoller < Formula desc "GNOME archive manager" homepage "https://wiki.gnome.org/Apps/FileRoller" url "https://download.gnome.org/sources/file-roller/3.32/file-roller-3.32.0.tar.xz" sha256 "03283027f1b9747c5fc5747eb672e0c155023c7fd74bec7b8faeb7b7b071a7c5" bottle do sha256 "6f2475abf43f50f6f7eb5706ba15477dc9b335f319a66694d026ae5f7bc84cd7" => :mojave sha256 "710ca33e691bfb0baf8cb7c8f1e80c34ff878e4e2a2351770add0775efb32a35" => :high_sierra sha256 "32e05b664c7348b1dbf2ea95a7ac61e1fc148fd91aaef463ec83ee30b72e3cd1" => :sierra end depends_on "itstool" => :build depends_on "meson" => :build depends_on "ninja" => :build depends_on "pkg-config" => :build depends_on "python" => :build depends_on "adwaita-icon-theme" depends_on "gtk+3" depends_on "hicolor-icon-theme" depends_on "json-glib" depends_on "libarchive" depends_on "libmagic" def install ENV.append "CFLAGS", "-I#{Formula["libmagic"].opt_include}" ENV.append "LIBS", "-L#{Formula["libmagic"].opt_lib}" # stop meson_post_install.py from doing what needs to be done in the post_install step ENV["DESTDIR"] = "" mkdir "build" do system "meson", "--prefix=#{prefix}", "-Dpackagekit=false", ".." system "ninja" system "ninja", "install" 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 system bin/"file-roller", "--help" end end