2009-12-01 19:32:23 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2010-05-09 18:36:26 +00:00
|
|
|
class PopplerData <Formula
|
|
|
|
url 'http://poppler.freedesktop.org/poppler-data-0.4.2.tar.gz'
|
|
|
|
md5 '4b7598072bb95686f58bdadc4f09715c'
|
|
|
|
end
|
|
|
|
|
2009-12-01 19:32:23 +00:00
|
|
|
class Poppler <Formula
|
2010-03-18 19:07:33 +00:00
|
|
|
url 'http://poppler.freedesktop.org/poppler-0.12.4.tar.gz'
|
2009-12-01 19:32:23 +00:00
|
|
|
homepage 'http://poppler.freedesktop.org/'
|
2010-03-18 19:07:33 +00:00
|
|
|
md5 '4155346f9369b192569ce9184ff73e43'
|
|
|
|
|
|
|
|
depends_on 'pkg-config'
|
2010-05-09 18:36:26 +00:00
|
|
|
depends_on "qt" if ARGV.include? "--with-qt4"
|
2009-12-01 19:32:23 +00:00
|
|
|
|
|
|
|
def install
|
2010-05-09 18:36:26 +00:00
|
|
|
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
|
2009-12-01 19:32:23 +00:00
|
|
|
system "make install"
|
2010-05-09 18:36:26 +00:00
|
|
|
|
|
|
|
# Install poppler font data.
|
|
|
|
PopplerData.new.brew do
|
|
|
|
system "make install prefix=#{prefix}"
|
|
|
|
end
|
2009-12-01 19:32:23 +00:00
|
|
|
end
|
|
|
|
end
|