# The otok recipe of ICU4C (https://github.com/apotocki/otok): libicuuc, libicui18n, libicuio and the # ICU data for every Apple platform, from the release archive with the prebuilt data, or with the data # built from its sources by the project's filter; the data in libicudata, as a file of its own or not at all; # static. [recipe] api = 1 library = "icu4c" name = "icu4c" version = "79.1" revision = 1 license = "Unicode-3.0" license-files = ["LICENSE"] homepage = "https://icu.unicode.org" description = "ICU, the International Components for Unicode (libicuuc, libicui18n, libicuio, the data)." keywords = ["unicode", "i18n", "icu"] linkage = ["static"] cxx-standard = ">= 17" # the sources of the release carry no data sources, only the data the build itself needs [source] url = "https://github.com/unicode-org/icu/releases/download/release-79.1/icu4c-79.1-sources.tgz" sha256 = "06fa63ecb521048f8082f12ad988f6b678d90cbd88aafce24cbc94902b191d99" # the prebuilt little-endian data, unless the data is filtered [[resource]] name = "data" url = "https://github.com/unicode-org/icu/releases/download/release-79.1/icu4c-79.1-data-bin-l.zip" sha256 = "72489fb316a60ae1c1da205866edd01b17e8fbf8354ad0615e6cc60f74e08811" when = { not = { option = "data-filter" } } # the sources of the data, which ICU's Python build tool builds as a filter chooses [[resource]] name = "data_sources" url = "https://github.com/unicode-org/icu/releases/download/release-79.1/icu4c-79.1-data.zip" sha256 = "b3a430009bb5fab77b1a4b98fab85cc8f887e26d4e4166121724298ae14d7224" when = { option = "data-filter" } [platforms] supported = ["ios", "iossim", "macosx", "catalyst", "tvos", "tvossim", "watchos", "watchossim", "xros", "xrossim"] build-on = ["macos/xcode"] [options.no-renaming] type = "bool" default = false doc = "No version suffixes on the C entry points (u_strlen, not u_strlen_79), so that Swift, which sees no function-like macros, can call ICU directly. Two such ICUs in one process collide. On iOS and the other Apple platforms but macOS the names are those of the private API of the system libicucore, and App Store review rejects an app whose executable still has them as symbols (ITMS-90338): strip it, or use this option outside the App Store." [options.data] type = "enum" values = ["static", "file", "none"] default = "static" doc = "Where the ICU data is. static: in libicudata, linked into the product. file: in icudt79l.dat, which otok delivers in data/ of the output, and libicudata is a stub; the application gives ICU the file before its first use, with u_setDataDirectory (the directory holding icudt79l.dat) or udata_setCommonData (its contents in memory). none: the stub only, and no file; the application brings the data itself." [options.data-filter] type = "file" doc = "A data filter of ICU's data build tool (JSON, https://unicode-org.github.io/icu/userguide/icu_data/buildtool.html): the data is built from its sources with what the filter keeps, for data = static or file. Needs Python 3." [toolchains] make = { version = ">= 3.81", default-recipe = "apotocki/make" } # configure runs any Python it finds (PYTHONPATH=… python -m icutools…), for the rules of the test data too: it is # given this one python = { version = ">= 3.9", default-recipe = "apotocki/python" } [[product]] name = "ICU" libraries = ["io", "i18n", "uc", "data"] headers = "uc" # the installed headers do not record --disable-renaming defines = [{ define = "U_DISABLE_RENAMING=1", when = { option = "no-renaming" } }] link = { runtime = "c++" } apple = { module = "CICU", privacy-manifest = "PrivacyInfo.xcprivacy" }