aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorCharlie Sharpsteen2010-05-09 11:36:26 -0700
committerAdam Vandenberg2010-06-06 20:45:10 -0700
commit8711658ebfea4418e3d85bc4ce4f763247e4c3da (patch)
treed276461b48eca86e55be1af228e98b1d316aa5b4 /Library
parent431dd51070940186c1dd3af3c12ba093f2deab07 (diff)
downloadhomebrew-8711658ebfea4418e3d85bc4ce4f763247e4c3da.tar.bz2
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>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/poppler.rb26
1 files changed, 25 insertions, 1 deletions
diff --git a/Library/Formula/poppler.rb b/Library/Formula/poppler.rb
index 120923ba2..8c497c498 100644
--- a/Library/Formula/poppler.rb
+++ b/Library/Formula/poppler.rb
@@ -1,14 +1,38 @@
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
- system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
+ 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