49 lines
1.7 KiB
Ruby
49 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"
|
|
revision 2
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "a32916487b500b927b22b2e3cbd0f3ec5de65a56dd5306472ee6dc09080c7a38" => :catalina
|
|
sha256 "2866289c378dcf276526de732f830dff28d1dbb12eb690209140e987b6bf2f10" => :mojave
|
|
sha256 "793fa03c334b4faea7b94c2b4e2992b40070358a94914272a119c411060baabd" => :high_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
|