class Goffice < Formula desc "Gnumeric spreadsheet program" homepage "https://developer.gnome.org/goffice/" url "https://download.gnome.org/sources/goffice/0.10/goffice-0.10.43.tar.xz" sha256 "550fceefa74622b8fe57dd0b030003e31db50edf7f87068ff5e146365108b64e" bottle do rebuild 1 sha256 "3aa7ce0a18a158cf827c10c522d2e9763871cfd8356fa1f8c510ff5b1ddb0388" => :mojave sha256 "eba0611c7b574b806fe4be80e3301c55d4f57bfb05cc42ff3cc1371dc1d7be71" => :high_sierra sha256 "52e5c5738c9a59056e0d016e04f27ac2fdc26a1cff375ea98eccd99573690e9d" => :sierra sha256 "ca9f9afa31c7bcde1d87c20a33cfb773499f94d8da43ced4dc89b628c4d336d2" => :el_capitan end head do url "https://github.com/GNOME/goffice.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "gtk-doc" => :build depends_on "libtool" => :build end depends_on "intltool" => :build depends_on "pkg-config" => :build depends_on "atk" depends_on "cairo" depends_on "gdk-pixbuf" depends_on "gettext" depends_on "gtk+3" depends_on "libgsf" depends_on "librsvg" depends_on "pango" depends_on "pcre" def install args = %W[--disable-dependency-tracking --prefix=#{prefix}] if build.head? system "./autogen.sh", *args else system "./configure", *args end system "make", "install" end test do (testpath/"test.c").write <<~EOS #include int main() { void libgoffice_init (void); void libgoffice_shutdown (void); return 0; } EOS system ENV.cc, "-I#{include}/libgoffice-0.10", "-I#{Formula["glib"].opt_include}/glib-2.0", "-I#{Formula["glib"].opt_lib}/glib-2.0/include", "-I#{Formula["libgsf"].opt_include}/libgsf-1", "-I#{MacOS.sdk_path}/usr/include/libxml2", "-I#{Formula["gtk+3"].opt_include}/gtk-3.0", "-I#{Formula["pango"].opt_include}/pango-1.0", "-I#{Formula["cairo"].opt_include}/cairo", "-I#{Formula["gdk-pixbuf"].opt_include}/gdk-pixbuf-2.0", "-I#{Formula["atk"].opt_include}/atk-1.0", testpath/"test.c", "-o", testpath/"test" system "./test" end end