@@ -150,6 +150,81 @@ def cel_spec_deps():
150150 urls = ["https://github.com/google/cel-spec/archive/" + CEL_SPEC_GIT_SHA + ".zip" ],
151151 )
152152
153+ _ICU4C_BUILD = """
154+ load("@rules_foreign_cc//foreign_cc:configure.bzl", "configure_make")
155+
156+ filegroup(
157+ name = "all",
158+ srcs = glob(["**"]),
159+ visibility = ["//visibility:private"],
160+ )
161+
162+ config_setting(
163+ name = "dbg",
164+ values = {
165+ "compilation_mode": "dbg",
166+ },
167+ visibility = ["//visibility:private"],
168+ )
169+
170+ configure_make(
171+ name = "icu4c",
172+ configure_command = "source/configure",
173+ configure_in_place = True,
174+ configure_options = [
175+ "--enable-shared",
176+ "--enable-static",
177+ "--disable-extras",
178+ "--disable-icuio",
179+ "--disable-layoutex",
180+ "--disable-icu-config",
181+ ] + select({
182+ ":dbg": ["--enable-debug"],
183+ "//conditions:default": [],
184+ }),
185+ lib_source = ":all",
186+ out_shared_libs = [
187+ "libicudata.so",
188+ "libicui18n.so",
189+ "libicutu.so",
190+ "libicuuc.so",
191+ ],
192+ out_static_libs = [
193+ "libicudata.a",
194+ "libicui18n.a",
195+ "libicutu.a",
196+ "libicuuc.a",
197+ ],
198+ args = ["-j 8"],
199+ visibility = ["//visibility:public"],
200+ )
201+ """
202+
203+ def cel_cpp_extensions_deps ():
204+ http_archive (
205+ name = "rules_foreign_cc" ,
206+ sha256 = "8e5605dc2d16a4229cb8fbe398514b10528553ed4f5f7737b663fdd92f48e1c2" ,
207+ strip_prefix = "rules_foreign_cc-0.13.0" ,
208+ url = "https://github.com/bazel-contrib/rules_foreign_cc/releases/download/0.13.0/rules_foreign_cc-0.13.0.tar.gz" ,
209+ )
210+ http_archive (
211+ name = "icu4c" ,
212+ sha256 = "dfacb46bfe4747410472ce3e1144bf28a102feeaa4e3875bac9b4c6cf30f4f3e" ,
213+ url = "https://github.com/unicode-org/icu/releases/download/release-76-1/icu4c-76_1-src.tgz" ,
214+ strip_prefix = "icu" ,
215+ patch_cmds = [
216+ "rm -f source/common/BUILD.bazel" ,
217+ "rm -f source/i18n/BUILD.bazel" ,
218+ "rm -f source/stubdata/BUILD.bazel" ,
219+ "rm -f source/tools/gennorm2/BUILD.bazel" ,
220+ "rm -f source/tools/toolutil/BUILD.bazel" ,
221+ "rm -f source/tools/unicode/c/genprops/BUILD.bazel" ,
222+ "rm -f source/tools/unicode/c/genuca/BUILD.bazel" ,
223+ "rm -f source/vendor/double-conversion/upstream/WORKSPACE" ,
224+ ],
225+ build_file_content = _ICU4C_BUILD ,
226+ )
227+
153228def cel_cpp_deps ():
154229 """All core dependencies of cel-cpp."""
155230 base_deps ()
0 commit comments