From patchwork Thu Jun 6 05:44:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jens_M=C3=B8lgaard?= X-Patchwork-Id: 14245 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 1380017060; Thu, 6 Jun 2019 06:46:14 +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,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 B093717042 for ; Thu, 6 Jun 2019 06:46:13 +0100 (BST) Received: from localhost ([127.0.0.1]:55027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYlE0-0007yc-Eg for patchwork@mira.cbaines.net; Thu, 06 Jun 2019 01:46:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYlDv-0007xo-F7 for guix-patches@gnu.org; Thu, 06 Jun 2019 01:46:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYlDu-0007Wo-D0 for guix-patches@gnu.org; Thu, 06 Jun 2019 01:46:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35136) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hYlDu-0007Wd-9H for guix-patches@gnu.org; Thu, 06 Jun 2019 01:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hYlDu-0003he-2m for guix-patches@gnu.org; Thu, 06 Jun 2019 01:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36112] [PATCH] gnu: aspell.scm: Fix dictionaries with underscore/uppercase in name. Resent-From: Jens =?utf-8?b?TcO4bGdhYXJk?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 06 Jun 2019 05:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36112 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 36112@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155979990814161 (code B ref -1); Thu, 06 Jun 2019 05:46:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jun 2019 05:45:08 +0000 Received: from localhost ([127.0.0.1]:48678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYlD2-0003gL-5V for submit@debbugs.gnu.org; Thu, 06 Jun 2019 01:45:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYlCz-0003fX-FF for submit@debbugs.gnu.org; Thu, 06 Jun 2019 01:45:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:42936) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYlCu-0005nG-AC for submit@debbugs.gnu.org; Thu, 06 Jun 2019 01:45:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYlCt-0007q0-5h for guix-patches@gnu.org; Thu, 06 Jun 2019 01:45:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYlCr-0005l0-WF for guix-patches@gnu.org; Thu, 06 Jun 2019 01:44:59 -0400 Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21323) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYlCr-0005j9-1g for guix-patches@gnu.org; Thu, 06 Jun 2019 01:44:57 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1559799890; cv=none; d=zoho.com; s=zohoarc; b=RFXKDAJ0y7OzSLqx0PrZUVbbqqDiK/VyLrxvtXZOCUEnEJTvJiq/chXLBFgyk7IaT2RHu0DyworbRjgHeh7HaLRyDxQSZbNEiw6EsK4ohv+OzyqKaF5XCiz44G/P/Kxu9IybWihnripdu/iNQDhaJD/kdRHn5OfjPNHtdjCKkPc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559799890; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To:ARC-Authentication-Results; bh=z2/MaD5+8pP8OHq59oDycmgRaTeHZztjgQT6FgkX4v8=; b=hH6v62QKBNEfL0Vcv1+8M/tk0BWtHDZgM3BJB6tNOEEeX/p+opGUNcRoxZEe1VdJHdSQxNFqre3LGqBy+zjniutuLGGVO+F3F94A+a+XCQJrQS5wPOh+1REoNE4yarQjh0aqqs5ISINQJ7UaM7OLkkjtDkCHOmpcvZ/hZh/AZ6o= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=zete.tk; spf=pass smtp.mailfrom=jens@zete.tk; dmarc=pass header.from= header.from= Received: from localhost (118.148.111.219 [118.148.111.219]) by mx.zohomail.com with SMTPS id 155979988922583.53259023665544; Wed, 5 Jun 2019 22:44:49 -0700 (PDT) From: Jens =?utf-8?b?TcO4bGdhYXJk?= User-Agent: Emacs/26.2 (x86_64-pc-linux-gnu) Date: Thu, 06 Jun 2019 17:44:46 +1200 Message-ID: <871s07jmi9.fsf@zete.tk> MIME-Version: 1.0 X-Zoho-Virus-Status: 1 X-ZohoMailClient: External X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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 Salut Guix! Since the same string is used to generate both the package names and source URLs of Aspell dictionaries, dictionaries pt-pt and pt-br have been producing invalid URLs. Their upstream names are pt_PT and pt_BR. This could be fixed by changing either the way package names or URLs are generated. Rather than adapting URLs to special cases, it seems more straightforward to let the dict-name string represent upstream name, and then downcase and replace underscores to produce a package name in accordance with the naming conventions. This was the simplest/easiest thing I could come up with. Do let me know if there is a smarter way! Kind regards, Jens M From 2bc4b7b31004642fcf300fe49f7b27ebd0353774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20M=C3=B8lgaard?= Date: Thu, 6 Jun 2019 17:06:56 +1200 Subject: [PATCH] gnu: aspell.scm: Fix dictionaries with underscore/uppercase in name. --- gnu/packages/aspell.scm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm index 1bbe57a4ef..19b22c11eb 100644 --- a/gnu/packages/aspell.scm +++ b/gnu/packages/aspell.scm @@ -32,7 +32,8 @@ #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages compression) - #:use-module (gnu packages perl)) + #:use-module (gnu packages perl) + #:use-module (ice-9 regex)) (define-public aspell (package @@ -102,7 +103,12 @@ dictionaries, including personal ones.") (define* (aspell-dictionary dict-name full-name #:key version sha256 (prefix "aspell6-")) (package - (name (string-append "aspell-dict-" dict-name)) + (name (string-append + "aspell-dict-" + (regexp-substitute/global + ;; Downcase and replace underscore in package names + ;; to follow Guix naming conventions. + #f "_" (string-downcase dict-name) 'pre "-" 'post))) (version version) (source (origin (method url-fetch) @@ -281,7 +287,7 @@ dictionaries, including personal ones.") "0w2k5l5rbqpliripgqwiqixz5ghnjf7i9ggbrc4ly4vy1ia10rmc"))) (define-public aspell-dict-pt-br - (aspell-dictionary "pt-br" "Brazilian Portuguese" + (aspell-dictionary "pt_BR" "Brazilian Portuguese" #:version "20090702-0" #:prefix "aspell6-" #:sha256 @@ -289,7 +295,7 @@ dictionaries, including personal ones.") "1y09lx9zf2rnp55r16b2vgj953l3538z1vaqgflg9mdvm555bz3p"))) (define-public aspell-dict-pt-pt - (aspell-dictionary "pt-pt" "Portuguese" + (aspell-dictionary "pt_PT" "Portuguese" #:version "20070510-0" #:prefix "aspell6-" #:sha256 -- 2.21.0