homebrew-core/Formula/libmspub.rb
2014-10-16 10:03:41 +01:00

49 lines
1.6 KiB
Ruby

require "formula"
class Libmspub < Formula
homepage "https://wiki.documentfoundation.org/DLP/Libraries/libmspub"
url "http://dev-www.libreoffice.org/src/libmspub/libmspub-0.1.1.tar.bz2"
sha1 "0a6743a07ee3393bd4437a8bbee12fa62c9cd0f4"
revision 1
bottle do
cellar :any
sha1 "d68c4429528e006a76a44936f4295bb3846759c2" => :mavericks
sha1 "dd9ce8854f4970534bcfb618bb8e67294976a104" => :mountain_lion
sha1 "1a2a88cf22beb35af91dfe0d89966817d5a861b3" => :lion
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 <librevenge-stream/librevenge-stream.h>
#include <libmspub/MSPUBDocument.h>
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",
"-L#{lib}", "-L#{Formula["librevenge"].lib}"
system "./test"
end
end