Commit 997cce7c authored by Thomas Haller's avatar Thomas Haller

build: fix glib dependency to require at least 2.40

Fixes: 8a46b25c
parent 5f1c1be4
......@@ -164,14 +164,7 @@ DISTCLEANFILES += $(polkit_policy_DATA)
noinst_LTLIBRARIES += \
introspection/libnmdbus.la
# gdbus-codegen 2.38 will emit code that requires glib 2.38, which
# will then cause availability warnings if we define
# GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32.
#
# This is fixed in GLib 2.40 (it emits code that takes
# GLIB_VERSION_MAX_ALLOWED into account), so this workaround can go
# away when we depend on that.
introspection_libnmdbus_la_CPPFLAGS = $(filter-out -DGLIB_VERSION_MAX_ALLOWED%,$(GLIB_CFLAGS))
introspection_libnmdbus_la_CPPFLAGS = $(GLIB_CFLAGS)
introspection_sources = \
introspection/org.freedesktop.NetworkManager.AccessPoint.c \
......
......@@ -243,10 +243,6 @@ PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0],
[PKG_CHECK_MODULES(GLIB, gio-unix-2.0 >= 2.40 gmodule-2.0)
AC_SUBST(LOG_DRIVER, '$(top_srcdir)/build-aux/test-driver')])
dnl GLIB_VERSION_MIN_REQUIRED should match the version above.
dnl GLIB_VERSION_MAX_ALLOWED should be set to the same version;
dnl nm-glib.h will cause it to be overridden for the functions
dnl we have compat versions of.
GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40"
AC_SUBST(GLIB_CFLAGS)
......
......@@ -126,7 +126,7 @@ BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
%if 0%{?fedora}
BuildRequires: wireless-tools-devel >= %{wireless_tools_version}
%endif
BuildRequires: glib2-devel >= 2.32.0
BuildRequires: glib2-devel >= 2.40.0
BuildRequires: gobject-introspection-devel >= 0.10.3
BuildRequires: gettext-devel
BuildRequires: pkgconfig
......
......@@ -74,17 +74,6 @@ install_data(
install_dir: dbus_ifaces_dir
)
'''
# gdbus-codegen 2.38 will emit code that requires glib 2.38, which
# will then cause availability warnings if we define
# GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32.
#
# This is fixed in GLib 2.40 (it emits code that takes
# GLIB_VERSION_MAX_ALLOWED into account), so this workaround can go
# away when we depend on that.
introspection_libnmdbus_la_CPPFLAGS = $(filter-out -DGLIB_VERSION_MAX_ALLOWED%,$(GLIB_CFLAGS))
'''
libnmdbus = static_library(
'nmdbus',
sources: sources,
......
......@@ -209,23 +209,18 @@ config_h.set10('HAVE_LIBSYSTEMD', libsystemd_dep.found())
systemd_dep = dependency('systemd', required: false)
have_systemd_200 = systemd_dep.found() and systemd_dep.version().version_compare('>= 200')
gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.32')
gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.40')
log_driver = join_paths(meson.source_root(), 'build-aux', (gio_unix_dep.version().version_compare('>= 2.37.6') ? 'tap-driver.sh' : 'test-driver'))
# FIXME: same version? which version?
# GLIB_VERSION_MIN_REQUIRED should match the version above.
# GLIB_VERSION_MAX_ALLOWED should be set to the same version;
# nm-glib.h will cause it to be overridden for the functions
# we have compat versions of.
glib_dep = declare_dependency(
dependencies: [
gio_unix_dep,
dependency('gmodule-2.0')
],
compile_args: [
'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32',
'-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32'
'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40',
'-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40'
]
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment