homebrew-core/Formula/poppler.rb
2014-10-21 21:14:12 +01:00

65 lines
1.7 KiB
Ruby

require 'formula'
class Poppler < Formula
homepage 'http://poppler.freedesktop.org'
url 'http://poppler.freedesktop.org/poppler-0.26.5.tar.xz'
sha1 '12937666faee80bae397a8338a3357e864d77d53'
bottle do
revision 1
sha1 "5f9fb565fd8034bb1a5e451e0a59eda8ec699fe0" => :yosemite
sha1 "8635336bb014de922e27242051eb72bda4de89fd" => :mavericks
sha1 "c61bc06c5dfc0f34a4a724000a6fb57297d0c27b" => :mountain_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.7.tar.gz'
sha1 '556a5bebd0eb743e0d91819ba11fd79947d8c674'
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