class Gtranslator < Formula desc "GNOME gettext PO file editor" homepage "https://wiki.gnome.org/Design/Apps/Translator" url "https://download.gnome.org/sources/gtranslator/3.32/gtranslator-3.32.1.tar.xz" sha256 "e1b37b0436684eb3079916eff7b6eeac2cd51ebbf8d2d6f35b5480ca0391b4da" bottle do sha256 "2cb0295073c0f1df175ed5b550b5f72ace147baaea33ac1057fb55df6a850bce" => :mojave sha256 "3947995fc4be8630abc393b5e2a10c93dc599fbd65a2fcf9bef3124d9750c8db" => :high_sierra sha256 "ac1903136af8f037d5a5c9bbd663d7d833adaf5b887471b72666681e88c237c2" => :sierra end depends_on "meson" => :build depends_on "ninja" => :build depends_on "pkg-config" => :build depends_on "python" => :build depends_on "adwaita-icon-theme" depends_on "glib" depends_on "gspell" depends_on "gtk+3" depends_on "gtksourceview4" depends_on "iso-codes" depends_on "itstool" depends_on "libgda" def install # 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}", ".." system "ninja", "-v" system "ninja", "install", "-v" 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}/gtranslator", "-h" end end