homebrew-core/Formula/libvisio.rb
kbinani bded2577f6 libvisio: fix test failure.
Closes Homebrew/homebrew#32198.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-09-10 00:07:10 -05:00

48 lines
1.5 KiB
Ruby

require "formula"
class Libvisio < Formula
homepage "https://wiki.documentfoundation.org/DLP/Libraries/libvisio"
url "http://dev-www.libreoffice.org/src/libvisio/libvisio-0.1.0.tar.xz"
sha1 "c82e5c7ad25e513c268032cda9febd01b8879504"
revision 2
bottle do
cellar :any
sha1 "bdfcdedd23af956b9368d2efcdcdd3a3c2ae149e" => :mavericks
sha1 "f91823c71abf65d1badc48ea249f21d6f85b9e88" => :mountain_lion
sha1 "6aec36a1622a98013865c6d3292eb4999fdccee5" => :lion
end
depends_on "pkg-config" => :build
depends_on "boost" => :build
depends_on "libwpd"
depends_on "libwpg"
depends_on "icu4c"
depends_on "librevenge"
def install
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