From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:41171) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZ7BZ-0004Ht-5d for guix-patches@gnu.org; Fri, 07 Jun 2019 01:13:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZ7BX-0000iR-B5 for guix-patches@gnu.org; Fri, 07 Jun 2019 01:13:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37633) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hZ7BW-0000ho-ID for guix-patches@gnu.org; Fri, 07 Jun 2019 01:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hZ7BW-0002MH-AM for guix-patches@gnu.org; Fri, 07 Jun 2019 01:13:02 -0400 Subject: [bug#36112] [PATCH] gnu: aspell.scm: Fix dictionaries with underscore/uppercase in name. Resent-Message-ID: From: Jens =?UTF-8?Q?M=C3=B8lgaard?= In-Reply-To: <87tvd2lo0t.fsf@gnu.org> References: <871s07jmi9.fsf@zete.tk> <87tvd2lo0t.fsf@gnu.org> Date: Fri, 07 Jun 2019 16:56:57 +1200 Message-ID: <87r286ngbq.fsf@zete.tk> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 36112@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thank you for the handholding, by the way... ;-) Ludovic Court=C3=A8s writes: > What about avoiding regexps with something like: > > (string-map (match-lambda > (#\_ #\-) > (chr chr)) > (string-downcase dict-name)) > > ? Yeah, that looks a lot nicer / more scheme-y to me as well. Was trying to find something to use with string-map. > > Please provide a ChangeLog-style commit log. :-) > > https://gnu.org/software/guix/manual/en/html_node/Submitting-Patches.ht= ml > How is this one? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-aspell.scm-Handle-dictionary-names-with-undersco.patch Content-Transfer-Encoding: quoted-printable From=20f2c43296e7e76d6343749f0fa04b0b9223710bb1 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Jens=3D20M=3DC3=3DB8lgaard?=3D Date: Thu, 6 Jun 2019 17:06:56 +1200 Subject: [PATCH] gnu: aspell.scm: Handle dictionary names with underscore/uppercase. * gnu/packages/aspell.scm(aspell-dictionary): Generate package name from upstream name. (aspell-dict-pt-pt, aspell-dict-pt-br): Use upstream name for URL. =2D-- gnu/packages/aspell.scm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm index 1bbe57a4ef..cbc9baeeb3 100644 =2D-- 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) =2D #:use-module (gnu packages perl)) + #:use-module (gnu packages perl) + #:use-module (ice-9 match)) =20 (define-public aspell (package @@ -102,7 +103,14 @@ dictionaries, including personal ones.") (define* (aspell-dictionary dict-name full-name #:key version sha256 (prefix "aspell6-")) (package =2D (name (string-append "aspell-dict-" dict-name)) + (name (string-append + "aspell-dict-" + ;; Downcase and replace underscore in package names + ;; to follow Guix naming conventions. + (string-map (match-lambda + (#\_ #\-) + (chr chr)) + (string-downcase dict-name)))) (version version) (source (origin (method url-fetch) @@ -281,7 +289,7 @@ dictionaries, including personal ones.") "0w2k5l5rbqpliripgqwiqixz5ghnjf7i9ggbrc4ly4vy1ia10rm= c"))) =20 (define-public aspell-dict-pt-br =2D (aspell-dictionary "pt-br" "Brazilian Portuguese" + (aspell-dictionary "pt_BR" "Brazilian Portuguese" #:version "20090702-0" #:prefix "aspell6-" #:sha256 @@ -289,7 +297,7 @@ dictionaries, including personal ones.") "1y09lx9zf2rnp55r16b2vgj953l3538z1vaqgflg9mdvm555bz3= p"))) =20 (define-public aspell-dict-pt-pt =2D (aspell-dictionary "pt-pt" "Portuguese" + (aspell-dictionary "pt_PT" "Portuguese" #:version "20070510-0" #:prefix "aspell6-" #:sha256 =2D-=20 2.21.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE/VzWzPUn4Rzyui0RiZ866GcCScAFAlz57pkACgkQiZ866GcC ScArNRAAjPTFYu8iKIjagn04dCwaJ78wxcEuGBOMuIKJSpSO7Bpgff+Rb4HVNh/v iFKVBMRBU8POH1yYJaurBZsHN9NRv9x3tdcQgUiXL0pRb5Hqu1QQXsgWI8WU7EBc 3G+pP5Oy7Y6X090QQ4wF+kawn1Lan0bOxA3vbPVNuLvmo+B0AIk72qgKtpCVlldL GV2C+0FpzCkp7EyVV2GJNyWg569LQRTg5uuTo3+HxY9ZU1YACpJyqDxg+rO8w7iX D3WTKyL1ub3p3jLKOY31CS/UD7lDH7XdkhbmGIcyZAwUb4m7rb8jztD0ihtrKzmE Xi7J2/rM1O4Gmcxw7YX8pzL6StXvV8lfjTfcDHvuwvf+ufKuAft0TuJcCNnaSLo6 VXH2Qu9MuBeWTa2X7D+tkG9lyo44MWisrooDZ3r8tEawjJ4XuonIPqmOo6Yyszbm OOjFLb/n2yHImoClzp2DC7eQ5P5nR/G6oawVG1oN2q1WCHYVuuBzhgilpiWjllAh Y56lcYDx5BAfmgvZ1ZkdLLyZf7ZuoFvSAdYQiVdfkf0TRmHq+x8WYQMLpPkn92xR IyQyrTlt+CBapewNSofamV5+BpnyAz/sNIQ1jokTKdJlkAHTMcKID9Q5pVpZ5phu eBxyIcQyh28Jk6yk53YSKEzVz5hrhwn4yEZsD9tIjDpkrqQNxWI= =sbsa -----END PGP SIGNATURE----- --==-=-=--