class Libodfgen < Formula homepage "http://sourceforge.net/p/libwpd/wiki/libodfgen/" url "http://dev-www.libreoffice.org/src/libodfgen-0.1.3.tar.bz2" mirror "https://downloads.sourceforge.net/project/libwpd/libodfgen/libodfgen-0.1.3/libodfgen-0.1.3.tar.bz2" sha1 "f726a1811bc78c12b28995d1bff2561e820667ea" bottle do cellar :any sha1 "ad5415189434aad9adb7611fc5da37aeb364ac0e" => :yosemite sha1 "8d363b8a40520295190f6b27837348310dadc264" => :mavericks sha1 "bf1050d243bee37249b6944b447326b3cc275c7f" => :mountain_lion end depends_on "pkg-config" => :build depends_on "boost" => :build depends_on "libwpg" => :build depends_on "libetonyek" => :build depends_on "libwpd" depends_on "librevenge" def install system "./configure", "--without-docs", "--disable-dependency-tracking", "--enable-static=no", "--with-sharedptr=boost", "--disable-werror", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.cpp").write <<-EOS.undent #include int main() { return ODF_FLAT_XML; } EOS system ENV.cxx, "test.cpp", "-o", "test", "-lrevenge-0.0", "-I#{Formula["librevenge"].include}/librevenge-0.0", "-L#{Formula["librevenge"].lib}", "-lodfgen-0.1", "-I#{include}/libodfgen-0.1", "-L#{lib}" system "./test" end end