github.com/johnnyeven/libtools@v0.0.0-20191126065708-61829c1adf46/third_party/icu/data/BUILD.bazel (about)

     1  package(
     2      default_visibility = ["//visibility:public"],
     3  )
     4  
     5  licenses(["notice"])  # Apache 2.0
     6  
     7  exports_files(["LICENSE"])
     8  
     9  # Data for core MIME/Unix/Windows encodings:
    10  # ISO 8859-2..9, 15; Windows-125x; EUC-CN; GBK (Windows cp936); GB 18030;
    11  # Big5 (Windows cp950); SJIS (Windows cp932); EUC-JP; EUC-KR, KS C 5601;
    12  # Windows cp949. Data is pre-processed for little-endian platforms. To replicate
    13  # this pre-processing (if you want additional encodings, for example), do the
    14  # following:
    15  #
    16  # First, download, build, and install ICU. This installs tools such as makeconv.
    17  # Then, run the following from your icu4c/source directory:
    18  #   $ cd data/mappings
    19  #   $ rm *.cnv  # there shouldn't be any .cnv files here to begin with
    20  #   $ grep \.ucm ucmcore.mk | \
    21  #     sed 's/\(UCM_SOURCE_CORE=\)\?\([^ ]\+\.ucm\)\\\?/\2/g' | \
    22  #     tr '\n' ' ' | xargs makeconv
    23  #   $ ls *.cnv > filelist.lst
    24  #   $ pkgdata -m common -p ucmcore filelist.lst
    25  #   $ genccode -f custom_conversion_data ucmcore.dat
    26  # This creates custom_conversion_data.c. You will need to change the target
    27  # :conversion_data to depend on your custom source instead of :conversion_data.c
    28  filegroup(
    29      name = "conversion_files",
    30      srcs = glob(["icu_conversion_data.c.gz.*"]),
    31  )
    32  
    33  # Data files are compressed and split to work around git performance degradation
    34  # around large files.
    35  genrule(
    36      name = "merge_conversion_data",
    37      srcs = [":conversion_files"],
    38      outs = ["conversion_data.c"],
    39      cmd = "cat $(locations :conversion_files) | gunzip > $@",
    40  )
    41  
    42  cc_library(
    43      name = "conversion_data",
    44      srcs = [":conversion_data.c"],
    45      deps = ["@icu//:headers"],
    46  )