From 72a27ecd7699bfe9dc21341be93e316a285f3234 Mon Sep 17 00:00:00 2001 From: Alarig Le Lay Date: Thu, 16 Apr 2020 19:47:35 +0200 Subject: [PATCH] app-text/OCRmyPDF: Importing modifications from ::guru Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Alarig Le Lay --- app-text/OCRmyPDF/Manifest | 1 + app-text/OCRmyPDF/OCRmyPDF-9.7.2.ebuild | 64 +++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 app-text/OCRmyPDF/OCRmyPDF-9.7.2.ebuild diff --git a/app-text/OCRmyPDF/Manifest b/app-text/OCRmyPDF/Manifest index f969020..5a054ab 100644 --- a/app-text/OCRmyPDF/Manifest +++ b/app-text/OCRmyPDF/Manifest @@ -1 +1,2 @@ DIST OCRmyPDF-9.7.1.tar.gz 7859333 BLAKE2B 5f366d8655c55dafe911d2f1feaad84c4f032252454015693b314515d6bd308e91f93626cb3229d2956354e2c60df8420fb4d7a2023ca0a78636ea5c40d7ff56 SHA512 daf5f636afa2704c9163f4f0d49f944358919c2af229030d78bb29f10d0a8acf3e219060542d52982bc02180b410c6dca771c54f4d3239250365397707bccf6c +DIST OCRmyPDF-9.7.2.tar.gz 7859735 BLAKE2B 2744c893f6dd0f23ada9a11570fdf007842d01bcd84a1892f01bb828ca5e4d62e25724adf8124f3c75186c6eb56b19ef3bbfcbd6f4c1f9fa5821b0d59a19be33 SHA512 03dd14940cafc74dbfbf4c4ec569ca5de4cd588a1e7da11fda65a48ddb40b0a0613a7d6bd6520b07b2b9dc705c4f0e744076c7826d9789d782014b4d1dacc16e diff --git a/app-text/OCRmyPDF/OCRmyPDF-9.7.2.ebuild b/app-text/OCRmyPDF/OCRmyPDF-9.7.2.ebuild new file mode 100644 index 0000000..ef648cf --- /dev/null +++ b/app-text/OCRmyPDF/OCRmyPDF-9.7.2.ebuild @@ -0,0 +1,64 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7} ) +DISTUTILS_USE_SETUPTOOLS=rdepend + +inherit bash-completion-r1 distutils-r1 + +DESCRIPTION="OCRmyPDF adds an OCR text layer to scanned PDF files" +HOMEPAGE="https://github.com/jbarlow83/OCRmyPDF" +MY_GITHUB_AUTHOR="jbarlow83" +SRC_URI="https://github.com/${MY_GITHUB_AUTHOR}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +# This uses *a lot* of RAM, I have 32gb and these tests tried to use it all +RESTRICT="test" +IUSE="jbig2enc" + +DEPEND="test? ( + dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + ~dev-python/python-xmp-toolkit-2.0.1[${PYTHON_USEDEP}] +)" + +RDEPEND=" + app-text/ghostscript-gpl + app-text/tesseract + app-text/unpaper + <=dev-python/pdfminer-six-20200402[${PYTHON_USEDEP}] + >=dev-python/pdfminer-six-20181108[${PYTHON_USEDEP}] + dev-python/pikepdf[${PYTHON_USEDEP}] + dev-python/pillow[${PYTHON_USEDEP}] + dev-python/reportlab[${PYTHON_USEDEP}] + dev-python/tqdm[${PYTHON_USEDEP}] + media-gfx/img2pdf + media-gfx/pngquant + media-libs/leptonica + virtual/python-cffi[${PYTHON_USEDEP}] + jbig2enc? ( media-libs/jbig2enc ) +" + +distutils_enable_tests pytest +distutils_enable_sphinx docs --no-autodoc + +python_prepare_all() { + # do not depend on deprecated dep + sed -i -e '/pytest-runner/d' setup.py || die + + distutils-r1_python_prepare_all +} + +src_install() { + distutils-r1_src_install + + newbashcomp "${S}"/misc/completion/ocrmypdf.bash "${PN,,}" + + insinto /usr/share/fish/vendor_completions.d + doins "${S}"/misc/completion/ocrmypdf.fish +}