class Libgsf < Formula desc "I/O abstraction library for dealing with structured file formats" homepage "https://developer.gnome.org/gsf/" url "https://download.gnome.org/sources/libgsf/1.14/libgsf-1.14.39.tar.xz" sha256 "3dcfc911438bf6fae5fe842e85a9ac14324d85165bd4035caad4a4420f15a175" bottle do sha256 "647281d341d045cedf55357436788f862e24120c748b4343c9a823edf82a1c19" => :el_capitan sha256 "8e046694d581d5c7e1eb95aa5d571757bf0b5e2805c9c2ddd535dc8d97b1f633" => :yosemite sha256 "037559afa276bf735a3b9aff0e8f416e7a351955b964ee4fd82979d8ebc2428a" => :mavericks end head do url "https://github.com/GNOME/libgsf.git" depends_on "automake" => :build depends_on "autoconf" => :build depends_on "gnome-common" => :build depends_on "gtk-doc" => :build depends_on "libtool" => :build end depends_on "pkg-config" => :build depends_on "intltool" => :build depends_on "gdk-pixbuf" => :optional depends_on "gettext" depends_on "glib" 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 system bin/"gsf", "--help" (testpath/"test.c").write <<-EOS.undent #include int main() { void gsf_init (void); return 0; } EOS system ENV.cc, "-I#{include}/libgsf-1", "-I#{Formula["glib"].opt_include}/glib-2.0", "-I#{Formula["glib"].opt_lib}/glib-2.0/include", testpath/"test.c", "-o", testpath/"test" system "./test" end end