diff mbox series

[bug#60358,v5,3/5] gnu: UCD: Add version 3.0-update1.

Message ID 36a8b51d628dab1706ed903db57eb1be1abbee1f.camel@planete-kraus.eu
State New
Headers show
Series None | expand

Commit Message

Vivien Kraus Dec. 30, 2022, 9:20 p.m. UTC
* gnu/packages/unicode.scm (ucd3.0-update1): New variable.
---
 gnu/packages/unicode.scm | 59 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)

Comments

Liliana Marie Prikler Dec. 31, 2022, 6:49 a.m. UTC | #1
Am Freitag, dem 30.12.2022 um 22:20 +0100 schrieb Vivien Kraus:
> * gnu/packages/unicode.scm (ucd3.0-update1): New variable.
> ---
Surely this must work with a newer UCD.  Perhaps not with 14, which is
the currently packaged one, but what if we use 7, which is the first
zipped one?  Using a newer UCD might also solve your Hangul problem.

Cheers
Vivien Kraus Dec. 31, 2022, 10:56 a.m. UTC | #2
Hi!

Le samedi 31 décembre 2022 à 07:49 +0100, Liliana Marie Prikler a
écrit :
> Am Freitag, dem 30.12.2022 um 22:20 +0100 schrieb Vivien Kraus:
> > * gnu/packages/unicode.scm (ucd3.0-update1): New variable.
> > ---
> Surely this must work with a newer UCD.  Perhaps not with 14, which
> is
> the currently packaged one, but what if we use 7, which is the first
> zipped one?  Using a newer UCD might also solve your Hangul problem.

If you look at gen-uni-tables.c in lib/, you will see that the
instructions insist on using PropList-3.0.1.txt from 3.0 update 1, in
addition to a recent UCD (there are 2 UCD inputs to the gnulib package:
the specific 3.0.1 ucd and the recent ucd − they don’t have colliding
file names). In theory, I would also update UCD, but it has a lot of
dependent packages so the update should go to the staging branch
instead.

There are no clear instructions on how to get HangulSyllableNames.txt,
so I’m hesitant to declare that version 7 will do.

Vivien
Liliana Marie Prikler Dec. 31, 2022, 2:07 p.m. UTC | #3
Am Samstag, dem 31.12.2022 um 11:56 +0100 schrieb Vivien Kraus:
> Hi!
> 
> Le samedi 31 décembre 2022 à 07:49 +0100, Liliana Marie Prikler a
> écrit :
> > Am Freitag, dem 30.12.2022 um 22:20 +0100 schrieb Vivien Kraus:
> > > * gnu/packages/unicode.scm (ucd3.0-update1): New variable.
> > > ---
> > Surely this must work with a newer UCD.  Perhaps not with 14, which
> > is
> > the currently packaged one, but what if we use 7, which is the
> > first
> > zipped one?  Using a newer UCD might also solve your Hangul
> > problem.
> 
> If you look at gen-uni-tables.c in lib/, you will see that the
> instructions insist on using PropList-3.0.1.txt from 3.0 update 1, in
> addition to a recent UCD (there are 2 UCD inputs to the gnulib
> package: the specific 3.0.1 ucd and the recent ucd − they don’t have
> colliding file names). In theory, I would also update UCD, but it has
> a lot of dependent packages so the update should go to the staging
> branch instead.
Looking at the comment, you only need the proplist, however, not
anything else.  I'd also experiment with providing an empty file in its
stead, but it doesn't matter too much as long as the hacks we need to
take are kept acceptably few.

If you want to use UCD 15, go ahead.  There is a ucd-next package that
has possibly fewer dependants, which ironically also points to UCD 14
atm.

As for the deleted files in some test directories, can we abbreviate
them with regular expressions or keep lists?

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/unicode.scm b/gnu/packages/unicode.scm
index bda0de04cc..66340721e3 100644
--- a/gnu/packages/unicode.scm
+++ b/gnu/packages/unicode.scm
@@ -21,13 +21,15 @@ 
 (define-module (gnu packages unicode)
   #:use-module (gnu packages autotools)
   #:use-module (guix git-download)
+  #:use-module (guix gexp)
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
-  #:use-module (guix build-system trivial))
+  #:use-module (guix build-system trivial)
+  #:use-module (ice-9 match))
 
 (define-public libunibreak
   (package
@@ -112,6 +114,61 @@  (define-public ucd-next
         (base32
          "001nq9w52ijma0vps40xwy2q6ylpyf1393lzb128ibypnmv54fh3"))))))
 
+(define-public ucd3.0-update1
+  (package
+    (inherit ucd)
+    (version "3.0-update1")
+    (source
+     ;; unicode.org does not provide a zipped archive.
+     (directory-union
+      "ucd-3.0-update1-source"
+      (map
+       (match-lambda
+         ((filename . hash)
+          (file-union
+           (string-append "ucd-3.0-update1-" filename)
+           `((,filename
+              ,(origin
+                 (method url-fetch)
+                 (uri (string-append "https://www.unicode.org/Public/3.0-Update1/" filename))
+                 (sha256 hash)))))))
+       `(("ArabicShaping-3.txt"
+          . ,(base32
+              "0k6hwdnln8cwkzixxbbc6q5g3nx3z5p1549c0jicnz7gq2mvkh90"))
+         ("BidiMirroring-1.txt"
+          . ,(base32
+              "0wc5gj6mx5wjkwph734swqd3zvi3ngfx75yybbc1f52dc1l3sh9m"))
+         ("CaseFolding-2.txt"
+          . ,(base32
+              "143hvpalrnkrxc2g9626v6w4cgmksg9hkcm39fpmqidn0rnpm8vy"))
+         ("CompositionExclusions-2.txt"
+          . ,(base32
+              "06vlc7yqhkacbb411ykyn4na5kq93yp0p9mm3a2jfixk704nwpj1"))
+         ("Jamo-3.txt"
+          . ,(base32
+              "092lww4ak9wa7g4jn80i9ckniwg3ymmiaq62xxhhbwk3cx2d23ad"))
+         ("NormalizationTest-3.0.1.txt"
+          . ,(base32
+              "1r5vq8dlar7km1376bp16l40pyczzvwk9waxgin2i2432qdpwmga"))
+         ("PropList-3.0.1.txt"
+          . ,(base32
+              "0k6wyijyzdl5g3nibcwfm898kfydx1pqaz28v7fdvnzdvd5fz7lh"))
+         ("ReadMe-3.0.1.txt"
+          . ,(base32
+              "08mkcs3r1caj67wrcqq0gyb79zj9qyqnmx8qab0rsd4qg87xhnbv"))
+         ("SpecialCasing-3.txt"
+          . ,(base32
+              "08vrf0kk5zlsl40h4nsfbpnckl4610m7x2072lyq97lln7dsky7a"))
+         ("UnicodeCharacterDatabase-3.0.1.html"
+          . ,(base32
+              "0fy7vb1zkxg2pg198p7phncjs78gz6lvdzhv51yz34kds8nzz40m"))
+         ("UnicodeData-3.0.1.html"
+          . ,(base32
+              "0fvv59ydp09mppjr8130kmp90r240hnaqld8i5xkpz900fl20pc1"))
+         ("UnicodeData-3.0.1.txt"
+          . ,(base32
+              "092svm19f78pxg58pcisg3i57884y7z22rymrcppjkg6sz3izsia"))))))))
+
 (define (unicode-emoji-file name version hash)
   (origin
     (method url-fetch)