kse-01/tensorflow/third_party/icu/data/BUILD.bazel
github-classroom[bot] 1122cdd8b0
Initial commit
2023-10-09 11:37:31 +00:00

44 lines
1.5 KiB (Stored with Git LFS)
Python

package(
default_visibility = ["//visibility:public"],
)
licenses(["notice"]) # Apache 2.0
exports_files(["LICENSE"])
# Data for core MIME/Unix/Windows encodings:
# ISO 8859-2..9, 15; Windows-125x; EUC-CN; GBK (Windows cp936); GB 18030;
# Big5 (Windows cp950); SJIS (Windows cp932); EUC-JP; EUC-KR, KS C 5601;
# Windows cp949. Data is pre-processed for little-endian platforms. To replicate
# this pre-processing (if you want additional encodings, for example), do the
# following:
#
# First, download, build, and install ICU. This installs tools such as makeconv.
# Then, run the following from your icu4c/source directory:
# $ cp [path to filters.json] .
# $ ICU_DATA_FILTER_FILE=filters.json ./runConfigureICU Linux
# $ make clean && make
# $ cd data/out/tmp
# $ genccode icudt64l.dat
# $ echo 'U_CAPI const void * U_EXPORT2 uprv_getICUData_conversion() { return icudt64l_dat.bytes; }' >> icudt64l_dat.c
# This creates icudt64l_dat.c, which you can move, rename, gzip, then split.
filegroup(
name = "conversion_files",
srcs = glob(["icu_conversion_data.c.gz.*"]),
)
# Data files are compressed and split to work around git performance degradation
# around large files.
genrule(
name = "merge_conversion_data",
srcs = [":conversion_files"],
outs = ["conversion_data.c"],
cmd = "cat $(locations :conversion_files) | gunzip > $@",
)
cc_library(
name = "conversion_data",
srcs = [":conversion_data.c"],
deps = ["@icu//:headers"],
alwayslink = 1,
)