From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GTSQB6r2pV/kXgAA0tVLHw (envelope-from ) for ; Sat, 07 Nov 2020 01:21:46 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eMrJAqr2pV9PMgAAB5/wlQ (envelope-from ) for ; Sat, 07 Nov 2020 01:21:46 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4B93C94053C for ; Sat, 7 Nov 2020 01:21:45 +0000 (UTC) Received: from localhost ([::1]:55338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbCvG-0004iz-Or for larch@yhetil.org; Fri, 06 Nov 2020 20:21:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbCuc-0004id-AG for guix-patches@gnu.org; Fri, 06 Nov 2020 20:21:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46129) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kbCuc-0005hN-0W for guix-patches@gnu.org; Fri, 06 Nov 2020 20:21:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kbCub-0007Iq-Sh for guix-patches@gnu.org; Fri, 06 Nov 2020 20:21:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44457] [PATCH]: gnu: Add hunspell-dict-it-it. References: In-Reply-To: Resent-From: paul Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Nov 2020 01:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44457 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44457@debbugs.gnu.org Received: via spool by 44457-submit@debbugs.gnu.org id=B44457.160471201427994 (code B ref 44457); Sat, 07 Nov 2020 01:21:01 +0000 Received: (at 44457) by debbugs.gnu.org; 7 Nov 2020 01:20:14 +0000 Received: from localhost ([127.0.0.1]:57675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbCtm-0007HO-Sg for submit@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 ) id 1kbCth-0007H5-2R for 44457@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@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@autistici.org) by localhost (Postfix) with ESMTPSA id 4CSfZC3VGfz8sgQ for <44457@debbugs.gnu.org>; Sat, 7 Nov 2020 01:20:03 +0000 (UTC) From: paul Message-ID: <79f0de78-4d1f-7cae-3081-2581cafb51ee@autistici.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=autistici.org header.s=stigmate header.b=bkSObMRj; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: pM2kw8QnM8if 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 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 +;;; +;;; 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 . + +(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--