homebrew-core/Formula/libmspub.rb

51 lines
1.6 KiB
Ruby
Raw Normal View History

2014-06-24 03:05:53 +00:00
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
2014-06-24 03:05:53 +00:00
bottle do
cellar :any
2014-10-21 13:18:18 +00:00
revision 1
sha1 "33d70492c8466fdefc361d85d7b9a0e2767ba2fa" => :yosemite
sha1 "e9693dff8761210d2f3855374451aad5106464cd" => :mavericks
sha1 "3ab66b5c8dd911d46d9796d63659dfe8ae76e3c9" => :mountain_lion
2014-06-24 03:05:53 +00:00
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}"
2014-06-24 03:05:53 +00:00
system "./test"
end
end