class Libcdr < Formula desc "C++ library to parse the file format of CorelDRAW documents" homepage "https://wiki.documentfoundation.org/DLP/Libraries/libcdr" url "https://dev-www.libreoffice.org/src/libcdr/libcdr-0.1.4.tar.xz" sha256 "e7a7e8b00a3df5798110024d7061fe9d1c3330277d2e4fa9213294f966a4a66d" revision 6 bottle do cellar :any sha256 "147c5b5fe253d9c96f113e68712508c98cea69fe8247178b7fc055b95b63bbd1" => :mojave sha256 "79a6e391b298c963de1b416e4370ff21aa78ff29481800bc7b54dcbfbef2da6a" => :high_sierra sha256 "b2655d493d9ff07a3c454719c1be946e217f54f7f59c42e4a4c5cdeb7b4327a6" => :sierra end depends_on "cppunit" => :build depends_on "pkg-config" => :build depends_on "boost" depends_on "icu4c" depends_on "librevenge" depends_on "little-cms2" def install ENV.cxx11 # Needed for Boost 1.59.0 compatibility. ENV["LDFLAGS"] = "-lboost_system-mt" system "./configure", "--disable-werror", "--without-docs", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.cpp").write <<~EOS #include int main() { libcdr::CDRDocument::isSupported(0); } EOS system ENV.cxx, "test.cpp", "-o", "test", "-I#{Formula["librevenge"].include}/librevenge-0.0", "-I#{include}/libcdr-0.1", "-L#{lib}", "-lcdr-0.1" system "./test" end end