[rhythmbox/wip/hadess/fix-i18n] build: Fix translations not working
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/wip/hadess/fix-i18n] build: Fix translations not working
- Date: Thu, 5 May 2022 07:49:19 +0000 (UTC)
commit f6f0824d3571b77a142913c9b3dbf874f920272d
Author: Bastien Nocera <hadess hadess net>
Date: Wed May 4 17:42:36 2022 +0200
build: Fix translations not working
ENABLE_NLS was never set after the port to meson, so force enable it, as
any reasonable OS will have NLS support nowadays. Detect and link to
libintl for systems where the functionality isn't available in the
libc.
config.h.meson | 3 +++
meson.build | 2 ++
metadata/meson.build | 2 +-
remote/dbus/meson.build | 2 +-
shell/meson.build | 2 +-
5 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/config.h.meson b/config.h.meson
index 811a501df..e84138db5 100644
--- a/config.h.meson
+++ b/config.h.meson
@@ -8,6 +8,9 @@
/* Define to the gettext package name. */
#mesondefine GETTEXT_PACKAGE
+/* Define to enable NLS */
+#mesondefine ENABLE_NLS
+
/* Define if you have GNU fwrite_unlocked */
#mesondefine HAVE_GNU_FWRITE_UNLOCKED
diff --git a/meson.build b/meson.build
index 0a40c47c9..7645fe166 100644
--- a/meson.build
+++ b/meson.build
@@ -47,6 +47,7 @@ cdata.set('GLIB_VERSION_MAX_ALLOWED', 'GLIB_VERSION_2_56')
gstreamer_required = '1.4.0'
+intl = dependency('intl', required: true)
cairo = dependency('cairo', required: true)
gdk_pixbuf = dependency('gdk-pixbuf-2.0', version: '>= 2.18.0')
gio = dependency('gio-2.0', version: '>=' + glib_required, required: true)
@@ -178,6 +179,7 @@ endif
cdata.set('GETTEXT_PACKAGE', '"rhythmbox"')
cdata.set('PACKAGE', '"rhythmbox"')
cdata.set('VERSION', '@0@'.format(meson.project_version()))
+cdata.set('ENABLE_NLS', 1)
# Needed so that we can build static libraries and later link them into
# shared libraries.
diff --git a/metadata/meson.build b/metadata/meson.build
index 76d200785..071406d25 100644
--- a/metadata/meson.build
+++ b/metadata/meson.build
@@ -58,7 +58,7 @@ rbmetadata_dep = declare_dependency(
executable('rhythmbox-metadata', metadata_service_sources,
c_args: metadata_c_args,
link_with: rbmetadata_lib,
- dependencies: [librb_dep, rbmetadata_dep],
+ dependencies: [librb_dep, rbmetadata_dep, intl],
install: true,
install_dir: get_option('libexecdir'),
install_rpath: rpath
diff --git a/remote/dbus/meson.build b/remote/dbus/meson.build
index 0f053a2b6..78e5d91d1 100644
--- a/remote/dbus/meson.build
+++ b/remote/dbus/meson.build
@@ -9,7 +9,7 @@ client_c_args = [
executable('rhythmbox-client',
'rb-client.c',
c_args: client_c_args,
- dependencies: librb_dep,
+ dependencies: [librb_dep, intl],
install: true,
install_rpath: rpath
)
diff --git a/shell/meson.build b/shell/meson.build
index 0f843f8bc..f65bbd114 100644
--- a/shell/meson.build
+++ b/shell/meson.build
@@ -147,7 +147,7 @@ if enable_python
endif
executable('rhythmbox', 'main.c',
- dependencies: rhythmbox_dependencies,
+ dependencies: [ rhythmbox_dependencies, intl ],
c_args: shell_c_args,
include_directories: [ pluginsinc ],
install: true,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]