50 lines
1.6 KiB
Ruby
50 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
|
|
revision 1
|
|
sha1 "33d70492c8466fdefc361d85d7b9a0e2767ba2fa" => :yosemite
|
|
sha1 "e9693dff8761210d2f3855374451aad5106464cd" => :mavericks
|
|
sha1 "3ab66b5c8dd911d46d9796d63659dfe8ae76e3c9" => :mountain_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
|