class GnomeLatex < Formula desc "LaTeX editor for the GNOME desktop" homepage "https://wiki.gnome.org/Apps/LaTeXila" url "https://download.gnome.org/sources/gnome-latex/3.28/gnome-latex-3.28.1.tar.xz" sha256 "02105e81765388faa9f75ccb43b745b1d66bfb14285b7855e6a7809e7f0c88fc" bottle do sha256 "94cc5026043f41ccac969a6e4c5e259e96405465c4654df3cfd9cf8e97f6892f" => :high_sierra sha256 "a9646fd5e5ac309ef2af60789f3c8330daadf4b2fbd6ad1e5ae49356b4f38f53" => :sierra sha256 "d3df93df2ad267d89548b43f1cf02833e60bc2e6cfeb00d04388e890046e47b3" => :el_capitan end depends_on "gobject-introspection" => :build depends_on "pkg-config" => :build depends_on "vala" => :build depends_on "intltool" => :build depends_on "itstool" => :build depends_on "gspell" depends_on "tepl" depends_on "libgee" depends_on "adwaita-icon-theme" depends_on "gnome-themes-standard" => :optional def install system "./configure", "--disable-schemas-compile", "--disable-dependency-tracking", "--disable-silent-rules", "--disable-dconf-migration", "--prefix=#{prefix}" 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" # HighContrast is provided by gnome-themes-standard if File.file?("#{HOMEBREW_PREFIX}/share/icons/HighContrast/.icon-theme.cache") system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "-f", "-t", "#{HOMEBREW_PREFIX}/share/icons/HighContrast" end end test do system "#{bin}/gnome-latex", "--version" end end