diff options
| author | nibbles 2bits | 2012-04-02 12:21:23 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-04-29 09:34:27 -0700 |
| commit | aa80fbc0ce0047b395e1edf80855d7cac01b73b0 (patch) | |
| tree | 9acafac035fc98e71954f2b6473d68657d4b1d75 /Library | |
| parent | c84add7bea4b853632bf16db8931eceaf3d523b2 (diff) | |
| download | homebrew-aa80fbc0ce0047b395e1edf80855d7cac01b73b0.tar.bz2 | |
wkhtmltopdf 0.11.0_rc1 + fix 64bit compile error
* Upgrade wkhtmltopdf to version 0.11.0_rc1
* Adjust existing inreplace because the file has a different name.
* Fix compile error when 64bit Qt4 doesn't have i386 symbols by
using inreplace to set the qmake build as 64bit, not universal.
* Use `qmake -spec macx-g++` to configure it, from Sharpie.
* Temporarily set DYLD_LIBRARY_PATH to help the binaries find
libwkhtmltopdf.0.dylib for generating the man pages.
* Adjust command to generate man page, as wkhtmltopdf is in bin.
* Add command to generate man page for wkhtmltoimage.
* Add command to install wkhtmltoimage.
* Add command to install wkhtmltoimage.1 into man1.
* Add command to install all libraries.
Built and tested by converting a url to pdf on Lion and 64bit SL
using all five compilers from XCode-4.3.2 and 4.0.2.
Fixes #9265
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/wkhtmltopdf.rb | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/Library/Formula/wkhtmltopdf.rb b/Library/Formula/wkhtmltopdf.rb index c3858e8a4..7d446da54 100644 --- a/Library/Formula/wkhtmltopdf.rb +++ b/Library/Formula/wkhtmltopdf.rb @@ -1,30 +1,38 @@ require 'formula' class Wkhtmltopdf < Formula - url 'http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9.tar.bz2' homepage 'http://code.google.com/p/wkhtmltopdf/' - md5 'df2bb84b7d15140ca14732898155dd6a' + url 'http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1.tar.bz2' + sha1 'db03922d281856e503b3d562614e3936285728c7' + version '0.11.0_rc1' depends_on 'qt' def install - # fix that missing TEMP= include - inreplace 'wkhtmltopdf.pro' do |s| + # fix that missing TEMP= include. + inreplace 'common.pri' do |s| s.gsub! 'TEMP = $$[QT_INSTALL_LIBS] libQtGui.prl', '' s.gsub! 'include($$join(TEMP, "/"))', '' end - # Always creates a useless .app doh, - # AFAIK this is fixed in 0.10.0beta - wkhtml_bin = 'wkhtmltopdf.app/Contents/MacOS/wkhtmltopdf' - wkhtml_man = "#{name}.1" + # It tries to build universally, but Qt is bottled as 64bit => build error. + # If we are 64bit, do not compile with -arch i386. This is a Homebrew + # issue with our Qt4, not upstream, because wkhtmltopdf bundles a patched + # Qt4 that Homebrew doesn't use. + if MacOS.prefer_64_bit? + inreplace 'src/pdf/pdf.pro', 'x86', 'x86_64' + inreplace 'src/image/image.pro', 'x86', 'x86_64' + end - system "qmake" - system "make" - system "#{wkhtml_bin} --manpage > #{wkhtml_man}" + system 'qmake', '-spec', 'macx-g++' + system 'make' + ENV['DYLD_LIBRARY_PATH'] = './bin' + `bin/wkhtmltopdf --manpage > wkhtmltopdf.1` + `bin/wkhtmltoimage --manpage > wkhtmltoimage.1` - # install binary and man file - bin.install wkhtml_bin - man1.install wkhtml_man + # install binaries, libs, and man pages + bin.install Dir[ "bin/wkh*" ] + lib.install Dir[ "bin/lib*" ] + man1.install Dir[ "wkht*.1" ] end end |
