49 lines
1.8 KiB
Ruby
49 lines
1.8 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.4.tar.xz"
|
|
sha256 "ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba"
|
|
revision 2
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "8db32d56cbf7fc562024580618868a70d9d4e90301de35ffe74db4d0ba12491f" => :mojave
|
|
sha256 "3a5055e8ff1f55de6c79d4793767aa3c881a4ee25f662850801db1db56e289aa" => :high_sierra
|
|
sha256 "2b2f16add39ca5bdbb26a2698513757eddc711ed2330e197258a8d94fccc04f3" => :sierra
|
|
sha256 "77d32faa735ab867c48b947a83c9cf12ba3bbe747e0c94c43615d721a94b8d2d" => :el_capitan
|
|
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
|
|
#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
|