blob: dce9a9da856a261ae19133b97303676356fa767b [file]
# MODULE.bazel
module(
name = "aoo",
version = "4.5.0",
)
# --------------- product branding (single source of truth) ---------------
# The product VERSION is module(version=...) above. The human-readable product
# NAME and FULL NAME live here (a module() name can't hold spaces/caps). These
# feed the window title, About box and %PRODUCTNAME tokens via @product_info →
# //main/postprocess brand Setup.xcu substitution.
product = use_extension("//build:product.bzl", "product")
product.info(
name = "Apache OpenOffice",
full_name = "Apache OpenOffice",
)
use_repo(product, "product_info")
# --------------- bazel dependencies ---------------
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_cc", version = "0.2.17")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "libxml2", version = "2.9.10")
bazel_dep(name = "libxslt", version = "1.1.35")
bazel_dep(name = "curl", version = "8.7.1")
bazel_dep(name = "openssl", version = "3.0.13")
bazel_dep(name = "strawberry-perl", version = "5.32.1.1")
bazel_dep(name = "rules_foreign_cc", version = "0.15.1")
bazel_dep(name = "bazel_lib", version = "3.3.1")
# MODULE.bazel (root) - only orchestrates, no details
bazel_dep(name = "redland", version = "1.0.17")
bazel_dep(name = "boost.legacy", version = "1.55.0")
bazel_dep(name = "ucpp", version = "1.3.2")
bazel_dep(name = "expat", version = "2.5.0")
bazel_dep(name = "zlib", version = "1.3.2")
bazel_dep(name = "icu", version = "49.1.2")
bazel_dep(name = "python", version = "2.7.18")
bazel_dep(name = "vigra", version = "1.6.0")
bazel_dep(name = "jpeg", version = "8d")
bazel_dep(name = "sampleicc", version = "1.3.2")
bazel_dep(name = "gperf", version = "3.1")
bazel_dep(name = "hunspell", version = "1.3.3")
bazel_dep(name = "hyphen", version = "2.7.1")
bazel_dep(name = "mythes", version = "1.2.0")
bazel_dep(name = "libtextcat", version = "2.2")
bazel_dep(name = "mysqlcppconn", version = "1.1.12")
bazel_dep(name = "mariadb-connector-c", version = "2.3.7")
bazel_dep(name = "libxmlsec1", version = "1.2.14")
bazel_dep(name = "nss", version = "3.39")
bazel_dep(name = "rules_java", version = "8.11.0")
bazel_dep(name = "mdds", version = "0.3.1")
bazel_dep(name = "coinmp", version = "1.7.6")
bazel_dep(name = "gtest", version = "1.7.0") # GoogleTest — C++ unit-test foundation (//main/test)
# Host JDK. Expose the machine's local JDK so we can register an ARCH-NEUTRAL java
# RUNTIME toolchain (see //build/toolchain/java). rules_java only auto-registers
# cpu-pinned (windows + x86_64) runtime toolchains, which stop resolving the moment
# the TARGET cpu isn't x86_64 — x86_32 today, arm64/riscv as the matrix grows.
java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains")
use_repo(java_toolchains, "local_jdk")
# --------------- build-time tools (not linked, not in registry) ---------------
http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
vs_config_repo_rule = use_repo_rule("//build:vs_config_repo.bzl", "vs_config_repo")
msvc_debug_crt = use_repo_rule("//build:debug_crt_repo.bzl", "msvc_debug_crt_repo")
vs_config_repo_rule(name = "vs_config")
msvc_debug_crt(name = "msvc_debug_crt")
http_file(
name = "apache_rat_jar",
url = "https://repo1.maven.org/maven2/org/apache/rat/apache-rat/0.10/apache-rat-0.10.jar",
sha256 = "b9565317dd5c3c02806e023aa8724fcfcb10a1a8c13d17b30872f0bb0bd4646e",
downloaded_file_path = "apache-rat-0.10.jar",
)
register_toolchains("//build/toolchain:cc_toolchain_x86_vs2008_def")
register_toolchains("//build/toolchain:cc_toolchain_x64_vs2008_def")
# Arch-neutral host JDK RUNTIME toolchain. Registered in the root module so it
# outranks rules_java's cpu-pinned remote-JDK runtime toolchains; it matches EVERY
# windows target platform (x86_32, x86_64, future arm64/riscv) so the jar-packaging
# host step (java_pipeline.bzl) resolves regardless of the product's target arch.
register_toolchains("//build/toolchain/java:host_jdk_runtime_toolchain")
# Execution platforms. ORDER MATTERS — register_execution_platforms prepends, so the
# FIRST entry is the highest-priority exec platform.
# winXP-x64 (x86_64) MUST be first: it becomes the exec platform for all build
# actions and cfg="exec" tools (idlc/regmerge/cppumaker/rsc/…), so those tools are
# built x64 and run natively on this x64 host (matching the amd64 CRT staging).
# A target that requires no cc toolchain (e.g. idl_library, which just runs the
# staged tools) picks the first exec platform outright — if winXP-x86 were first,
# those tools would be built x86_32 (breaking the x64 regmerge/idlc link + CRT).
# winXP-x86 (x86_32) is the fallback: this x64 host also runs 32-bit binaries via
# WOW64, so x86 TEST targets (target cpu:x86_32) resolve their test toolchain here
# (Bazel runs tests on an exec platform matching the target's constraints; without
# this, x86 `bazel test` fails "no matching default_test_toolchain_type"). Only the
# test-run action lands here — cc/exec-tool actions need a cc toolchain, which is
# exec_compatible_with x86_64 only, so they never select winXP-x86.
register_execution_platforms(
"//build/platforms:winXP-x64",
"//build/platforms:winXP-x86",
)
# Use preinstalled pkg-config instead of building it from source (building it
# from source requires gettext_runtime whose BUILD uses a removed cc_import builtin).
register_toolchains("@rules_foreign_cc//toolchains:preinstalled_pkgconfig_toolchain")