homebrew-core/Formula/poppler.rb
Charlie Sharpsteen 433d224705 Updated poppler formula
Updated the poppler formula to address the following issues:

- Poppler font data is now downloaded and installed to
  #{prefix}/share/poppler using an internal brew.

- Added an install option, --with-qt4, that sets flags for linking to Qt
  frameworks installed by the qt formula.

Using the qt4 option will also desginate the qt formula as a dependency
which will significantly increase compile times if Qt has not allready
been installed.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-06-06 20:45:10 -07:00

38 lines
972 B
Ruby

require 'formula'
class PopplerData <Formula
url 'http://poppler.freedesktop.org/poppler-data-0.4.2.tar.gz'
md5 '4b7598072bb95686f58bdadc4f09715c'
end
class Poppler <Formula
url 'http://poppler.freedesktop.org/poppler-0.12.4.tar.gz'
homepage 'http://poppler.freedesktop.org/'
md5 '4155346f9369b192569ce9184ff73e43'
depends_on 'pkg-config'
depends_on "qt" if ARGV.include? "--with-qt4"
def install
if ARGV.include? "--with-qt4"
qt4Flags = `pkg-config QtCore --libs` + `pkg-config QtGui --libs`
qt4Flags.gsub!("\n","")
ENV['POPPLER_QT4_CFLAGS'] = qt4Flags
end
configureArgs = [
"--prefix=#{prefix}",
"--disable-dependency-tracking"
]
configureArgs << "--disable-poppler-qt4" unless ARGV.include? "--with-qt4"
system "./configure", *configureArgs
system "make install"
# Install poppler font data.
PopplerData.new.brew do
system "make install prefix=#{prefix}"
end
end
end