From patchwork Mon Feb 27 22:48:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon South X-Patchwork-Id: 47462 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A0FA716C19; Mon, 27 Feb 2023 22:49:33 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 94D6916BA5 for ; Mon, 27 Feb 2023 22:49:32 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWmIs-0006bL-1z; Mon, 27 Feb 2023 17:49:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWmIq-0006a4-7E for guix-patches@gnu.org; Mon, 27 Feb 2023 17:49:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWmIo-00069W-CR for guix-patches@gnu.org; Mon, 27 Feb 2023 17:49:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pWmIo-0000Wl-8X for guix-patches@gnu.org; Mon, 27 Feb 2023 17:49:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61851] [PATCH] gnu: tesseract-ocr: Use standard TESSDATA_PREFIX. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Feb 2023 22:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61851 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: jlicht@fsfe.org Cc: 61851@debbugs.gnu.org Received: via spool by 61851-submit@debbugs.gnu.org id=B61851.16775380951833 (code B ref 61851); Mon, 27 Feb 2023 22:49:02 +0000 Received: (at 61851) by debbugs.gnu.org; 27 Feb 2023 22:48:15 +0000 Received: from localhost ([127.0.0.1]:49143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWmI3-0000TT-18 for submit@debbugs.gnu.org; Mon, 27 Feb 2023 17:48:15 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:57574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWmI0-0000Sc-KY for 61851@debbugs.gnu.org; Mon, 27 Feb 2023 17:48:14 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 7675CE8B3D; Mon, 27 Feb 2023 22:48:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GfnLZpcDzJaW; Mon, 27 Feb 2023 22:48:06 +0000 (UTC) Received: from localhost.localdomain (23-233-96-72.cpe.pppoe.ca [23.233.96.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 8C319E23C3; Mon, 27 Feb 2023 22:48:06 +0000 (UTC) From: Simon South Date: Mon, 27 Feb 2023 17:48:04 -0500 Message-Id: <20230227224804.21743-1-simon@simonsouth.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <878rgik9uo.fsf@simonsouth.net> References: <878rgik9uo.fsf@simonsouth.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches --- 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")