From patchwork Fri Aug 12 05:07:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41570 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 E4F0127BBEA; Fri, 12 Aug 2022 06:09:39 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable 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 AB07227BBE9 for ; Fri, 12 Aug 2022 06:09:39 +0100 (BST) Received: from localhost ([::1]:54954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMMvS-0001Vs-PM for patchwork@mira.cbaines.net; Fri, 12 Aug 2022 01:09:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMMux-0001V3-7g for guix-patches@gnu.org; Fri, 12 Aug 2022 01:09:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37378) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMMus-0000Xs-B1 for guix-patches@gnu.org; Fri, 12 Aug 2022 01:09:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMMus-0005vX-6N for guix-patches@gnu.org; Fri, 12 Aug 2022 01:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57151] [PATCH 1/2] gnu: Add tesseract-ocr-tessdata-fast. References: <20220812050543.3923-1-maxim.cournoyer@gmail.com> In-Reply-To: <20220812050543.3923-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 Aug 2022 05:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57151 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57151@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57151-submit@debbugs.gnu.org id=B57151.166028088722702 (code B ref 57151); Fri, 12 Aug 2022 05:09:02 +0000 Received: (at 57151) by debbugs.gnu.org; 12 Aug 2022 05:08:07 +0000 Received: from localhost ([127.0.0.1]:55357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMMty-0005u6-LM for submit@debbugs.gnu.org; Fri, 12 Aug 2022 01:08:06 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:35762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMMtw-0005ta-Fu for 57151@debbugs.gnu.org; Fri, 12 Aug 2022 01:08:04 -0400 Received: by mail-qk1-f180.google.com with SMTP id u24so60048qku.2 for <57151@debbugs.gnu.org>; Thu, 11 Aug 2022 22:08:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=GbJGnHBh9MJDsGA+rg/3OJ2Iiu4gy6Tx9D9DOTXOvCc=; b=pyygfnLA78LAU9/fBt4zhcRYADBCxNPAtVh+Hzdo6McECoxPzoWCJ2aB1vRW35L1Tn wy6TwfcVZysNnXFsHWZVUVZJ/1Qmhzc4+kPA73nnYsaD2TVH3REa9gs2xz5yNzGMBs0f 7ZU9RrkErHNBVlz0wXo5hf6i/CINbTMqXgOoIYLNbSLO5i3q9xS1y08JlS+H7cjlDwdf 6M1bF/p3ZJgzhw+ZPGovqTJCV08JRQ766NZHPQ6dLVgk7Cg93BfN5Xn2M5DSWgMTUXzb rOkbzlaYBxBxGoVyi0gGsbXjGw8tTGWvrVmLrOTlFbaORcSI4KyQ2MRCy9KG2sk3WLo3 uvOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=GbJGnHBh9MJDsGA+rg/3OJ2Iiu4gy6Tx9D9DOTXOvCc=; b=Lp1Vt08fk7ooaAWLVDcGjGTb1pKHi1xyYQxA/4uj3tzWNmhcY1R3OuL+WVuZWMwtv2 NFn+KepwCFB5XTzWFCrN2dp9oafes7vDmSh8ez9Pw4nsKvf+JpKLdK4powFZQiGXMiNZ MuMzIUrH6rojhDM1wlagBaniZzOMwIZ+BDLyHDsQ5Wb71hQm0j1fArX0onnFE8XhbsPr kXeCxJO2L39461JukFxCxapVzWdwZt+oEQSWMrzzK+0gqcgbFojie83+WHa2Akje5wz4 GZgsRI2tYOtQFxuvqJA5XZLfqmfQS5idTD7aPrHXjO7GLyRMkQnySGAdXOC0QLnOVg4x uzvA== X-Gm-Message-State: ACgBeo0iI4dy2MDTAtZDqpadF2GOYMr9rOIIus3D59oUuXZBgxRO8NQr eJo9yKRkTz2R/RPBXB4PI9XST9xPTzA= X-Google-Smtp-Source: AA6agR49JDyGfnG0zST1UIR7mU8oLN9/MoqWR1naSGXveNZatBw//xS5GrenSM4iyGDpj7t3CoR6iA== X-Received: by 2002:a05:620a:bc9:b0:6b6:66b2:d417 with SMTP id s9-20020a05620a0bc900b006b666b2d417mr1683544qki.3.1660280877539; Thu, 11 Aug 2022 22:07:57 -0700 (PDT) Received: from localhost.localdomain (dsl-10-148-207.b2b2c.ca. [72.10.148.207]) by smtp.gmail.com with ESMTPSA id l18-20020a37f912000000b006b5fe1c376fsm938253qkj.131.2022.08.11.22.07.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Aug 2022 22:07:57 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 12 Aug 2022 01:07:51 -0400 Message-Id: <20220812050752.3980-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/ocr.scm (tesseract-ocr-tessdata-fast): New variable. --- gnu/packages/ocr.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/ocr.scm b/gnu/packages/ocr.scm index e28bd17668..e2c9f561cc 100644 --- a/gnu/packages/ocr.scm +++ b/gnu/packages/ocr.scm @@ -29,6 +29,7 @@ (define-module (gnu packages ocr) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (gnu packages) @@ -74,6 +75,32 @@ (define-public ocrad it produces text in 8-bit or UTF-8 formats.") (license license:gpl3+))) +(define-public tesseract-ocr-tessdata-fast + (package + (name "tesseract-ocr-tessdata-fast") + (version "4.1.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tesseract-ocr/tessdata_fast") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1m310cpb87xx8l8q7jy9fvzf6a0m8rm0dmjpbiwhc2mi6w4gn084")))) + (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")))))) + (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 +models for the Tesseract OCR Engine.") + (license license:asl2.0))) + (define-public tesseract-ocr (package (name "tesseract-ocr")