class GsettingsDesktopSchemas < Formula desc "GSettings schemas for desktop components" homepage "https://download.gnome.org/sources/gsettings-desktop-schemas/" url "https://download.gnome.org/sources/gsettings-desktop-schemas/3.24/gsettings-desktop-schemas-3.24.0.tar.xz" sha256 "f6573a3f661d22ff8a001cc2421d8647717f1c0e697e342d03c6102f29bbbb90" bottle do cellar :any_skip_relocation sha256 "b8a7f888ffff66f3f5806659a1bd0e91517ab95a12c439d0ec9551067e41ae72" => :sierra sha256 "b8a7f888ffff66f3f5806659a1bd0e91517ab95a12c439d0ec9551067e41ae72" => :el_capitan sha256 "b8a7f888ffff66f3f5806659a1bd0e91517ab95a12c439d0ec9551067e41ae72" => :yosemite end depends_on "pkg-config" => :build depends_on "intltool" => :build depends_on "gobject-introspection" => :build depends_on "glib" depends_on "gettext" depends_on "libffi" depends_on "python" if MacOS.version <= :mavericks def install system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}", "--disable-schemas-compile", "--enable-introspection=yes" system "make", "install" end def post_install # manual schema compile step system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas" end test do (testpath/"test.c").write <<-EOS.undent #include int main(int argc, char *argv[]) { return 0; } EOS system ENV.cc, "-I#{HOMEBREW_PREFIX}/include/gsettings-desktop-schemas", "test.c", "-o", "test" system "./test" end end