GNU bug report logs - #76750
[PATCH 0/2] Add icu4c-76.

Previous Next

Package: guix-patches;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Tue, 4 Mar 2025 22:07:02 UTC

Severity: normal

Tags: patch

Done: Ian Eure <ian <at> retrospec.tv>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 76750 <at> debbugs.gnu.org (full text, mbox):

From: Tomas Volf <~@wolfsden.cz>
To: 76750 <at> debbugs.gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [PATCH 1/2] gnu: icu4c: Extract uri into a separate procedure.
Date: Tue,  4 Mar 2025 23:08:18 +0100
* gnu/packages/icu4c.scm (icu4?-uri, icu4c-uri, icu4j-uri): New procedures.
(icu4c, icu4c-73, icu4c-75, icu4c-70, icu4c-69)[source]: Use icu4c-uri.
(java-icu4j)[source]: Use icu4j-uri.

Change-Id: Iad114631de530e32e4691bc88421d70f015f31d0
---
 gnu/packages/icu4c.scm | 56 +++++++++++++++---------------------------
 1 file changed, 20 insertions(+), 36 deletions(-)

diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm
index 0ca917305d..fadea0bbdb 100644
--- a/gnu/packages/icu4c.scm
+++ b/gnu/packages/icu4c.scm
@@ -43,18 +43,27 @@ (define-module (gnu packages icu4c)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system gnu))
 
+(define (icu4?-uri variant version)
+  (string-append
+   "https://github.com/unicode-org/icu/releases/download/release-"
+   (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
+   "/icu4" variant "-"
+   (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
+   "-src.tgz"))
+
+(define (icu4c-uri version)
+  (icu4?-uri "c" version))
+
+(define (icu4j-uri version)
+  (icu4?-uri "j" version))
+
 (define-public icu4c
   (package
     (name "icu4c")
     (version "71.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://github.com/unicode-org/icu/releases/download/release-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
-                    "/icu4c-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
-                    "-src.tgz"))
+              (uri (icu4c-uri version))
               (sha256
                (base32 "1gqywaqj9jmdwrng9lm6inyqmi5j2cz36db9dcqg3yk13zjyd9v7"))))
     (build-system gnu-build-system)
@@ -117,12 +126,7 @@ (define-public icu4c-73
     (version "73.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://github.com/unicode-org/icu/releases/download/release-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
-                    "/icu4c-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
-                    "-src.tgz"))
+              (uri (icu4c-uri version))
               (sha256
                (base32
                 "0iccpdvc0kvpww5a31k9gjkqigyz016i7v80r9zamd34w4fl6mx4"))
@@ -140,12 +144,7 @@ (define-public icu4c-75
     (version "75.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://github.com/unicode-org/icu/releases/download/release-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
-                    "/icu4c-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
-                    "-src.tgz"))
+              (uri (icu4c-uri version))
               (sha256
                (base32
                 "1vya31v549pq89kgr02jajwi7gc7qw0mv6n4265pxs6jwkrqv5nb"))))))
@@ -156,12 +155,7 @@ (define-public icu4c-70
     (version "70.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://github.com/unicode-org/icu/releases/download/release-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
-                    "/icu4c-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
-                    "-src.tgz"))
+              (uri (icu4c-uri version))
               (sha256
                (base32
                 "1m9zgkaf5lyh65nyc6n0n5bs2f5k53nnj1ih6nskpwbvq4l5884d"))))
@@ -186,12 +180,7 @@ (define-public icu4c-69
     (version "69.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://github.com/unicode-org/icu/releases/download/release-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
-                    "/icu4c-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
-                    "-src.tgz"))
+              (uri (icu4c-uri version))
               (sha256
                (base32
                 "0icps0avkwy5df3wwc5kybxcg63hcgk4phdh9g244g0xrmx7pfjc"))))))
@@ -219,12 +208,7 @@ (define-public java-icu4j
     (version "70.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://github.com/unicode-org/icu/releases/download/release-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
-                    "/icu4j-"
-                    (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
-                    ".tgz"))
+              (uri (icu4j-uri version))
               (sha256
                (base32 "0qrs75iyzn19kf54q55jn8wf6xjlpkrihdwqpxm39jdh2hz4cgvj"))))
     (build-system ant-build-system)
-- 
2.48.1





This bug report was last modified 75 days ago.

Previous Next


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