Subject: bug#61851: closed (Re: bug#61851: [PATCH] gnu: tesseract-ocr-tessdata-fast: Install tesseract config files.)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 21 Mar 2023 03:14:02 +0000

Your bug report

#61851: [PATCH] gnu: tesseract-ocr-tessdata-fast: Install tesseract config files.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
61851: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61851
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#61851: [PATCH] gnu: tesseract-ocr-tessdata-fast: Install tesseract config files.
From: Maxim Cournoyer <[email-masked]>
To: Jelle Licht <[email-masked]>
Cc: [email-masked], Simon South <[email-masked]>
Date: Mon, 20 Mar 2023 23:13:19 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Jelle Licht <[email-masked]> writes:

> Hey folks,
>
> Maxim Cournoyer <[email-masked]> writes:
>
>> Hello,
>>
>> Simon South <[email-masked]> writes:
>>
>>> Maxim Cournoyer <[email-masked]> writes:
>>>> Would you be so kind as to open an issue with upstream about the
>>>> misleading doc?
>>>
>>> I would've submitted a patch already were the project not using GitHub.
>>> I don't have a GitHub account and don't intend to get one.
>>>
>>> Would anyone else be willing to be open an issue on this?
>>
>> No problem; see: https://github.com/tesseract-ocr/tesseract/issues/4025.
>
> So it seems the issue was confirmed. In addition there seems to be some
> inconsistencies between build system with regards to how the data dir is
> interpreted by tesseract:
>
> https://github.com/tesseract-ocr/tesseract/issues/4026
>
> I think it makes sense for us to apply [a version of] Simon's patch.  QA
> also seems to show green lights, ignoring the unrelated recent
> openmpi-related failures.
>
> WDYT?

I've now applied it, after writing a proper change log commit message,
and running the xvnc and lightdm system tests to get some confidence
(they make use of tesseract-ocr).

Thank you for looking into it!

-- 
Thanks,
Maxim

Subject: [PATCH] gnu: tesseract-ocr-tessdata-fast: Install tesseract config files.
From: [email-masked]
To: [email-masked]
Cc: Jelle Licht <[email-masked]>
Date: Mon, 27 Feb 2023 21:55:16 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

From: Jelle Licht <[email-masked]>

* gnu/packages/ocr.scm (tesseract-ocr-tessdata-fast)[source]: Add recursive?
flag. Adjust hash accordingly.
[arguments]<#:phases>: Remove unneeded workaround.
---

 gnu/packages/ocr.scm | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/ocr.scm b/gnu/packages/ocr.scm
index c1cd4f061e..e07d40bda4 100644
--- a/gnu/packages/ocr.scm
+++ b/gnu/packages/ocr.scm
@@ -82,18 +82,14 @@ (define-public tesseract-ocr-tessdata-fast
               (method git-fetch)
               (uri (git-reference
                     (url "https://github.com/tesseract-ocr/tessdata_fast")
+                    (recursive? #t) ; for tessconfigs
                     (commit version)))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1m310cpb87xx8l8q7jy9fvzf6a0m8rm0dmjpbiwhc2mi6w4gn084"))))
+                "1hqdsy3zdy5b9l641fvhnawkw6wpb8nkvjql78q8g47js8109mhm"))))
     (build-system copy-build-system)
-    (arguments (list #:install-plan #~'(("." "share/tesseract-ocr/tessdata"))
-                     #:phases #~(modify-phases %standard-phases
-                                  (add-after 'unpack 'delete-broken-links
-                                    (lambda _
-                                      (delete-file "configs")
-                                      (delete-file "pdf.ttf"))))))
+    (arguments (list #:install-plan #~'(("." "share/tesseract-ocr/tessdata"))))
     (home-page "https://github.com/tesseract-ocr/tessdata_fast")
     (synopsis "Fast integer versions of trained LSTM models")
     (description "This repository contains fast integer versions of trained
-- 
2.39.1