diff options
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/OCRmyPDF/Manifest | 7 | ||||
-rw-r--r-- | app-text/OCRmyPDF/OCRmyPDF-16.3.1.ebuild | 8 | ||||
-rw-r--r-- | app-text/OCRmyPDF/OCRmyPDF-16.5.0.ebuild (renamed from app-text/OCRmyPDF/OCRmyPDF-16.4.1.ebuild) | 14 | ||||
-rw-r--r-- | app-text/OCRmyPDF/files/OCRmyPDF-16.4.3-mask.patch | 29 |
4 files changed, 49 insertions, 9 deletions
diff --git a/app-text/OCRmyPDF/Manifest b/app-text/OCRmyPDF/Manifest index cc20819..42ca6e2 100644 --- a/app-text/OCRmyPDF/Manifest +++ b/app-text/OCRmyPDF/Manifest @@ -1,5 +1,6 @@ +AUX OCRmyPDF-16.4.3-mask.patch 1387 BLAKE2B 97da69148f4bd3bb319842bc084ef08084b3c669911e3c70ffcd404b27cd158ef96e7d4b6b546f710db7dd2bb5c0e792e770ecee1cfdd3b585bb012050844710 SHA512 42d34d309f53e59718272dd6204e9311363b8335a9af401bff5497d18a872752d729267fc52d3937830cf6380a0ce43848fb8a06e15d1b6d5c50beaf9193c034 DIST OCRmyPDF-16.3.1.tar.gz 6691988 BLAKE2B 82fb80b18df2ddfa79314958e8e54366a6886b4a96cdfcb7a54cc87c9f380c86fa89cbe1e3039169c2bbdc9d1835ba1cbe86e3e44015d5b50b1b90e0cf7a1904 SHA512 fbd6b0d1a8fc11361c0c0548f625629a64042866618009729c3adcf66ab7ac612ad58d4f3ba419c577d9c11ea6f8b14be8918c704e86ea96a05c461c0939242d -DIST OCRmyPDF-16.4.1.tar.gz 6694542 BLAKE2B 74acfa3dcb7b0b70fc01a210391f103b0f5bc566a34457f861a4788e9ecede7c51d0c4da32824570bf6039b0c6a2c67a0453e44bf9cf355736ffb63f014788b7 SHA512 7a5f3856852333b0429bb18b82a29c8972e8225f1302c918d91d3b9c1e9b012d14ee5af76b42c07a5680e81643de4825e105d33f5f5663422e5c190c1b1719e2 -EBUILD OCRmyPDF-16.3.1.ebuild 2158 BLAKE2B d1574557209ff8823c067e68327e18d6c603d842d66ebbc48b43fc417ec91b7b86c9cd11d74bb26f1849d286dffe5c6ac8a78523013ed150e888fb38c5d134dc SHA512 8f75f99084748b41b00f10bee380ae734628c8e03458d628c9724b0acfa2a5e7b3c17057c808c043d2dea59938285c109d2f6541730a2e4120c8afb5cb5e59f9 -EBUILD OCRmyPDF-16.4.1.ebuild 2158 BLAKE2B d1574557209ff8823c067e68327e18d6c603d842d66ebbc48b43fc417ec91b7b86c9cd11d74bb26f1849d286dffe5c6ac8a78523013ed150e888fb38c5d134dc SHA512 8f75f99084748b41b00f10bee380ae734628c8e03458d628c9724b0acfa2a5e7b3c17057c808c043d2dea59938285c109d2f6541730a2e4120c8afb5cb5e59f9 +DIST OCRmyPDF-16.5.0.tar.gz 6693439 BLAKE2B ce2e0db93468ce2b7a7578b115d44b7e64ef0e08436f1401ad27cca89a64e3f499087a1ae339a32bb0ebf353330a49f61d747d92e369fbc893f845c5300b01a7 SHA512 1630703d2caa0fa5a7481c19eb6cca8219450b98dc5183295496e08b8a1b4e680286ca52c6ed1f75fcaf4abe0d77629a6b1da6564376f11c26a6ff2b51716de1 +EBUILD OCRmyPDF-16.3.1.ebuild 2269 BLAKE2B e95f529c8aa371e33831ff76e53ae4b5199e097909f1843e99d7c3969829f799a12fcfd2c213cd0183a31a2c08bb2ae7df2f7907c35a1dcb04982669569ab791 SHA512 9556465c4b2710c265f8bc7af767d9d9dfd6badbed2d2cf4fa39374c90ef336604706fdf72b6bbae144892bfaafb4ef21c6869745e54c1586045dacbca508c43 +EBUILD OCRmyPDF-16.5.0.ebuild 2210 BLAKE2B 15deeaf8e9c39432c1fd0cd920d9e9a68fcf79cec95206671b21f11772a9d8dbb64850770e4e219d179ca9f41988e1a9e84302fa2e362a9db2bdaf892470f524 SHA512 fae7c61d12c624b615755d670236817d6e8dd41279c78e59eaab61ced9a9d8fcc0a1123caec045b9826e1ae9ef88609e51181f4d45efdd18c857091438ccbabf MISC metadata.xml 487 BLAKE2B ff83beac62a69edac41d4b7f72db5a9e2d318ca7a3aa1aceec924f3bcae7767b9a00fc29e6227371d36123c57d4ef19ebc1996789acfcf1428600076986579d1 SHA512 8677c9314d5586205d93045efb49f1495957e99bdfe69208c12dce0fd72a9261b4bfdcb05d05ffb897f0c5f6827c2ec327a569b970ac0ef9b293df2801d72fb9 diff --git a/app-text/OCRmyPDF/OCRmyPDF-16.3.1.ebuild b/app-text/OCRmyPDF/OCRmyPDF-16.3.1.ebuild index 25e9576..ce4e2fe 100644 --- a/app-text/OCRmyPDF/OCRmyPDF-16.3.1.ebuild +++ b/app-text/OCRmyPDF/OCRmyPDF-16.3.1.ebuild @@ -10,7 +10,13 @@ inherit distutils-r1 optfeature shell-completion DESCRIPTION="OCRmyPDF adds an OCR text layer to scanned PDF files" HOMEPAGE="https://github.com/ocrmypdf/OCRmyPDF" -SRC_URI="https://github.com/ocrmypdf/OCRmyPDF/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +if [[ "${PV}" =~ 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ocrmypdf/OCRmyPDF" +else + SRC_URI="https://github.com/ocrmypdf/OCRmyPDF/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi LICENSE="MPL-2.0" SLOT="0" diff --git a/app-text/OCRmyPDF/OCRmyPDF-16.4.1.ebuild b/app-text/OCRmyPDF/OCRmyPDF-16.5.0.ebuild index 25e9576..1270652 100644 --- a/app-text/OCRmyPDF/OCRmyPDF-16.4.1.ebuild +++ b/app-text/OCRmyPDF/OCRmyPDF-16.5.0.ebuild @@ -3,14 +3,20 @@ EAPI=8 -DISTUTILS_USE_PEP517=setuptools +DISTUTILS_USE_PEP517=hatchling PYTHON_COMPAT=( python3_{10..12} ) inherit distutils-r1 optfeature shell-completion DESCRIPTION="OCRmyPDF adds an OCR text layer to scanned PDF files" HOMEPAGE="https://github.com/ocrmypdf/OCRmyPDF" -SRC_URI="https://github.com/ocrmypdf/OCRmyPDF/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +if [[ "${PV}" =~ 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ocrmypdf/OCRmyPDF" +else + SRC_URI="https://github.com/ocrmypdf/OCRmyPDF/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi LICENSE="MPL-2.0" SLOT="0" @@ -30,7 +36,7 @@ RDEPEND=" >=media-gfx/img2pdf-0.5[${PYTHON_USEDEP}] " BDEPEND=" - >=dev-python/setuptools-scm-7.0.5[${PYTHON_USEDEP}] + dev-python/hatch-vcs[${PYTHON_USEDEP}] test? ( >=app-text/unpaper-6.1 >=dev-python/hypothesis-6.36.0[${PYTHON_USEDEP}] @@ -54,8 +60,6 @@ EPYTEST_DESELECT=( 'tests/test_metadata.py::test_malformed_docinfo' ) -export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} - src_prepare() { distutils-r1_src_prepare sed -e "/-n auto/d" -i pyproject.toml || die diff --git a/app-text/OCRmyPDF/files/OCRmyPDF-16.4.3-mask.patch b/app-text/OCRmyPDF/files/OCRmyPDF-16.4.3-mask.patch new file mode 100644 index 0000000..e46ae04 --- /dev/null +++ b/app-text/OCRmyPDF/files/OCRmyPDF-16.4.3-mask.patch @@ -0,0 +1,29 @@ +From b3324c3b4e8052176f5ec86eda1ea726894fd510 Mon Sep 17 00:00:00 2001 +From: "James R. Barlow" <james@purplerock.ca> +Date: Sat, 31 Aug 2024 00:37:52 -0700 +Subject: [PATCH] Don't assume /Mask is always a Stream + +Fixes #1377 +--- + src/ocrmypdf/pdfinfo/info.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/ocrmypdf/pdfinfo/info.py b/src/ocrmypdf/pdfinfo/info.py +index 7c946906b..953af9cd5 100644 +--- a/src/ocrmypdf/pdfinfo/info.py ++++ b/src/ocrmypdf/pdfinfo/info.py +@@ -382,8 +382,12 @@ def __init__( + self._height = max(smask.get(Name.Height, 0), self._height) + if (mask := pim.obj.get(Name.Mask, None)) is not None: + # If the image has a /Mask entry, it has an explicit mask. +- self._width = max(mask.get(Name.Width, 0), self._width) +- self._height = max(mask.get(Name.Height, 0), self._height) ++ # /Mask can be a Stream or an Array. If it's a Stream, ++ # use its /Width and /Height if they are larger than the main ++ # image's. ++ if isinstance(mask, Stream): ++ self._width = max(mask.get(Name.Width, 0), self._width) ++ self._height = max(mask.get(Name.Height, 0), self._height) + + # If /ImageMask is true, then this image is a stencil mask + # (Images that draw with this stencil mask will have a reference to |