class Libmspub < Formula desc "Interpret and import Microsoft Publisher content" homepage "https://wiki.documentfoundation.org/DLP/Libraries/libmspub" url "http://dev-www.libreoffice.org/src/libmspub/libmspub-0.1.2.tar.xz" sha256 "b0baabf82d20c08ad000e80fa02154ce2f2ffde1ee60240d6e3a917c3b35560f" revision 3 bottle do cellar :any sha256 "2fa83a87abedbf2f84e070226e29f64f45311bde9a020d5ccb3d8d9ebd13b430" => :sierra sha256 "82895a9776c26b2dcce5a13604fcfae3334f99db51fd676e1e015e01fdc192f8" => :el_capitan sha256 "8b8e0c35baf4f9f2c8c7c4e2d381fa69e211ef39648a93912245ece1ad70e827" => :yosemite end depends_on "pkg-config" => :build depends_on "boost" => :build depends_on "libwpg" => :build depends_on "libwpd" depends_on "icu4c" depends_on "librevenge" def install system "./configure", "--without-docs", "--disable-dependency-tracking", "--enable-static=no", "--disable-werror", "--disable-tests", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.cpp").write <<-EOS.undent #include #include int main() { librevenge::RVNGStringStream docStream(0, 0); libmspub::MSPUBDocument::isSupported(&docStream); return 0; } EOS system ENV.cxx, "test.cpp", "-o", "test", "-lrevenge-stream-0.0", "-I#{Formula["librevenge"].include}/librevenge-0.0", "-lmspub-0.1", "-I#{include}/libmspub-0.1", "-L#{lib}", "-L#{Formula["librevenge"].lib}" system "./test" end end