45 lines
1.5 KiB
Ruby
45 lines
1.5 KiB
Ruby
class Pdfsandwich < Formula
|
|
desc "Generate sandwich OCR PDFs from scanned file"
|
|
homepage "http://www.tobias-elze.de/pdfsandwich/"
|
|
url "https://downloads.sourceforge.net/project/pdfsandwich/pdfsandwich%200.1.7/pdfsandwich-0.1.7.tar.bz2"
|
|
sha256 "9795ffea84b9b6b501f38d49a4620cf0469ddf15aac31bac6dbdc9ec1716fa39"
|
|
revision 1
|
|
head "https://svn.code.sf.net/p/pdfsandwich/code/trunk/src"
|
|
|
|
livecheck do
|
|
url :stable
|
|
end
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "f02f16a0b4762dd522dcfc633727e3f68dca40966e34d9c89015dc896d47cacc" => :catalina
|
|
sha256 "1c11166775d495add7143bce32ef70def752462bfd91a54ff5f69ff671324259" => :mojave
|
|
sha256 "d7397999d8b60f0f74956cf53c20994ee565db95d501b7143cc5efe48c3759ae" => :high_sierra
|
|
end
|
|
|
|
depends_on "gawk" => :build
|
|
depends_on "ocaml" => :build
|
|
depends_on "exact-image"
|
|
depends_on "ghostscript"
|
|
depends_on "imagemagick"
|
|
depends_on "poppler"
|
|
depends_on "tesseract"
|
|
depends_on "unpaper"
|
|
|
|
def install
|
|
system "./configure", "--disable-debug",
|
|
"--disable-dependency-tracking",
|
|
"--prefix=#{prefix}"
|
|
system "make"
|
|
system "make", "install"
|
|
bin.env_script_all_files(libexec/"bin", PATH: "#{Formula["poppler"].opt_bin}:$PATH")
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/pdfsandwich", "-o", testpath/"test_ocr.pdf",
|
|
test_fixtures("test.pdf")
|
|
assert_predicate testpath/"test_ocr.pdf", :exist?,
|
|
"Failed to create ocr file"
|
|
end
|
|
end
|