2014-03-31 20:11:43 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class PdfTools < Formula
|
|
|
|
homepage "https://github.com/axot/pdf-tools"
|
|
|
|
url "https://github.com/axot/pdf-tools/releases/download/v0.20/pdf-tools_v0.20.tgz"
|
|
|
|
sha1 "0592f58d8f6dcdc597525ce887abda564eced285"
|
|
|
|
|
2014-04-01 17:41:21 +00:00
|
|
|
bottle do
|
|
|
|
sha1 "424085396d9c3669957be227e3347595fa620b64" => :mavericks
|
|
|
|
sha1 "12acd5174bc22ccaa8d13359a5cdcaee344d83b5" => :mountain_lion
|
|
|
|
sha1 "9275fd218bdc416b140214adb419d8f8201a491f" => :lion
|
|
|
|
end
|
|
|
|
|
2014-03-31 20:11:43 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
|
|
|
|
depends_on :autoconf
|
|
|
|
depends_on :automake
|
|
|
|
depends_on :libtool
|
|
|
|
|
|
|
|
depends_on "cairo"
|
|
|
|
depends_on "poppler" => "with-glib"
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV['zlib_CFLAGS'] = '-I/usr/include'
|
|
|
|
ENV['zlib_LIBS'] = '-L/usr/lib -lz'
|
|
|
|
|
|
|
|
system "./autogen.sh"
|
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make"
|
|
|
|
|
|
|
|
prefix.install "pdf-tools-0.20.tar"
|
|
|
|
(prefix/"elpa").mkpath
|
|
|
|
system "tar", "--strip-components=1", "-xf", "#{prefix}/pdf-tools-0.20.tar", "-C", "#{prefix}/elpa"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
To install to your Emacs run:
|
|
|
|
emacs -Q --batch --eval "(package-install-file \\"#{prefix}/pdf-tools-0.20.tar\\")"
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|