[glib] Meson: libintl is a public dependency of glib-2.0



commit 7b8d8835f53ba7e9a9b482571b49909828986586
Author: Xavier Claessens <xavier claessens collabora com>
Date:   Sun May 13 19:22:51 2018 -0400

    Meson: libintl is a public dependency of glib-2.0
    
    On non-glibc platforms gettext is provided by extra libintl dependency.
    We wrongly thought libintl is an internal dependency and applications
    needs to explicitly link on it, but turns out that breaks many
    applications and with autotools the .pc generated actually has -lintl in
    public "Libs:".
    
    https://bugzilla.gnome.org/show_bug.cgi?id=796085

 gio/meson.build       | 16 ++++++++--------
 gio/tests/meson.build |  1 -
 glib/meson.build      | 12 ++++++------
 gobject/meson.build   |  2 +-
 4 files changed, 15 insertions(+), 16 deletions(-)
---
diff --git a/gio/meson.build b/gio/meson.build
index 8adf35031..42f67715d 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -794,7 +794,7 @@ libgio = library('gio-2.0',
   include_directories : [configinc, gioinc],
   link_with : internal_deps,
   #  '$(gio_win32_res_ldflag)',
-  dependencies : [libintl, libz_dep, libdl_dep, libmount_dep, libglib_dep,
+  dependencies : [libz_dep, libdl_dep, libmount_dep, libglib_dep,
                   libgobject_dep, libgmodule_dep, selinux_dep, xattr_dep,
                   platform_deps, network_libs],
   c_args : gio_c_args,
@@ -894,13 +894,13 @@ executable('gio', gio_tool_sources,
   c_args : gio_c_args,
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
-  dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
+  dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
 
 executable('gresource', 'gresource-tool.c',
   install : true,
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
-  dependencies : [libelf, libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
+  dependencies : [libelf, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
 
 executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
   install : true,
@@ -914,7 +914,7 @@ glib_compile_schemas = executable('glib-compile-schemas',
   install : true,
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
-  dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
+  dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
 
 glib_compile_resources = executable('glib-compile-resources',
   [gconstructor_as_data_h, 'gvdb/gvdb-builder.c', 'glib-compile-resources.c'],
@@ -922,14 +922,14 @@ glib_compile_resources = executable('glib-compile-resources',
   c_args : gio_c_args,
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
-  dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
+  dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
 
 executable('gsettings', 'gsettings-tool.c',
   install : true,
   c_args : gio_c_args,
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
-  dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
+  dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
 install_data('gschema.dtd',
   install_dir : join_paths(get_option('datadir'), 'glib-2.0/schemas'))
 
@@ -941,7 +941,7 @@ executable('gdbus', 'gdbus-tool.c',
   c_args : gio_c_args,
   # intl.lib is not compatible with SAFESEH
   link_args : noseh_link_args,
-  dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
+  dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
 
 if host_system != 'windows'
   executable('gapplication', 'gapplication-tool.c',
@@ -949,7 +949,7 @@ if host_system != 'windows'
     c_args : gio_c_args,
     # intl.lib is not compatible with SAFESEH
     link_args : noseh_link_args,
-    dependencies : [libintl, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
+    dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
 endif
 
 if enable_systemtap
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index ff897e44a..96229bd8b 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -3,7 +3,6 @@ common_gio_tests_deps = [
   libgmodule_dep,
   libgobject_dep,
   libgio_dep,
-  libintl
 ]
 
 subdir('gdbus-object-manager-example')
diff --git a/glib/meson.build b/glib/meson.build
index 3646d7038..410669dce 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -245,11 +245,11 @@ libglib_dep = declare_dependency(
   link_with : libglib,
   # thread_dep doesn't get pulled in from libglib atm,
   # see https://github.com/mesonbuild/meson/issues/1426
-  dependencies : [thread_dep],
+  dependencies : [thread_dep, libintl],
   # We sadly need to export configinc here because everyone includes <glib/*.h>
   include_directories : [configinc, glibinc])
 
-pkg.generate(libraries : libglib,
+pkg.generate(libraries : [libglib, libintl],
   libraries_private : [osx_ldflags],
   subdirs : ['glib-2.0'],
   extra_cflags : ['-I${libdir}/glib-2.0/include'],
@@ -271,23 +271,23 @@ if host_system == 'windows'
       install : true,
       gui_app : true,
       include_directories : configinc,
-      dependencies : [libintl, libglib_dep])
+      dependencies : [libglib_dep])
     executable('gspawn-win32-helper-console', 'gspawn-win32-helper.c',
       install : true,
       c_args : ['-DHELPER_CONSOLE'],
       include_directories : configinc,
-      dependencies : [libintl, libglib_dep])
+      dependencies : [libglib_dep])
   else
     executable('gspawn-win64-helper', 'gspawn-win32-helper.c',
       install : true,
       gui_app : true,
       include_directories : configinc,
-      dependencies : [libintl, libglib_dep])
+      dependencies : [libglib_dep])
     executable('gspawn-win64-helper-console', 'gspawn-win32-helper.c',
       install : true,
       c_args : ['-DHELPER_CONSOLE'],
       include_directories : configinc,
-      dependencies : [libintl, libglib_dep])
+      dependencies : [libglib_dep])
   endif
 else
   gtester = executable('gtester', 'gtester.c',
diff --git a/gobject/meson.build b/gobject/meson.build
index aa8f5398e..d34a897a7 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -68,7 +68,7 @@ libgobject = library('gobject-2.0',
   soversion : soversion,
   install : true,
   include_directories : [configinc],
-  dependencies : [libintl, libffi_dep, libglib_dep],
+  dependencies : [libffi_dep, libglib_dep],
   c_args : ['-DG_LOG_DOMAIN="GLib-GObject"', '-DGOBJECT_COMPILATION'] + glib_hidden_visibility_args,
   link_args : glib_link_flags,
 )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]