Use unicode-data instead of downloading external files
authorPeter Colberg <peter@colberg.org>
Sun, 31 Jul 2016 03:21:18 +0000 (04:21 +0100)
committerPeter Colberg <peter@colberg.org>
Sun, 31 Jul 2016 03:21:18 +0000 (04:21 +0100)
Forwarded: not-needed
Last-Update: 2015-11-01

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

data/Makefile

index c41f6016f59429b16b9caa3948c7725322376a49..470f133e2ac5461fb6b3cbf61c15cfe527f490fb 100644 (file)
@@ -23,10 +23,10 @@ utf8proc_data.c.new: data_generator.rb UnicodeData.txt GraphemeBreakProperty.txt
 UNIFONT_VERSION=9.0.01
 
 unifont.ttf:
-       $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://mirrors.kernel.org/gnu/unifont/unifont-$(UNIFONT_VERSION)/unifont-$(UNIFONT_VERSION).ttf
+       cp /usr/share/fonts/truetype/unifont/unifont.ttf $@
 
 unifont_upper.ttf:
-       $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://mirrors.kernel.org/gnu/unifont/unifont-$(UNIFONT_VERSION)/unifont_upper-$(UNIFONT_VERSION).ttf
+       cp /usr/share/fonts/truetype/unifont/unifont_upper.ttf $@
 
 %.sfd: %.ttf
        $(FONTFORGE) -lang=ff -c "Open(\"$<\");Save(\"$@\");Quit(0);"
@@ -38,28 +38,28 @@ CharWidths.txt: charwidths.jl unifont.sfd unifont_upper.sfd EastAsianWidth.txt
 UNICODE_VERSION=9.0.0
 
 UnicodeData.txt:
-       $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/UnicodeData.txt
+       cp /usr/share/unicode/UnicodeData.txt $@
 
 EastAsianWidth.txt:
-       $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/EastAsianWidth.txt
+       cp /usr/share/unicode/extracted/DerivedEastAsianWidth.txt $@
 
 GraphemeBreakProperty.txt:
-       $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/auxiliary/GraphemeBreakProperty.txt
+       cp /usr/share/unicode/auxiliary/GraphemeBreakProperty.txt $@
 
 DerivedCoreProperties.txt:
-       $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/DerivedCoreProperties.txt
+       cp /usr/share/unicode/DerivedCoreProperties.txt $@
 
 CompositionExclusions.txt:
-       $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/CompositionExclusions.txt
+       cp /usr/share/unicode/CompositionExclusions.txt $@
 
 CaseFolding.txt:
-       $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/CaseFolding.txt
+       cp /usr/share/unicode/CaseFolding.txt $@
 
 NormalizationTest.txt:
-       $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/NormalizationTest.txt
+       bzip2 -d < /usr/share/unicode/NormalizationTest.txt.bz2 > $@
 
 GraphemeBreakTest.txt:
-       $(CURL) $(CURLFLAGS) $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/auxiliary/GraphemeBreakTest.txt | $(PERL) -pe 's,÷,/,g;s,×,+,g' > $@
+       $(PERL) -pe 's,÷,/,g;s,×,+,g' < /usr/share/unicode/auxiliary/GraphemeBreakTest.txt > $@
 
 clean:
        rm -f UnicodeData.txt EastAsianWidth.txt GraphemeBreakProperty.txt DerivedCoreProperties.txt CompositionExclusions.txt CaseFolding.txt NormalizationTest.txt GraphemeBreakTest.txt CharWidths.txt unifont*.ttf unifont*.sfd