47 lines
1.7 KiB
Ruby
47 lines
1.7 KiB
Ruby
class Libvisio < Formula
|
|
desc "Interpret and import Visio diagrams"
|
|
homepage "https://wiki.documentfoundation.org/DLP/Libraries/libvisio"
|
|
url "https://dev-www.libreoffice.org/src/libvisio/libvisio-0.1.7.tar.xz"
|
|
sha256 "8faf8df870cb27b09a787a1959d6c646faa44d0d8ab151883df408b7166bea4c"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "eceb874ef98ff8e83b1459b946c4a5d2da805107555e31c4b9b6421fa6afcfa5" => :mojave
|
|
sha256 "21bf0ad3a0c856356491eec3eed8ed9daf739089597ce4649183bd0be4255266" => :high_sierra
|
|
sha256 "12f6114e5d146f54b3faba8015ac5d85b94a72b52898b975145d410aa7bb49db" => :sierra
|
|
end
|
|
|
|
depends_on "cppunit" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "boost"
|
|
depends_on "icu4c"
|
|
depends_on "librevenge"
|
|
|
|
def install
|
|
# Needed for Boost 1.59.0 compatibility.
|
|
ENV["LDFLAGS"] = "-lboost_system-mt"
|
|
system "./configure", "--without-docs",
|
|
"-disable-dependency-tracking",
|
|
"--enable-static=no",
|
|
"--prefix=#{prefix}"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.cpp").write <<~EOS
|
|
#include <librevenge-stream/librevenge-stream.h>
|
|
#include <libvisio/VisioDocument.h>
|
|
int main() {
|
|
librevenge::RVNGStringStream docStream(0, 0);
|
|
libvisio::VisioDocument::isSupported(&docStream);
|
|
return 0;
|
|
}
|
|
EOS
|
|
system ENV.cxx, "test.cpp", "-o", "test",
|
|
"-lrevenge-stream-0.0",
|
|
"-I#{Formula["librevenge"].include}/librevenge-0.0",
|
|
"-L#{Formula["librevenge"].lib}",
|
|
"-lvisio-0.1", "-I#{include}/libvisio-0.1", "-L#{lib}"
|
|
system "./test"
|
|
end
|
|
end
|