2014-06-11 04:01:18 +00:00
|
|
|
require "formula"
|
2010-02-07 22:09:05 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libwpd < Formula
|
2014-06-15 16:19:19 +00:00
|
|
|
homepage "http://libwpd.sourceforge.net/"
|
2014-06-11 04:01:18 +00:00
|
|
|
url "http://dev-www.libreoffice.org/src/libwpd-0.10.0.tar.bz2"
|
|
|
|
sha1 "bbcc6e528a69492fb2b4bbb9a56d385a29efc4c4"
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2014-05-01 21:08:51 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-10-19 19:03:30 +00:00
|
|
|
revision 1
|
|
|
|
sha1 "5ee8b064986e9a93d7160000fed86631ec67ac5b" => :yosemite
|
|
|
|
sha1 "76609ba2ba73cf1fbb60e6de22c3eb7b73f61483" => :mavericks
|
|
|
|
sha1 "dfb25198b4294801aa9d5e8b5bca484291f7e19d" => :mountain_lion
|
2014-05-01 21:08:51 +00:00
|
|
|
end
|
|
|
|
|
2014-06-15 16:19:19 +00:00
|
|
|
depends_on "pkg-config" => :build
|
2010-02-07 22:09:05 +00:00
|
|
|
depends_on "glib"
|
|
|
|
depends_on "libgsf"
|
2014-06-11 04:01:18 +00:00
|
|
|
depends_on "librevenge"
|
2010-02-07 22:09:05 +00:00
|
|
|
|
|
|
|
def install
|
2012-07-29 14:55:52 +00:00
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
2014-06-11 04:01:18 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.cpp").write <<-EOS.undent
|
|
|
|
#include <libwpd/libwpd.h>
|
|
|
|
int main() {
|
|
|
|
return libwpd::WPD_OK;
|
|
|
|
}
|
|
|
|
EOS
|
2014-06-15 16:19:19 +00:00
|
|
|
system ENV.cc, "test.cpp", "-o", "test",
|
2014-06-11 04:01:18 +00:00
|
|
|
"-lrevenge-0.0", "-I#{Formula["librevenge"].include}/librevenge-0.0",
|
|
|
|
"-lwpd-0.10", "-I#{include}/libwpd-0.10"
|
2014-06-15 16:19:19 +00:00
|
|
|
system "./test"
|
2010-02-07 22:09:05 +00:00
|
|
|
end
|
|
|
|
end
|