From patchwork Tue Aug 20 15:46:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Vong X-Patchwork-Id: 14979 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 2548F172F8; Tue, 20 Aug 2019 16:48:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id BA779172F5 for ; Tue, 20 Aug 2019 16:48:12 +0100 (BST) Received: from localhost ([::1]:38874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i06Mm-0006RD-7R for patchwork@mira.cbaines.net; Tue, 20 Aug 2019 11:48:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38484) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i06Me-0006PZ-0m for guix-patches@gnu.org; Tue, 20 Aug 2019 11:48:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i06Mc-0001RK-BN for guix-patches@gnu.org; Tue, 20 Aug 2019 11:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53048) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i06Mc-0001RA-8I for guix-patches@gnu.org; Tue, 20 Aug 2019 11:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i06Mc-0000fD-3E for guix-patches@gnu.org; Tue, 20 Aug 2019 11:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37103] [PATCH 04/20] gnu: Add python2-tegaki-python. Resent-From: Alex Vong Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Aug 2019 15:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37103 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37103@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15663160322480 (code B ref -1); Tue, 20 Aug 2019 15:48:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Aug 2019 15:47:12 +0000 Received: from localhost ([127.0.0.1]:33633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i06Lj-0000dp-OD for submit@debbugs.gnu.org; Tue, 20 Aug 2019 11:47:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:33454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i06Lh-0000dh-Kk for submit@debbugs.gnu.org; Tue, 20 Aug 2019 11:47:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38327) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i06Lg-0006BX-5f for guix-patches@gnu.org; Tue, 20 Aug 2019 11:47:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i06Le-0000Tz-V5 for guix-patches@gnu.org; Tue, 20 Aug 2019 11:47:04 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:43873) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i06Le-0000TJ-OR for guix-patches@gnu.org; Tue, 20 Aug 2019 11:47:02 -0400 Received: by mail-pg1-x532.google.com with SMTP id k3so3469051pgb.10 for ; Tue, 20 Aug 2019 08:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=mP8+PoOur9GlEW/FUyexygUk0VgRJTEcgJToSsFCzqM=; b=mpugTNSZtAKeQuNFzgnbHo/gAKDs78uUz8UDCS1K5vVOn/9FfpFSRN7HZXHzS2mE3z NqCUD0chVO7xvqt0mfsJFGJgBHV1/05cc0MHnjRHztr0EVyICKpjy1QzxkO559X1DUa0 biforKwp6dtDnJ7adv9dc3AtqbcCGUNMH4oZxsEH4b0+dnobf4viYMRlbvywaGe1uy9i Jqh/8p4AAWotw6sGK0xrlksLRpm8V7R32jkcs6riMvQOYXGm/pDdxI723d3PoLXLQP8M 8hAm6ddSj5DBjtXoKacNOnustwMJ62mBqeMxXmjGJOxwlfcigjv37BzoS5UGeL0c/UyG EYpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=mP8+PoOur9GlEW/FUyexygUk0VgRJTEcgJToSsFCzqM=; b=TcFjmfy2KzMl0e6rOaX7jxzIKbPNnLoTEL7YPLhGZRk7HGfGxA3In1p+Ui75s03vSf 5Vzl0lGLEnJic6mdEpPOypBi+OQjOoDIfY6JlvcM0ScIVUc0ibmg65np3bYyOlKix5li woC9UJq57ixVG/xpEHHt6tG2wWiXAZhy3W+Ihyie4hI442+K11RF36wJhZd4K0aLDFX7 2wxN6b3G8d6CKrR3OGn+baeyJwN3EYBA1A+eNn7bB/7mU4FECrXUm7Vph0Jl4CzCjdLs DJqEcRgOesxQU45lS/IrG5pjuWIE8DXTe1fLEeloioG1cG6MnbfEiZa0VfP2IEJYd76s L/fQ== X-Gm-Message-State: APjAAAXamWnA3I8A5zhD0IxOiDnxY9abr6tOqZA4D4/xsNHM8SGzRMfJ wFd+V9hGHreF9w2yqetMAw6MJO3t X-Google-Smtp-Source: APXvYqyOn+wMofMfHDmkVDrzY9ObV3YjML7Cwh57hWT+QQsmjRYbSofgnlE7ftiZwzYA6CLPOYJjmQ== X-Received: by 2002:a17:90a:a46:: with SMTP id o64mr673054pjo.90.1566316021379; Tue, 20 Aug 2019 08:47:01 -0700 (PDT) Received: from debian (1-64-82-217.static.netvigator.com. [1.64.82.217]) by smtp.gmail.com with ESMTPSA id v15sm21331324pfn.69.2019.08.20.08.47.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 08:47:00 -0700 (PDT) User-agent: mu4e 1.2.0; emacs 26.2 From: Alex Vong Date: Tue, 20 Aug 2019 23:46:56 +0800 Message-ID: <86v9urvnyn.fsf@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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 From e606e1f60f125a402eb13dc807d141b0c9b65fdb Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Thu, 8 Aug 2019 13:49:19 +0800 Subject: [PATCH 04/20] gnu: Add python2-tegaki-python. * gnu/packages/language.scm (python2-tegaki-python): New variable. --- gnu/packages/language.scm | 54 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm index cc685437c9..2ef4fed721 100644 --- a/gnu/packages/language.scm +++ b/gnu/packages/language.scm @@ -22,6 +22,7 @@ (define-module (gnu packages language) #:use-module (gnu packages) #:use-module (gnu packages glib) + #:use-module (gnu packages ocr) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -31,8 +32,10 @@ #:use-module (guix packages) #:use-module (guix build-system perl) #:use-module (guix build-system python) - #:use-module ((guix licenses) #:select (gpl2 gpl2+ gpl3 perl-license)) - #:use-module (guix download)) + #:use-module ((guix licenses) + #:select (bsd-3 gpl2 gpl2+ gpl3 perl-license zpl2.1)) + #:use-module (guix download) + #:use-module (guix utils)) (define-public perl-lingua-en-findnumber (package @@ -479,3 +482,50 @@ modern implementation of handwriting recognition software, specifically designed for Chinese (simplified and traditional) and Japanese, and that is suitable for both the desktop and mobile devices.") (license gpl2+))) ; all files + +(define-public python2-tegaki-python + (package + (inherit python2-tegaki-wagomu) + (name "python2-tegaki-python") + (version "0.3.1") + (source + (origin + (method url-fetch) + (uri (tegaki-release-uri "tegaki-python" version)) + (sha256 + (base32 + "0x93k7pw9nh0ywd97pr8pm7jv3f94nw044i5k0zvzhdpsjqvak7p")) + (modules remove-pre-compiled-files-modules) + (snippet (remove-pre-compiled-files "pyc")))) + (arguments + (substitute-keyword-arguments (package-arguments python2-tegaki-wagomu) + ((#:phases _) + `(modify-phases %standard-phases + (add-after 'unpack 'pre-configure + (lambda* (#:key inputs #:allow-other-keys) + ;; Always convert string to unicode to avoid the following error + ;; when running "tegaki-build" in python2-tegaki-tools: + ;; + ;; sqlite3.ProgrammingError: You must not use 8-bit bytestrings + ;; unless you use a text_factory that can interpret 8-bit + ;; bytestrings (like text_factory = str). + ;; It is highly recommended that you instead just switch your + ;; application to Unicode strings. + (substitute* "tegaki/charcol.py" + (("sqlite3.OptimizedUnicode") + "lambda s: unicode(s, 'utf-8')")) + (substitute* "tegaki/engine.py" + (("/usr(/local)?") + (assoc-ref inputs "python2-tegaki-wagomu"))) + #t)))))) + ;; override inherited inputs + (inputs '()) + (native-inputs '()) + (propagated-inputs + `(("python2-tegaki-wagomu" ,python2-tegaki-wagomu) + ("python2-zinnia" ,python2-zinnia))) + (synopsis + "Chinese and Japanese Handwriting Recognition (Base python library)") + (license (list gpl2+ ; all files except... + bsd-3 ; dictutils.py + zpl2.1)))) ; minjson.py -- 2.22.0