From nobody Wed Mar 30 20:47:44 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 74A1C1A3BF05; Wed, 30 Mar 2022 20:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KTJR42Qy3z4TQT; Wed, 30 Mar 2022 20:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648673264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/dIEMYkPzSv6D2q/oOUHo+Wz09368mhSlv8IPKU6owI=; b=iLsO/82ItlVb27ZeP4t8yjj/KYZdZ3u700G759/vcw1EOhpUk0JwG8Cc0x0bi/j+v1sW0r 01tTvomJQ5f8lpYYZ+P2clgqEXgeiE9bh9onxqcBJ4PdnlGoBLxwBgZaxrFCA9tGPikLYM +7Fp7fLRSRVrz76i7WOFKV8TK+zmHXCYpqOxySrifBqgb8P9IzF0/mos/bzmbV6P7O0pO+ S72gOfw7eBehs03fvfPRiZQOWq4fFLY84KF8R3gItYFej9EKNr5w7WrpbDQBDneI1WYgf0 y9E7S0E1/yOGkYfUX7AqyHjBUZGTWLO4XPpgzp2AlMhWoTpGTtUwLPEKZ73fzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B9F51A35E; Wed, 30 Mar 2022 20:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22UKliuo025361; Wed, 30 Mar 2022 20:47:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22UKliGC025360; Wed, 30 Mar 2022 20:47:44 GMT (envelope-from git) Date: Wed, 30 Mar 2022 20:47:44 GMT Message-Id: <202203302047.22UKliGC025360@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthias Andree Subject: git: 909f75fd1228 - main - graphics/py-pytesseract: update to v0.3.10 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mandree X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 909f75fd1228c514cae8f560f5655e4aabb53127 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648673264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/dIEMYkPzSv6D2q/oOUHo+Wz09368mhSlv8IPKU6owI=; b=aa4Io0kIIAkqV/D+fb/Y4LDRPaSJ8J+vm5F5UdLQ9gZjZ/OGP2Q5jFiKMBKOj/2+AtTMy6 QONrA6qZ8A/gjFvvBAVDQjO9bKWKhXwB64ogh9DzTI2VZyovEKk2Orbqwv3hRLWX8s5RQo KgVeLQKjX3r0LEuMMWJAn/qpOvCJvMwCKp5HwLeIIaBTlsaQUp3tlTIO7sE5mBljscD1bt etL+8PkLVBxvI1g6dID33dVVWZDh1bZd/JSknmsbuuU2HFZHcPuNk4r45Lc4k3m6lvjq2v 9Ooju5MVzH+5+blrw6OAHFQXM++4ceag1t27M9FxUGyNyiweLjPjHAwmP/ZPBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648673264; a=rsa-sha256; cv=none; b=sbabiAzmffraMCYsW1oGBbLuIY5E1GdTj6dHufsf9KYyYTPQDVitTyFKrxwYa2vx10t9k1 9UvTXx+0gVfaaDhLe/rHm7jEMxuvRFAG0RPbSSzQYcVxvVzcuTvxsIQG4MIXPj068Ui92T r8767WtOu/QD0isBP3HnnZPaWEz0sMwYaKm+3pCdVrC/a1WBOOUDg27k2wTBDwoK7uDAob Eyz5fH4PCEFZEJXDsWnxh5pYwg97FiKkS3tSPbUgbjc78kBBIluXw/PUVQ2sxZsrJf1XHE 6X86RSk4eezrvyvfVbAF43BH3evjwxu0EqRtrltp3lkwnAZGz7JbrwV34+GCmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mandree: URL: https://cgit.FreeBSD.org/ports/commit/?id=909f75fd1228c514cae8f560f5655e4aabb53127 commit 909f75fd1228c514cae8f560f5655e4aabb53127 Author: Matthias Andree AuthorDate: 2022-03-30 20:45:37 +0000 Commit: Matthias Andree CommitDate: 2022-03-30 20:47:31 +0000 graphics/py-pytesseract: update to v0.3.10 * Fix image_to_osd regression (reported by @klavdijS) Changelog: https://github.com/madmaze/pytesseract/releases/tag/v0.3.10 MFH skipped, we are just two days before 2022Q2 branch. --- graphics/py-pytesseract/Makefile | 13 ++++++++-- graphics/py-pytesseract/distinfo | 6 ++--- graphics/py-pytesseract/files/patch-g06e7f807 | 36 --------------------------- 3 files changed, 14 insertions(+), 41 deletions(-) diff --git a/graphics/py-pytesseract/Makefile b/graphics/py-pytesseract/Makefile index 541f47401242..c3ec6d410828 100644 --- a/graphics/py-pytesseract/Makefile +++ b/graphics/py-pytesseract/Makefile @@ -1,6 +1,5 @@ PORTNAME= pytesseract -PORTVERSION= 0.3.9 -PORTREVISION= 1 +PORTVERSION= 0.3.10 DISTVERSIONPREFIX= v CATEGORIES= graphics python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -28,6 +27,16 @@ USE_PYTHON= autoplist concurrent distutils NO_ARCH= yes do-test: + # FIXME hack alert. graphics/leptonica by default does not include + # jpeg2000 (openjpeg) support, and the pytesseract self-test is not + # smart enough to detect that and skip the test, so let us check + # and punch out the jpeg2000 test if it is pointless running it. + # https://github.com/madmaze/pytesseract/issues/419 + @if ${READELF} -d ${LOCALBASE}/lib/liblept.so | ${EGREP} -q '\.+\&2 '===> liblept.so (graphics/leptonica) is linked without libopenjp2, disabling JPEG2000 test' ; \ + ${REINPLACE_CMD} '/jpeg2000/d' ${WRKSRC}/tests/pytesseract_test.py ; \ + fi cd ${WRKSRC} && ${SETENV} ${TEST_ENV} tox-${PYTHON_VER} -e ${PY_FLAVOR} --sitepackages .include diff --git a/graphics/py-pytesseract/distinfo b/graphics/py-pytesseract/distinfo index 3995d7d1dcd4..0bea694fe5aa 100644 --- a/graphics/py-pytesseract/distinfo +++ b/graphics/py-pytesseract/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1643230252 -SHA256 (madmaze-pytesseract-v0.3.9_GH0.tar.gz) = 3dddea670d0338f765b0693eecf5ba88fb268bfe26e0b76bade8b615b1802672 -SIZE (madmaze-pytesseract-v0.3.9_GH0.tar.gz) = 964493 +TIMESTAMP = 1648668468 +SHA256 (madmaze-pytesseract-v0.3.10_GH0.tar.gz) = 1de64cae604fc0b2bc5b185620c612199b01c833c64c2a4a9e8877ace1ed5a92 +SIZE (madmaze-pytesseract-v0.3.10_GH0.tar.gz) = 1098547 diff --git a/graphics/py-pytesseract/files/patch-g06e7f807 b/graphics/py-pytesseract/files/patch-g06e7f807 deleted file mode 100644 index 71ba847a05ff..000000000000 --- a/graphics/py-pytesseract/files/patch-g06e7f807 +++ /dev/null @@ -1,36 +0,0 @@ -This is obtained from upstream and ADDITIONALLY -changes the try: val = int(row[i]) in upstream int3l@github's version -to int(float(row[i])). -- Matthias Andree, mandree@FreeBSD.org - -From 06e7f8077467950d2f4e0f619fb193730c2d2079 Mon Sep 17 00:00:00 2001 -From: int3l -Date: Thu, 27 Jan 2022 16:09:21 +0200 -Subject: [PATCH] Fix confidence conversion from str to int - -Account for negative values. Fixes #406 ---- - pytesseract/pytesseract.py | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/pytesseract/pytesseract.py b/pytesseract/pytesseract.py -index 984b106..e927e80 100644 ---- a/pytesseract/pytesseract.py -+++ b/pytesseract/pytesseract.py -@@ -313,9 +313,14 @@ def file_to_dict(tsv, cell_delimiter, str_col_idx): - if len(row) <= i: - continue - -- val = row[i] -- if row[i].isdigit() and i != str_col_idx: -- val = int(row[i]) -+ if i != str_col_idx: -+ try: -+ val = int(float(row[i])) -+ except ValueError: -+ val = row[i] -+ else: -+ val = row[i] -+ - result[head].append(val) - - return result