2014-06-11 04:05:05 +00:00
|
|
|
require "formula"
|
2010-02-07 22:15:15 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libwpg < Formula
|
2013-01-29 05:29:44 +00:00
|
|
|
homepage 'http://libwpg.sourceforge.net/'
|
2014-06-11 04:05:05 +00:00
|
|
|
url 'http://dev-www.libreoffice.org/src/libwpg-0.3.0.tar.bz2'
|
|
|
|
sha1 'c8422f9a01e98ff3cb5d64d518e61f6a0bb77551'
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2014-06-16 00:38:23 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "50eed06b50a8793c2ef17e739e07bd2d20123236" => :mavericks
|
|
|
|
sha1 "0ec7bbafdeeeb475d0f8b91801df6b14ba5eaf15" => :mountain_lion
|
|
|
|
sha1 "8664b231a414048acf8e1e113178e689338325a7" => :lion
|
|
|
|
end
|
|
|
|
|
2013-04-24 04:09:54 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-02-07 22:15:15 +00:00
|
|
|
depends_on 'libwpd'
|
2014-06-11 04:05:05 +00:00
|
|
|
depends_on 'librevenge'
|
2010-02-07 22:15:15 +00:00
|
|
|
|
|
|
|
def install
|
2013-01-29 05:29:44 +00:00
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
2014-06-11 04:05:05 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/'test.cpp').write <<-EOS.undent
|
|
|
|
#include <libwpg/libwpg.h>
|
|
|
|
int main() {
|
|
|
|
return libwpg::WPG_AUTODETECT;
|
|
|
|
}
|
|
|
|
EOS
|
2014-06-16 00:46:21 +00:00
|
|
|
system ENV.cc, "test.cpp", "-o", "test",
|
2014-06-11 04:05:05 +00:00
|
|
|
"-lrevenge-0.0", "-I#{Formula['librevenge'].include}/librevenge-0.0",
|
|
|
|
"-lwpg-0.3", "-I#{include}/libwpg-0.3"
|
2014-06-16 00:46:21 +00:00
|
|
|
system "./test"
|
2010-02-07 22:15:15 +00:00
|
|
|
end
|
|
|
|
end
|