homebrew-core/Formula/libmspub.rb
2017-08-12 21:18:34 -07:00

48 lines
1.7 KiB
Ruby

class Libmspub < Formula
desc "Interpret and import Microsoft Publisher content"
homepage "https://wiki.documentfoundation.org/DLP/Libraries/libmspub"
url "https://dev-www.libreoffice.org/src/libmspub/libmspub-0.1.2.tar.xz"
sha256 "b0baabf82d20c08ad000e80fa02154ce2f2ffde1ee60240d6e3a917c3b35560f"
revision 5
bottle do
cellar :any
sha256 "667954cf7d852f4db33db4f1bb0cc38a620e5450bae1fc278da95ba2d0f51f2e" => :sierra
sha256 "1d40e6c8b2f62691dca7761ecb97b15a3bce8f3e8638b3df05057e61d063cfc7" => :el_capitan
sha256 "6e9c31fdf773518e58be86f562f1a39dde473c29c5fcdb0263fec08bf64f22a7" => :yosemite
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