Skip to content

Commit

Permalink
meson.build: support building with ICU 76
Browse files Browse the repository at this point in the history
ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer
add `icu-uc` when linking to shared libraries. This results in failure:
```
src/lib/icu/libicu.a.p/Converter.cxx.o: undefined reference to symbol 'ucnv_fromUnicode_76'
```

[^1]: unicode-org/icu@199bc82

Closes #2151
  • Loading branch information
cho-m authored and MaxKellermann committed Dec 3, 2024
1 parent 9d2666f commit 4a49f75
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ver 0.23.16 (not yet released)
* support libfmt 11
* support ICU 76

ver 0.23.15 (2023/12/20)
* decoder
Expand Down
11 changes: 7 additions & 4 deletions src/lib/icu/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
icu_dep = dependency('icu-i18n', version: '>= 50', required: get_option('icu'))
conf.set('HAVE_ICU', icu_dep.found())
icu_i18n_dep = dependency('icu-i18n', version: '>= 50', required: get_option('icu'))
icu_uc_dep = dependency('icu-uc', version: '>= 50', required: get_option('icu'))
have_icu = icu_i18n_dep.found() and icu_uc_dep.found()
conf.set('HAVE_ICU', have_icu)

icu_sources = [
'CaseFold.cxx',
Expand All @@ -13,7 +15,7 @@ if is_windows
endif

iconv_dep = []
if icu_dep.found()
if have_icu
icu_sources += [
'Util.cxx',
'Init.cxx',
Expand Down Expand Up @@ -44,7 +46,8 @@ icu = static_library(
icu_sources,
include_directories: inc,
dependencies: [
icu_dep,
icu_i18n_dep,
icu_uc_dep,
iconv_dep,
fmt_dep,
],
Expand Down

0 comments on commit 4a49f75

Please sign in to comment.