require "formula" class Libvisio < Formula homepage "https://wiki.documentfoundation.org/DLP/Libraries/libvisio" url "http://dev-www.libreoffice.org/src/libvisio/libvisio-0.1.0.tar.xz" sha1 "c82e5c7ad25e513c268032cda9febd01b8879504" revision 3 bottle do cellar :any sha1 "1b23f312ce3dece38c7ee05eba21c6d294de58dd" => :mavericks sha1 "5aa48d33eb3dae9f982ca850a07656512c83b292" => :mountain_lion sha1 "2ffaa6fb2dcf469aaf47fdf23d71700f4432fd5b" => :lion end depends_on "pkg-config" => :build depends_on "boost" => :build depends_on "libwpd" depends_on "libwpg" depends_on "icu4c" depends_on "librevenge" def install system "./configure", "--without-docs", "-disable-dependency-tracking", "--enable-static=no", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.cpp").write <<-EOS.undent #include #include int main() { librevenge::RVNGStringStream docStream(0, 0); libvisio::VisioDocument::isSupported(&docStream); return 0; } EOS system ENV.cxx, "test.cpp", "-o", "test", "-lrevenge-stream-0.0", "-I#{Formula["librevenge"].include}/librevenge-0.0", "-L#{Formula["librevenge"].lib}", "-lvisio-0.1", "-I#{include}/libvisio-0.1", "-L#{lib}" system "./test" end end