From patchwork Mon Feb 8 23:14:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Tai X-Patchwork-Id: 26968 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 A548427BC21; Tue, 9 Feb 2021 00:20:54 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0D01427BC1E for ; Tue, 9 Feb 2021 00:20:54 +0000 (GMT) Received: from localhost ([::1]:49386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9Glx-0000vb-2D for patchwork@mira.cbaines.net; Mon, 08 Feb 2021 19:20:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9FlD-0007iv-7M for guix-patches@gnu.org; Mon, 08 Feb 2021 18:16:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40580) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9FlC-0006d4-Cs for guix-patches@gnu.org; Mon, 08 Feb 2021 18:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l9FlC-00038J-99 for guix-patches@gnu.org; Mon, 08 Feb 2021 18:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46376] [PATCH] gnu: tesseract-ocr: update to 4.1.1) Resent-From: Andy Tai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Feb 2021 23:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46376 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jelle Licht Cc: 46376@debbugs.gnu.org Received: via spool by 46376-submit@debbugs.gnu.org id=B46376.161282610811966 (code B ref 46376); Mon, 08 Feb 2021 23:16:02 +0000 Received: (at 46376) by debbugs.gnu.org; 8 Feb 2021 23:15:08 +0000 Received: from localhost ([127.0.0.1]:52124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9FkJ-00036u-BB for submit@debbugs.gnu.org; Mon, 08 Feb 2021 18:15:07 -0500 Received: from mail-io1-f42.google.com ([209.85.166.42]:33561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9FkG-000368-So for 46376@debbugs.gnu.org; Mon, 08 Feb 2021 18:15:05 -0500 Received: by mail-io1-f42.google.com with SMTP id q7so16905829iob.0 for <46376@debbugs.gnu.org>; Mon, 08 Feb 2021 15:15:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atai-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=14lYyYIFk87/sL0Vvd0O8OYbU2taFK8FSs0kF93xiZs=; b=y67q12hHb8qXf6dBf4rcZR2CRgQT/KqqIdZSoi0jr2YQYTTw3QK3afUA+eW80dlyTF hOZjznJ1a5KQkr6PqYsqmak1UdFS/9qM/YxMJRI5TuFN7I/8h0eSqiN+i3YStox3d51f YMdCT9nyVCFMt75XZVJ8c4psWoVP5ywBSHligAc/fOU7o+eYfO/deJNWInyb8iMRe0FY ZjiC8o3ElLnv+El2H2r/f7LpEqCrI6bkt815RcjI5NTUEmVlZhqT0gP9rwyarIPVa6rf bz5GHiqFlV3BUIDFCrcW+5esg3hvn9SFviur6lWztjZXHyrwPx5ROzUvBjHgb1Tcrn6Q kEOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=14lYyYIFk87/sL0Vvd0O8OYbU2taFK8FSs0kF93xiZs=; b=bJyLZ4c9xGBDIABc1uq1CeFmcS378Ecoe1JFJBAGw3WHKR609PEMOQH6xXmhvsvAsI FRl6aYUsNpilzN7OHbkBHwM4QyL1A0Ql/+0XstoH6wN372fsu4vtT1XkCmhd0YJfE78u oNb4PuZP343DrgTHztSocTfuA1TDl0yY5nxwZ9vzrEsWE83eSZbYqX+8/eVkWI2z9/Uf NET17eCU/HOlUQ8bn8ghpxztEWLFY3Il5IhJFyDV31+wzZbpdA4UYmrAxx9qausson0S 4pgjiUJl1uj0Y113F8kkTk4SSd4bV6UmPeKXsSdLB4Jw8HzBT4tOiJpkKNN+osfoC2Ed yDsQ== X-Gm-Message-State: AOAM531V93arIs4j/JOs2NVPfMrqKt1Pr9W/sG/A3JglYZCqI+LbhpWy FEYL8/SohIitBX6p4Gzn9vEw5u6IR5xk4Mt3fdNWDi7DTUk= X-Google-Smtp-Source: ABdhPJzqVyho88WpjlG/m3RdvC7AfYjdvnJATtXO95OzqpB6Aicssc+MEEbobGbp7QIedTZ09WyzdSXqvs+zjOHq+uQ= X-Received: by 2002:a5d:94cb:: with SMTP id y11mr16726917ior.117.1612826099153; Mon, 08 Feb 2021 15:14:59 -0800 (PST) MIME-Version: 1.0 References: <86a6sep7h0.fsf@posteo.net> In-Reply-To: <86a6sep7h0.fsf@posteo.net> From: Andy Tai Date: Mon, 8 Feb 2021 15:14:22 -0800 Message-ID: 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 updated patch attached On Mon, Feb 8, 2021 at 1:36 PM Jelle Licht wrote: > > > > * gnu/packages/ocr.scm (tesseract-ocr): update to 4.1.1 > ^ This is usually capitalised. capitalized > > [snip] > > (define-public tesseract-ocr > > + ;; some useful commits beyond last official stable release in release branch > > + (let ((commit "97079fa353557af6df86fd20b5d2e0dff5d8d5df")) > > (package > > (name "tesseract-ocr") > > - (version "3.04.01") > > + (version "4.1.1") > ^ Since we are not _actually_ using version 4.1.1, but a > later commit, you could use > `(git-version "4.1.1" revision commit)' here instead changed as suggested > > > (source > > (origin > > (method git-fetch) > > (uri (git-reference > > (url "https://github.com/tesseract-ocr/tesseract") > > - (commit version))) > > - (file-name (git-file-name name version)) > > + (commit commit) > > + ;; Fetch git submodules > > + (recursive? #t))) > > Instead of stating what the code does, would you consider adding a > comment why this is needed? > commented as suggested > > + (file-name (string-append name "-" version "-" commit "-checkout")) > ^ You can use `(git-file-name name version)' here. > changed as suggested > > (sha256 > > - (base32 "0h1x4z1h86n2gwknd0wck6gykkp99bmm02lg4a47a698g4az6ybv")))) > > + (base32 "0axwla82fpzp86lc553wp3hk0fz5dylw4as0jbf4hkqcyajlbzp4")))) > > (build-system gnu-build-system) > > (inputs > > - `(("leptonica" ,leptonica))) > > + `( ("cairo" ,cairo) > > + ("icu" ,icu4c) > > + ("leptonica" ,leptonica) > > + ("pango" ,pango))) > > + (native-inputs > > + `(("autoconf" ,autoconf) > > + ("autoconf-archive" ,autoconf-archive) > > + ("automake" ,automake) > > + ("googletest" ,googletest) > > + ("libtool" ,libtool) > > + ("pkg-config" ,pkg-config))) > > (arguments > > '(#:configure-flags > > (let ((leptonica (assoc-ref %build-inputs "leptonica"))) > > - (list (string-append "LIBLEPT_HEADERSDIR=" leptonica "/include"))))) > > + (list (string-append "LIBLEPT_HEADERSDIR=" leptonica "/include"))) > > + ;; some test, applybox_test fails to build > > + #:tests? #f)) > 2 nits: Is it possible to patch or disable only the failing tests? tests failing to build probably due to some issue with parallel builds; did not dig into it as probably will take much time; will be TODO if time allows) > Is there a reason googletest is added if testing is subsequently disabled? > removed > Thanks, > - Jelle --- Andy Tai, atai@atai.org, Skype: licheng.tai, Line: andy_tai, WeChat: andytai1010 Year 2021 民國110年 自動的精神力是信仰與覺悟 自動的行為力是勞動與技能 From 7ab7fcbb95d933f6a7ba3e688131caa0435bdfdd Mon Sep 17 00:00:00 2001 From: Andy Tai Date: Sun, 7 Feb 2021 22:23:47 -0800 Subject: [PATCH] gnu: tesseract-ocr: Update to 4.1.1 * gnu/packages/ocr.scm (tesseract-ocr): Update to 4.1.1 --- gnu/packages/ocr.scm | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/gnu/packages/ocr.scm b/gnu/packages/ocr.scm index dc4930918a..0d357726b2 100644 --- a/gnu/packages/ocr.scm +++ b/gnu/packages/ocr.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016, 2020 Efraim Flashner ;;; Copyright © 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 Alex Vong +;;; Copyright © 2021 Andy Tai ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,7 +27,12 @@ #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system python) + #:use-module (gnu packages autotools) + #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages image)) @@ -52,25 +58,41 @@ it produces text in 8-bit or UTF-8 formats.") (license license:gpl3+))) (define-public tesseract-ocr + ;; some useful commits beyond last official stable release in release branch + (let ((commit "97079fa353557af6df86fd20b5d2e0dff5d8d5df") + (revision "1")) (package (name "tesseract-ocr") - (version "3.04.01") + (version (git-version "4.1.1" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/tesseract-ocr/tesseract") - (commit version))) + (commit commit) + ;; source git repo with submodules; ensure they are fetched + (recursive? #t))) (file-name (git-file-name name version)) (sha256 - (base32 "0h1x4z1h86n2gwknd0wck6gykkp99bmm02lg4a47a698g4az6ybv")))) + (base32 "0axwla82fpzp86lc553wp3hk0fz5dylw4as0jbf4hkqcyajlbzp4")))) (build-system gnu-build-system) (inputs - `(("leptonica" ,leptonica))) + `( ("cairo" ,cairo) + ("icu" ,icu4c) + ("leptonica" ,leptonica) + ("pango" ,pango))) + (native-inputs + `(("autoconf" ,autoconf) + ("autoconf-archive" ,autoconf-archive) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config))) (arguments '(#:configure-flags (let ((leptonica (assoc-ref %build-inputs "leptonica"))) - (list (string-append "LIBLEPT_HEADERSDIR=" leptonica "/include"))))) + (list (string-append "LIBLEPT_HEADERSDIR=" leptonica "/include"))) + ;; some test, applybox_test fails to build + #:tests? #f)) (home-page "https://github.com/tesseract-ocr/tesseract") (synopsis "Optical character recognition engine") (description @@ -79,7 +101,7 @@ high accuracy. It supports many languages, output text formatting, hOCR positional information and page layout analysis. Several image formats are supported through the Leptonica library. It can also detect whether text is monospaced or proportional.") - (license license:asl2.0))) + (license license:asl2.0)))) (define-public zinnia (let* ((commit "581faa8f6f15e4a7b21964be3a5ec36265c80e5b") -- 2.30.0