aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorYue Liu2014-06-10 21:23:07 -0700
committerMike McQuaid2014-06-22 08:26:51 +0100
commit25e098694c39bf559c0c77c8edad27f90128c4ab (patch)
treef4aa044ff97b58f2dac8e751d1f29f56e2bbf584 /Library/Formula
parentdd6d1f3a9783b8bd9bc6659607ae71722745dd1e (diff)
downloadhomebrew-25e098694c39bf559c0c77c8edad27f90128c4ab.tar.bz2
add libvisio 0.1.0
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/libvisio.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/Library/Formula/libvisio.rb b/Library/Formula/libvisio.rb
new file mode 100644
index 000000000..4b9939e5b
--- /dev/null
+++ b/Library/Formula/libvisio.rb
@@ -0,0 +1,38 @@
+require "formula"
+
+class Libvisio < Formula
+ homepage "http://www.freedesktop.org/wiki/Software/libvisio/"
+ url "http://dev-www.libreoffice.org/src/libvisio-0.1.0.tar.xz"
+ sha1 "c82e5c7ad25e513c268032cda9febd01b8879504"
+
+ 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",
+ "-lvisio-0.1", "-I#{Formula["libvisio"].include}/libvisio-0.1"
+ system "./test"
+ end
+end