2014-06-24 03:05:53 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Libmspub < Formula
|
2014-07-25 14:23:38 +00:00
|
|
|
homepage "https://wiki.documentfoundation.org/DLP/Libraries/libmspub"
|
2014-08-08 04:12:11 +00:00
|
|
|
url "http://dev-www.libreoffice.org/src/libmspub/libmspub-0.1.1.tar.bz2"
|
|
|
|
sha1 "0a6743a07ee3393bd4437a8bbee12fa62c9cd0f4"
|
2014-06-24 03:05:53 +00:00
|
|
|
|
|
|
|
bottle do
|
2014-06-24 04:01:23 +00:00
|
|
|
cellar :any
|
2014-08-08 04:12:13 +00:00
|
|
|
sha1 "25a8271a146caaa1074ee71599f8e0b6baf5d81e" => :mavericks
|
|
|
|
sha1 "ce8627de1435ad221b4f631f48999ec260278eee" => :mountain_lion
|
|
|
|
sha1 "7096aed5efd72e4cfae1f383e51402745fd2e0a2" => :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"
|
|
|
|
system "./test"
|
|
|
|
end
|
|
|
|
end
|