Use unicode-data instead of downloading external files
authorPeter Colberg <peter@colberg.org>
Wed, 21 Sep 2022 14:22:38 +0000 (15:22 +0100)
committerMo Zhou <lumin@debian.org>
Wed, 21 Sep 2022 14:22:38 +0000 (15:22 +0100)
Forwarded: not-needed
Last-Update: 2021-12-22

Replace external links with copies of Unicode data and GNU Unifont
provided by the packages unicode-data and ttf-unifont, respectively.
Last-Update: 2021-12-22
Gbp-Pq: Name use-unicode-data.patch

data/Makefile

index 1fc9d53e873b15b7e599c0b77e473ea1f46db9ec..6e2c63b26518950d7cee3ad85fab2d3295e058a9 100644 (file)
@@ -25,37 +25,37 @@ CharWidths.txt: charwidths.jl EastAsianWidth.txt
 UNICODE_VERSION=14.0.0
 
 UnicodeData.txt:
-       $(CURL) $(CURLFLAGS) -o $@ https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/UnicodeData.txt
+       cp /usr/share/unicode/UnicodeData.txt $@
 
 EastAsianWidth.txt:
-       $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/EastAsianWidth.txt
+       cp /usr/share/unicode/extracted/DerivedEastAsianWidth.txt $@
 
 GraphemeBreakProperty.txt:
-       $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/auxiliary/GraphemeBreakProperty.txt
+       cp /usr/share/unicode/auxiliary/GraphemeBreakProperty.txt $@
 
 DerivedCoreProperties.txt:
-       $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/DerivedCoreProperties.txt
+       cp /usr/share/unicode/DerivedCoreProperties.txt $@
 
 CompositionExclusions.txt:
-       $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/CompositionExclusions.txt
+       cp /usr/share/unicode/CompositionExclusions.txt $@
 
 CaseFolding.txt:
-       $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/CaseFolding.txt
+       cp /usr/share/unicode/CaseFolding.txt $@
 
 NormalizationTest.txt:
-       $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/NormalizationTest.txt
+       bzip2 -d < /usr/share/unicode/NormalizationTest.txt.bz2 > $@
 
 GraphemeBreakTest.txt:
-       $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/auxiliary/GraphemeBreakTest.txt
+       cp /usr/share/unicode/auxiliary/GraphemeBreakTest.txt $@
 
 emoji-data.txt:
-       $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://unicode.org/Public/$(UNICODE_VERSION)/ucd/emoji/emoji-data.txt
+       cp /usr/share/unicode/emoji/emoji-data.txt $@
 
 Uppercase.txt: DerivedCoreProperties.txt
-       $(RUBY) -e 'puts File.read("DerivedCoreProperties.txt")[/# Derived Property: Uppercase.*?# Total code points:/m]' > $@
+       grep -zoP '(?s)# Derived Property: Uppercase.*?# Total code points:' DerivedCoreProperties.txt > $@
 
 Lowercase.txt: DerivedCoreProperties.txt
-       $(RUBY) -e 'puts File.read("DerivedCoreProperties.txt")[/# Derived Property: Lowercase.*?# Total code points:/m]' > $@
+       grep -zoP '(?s)# Derived Property: Lowercase.*?# Total code points:' DerivedCoreProperties.txt > $@
 
 clean:
        rm -f UnicodeData.txt EastAsianWidth.txt GraphemeBreakProperty.txt DerivedCoreProperties.txt CompositionExclusions.txt CaseFolding.txt NormalizationTest.txt GraphemeBreakTest.txt CharWidths.txt emoji-data.txt