homebrew-core/Formula/poppler.rb
2014-05-27 20:16:22 -05:00

64 lines
1.7 KiB
Ruby

require 'formula'
class Poppler < Formula
homepage 'http://poppler.freedesktop.org'
url 'http://poppler.freedesktop.org/poppler-0.26.1.tar.xz'
sha1 '69911065030200bb7233a1f051b2e4695bbc386c'
bottle do
sha1 "665087d2cbf78417e8651182547e456c0fb1b61c" => :mavericks
sha1 "baedb7e6b18a90bc0b8720f3808f886a02ae8d6c" => :mountain_lion
sha1 "970ccd0298c820b229a3872ca8107ffd5e4810e3" => :lion
end
option 'with-qt4', 'Build Qt backend'
option 'with-lcms2', 'Use color management system'
depends_on 'pkg-config' => :build
depends_on 'cairo'
depends_on 'fontconfig'
depends_on 'freetype'
depends_on 'gettext'
depends_on 'glib'
depends_on 'gobject-introspection'
depends_on 'jpeg'
depends_on 'libpng'
depends_on 'libtiff'
depends_on 'openjpeg'
depends_on 'qt' if build.with? 'qt4'
depends_on 'little-cms2' if build.with? 'lcms2'
conflicts_with 'pdftohtml', :because => 'both install `pdftohtml` binaries'
conflicts_with 'pdf2image', 'xpdf',
:because => 'poppler, pdf2image, and xpdf install conflicting executables'
resource 'font-data' do
url 'http://poppler.freedesktop.org/poppler-data-0.4.6.tar.gz'
sha1 'f030563eed9f93912b1a546e6d87936d07d7f27d'
end
def install
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--enable-xpdf-headers
--enable-poppler-glib
--disable-gtk-test
--enable-introspection=yes
]
if build.with? "qt4"
args << "--enable-poppler-qt4"
else
args << "--disable-poppler-qt4"
end
args << "--enable-cms=lcms2" if build.with? "lcms2"
system "./configure", *args
system "make install"
resource('font-data').stage { system "make", "install", "prefix=#{prefix}" }
end
end