homebrew-core/Formula/libcdr.rb
2018-03-29 16:33:09 +10:00

45 lines
1.5 KiB
Ruby

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 3
bottle do
cellar :any
sha256 "3cb56137892fdd15220df4225fae028f5d09bda8b1f3e4164a326404509c87db" => :high_sierra
sha256 "7778cd1cce4897263fad056d66957ed0a65150776ce917c4dc4559768a74b25c" => :sierra
sha256 "3a1e6bac1528350a5367037c45d273d8cb8b975b5396fd18ade67f75d2b24d77" => :el_capitan
end
depends_on "pkg-config" => :build
depends_on "cppunit" => :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 <libcdr/libcdr.h>
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