homebrew-core/Formula/libvisio.rb
2016-04-10 23:02:30 -04:00

49 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.3.tar.xz"
sha256 "943e03b1e6c969af4c2133a6671c9630adf3aaf8d460156744a28f58c9f47cd8"
revision 1
bottle do
cellar :any
sha256 "a9ef7b2ac1d7873b9c879c42a7454ff752c5c2ef4e7a23606583ebda16dbd794" => :el_capitan
sha256 "95f0b0f81bff5bb91978bb2599869fdd435e78abda6bd56933d28fc03a11de45" => :yosemite
sha256 "a5e3178d3edbe400b534236897bd148daecdf5dd2e05939a4a87445927773ce7" => :mavericks
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