postgresql/contrib/unaccent/meson.build
Jeff Davis c45dc7ffbb initdb: derive encoding from locale for ICU; similar to libc.
Previously, the default encoding was derived from the locale when
using libc; while the default was always UTF-8 when using ICU. That
would throw an error when the locale was not compatible with UTF-8.

This commit causes initdb to derive the default encoding from the
locale for both providers. If --no-locale is specified (or if the
locale is C or POSIX), the default encoding will be UTF-8 for ICU
(because ICU does not support SQL_ASCII) and SQL_ASCII for libc.

Per buildfarm failure on system "hoverfly" related to commit
27b62377b4.

Discussion: https://postgr.es/m/d191d5841347301a8f1238f609471ddd957fc47e.camel%40j-davis.com
2023-03-10 10:51:24 -08:00

43 lines
873 B
Meson

# Copyright (c) 2022-2023, PostgreSQL Global Development Group
unaccent_sources = files(
'unaccent.c',
)
if host_system == 'windows'
unaccent_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
'--NAME', 'unaccent',
'--FILEDESC', 'unaccent - text search dictionary that removes accents',])
endif
unaccent = shared_module('unaccent',
unaccent_sources,
kwargs: contrib_mod_args,
)
contrib_targets += unaccent
install_data(
'unaccent--1.0--1.1.sql',
'unaccent--1.1.sql',
'unaccent.control',
kwargs: contrib_data_args,
)
install_data(
'unaccent.rules',
install_dir: dir_data / 'tsearch_data'
)
# XXX: Implement downlo
tests += {
'name': 'unaccent',
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'regress': {
'sql': [
'unaccent',
],
'regress_args': ['--encoding=UTF8', '--no-locale'],
},
}