LibLocale: Install ICU package and link into LibLocale

Rather than removing LibLocale entirely, we will use it as a wrapper
around ICU (which has some C-like interfaces, and uses UTF-16 for its
string types). Using ICU will provide better web compatibility overall,
and will let us implement features we were previously unable to (e.g.
Intl.Collator requires data that is not in the JSON export of the CLDR).
This commit is contained in:
Timothy Flynn 2024-06-08 11:10:10 -04:00 committed by Andreas Kling
parent e0bbbc729b
commit 221507c567
Notes: sideshowbarker 2024-07-17 08:55:54 +09:00
4 changed files with 20 additions and 11 deletions

View file

@ -29,7 +29,7 @@ runs:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update sudo apt-get update
sudo apt-get install ccache clang-18 clang++-18 clang-format-18 lld-18 gcc-13 g++-13 libstdc++-13-dev ninja-build unzip qt6-base-dev qt6-tools-dev-tools libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev libpulse-dev libssl-dev libegl1-mesa-dev sudo apt-get install autoconf autoconf-archive automake ccache clang-18 clang++-18 clang-format-18 lld-18 gcc-13 g++-13 libstdc++-13-dev ninja-build unzip qt6-base-dev qt6-tools-dev-tools libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev libpulse-dev libssl-dev libegl1-mesa-dev
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100
@ -59,7 +59,7 @@ runs:
run: | run: |
set -e set -e
brew update brew update
brew install coreutils bash ninja wabt ccache unzip qt llvm@18 brew install autoconf autoconf-archive automake coreutils bash ninja wabt ccache unzip qt llvm@18
- name: 'Install vcpkg' - name: 'Install vcpkg'
shell: bash shell: bash

View file

@ -9,7 +9,7 @@ NOTE: In all of the below lists of packages, the Qt6 multimedia package is not n
On Debian/Ubuntu required packages include, but are not limited to: On Debian/Ubuntu required packages include, but are not limited to:
``` ```
sudo apt install build-essential cmake libgl1-mesa-dev ninja-build qt6-base-dev qt6-tools-dev-tools qt6-multimedia-dev ccache fonts-liberation2 zip unzip curl tar sudo apt install autoconf autoconf-archive automake build-essential cmake libgl1-mesa-dev ninja-build qt6-base-dev qt6-tools-dev-tools qt6-multimedia-dev ccache fonts-liberation2 zip unzip curl tar
``` ```
For Ubuntu 20.04 and above, ensure that the Qt6 Wayland packages are available: For Ubuntu 20.04 and above, ensure that the Qt6 Wayland packages are available:
@ -56,7 +56,7 @@ Xcode 14 versions before 14.3 might crash while building ladybird. Xcode 14.3 or
``` ```
xcode-select --install xcode-select --install
brew install cmake ninja ccache brew install autoconf autoconf-archive automake cmake ninja ccache
``` ```
If you also plan to use the Qt chrome on macOS: If you also plan to use the Qt chrome on macOS:

View file

@ -21,6 +21,10 @@ serenity_lib(LibLocale locale)
target_link_libraries(LibLocale PRIVATE LibUnicode) target_link_libraries(LibLocale PRIVATE LibUnicode)
target_compile_definitions(LibLocale PRIVATE ENABLE_UNICODE_DATA=$<BOOL:${ENABLE_UNICODE_DATABASE_DOWNLOAD}>) target_compile_definitions(LibLocale PRIVATE ENABLE_UNICODE_DATA=$<BOOL:${ENABLE_UNICODE_DATABASE_DOWNLOAD}>)
find_package(ICU REQUIRED COMPONENTS data i18n uc)
target_include_directories(LibLocale PRIVATE ${ICU_INCLUDE_DIRS})
target_link_libraries(LibLocale PUBLIC ${ICU_LIBRARIES})
if (DEFINED LOCALE_DATA_SOURCES) if (DEFINED LOCALE_DATA_SOURCES)
target_link_libraries(LibLocale PRIVATE LibLocaleData) target_link_libraries(LibLocale PRIVATE LibLocaleData)
endif() endif()

View file

@ -1,14 +1,23 @@
{ {
"builtin-baseline": "01f602195983451bc83e72f4214af2cbc495aa94", "builtin-baseline": "01f602195983451bc83e72f4214af2cbc495aa94",
"dependencies": [ "dependencies": [
"sqlite3",
"woff2",
{ {
"name": "fontconfig", "name": "fontconfig",
"platform": "linux | freebsd | openbsd" "platform": "linux | freebsd | openbsd"
} },
"icu",
"sqlite3",
"woff2"
], ],
"overrides": [ "overrides": [
{
"name": "fontconfig",
"version": "2.14.2#1"
},
{
"name": "icu",
"version": "74.2#1"
},
{ {
"name": "sqlite3", "name": "sqlite3",
"version": "3.45.3" "version": "3.45.3"
@ -16,10 +25,6 @@
{ {
"name": "woff2", "name": "woff2",
"version": "1.0.2#4" "version": "1.0.2#4"
},
{
"name": "fontconfig",
"version": "2.14.2#1"
} }
] ]
} }