GNU bug report logs - #44457
[PATCH]: gnu: Add hunspell-dict-it-it.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: paul <goodoldpaul@HIDDEN>; Keywords: patch; dated Thu, 5 Nov 2020 01:23:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 44457 <at> debbugs.gnu.org:


Received: (at 44457) by debbugs.gnu.org; 7 Nov 2020 01:20:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 06 20:20:14 2020
Received: from localhost ([127.0.0.1]:57675 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kbCtm-0007HO-Sg
	for submit <at> debbugs.gnu.org; Fri, 06 Nov 2020 20:20:14 -0500
Received: from latitanza.investici.org ([82.94.249.234]:24919)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <goodoldpaul@HIDDEN>) id 1kbCth-0007H5-2R
 for 44457 <at> debbugs.gnu.org; Fri, 06 Nov 2020 20:20:09 -0500
Received: from mx3.investici.org (unknown [127.0.0.1])
 by latitanza.investici.org (Postfix) with ESMTP id 4CSfZC4YwDz8sgX
 for <44457 <at> debbugs.gnu.org>; Sat,  7 Nov 2020 01:20:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org;
 s=stigmate; t=1604712003;
 bh=QJu2tDSVdgP7KR8eHFML2F8k/dIEpATwdBzy1K+6GU8=;
 h=To:From:Subject:Date:From;
 b=bkSObMRjJ+AZpkFkhtxbHVuftCAjClswkq6NdL9AWI+kt3SYbzgHwvcbN31Ec/oGF
 maY5NOiw0ytktb0aHVCYlg7Z1IJqLcf41tF4DlYRDXwnIk4x8HtgwFjdQL1ydgeIwc
 2mdHpeKs9hhC3WYSP3O4nIOVBxI8ETfGZFEBV8X8=
Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234])
 (Authenticated sender: goodoldpaul@HIDDEN) by localhost (Postfix) with
 ESMTPSA id 4CSfZC3VGfz8sgQ
 for <44457 <at> debbugs.gnu.org>; Sat,  7 Nov 2020 01:20:03 +0000 (UTC)
To: 44457 <at> debbugs.gnu.org
From: paul <goodoldpaul@HIDDEN>
Subject: Re: [PATCH]: gnu: Add hunspell-dict-it-it.
Message-ID: <79f0de78-4d1f-7cae-3081-2581cafb51ee@HIDDEN>
Date: Sat, 7 Nov 2020 02:20:02 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Icedove/78.3.3
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------F6DF53F81EAEF73B7DCD239D"
Content-Language: en-US
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 44457
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------F6DF53F81EAEF73B7DCD239D
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi Jonathan,

I'm attaching an updated patch.

I changed the build system to trivial and removed the useless let (I=20
must admit I forgot it there). About the variable naming, technically=20
there is also it_CH: the Italian spoke in a region of Switzerland. In=20
the Libreoffice repository there's still no dedicated dictionary but it=20
could be uploaded in the future, so I'd keep the variable naming. What=20
do you think?

Thank you for your review,

Cheers

Giacomo


--------------F6DF53F81EAEF73B7DCD239D
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-gnu-Add-hunspell-dict-it-it.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="0001-gnu-Add-hunspell-dict-it-it.patch"

=46rom 17a476dd234fa4a128eb90ccc8ac9a565045bfa1 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <goodoldpaul@HIDDEN>
Date: Thu, 5 Nov 2020 02:04:20 +0100
Subject: [PATCH] gnu: Add hunspell-dict-it-it.

* gnu/packages/hunspell.scm: New file;
(hunspell-dictionary): New variable;
(hunspell-dict-it-it): New variable.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk              |  1 +
 gnu/packages/hunspell.scm | 80 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)
 create mode 100644 gnu/packages/hunspell.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 2a994bd3b9..510687e714 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -273,6 +273,7 @@ GNU_SYSTEM_MODULES =3D				\
   %D%/packages/heads.scm			\
   %D%/packages/hexedit.scm			\
   %D%/packages/hugs.scm				\
+  %D%/packages/hunspell.scm				\
   %D%/packages/hurd.scm				\
   %D%/packages/hyperledger.scm			\
   %D%/packages/i2p.scm				\
diff --git a/gnu/packages/hunspell.scm b/gnu/packages/hunspell.scm
new file mode 100644
index 0000000000..ac46dd2104
--- /dev/null
+++ b/gnu/packages/hunspell.scm
@@ -0,0 +1,80 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright =C2=A9 2020 Giacomo Leidi <goodoldpaul@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (a=
t
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages hunspell)
+  #:use-module (guix build-system trivial)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (ice-9 match)
+  #:use-module (gnu packages libreoffice))
+
+(define* (hunspell-dictionary dict-name full-name #:key home-page licens=
e)
+  (package
+    (name (string-append
+           "hunspell-dict-"
+           ;; Downcase and replace underscore in package names
+           ;; to follow Guix naming conventions.
+           (string-map (match-lambda
+                         (#\_ #\-)
+                         (chr chr))
+                       (string-downcase dict-name))))
+    (version (package-version libreoffice))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url (string-append "https://anongit.freedesktop.org/git/"
+                                 "libreoffice/dictionaries.git/"))
+             (commit
+              (string-append "libreoffice-" version))))
+       (file-name (git-file-name "libreoffice-dictionaries" version))
+       (sha256
+        (base32 "0vvxnjpm1322ahf9q8bqs1yhkn7krglw8c6yazcf7a3jljykd9k9"))=
))
+    (build-system trivial-build-system)
+    (native-inputs
+     `(("source" ,source)))
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils))
+                   (let* ((dictionary
+                           (string-append (assoc-ref %build-inputs "sour=
ce")
+                                          "/" ,dict-name
+                                          "/" ,dict-name))
+                          (hunspell (string-append %output "/share/hunsp=
ell/"))
+                          (myspell (string-append %output "/share/myspel=
l")))
+                     (for-each
+                      (lambda (ext)
+                        (install-file (string-append dictionary ext)
+                                      hunspell))
+                      '(".aff" ".dic"))
+                     (symlink hunspell myspell)
+                     #t))))
+    (synopsis
+     (string-append "Hunspell dictionary for " full-name " (" dict-name =
")"))
+    (description "This package provides a dictionary for the Hunspell
+spell-checking library.")
+    (license license)
+    (home-page home-page)))
+
+(define-public hunspell-dict-it-it
+  (hunspell-dictionary "it_IT" "Italian"
+                       #:home-page "https://libreitalia.org/"
+                       #:license license:gpl3))
--=20
2.29.1


--------------F6DF53F81EAEF73B7DCD239D--




Information forwarded to guix-patches@HIDDEN:
bug#44457; Package guix-patches. Full text available.

Message received at 44457 <at> debbugs.gnu.org:


Received: (at 44457) by debbugs.gnu.org; 5 Nov 2020 15:31:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 05 10:31:16 2020
Received: from localhost ([127.0.0.1]:53863 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kahEG-0006R9-TL
	for submit <at> debbugs.gnu.org; Thu, 05 Nov 2020 10:31:16 -0500
Received: from mout.web.de ([217.72.192.78]:43195)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jonathan.brielmaier@HIDDEN>) id 1kahEC-0006Qr-1Z
 for 44457 <at> debbugs.gnu.org; Thu, 05 Nov 2020 10:31:12 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1604590262;
 bh=ZDacDzcKSEbTmOidY3CKoXKzpuPaGxPrVk6iZ0WeKnI=;
 h=X-UI-Sender-Class:To:Subject:From:Date;
 b=q2yvbSP4Ctyqk+fQkXyMmRULOc5Cbm9oFvHI+eRN9zN7Uhhhz1pqX76xvqmYaSCHl
 cR6BRW2P1KN4PcHfJa3UiAqLrg4wsO7C6qGuJye8XHLFQsaSM9a9e90yH4QCRNWh8G
 oR63Jww+Zd/4JFsbBC7rLSfl5Abq0xeuYIAms8oo=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from [192.168.178.54] ([5.146.192.20]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MRW2R-1kvvX63om5-00NJnI for
 <44457 <at> debbugs.gnu.org>; Thu, 05 Nov 2020 16:31:01 +0100
To: 44457 <at> debbugs.gnu.org
Subject: [PATCH]: gnu: Add hunspell-dict-it-it.
From: Jonathan Brielmaier <jonathan.brielmaier@HIDDEN>
Message-ID: <912a7c46-8b76-057c-e7e4-ece87b3984fe@HIDDEN>
Date: Thu, 5 Nov 2020 16:31:01 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Icedove/78.4.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:VC04c79mhezRHle3iFIZoPg0mQ6syY55boVSy72mWMwsaPSQ7LD
 7feX0G2KQjY2EtOXBQ/b1CX7Et2AqLaZTGSo8/rmgpEyIaOCud3fyv0piuSKSmAmdMrn8mo
 MF0is9LFPTHWyQ++bKemKvBr17u4W8pqBaEqdNLRyQmZboQatuES+mDHVMt/5q/aDeEdDtX
 W7qeyP5IZP+pt9U8O2OxQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:MeBvCK56kRE=:sQzUAuBrXCYPsW9/MqwTMZ
 D7ZdtHmTC6A1QzLoxssPcqXKHFhUMU+fYrkfgOaLIhAR0sotvrojSPE/vgiljBJZotCN+pkG7
 KKXvPmk38B8efKmQ7iafPOnhOrN0AGoxw6+NpFhUPUl3tOarx1AjQQGY/y3jXHilEQw2xUucK
 2Hqc8HQfRXjal6ZWyNwINkLKcq65+JTgFZDiFsrupsjE+m5K4qPlQZaudZRJbfun2b+GU+gjX
 NXCerB6TPgc7WikIUZyv4+Rt+gfygr6ml0MCxgRns6cyd6cfq4lfCf4q090N7QQZkfHw9Rya8
 4DHZ2v/8rw5yL/3PiAXD5N5nXq/pBTWh5l2nLxhFM4ED3IZtgCTEqg5hjDA2l4uw0YiaZI5T2
 /9b/aX2Z6AmwoZnxvPQYwXS3+/YPrbCxJugK5v8dGQ9G/oK+Nsrz0+5UxY627ZlpUrfbDB0Fz
 KfWK1OyiVMbIv3r2TB+3E6SgVvv8TdnLlAq33JBXnmorFVSPgmhSV5xqjrIbF5J1vuJVWsoIT
 l38BlZUsy6ePuEGbajg3hhpBLmzD4pALLOk5QxChsKMo84bQWl4jvKjlSTRHAyEZD0Ou7rAxK
 HmfTFG/cDfuo3aUxUpWcSTvei0XXsryd1OccEDrcDdtjUC4gouk9tsH00BeBuJ983ipX97kvb
 ADNRINR0oxdID58XbqZ482QzKyrl+iKN5x3Fyvzkv9td0pMEwYeKYkDuFeNq8VL4rEd+bOSGN
 Mo9ESH7iqCZGLT7yphfyp/7fWv076ZeoY1ejOJwXH+0W10kNlPEHMxmmBvxjtDWJU5qIPKHl0
 nzhNaOnsmI33UYqqX2qQdvk5D6Rh7V84Y5k5PoNQCr5pdk+u7J7EqgJxEYYkHwOMNLZ2To4Ps
 P0dFEw7Ayh68zxxLvuIqOkBFk9WvaXSKhFB4fnZiE=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 44457
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Subject: [PATCH] gnu: Add hunspell-dict-it-it.

In theory you could it split into two commits: one for the
hunspell-dictionary function and the other for the italian dict. But I
think it's okay so.

> +    (build-system gnu-build-system)
> +    (arguments

Maybe it would be an idea to (build-system trivial-build-system) instead?

> +(define-public hunspell-dict-it-it

If there is only one language version like with Italian, I think it
would be nicer to have it name `hunspell-dict-it`. But I guess it makes
the code a bit more complicated.

> +  (let ((home-page "https://libreitalia.org/")
> +        (license license:gpl3))
> +    (hunspell-dictionary "it_IT" "Italian"
> +                         #:home-page home-page
> +                         #:license license)))

For me the let feels a bit useless...

hunspell-dict-it-it builds and installs fine. It works in LibreOffice
just fine!

~Jonathan




Information forwarded to guix-patches@HIDDEN:
bug#44457; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Nov 2020 01:22:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 04 20:22:54 2020
Received: from localhost ([127.0.0.1]:51047 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kaTzE-0005R8-PI
	for submit <at> debbugs.gnu.org; Wed, 04 Nov 2020 20:22:54 -0500
Received: from lists.gnu.org ([209.51.188.17]:38410)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <goodoldpaul@HIDDEN>) id 1kaTz9-0005Qv-V4
 for submit <at> debbugs.gnu.org; Wed, 04 Nov 2020 20:22:47 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:39914)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <goodoldpaul@HIDDEN>)
 id 1kaTz9-00017h-Pp
 for guix-patches@HIDDEN; Wed, 04 Nov 2020 20:22:43 -0500
Received: from latitanza.investici.org ([82.94.249.234]:46945)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <goodoldpaul@HIDDEN>)
 id 1kaTz5-0008RJ-3M
 for guix-patches@HIDDEN; Wed, 04 Nov 2020 20:22:43 -0500
Received: from mx3.investici.org (unknown [127.0.0.1])
 by latitanza.investici.org (Postfix) with ESMTP id 4CRQk40y3bz8sgP
 for <guix-patches@HIDDEN>; Thu,  5 Nov 2020 01:22:36 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org;
 s=stigmate; t=1604539356;
 bh=VaYS64UicGG137uNUMC9reDstUVon3uoRCbWlU4YA84=;
 h=To:From:Subject:Date:From;
 b=sti8URnV8Mas9OO5fcWgpyEpz1CB+ceI8b++HZS1sN+/A0iF9hAP6S9wzc2b/ZqaJ
 VLxCIV2x/ZeyS11PUmUwAMHRXZVbYoLknDkvLlB42Zqb9hitmka4n55B8ffBJ6YrN9
 8EM4kN8mUv6E6gi6i4hFOP8hUytYMh+2Naq3yVoc=
Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234])
 (Authenticated sender: goodoldpaul@HIDDEN) by localhost (Postfix) with
 ESMTPSA id 4CRQk32gMhz8sfr
 for <guix-patches@HIDDEN>; Thu,  5 Nov 2020 01:22:35 +0000 (UTC)
To: guix-patches@HIDDEN
From: paul <goodoldpaul@HIDDEN>
Subject: [PATCH]: gnu: Add hunspell-dict-it-it.
Message-ID: <d7bfc77e-3a8c-bf80-c7d1-e0dff62006e8@HIDDEN>
Date: Thu, 5 Nov 2020 02:22:34 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Icedove/78.3.3
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------410A34A94F90923DEE34E1E2"
Content-Language: en-US
Received-SPF: pass client-ip=82.94.249.234;
 envelope-from=goodoldpaul@HIDDEN; helo=latitanza.investici.org
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 20:20:55
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

This is a multi-part message in MIME format.
--------------410A34A94F90923DEE34E1E2
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Dear Guixers,

as discussed here [0] and [1], I'm sending a patch to add a new=20
hunspell.scm file to store hunspell dictionaries and an Italian=20
dictionary. I tried to make my implementation reusable by other=20
languages by defining a function that produces dictionary packages.

If there is consensus I can move other hunspell dictionaries to the new=20
file and/or convert them to use the new function.

Thank you for your review.

Cheers,

Giacomo


[0]: https://issues.guix.gnu.org/42474

[1]: https://lists.nongnu.org/archive/html/guix-devel/2020-11/msg00000.ht=
ml


--------------410A34A94F90923DEE34E1E2
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-gnu-Add-hunspell-dict-it-it.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="0001-gnu-Add-hunspell-dict-it-it.patch"

=46rom e5db7d7e9c66fa105966fe88d18a40d8075b9f61 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <goodoldpaul@HIDDEN>
Date: Thu, 5 Nov 2020 02:04:20 +0100
Subject: [PATCH] gnu: Add hunspell-dict-it-it.

* gnu/packages/hunspell.scm: New file;
(hunspell-dictionary): New variable;
(hunspell-dict-it-it): New variable.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk              |  1 +
 gnu/packages/hunspell.scm | 81 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+)
 create mode 100644 gnu/packages/hunspell.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 2a994bd3b9..510687e714 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -273,6 +273,7 @@ GNU_SYSTEM_MODULES =3D				\
   %D%/packages/heads.scm			\
   %D%/packages/hexedit.scm			\
   %D%/packages/hugs.scm				\
+  %D%/packages/hunspell.scm				\
   %D%/packages/hurd.scm				\
   %D%/packages/hyperledger.scm			\
   %D%/packages/i2p.scm				\
diff --git a/gnu/packages/hunspell.scm b/gnu/packages/hunspell.scm
new file mode 100644
index 0000000000..1340ecee7b
--- /dev/null
+++ b/gnu/packages/hunspell.scm
@@ -0,0 +1,81 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright =C2=A9 2020 Giacomo Leidi <goodoldpaul@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (a=
t
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages hunspell)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (ice-9 match)
+  #:use-module (gnu packages libreoffice))
+
+(define* (hunspell-dictionary dict-name full-name #:key home-page licens=
e)
+  (package
+    (name (string-append
+           "hunspell-dict-"
+           ;; Downcase and replace underscore in package names
+           ;; to follow Guix naming conventions.
+           (string-map (match-lambda
+                         (#\_ #\-)
+                         (chr chr))
+                       (string-downcase dict-name))))
+    (version (package-version libreoffice))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url (string-append "https://anongit.freedesktop.org/git/"
+                                 "libreoffice/dictionaries.git/"))
+             (commit
+              (string-append "libreoffice-" version))))
+       (file-name (git-file-name "libreoffice-dictionaries" version))
+       (sha256
+        (base32 "0vvxnjpm1322ahf9q8bqs1yhkn7krglw8c6yazcf7a3jljykd9k9"))=
))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'build)
+         (replace 'install              ;no install target
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (hunspell (string-append out "/share/hunspell/"))
+                    (myspell (string-append out "/share/myspell")))
+               (for-each
+                (lambda (ext)
+                  (install-file (string-append ,dict-name "/" ,dict-name=
 ext)
+                                hunspell))
+                '(".aff" ".dic"))
+               (symlink hunspell myspell)
+               #t))))
+       #:tests? #f))                    ; no tests
+    (synopsis
+     (string-append "Hunspell dictionary for " full-name " (" dict-name =
")"))
+    (description "This package provides a dictionary for the Hunspell
+spell-checking library.")
+    (license license)
+    (home-page home-page)))
+
+(define-public hunspell-dict-it-it
+  (let ((home-page "https://libreitalia.org/")
+        (license license:gpl3))
+    (hunspell-dictionary "it_IT" "Italian"
+                         #:home-page home-page
+                         #:license license)))
--=20
2.29.1


--------------410A34A94F90923DEE34E1E2--




Acknowledgement sent to paul <goodoldpaul@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#44457; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 7 Nov 2020 01:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.