55 lines
1.9 KiB
Ruby
55 lines
1.9 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"
|
|
license "MPL-2.0"
|
|
revision 8
|
|
|
|
livecheck do
|
|
url "https://dev-www.libreoffice.org/src/"
|
|
regex(/href=["']?libmspub[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "3195885cb49f812356a0abefe1b5510ded44227b1ed81aaa2b0528de4ee801d9" => :catalina
|
|
sha256 "129b2e788cd9253e464272dbb8db2609832fbc26e473ec1a50d2ba6407ae6fd1" => :mojave
|
|
sha256 "8fc4879c42cf295f2651cb4a91f7c51582fa8fe50ebbaffc3998dd2c534840fe" => :high_sierra
|
|
end
|
|
|
|
depends_on "boost" => :build
|
|
depends_on "libwpg" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "icu4c"
|
|
depends_on "librevenge"
|
|
depends_on "libwpd"
|
|
|
|
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
|