From 1c1bde9587ee87891bfb60ad509a85d872a7793c Mon Sep 17 00:00:00 2001 From: Yue Liu Date: Mon, 23 Jun 2014 20:05:53 -0700 Subject: [PATCH] add libmspub 0.1.0 --- Formula/libmspub.rb | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Formula/libmspub.rb diff --git a/Formula/libmspub.rb b/Formula/libmspub.rb new file mode 100644 index 00000000000..166f78140ce --- /dev/null +++ b/Formula/libmspub.rb @@ -0,0 +1,43 @@ +require "formula" + +class Libmspub < Formula + homepage "http://www.freedesktop.org/wiki/Software/libmspub/" + url "http://dev-www.libreoffice.org/src/libmspub-0.1.0.tar.bz2" + sha1 "4dc9b9c85cb1c30dde071a88edf40a629b6de666" + + bottle do + end + + depends_on "pkg-config" => :build + depends_on "boost" => :build + depends_on "libwpg" => :build + depends_on "libwpd" + depends_on "icu4c" + depends_on "librevenge" + + def install + system "./configure", "--without-docs", + "--disable-dependency-tracking", + "--enable-static=no", + "--disable-werror", + "--disable-tests", + "--prefix=#{prefix}" + system "make", "install" + end + + test do + (testpath/"test.cpp").write <<-EOS.undent + #include + #include + int main() { + librevenge::RVNGStringStream docStream(0, 0); + libmspub::MSPUBDocument::isSupported(&docStream); + return 0; + } + EOS + system ENV.cxx, "test.cpp", "-o", "test", "-lrevenge-stream-0.0", + "-I#{Formula["librevenge"].include}/librevenge-0.0", + "-lmspub-0.1", "-I#{include}/libmspub-0.1" + system "./test" + end +end