Skip to content

Commit fd70ae4

Browse files
committed
Inflection-179: Update ICU dependency, XML2 dependency and Wikidata processing
1 parent 7689a95 commit fd70ae4

File tree

13 files changed

+24
-24
lines changed

13 files changed

+24
-24
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
- 'inflection/**'
2222
- '.github/workflows/**'
2323
env:
24-
ICU_MAJOR: '77'
24+
ICU_MAJOR: '78'
2525
ICU_MINOR: '1'
2626

2727
jobs:
@@ -36,13 +36,13 @@ jobs:
3636
- name: Download and install icu
3737
if: steps.cache.outputs.cache-hit != 'true'
3838
run: |
39-
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}-${ICU_MINOR}/icu4c-${ICU_MAJOR}_${ICU_MINOR}-Ubuntu22.04-x64.tgz
39+
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz
4040
export ICU=~/icu/
4141
mkdir -p $ICU
4242
echo "ICU directory is $ICU"
4343
4444
# Get the release and unpack.
45-
cp icu4c-${ICU_MAJOR}_${ICU_MINOR}-Ubuntu22.04-x64.tgz $ICU
45+
cp icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz $ICU
4646
pushd $ICU
4747
4848
pwd

.github/workflows/create-ubuntu-distribution-packaging.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# To update ICU version:
33
# 1. Update the ICU_ICU_MAJOR and ICU_MINOR environment variable below.
44
# 2. Check the ICU binary URL — is the filename still Ubuntu22.04-x64.tgz?
5-
# (e.g., icu4c-78_1-Ubuntu22.04-x64.tgz)
5+
# (e.g., icu4c-78.1-Ubuntu22.04-x64.tgz)
66
# 3. Update inflection/CMakeLists.txt:
77
# - Modify `CPACK_DEBIAN_PACKAGE_DEPENDS` to match the new ICU version.
88
# ----------------------------------------------------------------------------------------
@@ -19,7 +19,7 @@ jobs:
1919
build-and-package:
2020
runs-on: ubuntu-latest
2121
env:
22-
ICU_MAJOR: '77'
22+
ICU_MAJOR: '78'
2323
ICU_MINOR: '1'
2424
steps:
2525
- name: Checkout
@@ -51,9 +51,9 @@ jobs:
5151
if: steps.cache-icu.outputs.cache-hit != 'true'
5252
run: |
5353
cd /tmp
54-
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}-${ICU_MINOR}/icu4c-${ICU_MAJOR}_${ICU_MINOR}-Ubuntu22.04-x64.tgz
54+
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz
5555
mkdir icu-install
56-
tar -xzf icu4c-${ICU_MAJOR}_${ICU_MINOR}-Ubuntu22.04-x64.tgz -C icu-install
56+
tar -xzf icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz -C icu-install
5757
sudo mkdir -p /usr/local/icu-${ICU_MAJOR}_${ICU_MINOR}
5858
sudo cp -r icu-install/icu/usr/local/* /usr/local/icu-${ICU_MAJOR}_${ICU_MINOR}/
5959
sudo ldconfig

.github/workflows/doxygen-gh-pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- '!fst/**'
2020

2121
env:
22-
ICU_MAJOR: '77'
22+
ICU_MAJOR: '78'
2323
ICU_MINOR: '1'
2424

2525
jobs:
@@ -34,13 +34,13 @@ jobs:
3434
- name: Download and install icu
3535
if: steps.cache.outputs.cache-hit != 'true'
3636
run: |
37-
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}-${ICU_MINOR}/icu4c-${ICU_MAJOR}_${ICU_MINOR}-Ubuntu22.04-x64.tgz
37+
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz
3838
export ICU=~/icu/
3939
mkdir -p $ICU
4040
echo "ICU directory is $ICU"
4141
4242
# Get the release and unpack.
43-
cp icu4c-${ICU_MAJOR}_${ICU_MINOR}-Ubuntu22.04-x64.tgz $ICU
43+
cp icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz $ICU
4444
pushd $ICU
4545
4646
pwd

.github/workflows/ubuntu-memory-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- '.github/workflows/**'
2020
- 'inflection/**'
2121
env:
22-
ICU_MAJOR: '77'
22+
ICU_MAJOR: '78'
2323
ICU_MINOR: '1'
2424

2525
jobs:
@@ -34,13 +34,13 @@ jobs:
3434
- name: Download and install icu
3535
if: steps.cache.outputs.cache-hit != 'true'
3636
run: |
37-
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}-${ICU_MINOR}/icu4c-${ICU_MAJOR}_${ICU_MINOR}-Ubuntu22.04-x64.tgz
37+
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR}.${ICU_MINOR}/icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz
3838
export ICU=~/icu/
3939
mkdir -p $ICU
4040
echo "ICU directory is $ICU"
4141
4242
# Get the release and unpack.
43-
cp icu4c-${ICU_MAJOR}_${ICU_MINOR}-Ubuntu22.04-x64.tgz $ICU
43+
cp icu4c-${ICU_MAJOR}.${ICU_MINOR}-Ubuntu22.04-x64.tgz $ICU
4444
pushd $ICU
4545
4646
pwd

inflection/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ file(MAKE_DIRECTORY ${INFLECTION_INCLUDE_ROOT})
8888

8989
include(dependICU)
9090

91-
add_library(xml2 INTERFACE IMPORTED GLOBAL)
92-
set_target_properties(xml2 PROPERTIES IMPORTED_LIBNAME xml2)
93-
target_include_directories(xml2 INTERFACE ${CMAKE_OSX_SYSROOT}/usr/include/libxml2)
91+
find_package(LibXml2 REQUIRED)
9492

9593
# Runs Unicode Inflection unit tests: "make check"
9694
set(DYLD_LIBRARY_PATH ${ICU_LIB_DIRECTORY}:$<TARGET_FILE_DIR:inflection>)

inflection/cmake/versions.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# Copyright 2021-2024 Apple Inc. All rights reserved.
33
#
44
CATCH2_VERSION := 3.9.0
5-
ICU_VERSION_MINIMUM := 77.1
5+
ICU_VERSION_MINIMUM := 78.1
66
MARISA_VERSION := 0.3.1

inflection/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ target_link_libraries(itest
88
PRIVATE
99
inflection
1010
Catch2
11-
xml2
11+
LibXml2::LibXml2
1212
marisa_objs
1313
ICU::uc ICU::i18n
1414
$<$<PLATFORM_ID:Darwin>:${PERFDATA_FRAMEWORK}>

inflection/test/src/inflection/dialog/NumberConceptTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ TEST_CASE("NumberConceptTest#test_es_1")
382382

383383
TEST_CASE("NumberConceptTest#testSwiss")
384384
{
385-
REQUIRE(u"1000" == ::inflection::dialog::NumberConcept((int64_t)1000, ::inflection::util::LocaleUtils::SWITZERLAND_GERMAN(), ::inflection::util::LocaleUtils::SWITZERLAND_GERMAN()).getAsDigits().getPrint());
385+
REQUIRE(u"1'000" == ::inflection::dialog::NumberConcept((int64_t)1000, ::inflection::util::LocaleUtils::SWITZERLAND_GERMAN(), ::inflection::util::LocaleUtils::SWITZERLAND_GERMAN()).getAsDigits().getPrint());
386386
REQUIRE(u"1.000" == ::inflection::dialog::NumberConcept((int64_t)1000, ::inflection::util::LocaleUtils::SWITZERLAND_GERMAN(), ::inflection::util::LocaleUtils::SWITZERLAND_GERMAN()).getAsDigits().getSpeak());
387387
REQUIRE(u"1" == ::inflection::dialog::NumberConcept((int64_t)1, ::inflection::util::LocaleUtils::SWITZERLAND_FRENCH(), ::inflection::util::LocaleUtils::SWITZERLAND_FRENCH()).getAsDigits().getSpeak());
388388
REQUIRE(u"1,1" == ::inflection::dialog::NumberConcept(1.1, ::inflection::util::LocaleUtils::SWITZERLAND_FRENCH(), ::inflection::util::LocaleUtils::SWITZERLAND_FRENCH()).getAsDigits().getSpeak());
@@ -392,7 +392,7 @@ TEST_CASE("NumberConceptTest#testSwiss")
392392
REQUIRE(u"59" == ::inflection::dialog::NumberConcept((int64_t)59, ::inflection::util::LocaleUtils::SWITZERLAND_FRENCH(), ::inflection::util::LocaleUtils::SWITZERLAND_FRENCH()).getAsDigits().getSpeak());
393393
REQUIRE(u"59" == ::inflection::dialog::NumberConcept((int64_t)59, ::inflection::util::LocaleUtils::FRENCH(), ::inflection::util::LocaleUtils::FRENCH()).getAsDigits().getPrint());
394394
REQUIRE(u"59" == ::inflection::dialog::NumberConcept((int64_t)59, ::inflection::util::LocaleUtils::FRENCH(), ::inflection::util::LocaleUtils::FRENCH()).getAsDigits().getSpeak());
395-
REQUIRE(u"1000" == ::inflection::dialog::NumberConcept((int64_t)1000, ::inflection::util::LocaleUtils::SWITZERLAND_ITALIAN(), ::inflection::util::LocaleUtils::SWITZERLAND_ITALIAN()).getAsDigits().getPrint());
395+
REQUIRE(u"1'000" == ::inflection::dialog::NumberConcept((int64_t)1000, ::inflection::util::LocaleUtils::SWITZERLAND_ITALIAN(), ::inflection::util::LocaleUtils::SWITZERLAND_ITALIAN()).getAsDigits().getPrint());
396396
REQUIRE(u"1.000" == ::inflection::dialog::NumberConcept((int64_t)1000, ::inflection::util::LocaleUtils::SWITZERLAND_ITALIAN(), ::inflection::util::LocaleUtils::SWITZERLAND_ITALIAN()).getAsDigits().getSpeak());
397397
}
398398

inflection/tools/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ endif()
1111
set(CMAKE_CXX_FLAGS_${BUILD_TYPE} ${CMAKE_CXX_FLAGS_RELEASE})
1212
target_link_libraries(tool_libraries
1313
INTERFACE
14-
xml2
1514
ICU::uc ICU::i18n
1615
$<$<PLATFORM_ID:Linux>:${CMAKE_DL_LIBS}>
1716
)

inflection/tools/buildDictionary/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ add_executable(buildDictionary ${BUILD_DICTIONARY_SOURCES})
77
target_link_libraries(buildDictionary
88
PRIVATE
99
tool_libraries
10+
LibXml2::LibXml2
1011
marisa_objs
1112
inflection_tool_objs
1213
resource_objs

0 commit comments

Comments
 (0)