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 5 bottle do cellar :any sha256 "b63f7fac692b74414a2cfd969aa94588b045670410498e2e6a70b30b93a9ff86" => :mojave sha256 "2fb5cbb2d220b32b8c939d766ad3176ea81e90fea8ae77edceaf46a36188726c" => :high_sierra sha256 "8b949db079ea7f9f4657d1cc6355843062580831b5dd0b408cb51747c25e3535" => :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