From debbugs-submit-bounces@debbugs.gnu.org Sat May 11 15:51:58 2024 Received: (at submit) by debbugs.gnu.org; 11 May 2024 19:51:58 +0000 Received: from localhost ([127.0.0.1]:50230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5slC-0005ZP-5k for submit@debbugs.gnu.org; Sat, 11 May 2024 15:51:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:44088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5slA-0005ZJ-Jv for submit@debbugs.gnu.org; Sat, 11 May 2024 15:51:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s5slA-00030n-R6 for guix-patches@gnu.org; Sat, 11 May 2024 15:51:56 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117] helo=email.rimm.ee) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1s5sl9-0003Cu-3k for guix-patches@gnu.org; Sat, 11 May 2024 15:51:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1715457107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WIBRA1QkOknKPY2tlqvSaO6enEIsz+k9Llswrs6rh5g=; b=eJjc4HiRqHkB1knnYfIvx7CMZg+Jw1SVoSNUY7nEpZDXzuYY4CLbJ60bcpjLRMWP1qfGAp yQ0DII9eAXI57tsh30/JaOE5mDfVeYbPSKU4dFsSgpkgf6NY6g9X/oG5EieKF2Qn8laxhq fe0NylcGwV8bWDyxTSKsiBKJitwq9ox/SBIuMtTxsQJLejM3ejQwci12PDQqK0gcK+8T5C wTCkXpfmToC5AxZSTUId6qoGTxBam1s+fFa7ZDIr4/3ouF35thPVT70CVqnlb4DOQVSQvc JYx3tq45FvLRX8rpqZQp+az6WGGaAvT7tkAWbXLMN9025fBdYicTfWemtelNKQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 8ca2c4c0 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for ; Sat, 11 May 2024 19:51:47 +0000 (UTC) From: Herman Rimm To: guix-patches@gnu.org Subject: [PATCH 0/2] Package qutebrowser spellcheck files. Date: Sat, 11 May 2024 21:51:39 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=81.205.150.117; envelope-from=herman@rimm.ee; helo=email.rimm.ee X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_PBL=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hello, The first patch packages .bdic files built from the hunspell .dic and .aff files. In the second one qutebrowser is patched to instruct users to install those files if missing, instead of downloading them from a Chromium Project repository with the dictcli.py script. Cheers, Herman Herman Rimm (2): gnu: Add hunspell-bdic-en*. gnu: qutebrowser: Warn about missing .bdic files and ignore version. gnu/packages/hunspell.scm | 82 +++++++++++++++++++++++++++++++++++ gnu/packages/web-browsers.scm | 16 +++++++ 2 files changed, 98 insertions(+) base-commit: 360fea15cb25d0cdf55ec55488956257a0219fe4 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Sat May 11 15:58:10 2024 Received: (at 70884) by debbugs.gnu.org; 11 May 2024 19:58:10 +0000 Received: from localhost ([127.0.0.1]:50259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5srB-0005dh-To for submit@debbugs.gnu.org; Sat, 11 May 2024 15:58:10 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:45517 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5sr9-0005dE-2r for 70884@debbugs.gnu.org; Sat, 11 May 2024 15:58:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1715457481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5e9l5T9lR2xPM1v8uxIAgTPTcbXeVUzfo+q2tGoIauM=; b=heFqBPYYFGb0tQ29MXDlulxgQe6q+FW+i0p1H93hgae5L8g3sKJewM4eXq4/YyXm2SRVWw MLb32H8UGQcs61DEio2zxQtUOupO41VUHkengkN1+wIav55tFuulyGwRgsbVv6MH49OZzl ku4OiMClm/Y/5BNPlUahd8HX8Xx4njP4k4Adv+djXAh3O9YhZ+F4qrv44fbQzXQ/+fEidj xCmXOrPO3iLUwxFTdV2Rjm2A6JwGz3W62wGYeavbjUiXWBRAcYoPrdv0+lbyxdpFoX4f/4 zVrGhvVDyonyYfu2DkVM9fO2ggBgHFX5dyiCW5smy6fYJqVWT+Tdwe2PqsxvqA== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 0b57e7b9 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70884@debbugs.gnu.org>; Sat, 11 May 2024 19:58:01 +0000 (UTC) From: Herman Rimm To: 70884@debbugs.gnu.org Subject: [PATCH 1/2] gnu: Add hunspell-bdic-en*. Date: Sat, 11 May 2024 21:57:52 +0200 Message-ID: <15b7554f7b3f45c2b184778faf1891d93e038426.1715456480.git.herman@rimm.ee> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/aspell.scm (aspell-compiled-word-list): New procedure. (define-compiled-word-list-dictionary): New macro. (hunspell-bdic-en, hunspell-bdic-en-au, hunspell-bdic-en-ca, hunspell-bdic-en-g [...] Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 TVD_RCVD_IP Message was received from an IP address 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 70884 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/aspell.scm (aspell-compiled-word-list): New procedure. (define-compiled-word-list-dictionary): New macro. (hunspell-bdic-en, hunspell-bdic-en-au, hunspell-bdic-en-ca, hunspell-bdic-en-g [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * gnu/packages/aspell.scm (aspell-compiled-word-list): New procedure. (define-compiled-word-list-dictionary): New macro. (hunspell-bdic-en, hunspell-bdic-en-au, hunspell-bdic-en-ca, hunspell-bdic-en-gb, hunspell-bdic-en-gb-ize, hunspell-bdic-en-us): New variables. Change-Id: I4f02295add9803aefe7687b11d2bcbcb21cdd6b1 --- gnu/packages/hunspell.scm | 82 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/gnu/packages/hunspell.scm b/gnu/packages/hunspell.scm index 7163358260..782292c79f 100644 --- a/gnu/packages/hunspell.scm +++ b/gnu/packages/hunspell.scm @@ -32,6 +32,7 @@ (define-module (gnu packages hunspell) #:use-module (gnu packages compression) #:use-module (gnu packages m4) #:use-module (gnu packages perl) + #:use-module (gnu packages qt) #:use-module (gnu packages textutils)) (define-public hunspell @@ -445,3 +446,84 @@ (define-word-list-dictionary hunspell-dict-en-us "en_US" (synopsis "Hunspell dictionary for United States English")) +(define* (aspell-compiled-word-list + language + synopsis + #:optional + (nick (string-map (lambda (chr) + (if (char=? #\_ chr) + #\- + chr)) + (string-downcase language)))) + (package + (inherit (aspell-word-list language synopsis nick)) + (name (string-append "hunspell-bdic-" nick)) + (version "2018.04.16") + (native-inputs + (list (aspell-word-list language synopsis nick) qtwebengine)) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((dictionary + (string-append + (assoc-ref %build-inputs + (string-append "hunspell-dict-" ,nick)) + "/share/hunspell/" ,language ".dic")) + (convert-dict + (string-append + (assoc-ref %build-inputs "qtwebengine") + "/lib/qt6/libexec/qwebengine_convert_dict")) + (qtwebengine-dictionaries + (string-append %output + "/share/qtwebengine_dictionaries")) + (bdic (string-append (string-map (lambda (chr) + (if (char=? #\_ chr) + #\- + chr)) + ,language) + ".bdic"))) + (invoke convert-dict dictionary bdic) + (install-file bdic qtwebengine-dictionaries) + #t)))) + (description + "This package provides a compiled dictionary for the Hunspell +spell-checking library."))) + +(define-syntax define-compiled-word-list-dictionary + (syntax-rules (synopsis) + ((_ name language (synopsis text)) + (define-public name + (aspell-compiled-word-list language text))) + ((_ name language nick (synopsis text)) + (define-public name + (aspell-compiled-word-list language text nick))))) + +(define-compiled-word-list-dictionary hunspell-bdic-en + "en" + (synopsis "Compiled Hunspell dictionary for English")) + +(define-compiled-word-list-dictionary hunspell-bdic-en-au + "en_AU" + (synopsis "Compiled Hunspell dictionary for Australian English")) + +(define-compiled-word-list-dictionary hunspell-bdic-en-ca + "en_CA" + (synopsis "Compiled Hunspell dictionary for Canadian English")) + +(define-compiled-word-list-dictionary hunspell-bdic-en-gb + "en_GB-ise" "en-gb" + (synopsis + "Compiled Hunspell dictionary for British English, with -ise endings")) + +(define-compiled-word-list-dictionary hunspell-bdic-en-gb-ize + "en_GB-ize" + (synopsis + "Compiled Hunspell dictionary for British English, with -ize endings")) + +(define-compiled-word-list-dictionary hunspell-bdic-en-us + "en_US" + (synopsis "Compiled Hunspell dictionary for United States English")) + -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Sat May 11 15:58:12 2024 Received: (at 70884) by debbugs.gnu.org; 11 May 2024 19:58:12 +0000 Received: from localhost ([127.0.0.1]:50261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5srE-0005do-AA for submit@debbugs.gnu.org; Sat, 11 May 2024 15:58:12 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:45517 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5srA-0005dE-4s for 70884@debbugs.gnu.org; Sat, 11 May 2024 15:58:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1715457481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dmi9qUEEa2zgnTtEhELjOQCQ1EjtMcN7/TVXa2vI5iQ=; b=G9Vh1UPoCk4TgKfLkOrmwOPVrc4B+OpfTXeKUXm5xlMJrHHZidbugNDQ7oADXVEaSR9p5j BYHdFrokziGt9sO/mAQs7hxsIxt9XOkldFRF52WKJ4IgeK3+/Kipfhx6yMDGMgTet1KSLX Y1jRb+c1O653mutvNaNzMtfM5qwjITDlaQp2gblRNzBU6RB9BJDX0uJLlp/Of/9vyo0ovW gWZU4ydFwfYIewcvYhDleUuTnfam6Pn0Goy/ssUlZiyQ8WJFyMnKZZCSDMycTIeYGOaDzR IjnAXzt7RuqdfVRxjScWvXi0EUft7OVKLmUea9WAjMIHghEusSM8sORVt3yweQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id a349a687 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <70884@debbugs.gnu.org>; Sat, 11 May 2024 19:58:01 +0000 (UTC) From: Herman Rimm To: 70884@debbugs.gnu.org Subject: [PATCH 2/2] gnu: qutebrowser: Warn about missing .bdic files and ignore version. Date: Sat, 11 May 2024 21:57:53 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/web.browsers.scm (qutebrowser): Add build phase. Change-Id: Ib33c69ca4c95329c82edf9c7a6436ec9a1a0f7a7 --- gnu/packages/web-browsers.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] 0.0 TVD_RCVD_IP Message was received from an IP address 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 70884 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/web.browsers.scm (qutebrowser): Add build phase. Change-Id: Ib33c69ca4c95329c82edf9c7a6436ec9a1a0f7a7 --- gnu/packages/web-browsers.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [81.205.150.117 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * gnu/packages/web.browsers.scm (qutebrowser): Add build phase. Change-Id: Ib33c69ca4c95329c82edf9c7a6436ec9a1a0f7a7 --- gnu/packages/web-browsers.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index 78227a84fb..fe28f0c149 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -511,6 +511,22 @@ (define-public qutebrowser (string-append "os.path.join(\"" (assoc-ref outputs "out") "\", \"share\", \"qutebrowser\""))))) + (add-after 'unpack 'adjust-dictionary-warning-and-parsing + (lambda _ + (substitute* "qutebrowser/browser/webengine/webenginesettings.py" + (("- see") + "- install hunspell-bdic-{} package files to") + (("scripts/dictcli.py in qutebrowser's ") + "{}/qutebrowser/qtwebengine_dictionaries") + (("\"sources\".format\\(code") + ".format(code, code.lower(), os.getenv('XDG_DATA_HOME')")) + (substitute* "qutebrowser/browser/webengine/spell.py" + (("for matching_dict in matching_dicts") + "if False") + (("filename for version, filename") + "os.path.basename(dict) for dict") + (("in sorted\\(versioned_dicts.*") + "in matching_dicts]")))) (add-before 'check 'set-env-offscreen (lambda _ (setenv "QT_QPA_PLATFORM" "offscreen"))) -- 2.41.0