# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/zip.gni")
hyb_files = [
"hyb/hyph-af.hyb",
"hyb/hyph-as.hyb",
"hyb/hyph-be.hyb",
"hyb/hyph-bg.hyb",
"hyb/hyph-bn.hyb",
"hyb/hyph-cs.hyb",
"hyb/hyph-cu.hyb",
"hyb/hyph-cy.hyb",
"hyb/hyph-da.hyb",
"hyb/hyph-de-1901.hyb",
"hyb/hyph-de-1996.hyb",
"hyb/hyph-de-ch-1901.hyb",
"hyb/hyph-el.hyb",
"hyb/hyph-en-gb.hyb",
"hyb/hyph-en-us.hyb",
"hyb/hyph-es.hyb",
"hyb/hyph-et.hyb",
"hyb/hyph-eu.hyb",
"hyb/hyph-fr.hyb",
"hyb/hyph-ga.hyb",
"hyb/hyph-gl.hyb",
"hyb/hyph-gu.hyb",
"hyb/hyph-hi.hyb",
"hyb/hyph-hr.hyb",
"hyb/hyph-hu.hyb",
"hyb/hyph-hy.hyb",
"hyb/hyph-it.hyb",
"hyb/hyph-ka.hyb",
"hyb/hyph-kn.hyb",
"hyb/hyph-la.hyb",
"hyb/hyph-lt.hyb",
"hyb/hyph-lv.hyb",
"hyb/hyph-ml.hyb",
"hyb/hyph-mn-cyrl.hyb",
"hyb/hyph-mr.hyb",
"hyb/hyph-mul-ethi.hyb",
"hyb/hyph-nb.hyb",
"hyb/hyph-nl.hyb",
"hyb/hyph-nn.hyb",
"hyb/hyph-or.hyb",
"hyb/hyph-pa.hyb",
"hyb/hyph-pt.hyb",
"hyb/hyph-ru.hyb",
"hyb/hyph-sk.hyb",
"hyb/hyph-sl.hyb",
"hyb/hyph-sq.hyb",
"hyb/hyph-sv.hyb",
"hyb/hyph-ta.hyb",
"hyb/hyph-te.hyb",
"hyb/hyph-tk.hyb",
"hyb/hyph-uk.hyb",
"hyb/hyph-und-ethi.hyb",
]
zip("hyphenation-patterns") {
inputs = hyb_files
output = "$root_build_dir/hyphens-data.zip"
base_dir = "hyb"
}
copy("bundle_hyphen_data") {
sources = hyb_files
outputs = [ "$root_out_dir/hyphen-data/{{source_file_part}}" ]
# Component updater requires a version string, however valid version
# is not available at build time, so use a bogus version string which
# is lower than the prod version and is not all zeros since that has
# special meaning ("no component").
_manifest_json = {
manifest_version = 2
name = "hyphens-data"
version = "1.0.0.0"
}
write_file("$root_out_dir/hyphen-data/manifest.json", _manifest_json, "json")
}
copy("test_data") {
testonly = true
sources = [
# Dictionaries used in unit tests and web_tests.
"hyb/hyph-de-1996.hyb",
"hyb/hyph-en-gb.hyb",
"hyb/hyph-en-us.hyb",
]
outputs = [ "$root_gen_dir/hyphen-data/{{source_file_part}}" ]
}