libcdr 0.1.0

This commit is contained in:
luzpaz 2014-07-27 13:20:24 -05:00 committed by Mike McQuaid
parent 5554f0d665
commit 08bfea4ef6

34
Formula/libcdr.rb Normal file
View file

@ -0,0 +1,34 @@
require "formula"
class Libcdr < Formula
homepage "https://wiki.documentfoundation.org/DLP/Libraries/libcdr"
url "http://dev-www.libreoffice.org/src/libcdr/libcdr-0.1.0.tar.bz2"
sha1 "fea63690acea2b9eac5dc6f51232154b7bb41a9e"
depends_on "pkg-config" => :build
depends_on "boost" => :build
depends_on "icu4c"
depends_on "librevenge"
depends_on "little-cms2"
needs :cxx11
def install
ENV.libcxx
ENV.cxx11
system "./configure", "--disable-werror",
"--without-docs"
system "make", "install"
end
test do
(testpath/'test.cpp').write <<-EOS.undent
#include <libcdr/libcdr.h>
int main() {
libcdr::CDRDocument::isSupported(0);
}
EOS
system ENV.cxx, "test.cpp", "-I#{Formula["librevenge"].include}/librevenge-0.0", "-I#{HOMEBREW_PREFIX}/include/libcdr-0.1", "-lcdr-0.1"
end
end