Skip to content

Instantly share code, notes, and snippets.

@Echos
Created March 3, 2012 02:29
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save Echos/1963857 to your computer and use it in GitHub Desktop.
Save Echos/1963857 to your computer and use it in GitHub Desktop.
Homebrew PDFTK for OSX Lion
require 'formula'
class Pdftk < Formula
url 'http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-1.44-src.zip'
homepage 'http://www.pdflabs.com/'
md5 '9eb50fffcd621a627d387750c60982b4'
depends_on 'gcc' # with "--enable-java" option , required "Homebrew-alt" .
# via : https://github.com/adamv/homebrew-alt/
def install
cd "pdftk" do
system "make -f Makefile.OSX-10.6 TOOLPATH=/usr/local/bin/ VERSUFF=-4.6"
system "make -f Makefile.OSX-10.6 install TOOLPATH=/usr/local/bin/ VERSUFF=-4.6"
end
end
end
@jmccaffrey
Copy link

thanks for this.
While I was not able to get this, or the fork from sxua (https://gist.github.com/sxua/6210636) working on mountain lion (10.8.5), I learned a lot more about homebrew and how it works.

(I was getting errors of "dyld: _dyld_bind_fully_image_containing_address() error" with the original install from the pdflabs site, and java compile/path issues during make with this formula)

Ultimately I used the binary directly from http://www.kunugiken.com/os-x/compiling-pdftk-for-snow-leopard

@spl
Copy link

spl commented Jan 15, 2014

Here's my tap as an attempt to provide an easy installation for pdftk. It's my first formula, so feedback is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment