summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2025-12-02 10:02:11 +0100
committerLuke from DC <[email protected]>2025-12-07 04:36:13 +0000
commitbfdc4c4d82f7060bd24183b569757c94894cb5e0 (patch)
treee16e12850791425c3e4577642453dd6bcfbdaa13
parent29e36d7cf10c2773991f34fbac1791139f225930 (diff)
downloadmate-menus-master.tar.bz2
mate-menus-master.tar.xz
libmenu: Use GioUnix-2.0 to introspect the headerHEADmaster
This is required since Gio 2.80, see [^1]. We however make the dependency on 2.80 conditional to support older systems as well, as they don't require the modification to work. Fixes #119 and mate-desktop/mozo#92. [^1]: https://gitlab.gnome.org/GNOME/gnome-menus/-/commit/fe1eca74e1b6d75941d56088ea2aeca97b639926
-rw-r--r--configure.ac5
-rw-r--r--libmenu/Makefile.am5
2 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 619341c..554ff88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,11 @@ PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0 >= 2.50.0)
AC_SUBST(GIO_UNIX_CFLAGS)
AC_SUBST(GIO_UNIX_LIBS)
+dnl Conditional for GioUnix inclusion in Gir scanning
+PKG_CHECK_MODULES(GIO_UNIX_280, [gio-unix-2.0 >= 2.80.0],
+ [have_gio_unix_280=yes], [have_gio_unix_280=no])
+AM_CONDITIONAL([HAVE_GIO_UNIX_280], [test "x$have_gio_unix_280" = xyes])
+
AC_ARG_ENABLE(collection,
AS_HELP_STRING([--enable-collection],
[enable collection menu entry]),,
diff --git a/libmenu/Makefile.am b/libmenu/Makefile.am
index 2b72443..ef0b301 100644
--- a/libmenu/Makefile.am
+++ b/libmenu/Makefile.am
@@ -58,6 +58,11 @@ introspection_sources = $(libmate_menu_include_HEADERS) matemenu-tree.c
MateMenu-2.0.gir: libmate-menu.la
MateMenu_2_0_gir_INCLUDES = Gio-2.0
+# Under GIO >= 2.80 we need to include the dependency, see
+# https://gitlab.gnome.org/GNOME/gnome-menus/-/commit/fe1eca74e1b6d75941d56088ea2aeca97b639926
+if HAVE_GIO_UNIX_280
+MateMenu_2_0_gir_INCLUDES += GioUnix-2.0
+endif HAVE_GIO_UNIX_280
MateMenu_2_0_gir_CFLAGS = $(AM_CPPFLAGS)
MateMenu_2_0_gir_LIBS = libmate-menu.la
MateMenu_2_0_gir_SCANNERFLAGS = --identifier-prefix=MateMenu --symbol-prefix=matemenu --pkg-export=libmate-menu --c-include=matemenu-tree.h