Skip to content

Instantly share code, notes, and snippets.

@kshahkshah
Created September 16, 2015 20:28
Show Gist options
  • Save kshahkshah/841a3712b70a736d5e45 to your computer and use it in GitHub Desktop.
Save kshahkshah/841a3712b70a736d5e45 to your computer and use it in GitHub Desktop.
# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
# http://www.rubydoc.info/github/Homebrew/homebrew/master/frames
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Pdfsandwich < Formula
desc "A tool to make \"sandwich\" OCR pdf files"
homepage "http://www.tobias-elze.de/pdfsandwich/"
url "http://downloads.sourceforge.net/project/pdfsandwich/pdfsandwich%200.1.4/pdfsandwich-0.1.4.tar.bz2"
version "0.1.4"
sha256 "8b82f3ae08000c5cae1ff5a0f6537b0b563befef928e5198255b743a46714af3"
# depends_on "cmake" => :build
# depends_on :x11 # if your formula requires any X11/XQuartz components
depends_on "tesseract"
#=> "devel"
depends_on "gs"
depends_on "imagemagick"
depends_on "ocaml"
depends_on "unpaper"
depends_on "gawk"
def install
# ENV.deparallelize # if your formula fails when building in parallel
# Remove unrecognized options if warned by configure
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}"
# system "cmake", ".", *std_cmake_args
system "make", "install" # if this fails, try separate make/make install steps
end
test do
# `test do` will create, run in and delete a temporary directory.
#
# This test will fail and we won't accept that! It's enough to just replace
# "false" with the main program this formula installs, but it'd be nice if you
# were more thorough. Run the test with `brew test pdfsandwich`. Options passed
# to `brew install` such as `--HEAD` also need to be provided to `brew test`.
#
# The installed folder is not in the path, so use the entire path to any
# executables being tested: `system "#{bin}/program", "do", "something"`.
system "pdfsandwich"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment