diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/utf8proc/data/Makefile | |
parent | Initial commit. (diff) | |
download | ceph-b26c4052f3542036551aa9dec9caa4226e456195.tar.xz ceph-b26c4052f3542036551aa9dec9caa4226e456195.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/utf8proc/data/Makefile')
-rw-r--r-- | src/utf8proc/data/Makefile | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/utf8proc/data/Makefile b/src/utf8proc/data/Makefile new file mode 100644 index 000000000..1b2472807 --- /dev/null +++ b/src/utf8proc/data/Makefile @@ -0,0 +1,69 @@ +# Unicode data generation rules. Except for the test data files, most +# users will not use these Makefile rules, which are primarily to re-generate +# unicode_data.c when we get a new Unicode version or charwidth data; they +# require ruby, fontforge, and julia to be installed. + +# programs +CURL=curl +RUBY=ruby +PERL=perl +MAKE=make +JULIA=julia +FONTFORGE=fontforge +CURLFLAGS = --retry 5 --location + +.PHONY: clean + +.DELETE_ON_ERROR: + +utf8proc_data.c.new: data_generator.rb UnicodeData.txt GraphemeBreakProperty.txt DerivedCoreProperties.txt CompositionExclusions.txt CaseFolding.txt CharWidths.txt emoji-data.txt + $(RUBY) data_generator.rb < UnicodeData.txt > $@ + +# GNU Unifont version for font metric calculations: +UNIFONT_VERSION=11.0.01 + +unifont.ttf: + $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://mirrors.kernel.org/gnu/unifont/unifont-$(UNIFONT_VERSION)/unifont-$(UNIFONT_VERSION).ttf + +unifont_upper.ttf: + $(CURL) $(CURLFLAGS) -o $@ $(URLCACHE)https://mirrors.kernel.org/gnu/unifont/unifont-$(UNIFONT_VERSION)/unifont_upper-$(UNIFONT_VERSION).ttf + +%.sfd: %.ttf + $(FONTFORGE) -lang=ff -c "Open(\"$<\");Save(\"$@\");Quit(0);" + +CharWidths.txt: charwidths.jl unifont.sfd unifont_upper.sfd EastAsianWidth.txt + $(JULIA) charwidths.jl > $@ + +# Unicode data version +UNICODE_VERSION=11.0.0 + +UnicodeData.txt: + $(CURL) $(CURLFLAGS) -o $@ -O http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/UnicodeData.txt + +EastAsianWidth.txt: + $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/EastAsianWidth.txt + +GraphemeBreakProperty.txt: + $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/auxiliary/GraphemeBreakProperty.txt + +DerivedCoreProperties.txt: + $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/DerivedCoreProperties.txt + +CompositionExclusions.txt: + $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/CompositionExclusions.txt + +CaseFolding.txt: + $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/CaseFolding.txt + +NormalizationTest.txt: + $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/NormalizationTest.txt + +GraphemeBreakTest.txt: + $(CURL) $(CURLFLAGS) $(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/auxiliary/GraphemeBreakTest.txt | $(PERL) -pe 's,÷,/,g;s,×,+,g' > $@ + +emoji-data.txt: + $(CURL) $(CURLFLAGS) -o $@ -O $(URLCACHE)http://unicode.org/Public/emoji/`echo $(UNICODE_VERSION) | cut -d. -f1-2`/emoji-data.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 emoji-data.txt + rm -f utf8proc_data.c.new |