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 "http://dev-www.libreoffice.org/src/libvisio/libvisio-0.1.5.tar.xz"
|
|
sha256 "430a067903660bb1b97daf4b045e408a1bb75ca45e615cf05fb1a4da65fc5a8c"
|
|
revision 1
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "6758550321b373a6f5018327056dc7cbd1a95449dfc197ad395cfcd8d2be2d2f" => :sierra
|
|
sha256 "d4e7de0a1de6eba7f69f12ad13713e8454290c225d94d66f29f560ee3a249baa" => :el_capitan
|
|
sha256 "345c4c4cd79ca0d4aa98bd9af2f21e5e445e1c1e9e6a95e9f0b9b4f941623f5a" => :yosemite
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "boost" => :build
|
|
depends_on "cppunit" => :build
|
|
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.undent
|
|
#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
|