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 "9b7a178feffab5ce04d86c137cafc8496ae92a75237fcaa6b8320d970a49e83a" => :sierra
|
|
sha256 "cb4eae9b3069fc6c0e48b4b9512a6cc28498fac761cb87f1077511435df65517" => :el_capitan
|
|
sha256 "2037a9e05ee6321e43868992cd23611d15e44cca649f0a3b26da96b2327b3d9d" => :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
|