homebrew-core/Formula/libwpg.rb

38 lines
1.1 KiB
Ruby
Raw Normal View History

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/'
url 'http://dev-www.libreoffice.org/src/libwpg-0.3.0.tar.bz2'
sha1 'c8422f9a01e98ff3cb5d64d518e61f6a0bb77551'
2014-06-16 00:38:23 +00:00
bottle do
cellar :any
sha1 "50eed06b50a8793c2ef17e739e07bd2d20123236" => :mavericks
sha1 "0ec7bbafdeeeb475d0f8b91801df6b14ba5eaf15" => :mountain_lion
sha1 "8664b231a414048acf8e1e113178e689338325a7" => :lion
end
depends_on 'pkg-config' => :build
2010-02-07 22:15:15 +00:00
depends_on 'libwpd'
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}"
system "make", "install"
end
test do
(testpath/'test.cpp').write <<-EOS.undent
#include <libwpg/libwpg.h>
int main() {
return libwpg::WPG_AUTODETECT;
}
EOS
system ENV.cc, "test.cpp", "-o", "test",
"-lrevenge-0.0", "-I#{Formula['librevenge'].include}/librevenge-0.0",
"-lwpg-0.3", "-I#{include}/libwpg-0.3"
system "./test"
2010-02-07 22:15:15 +00:00
end
end