From: Simon South <simon@simonsouth.net>
To: jlicht@fsfe.org
Cc: 61851@debbugs.gnu.org
Subject: [bug#61851] [PATCH] gnu: tesseract-ocr: Use standard TESSDATA_PREFIX.
Date: Mon, 27 Feb 2023 17:48:04 -0500 [thread overview]
Message-ID: <20230227224804.21743-1-simon@simonsouth.net> (raw)
In-Reply-To: <878rgik9uo.fsf@simonsouth.net>
---
gnu/packages/ocr.scm | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/ocr.scm b/gnu/packages/ocr.scm
index c1cd4f061e..fc069b83e3 100644
--- a/gnu/packages/ocr.scm
+++ b/gnu/packages/ocr.scm
@@ -88,7 +88,7 @@ (define-public tesseract-ocr-tessdata-fast
(base32
"1m310cpb87xx8l8q7jy9fvzf6a0m8rm0dmjpbiwhc2mi6w4gn084"))))
(build-system copy-build-system)
- (arguments (list #:install-plan #~'(("." "share/tesseract-ocr/tessdata"))
+ (arguments (list #:install-plan #~'(("." "share/tessdata"))
#:phases #~(modify-phases %standard-phases
(add-after 'unpack 'delete-broken-links
(lambda _
@@ -131,15 +131,6 @@ (define-public tesseract-ocr
(substitute* "configure.ac"
(("AC_SUBST\\(\\[XML_CATALOG_FILES])")
""))))
- (add-after 'unpack 'adjust-TESSDATA_PREFIX-macro
- (lambda _
- ;; Use a deeper TESSDATA_PREFIX hierarchy so that a more
- ;; specific search-path than '/share' can be specified. The
- ;; build system uses CPPFLAGS for itself, so we can't simply set
- ;; a make flag.
- (substitute* "Makefile.am"
- (("-DTESSDATA_PREFIX='\"@datadir@\"'")
- "-DTESSDATA_PREFIX='\"@datadir@/tesseract-ocr\"'"))))
(add-after 'build 'build-training
(lambda* (#:key parallel-build? #:allow-other-keys)
(define n (if parallel-build? (number->string
@@ -155,7 +146,7 @@ (define n (if parallel-build? (number->string
;; extended via TESSDATA_PREFIX.
(lambda* (#:key native-inputs inputs #:allow-other-keys)
(define eng.traineddata
- "/share/tesseract-ocr/tessdata/eng.traineddata")
+ "/share/tessdata/eng.traineddata")
(install-file (search-input-file (or native-inputs inputs)
eng.traineddata)
(dirname (string-append #$output
@@ -183,7 +174,7 @@ (define eng.traineddata
(list leptonica))
(native-search-paths (list (search-path-specification
(variable "TESSDATA_PREFIX")
- (files (list "share/tesseract-ocr/tessdata"))
+ (files (list "share/tessdata"))
(separator #f)))) ;single value
(home-page "https://github.com/tesseract-ocr/tesseract")
(synopsis "Optical character recognition engine")
--
2.39.1
next prev parent reply other threads:[~2023-02-27 22:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 20:55 [bug#61851] [PATCH] gnu: tesseract-ocr-tessdata-fast: Install tesseract config files jlicht
2023-02-27 22:43 ` Simon South
2023-02-27 22:48 ` Simon South [this message]
2023-02-28 0:31 ` Jelle Licht
2023-02-28 15:00 ` Simon South
2023-02-28 15:35 ` Maxim Cournoyer
2023-02-28 16:40 ` Simon South
2023-02-28 21:41 ` Maxim Cournoyer
2023-03-16 20:38 ` Jelle Licht
2023-03-21 3:13 ` bug#61851: " Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230227224804.21743-1-simon@simonsouth.net \
--to=simon@simonsouth.net \
--cc=61851@debbugs.gnu.org \
--cc=jlicht@fsfe.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).