51 lines
1.8 KiB
Ruby
51 lines
1.8 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.1.tar.xz"
|
|
sha256 "4b510168d1465516fdf6e57c01e2f9eae1fc0ae232c74e44e70693bbc49227f1"
|
|
revision 1
|
|
|
|
bottle do
|
|
cellar :any
|
|
revision 1
|
|
sha256 "2b0803a0c889ba87abcea5ec42c10a13be208d74a459cd4a6ada1a7bc1149f9e" => :el_capitan
|
|
sha256 "19f8c12acccb86b9bffa3c1f1022f956f2c8d49f534e69a328dc6c866fdf3aca" => :yosemite
|
|
sha256 "3388c3405f0bd5f4e015e5ff3c4af6a279fbb82a52bce1d358631f5cc763433c" => :mavericks
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "boost" => :build
|
|
depends_on "cppunit" => :build
|
|
depends_on "libwpd"
|
|
depends_on "libwpg"
|
|
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.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
|