48 lines
1.7 KiB
Ruby
48 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.6.tar.xz"
|
|
sha256 "fe1002d3671d53c09bc65e47ec948ec7b67e6fb112ed1cd10966e211a8bb50f9"
|
|
revision 4
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "9c0a1efadd14b528b227c78e156ca1bb73fa7f3bd17ae4a5be8ec393a6ff2109" => :high_sierra
|
|
sha256 "ca50d80acd651fc9ed48dbe8849f9cb9b9746eadd4d7f73fb5f402ed8a3d1a7d" => :sierra
|
|
sha256 "c2132d94aceadaa37f518681b517e656b42ad6134476cc2b76862c4ec41c55a4" => :el_capitan
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "cppunit" => :build
|
|
depends_on "boost"
|
|
depends_on "librevenge"
|
|
depends_on "icu4c"
|
|
|
|
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
|