meson: use the custom meson provided intl dependency

Let meson deal with the system differences instead of handling
it manually.

The custom dependency was added in meson 0.59, then gained
static support with 0.60, and static support for cygwin with 0.61,
which is why the meson requirement is bumped to 0.61.

Debian bullseye ships meson 0.56, so switch to bookworm which
has 1.0.1
This commit is contained in:
Christoph Reiter 2024-04-28 14:29:44 +02:00 committed by Allan McRae
parent 9548d6cc76
commit 15a2338656
2 changed files with 3 additions and 8 deletions

View file

@ -88,7 +88,7 @@ arch-no-nls:
- fakechroot meson test -C build - fakechroot meson test -C build
debian: debian:
image: debian:bullseye image: debian:bookworm
before_script: before_script:
- apt update - apt update
- > - >

View file

@ -8,7 +8,7 @@ project('pacman',
'sysconfdir=/etc', 'sysconfdir=/etc',
'localstatedir=/var', 'localstatedir=/var',
], ],
meson_version : '>= 0.56') meson_version : '>= 0.61')
libalpm_version = '14.0.0' libalpm_version = '14.0.0'
@ -79,12 +79,7 @@ conf.set_quoted('ROOTDIR', ROOTDIR)
libintl = dependency('', required: false) libintl = dependency('', required: false)
if get_option('i18n') if get_option('i18n')
if not cc.has_function('ngettext') libintl = dependency('intl', static: get_option('buildstatic'))
libintl = cc.find_library('intl', required : false, static: get_option('buildstatic'))
if not libintl.found()
error('ngettext not found but NLS support requested')
endif
endif
conf.set('ENABLE_NLS', 1) conf.set('ENABLE_NLS', 1)
endif endif