Fix issues with glib 2.89.2
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
name: glibmm
|
||||
description: Official C++ interface for the popular cross-platform library Glib
|
||||
version: 2.66.9
|
||||
revision: 1
|
||||
revision: 2
|
||||
url: https://www.gtkmm.org/
|
||||
license: LGPL2.1-or-later
|
||||
license: LGPL-2.1-or-later
|
||||
maintainers:
|
||||
- [email protected]
|
||||
architecture: any
|
||||
@@ -12,7 +12,13 @@ depends:
|
||||
- glib
|
||||
- libsigcpp
|
||||
make_depends:
|
||||
- doxygen
|
||||
- meson
|
||||
- mm-common
|
||||
- libxslt
|
||||
- glib-networking
|
||||
downloads:
|
||||
- url: https://download.gnome.org/sources/glibmm/${BPM_PKG_VERSION%.*}/glibmm-${BPM_PKG_VERSION}.tar.xz
|
||||
extract_to: ${BPM_SOURCE}
|
||||
extract_strip_components: 1
|
||||
checksum: 5a026e5602085307c7dcb72b71b07261c40f80914277bef5f8d7f2ecab739bec
|
||||
|
||||
@@ -2,41 +2,33 @@
|
||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||
|
||||
DOWNLOAD="https://download.gnome.org/sources/glibmm/${BPM_PKG_VERSION%.*}/glibmm-${BPM_PKG_VERSION}.tar.xz"
|
||||
FILENAME="${DOWNLOAD##*/}"
|
||||
|
||||
# The prepare function is executed in the root of the temp directory
|
||||
# This function is used for downloading files and putting them into the correct location
|
||||
prepare() {
|
||||
wget "$DOWNLOAD"
|
||||
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
|
||||
cd "$BPM_SOURCE"
|
||||
|
||||
patch -Np1 -i "$BPM_WORKDIR"/glibmm24-2.66.9-glib_2.89.2-type-definition.patch
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
mkdir glibmm-build
|
||||
cd glibmm-build
|
||||
|
||||
meson setup --prefix=/usr --libdir=/usr/lib --buildtype=release ..
|
||||
meson compile
|
||||
meson setup build --prefix=/usr -Dmaintainer-mode=true
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
# The check function is executed in the source directory
|
||||
# This function is used to run tests to verify the package has been compiled correctly
|
||||
check() {
|
||||
cd glibmm-build
|
||||
|
||||
meson test
|
||||
meson test -C build
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
cd glibmm-build
|
||||
meson install -C build --destdir="$BPM_OUTPUT"
|
||||
|
||||
meson install --destdir="$BPM_OUTPUT"
|
||||
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING.tools "$BPM_OUTPUT"/usr/share/licenses/glibmm/COPYING.tools
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/glibmm/COPYING
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING* -t "$BPM_OUTPUT"/usr/share/licenses/glibmm
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
From d26083c41219958e802d5da733d4b4d3c342ec89 Mon Sep 17 00:00:00 2001
|
||||
From: Kjell Ahlstedt <[email protected]>
|
||||
Date: Sun, 5 Jul 2026 16:49:52 +0200
|
||||
Subject: [PATCH] Gio: Emblem and DBus::ActionGroup: Don't derive gtkmm__Gxxx
|
||||
types
|
||||
|
||||
GEmblem and GDBusActionGroup are declared G_DECLARE_FINAL_TYPE.
|
||||
Add _DO_NOT_DERIVE_GTYPE, _ABI_AS_WITH_DERIVED_GTYPE and _STRUCT_NOT_HIDDEN
|
||||
to the corresponding glibmm classes.
|
||||
---
|
||||
gio/src/dbusactiongroup.hg | 14 ++++++++++++++
|
||||
gio/src/emblem.hg | 4 ++++
|
||||
2 files changed, 18 insertions(+)
|
||||
|
||||
diff --git a/gio/src/dbusactiongroup.hg b/gio/src/dbusactiongroup.hg
|
||||
index ae9bb6fd..27359bfe 100644
|
||||
--- a/gio/src/dbusactiongroup.hg
|
||||
+++ b/gio/src/dbusactiongroup.hg
|
||||
@@ -21,6 +21,17 @@
|
||||
_DEFS(giomm,gio)
|
||||
_PINCLUDE(glibmm/private/object_p.h)
|
||||
|
||||
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
+// Necessary if compiled against glib < 2.89.1, where GDBusActionGroup is not
|
||||
+// a final type, and GDBusActionGroupClass is not defined by G_DECLARE_FINAL_TYPE().
|
||||
+// (It was declared a final type somewhere between 2.89.1 and 2.89.2.
|
||||
+// The compiler will probably complain if you compile against a glib 2.89.1
|
||||
+// where GDBusActionGroup is not a final type.)
|
||||
+#if !GLIB_CHECK_VERSION(2,89,1)
|
||||
+using GDBusActionGroupClass = struct _GDBusActionGroupClass;
|
||||
+#endif
|
||||
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
|
||||
+
|
||||
namespace Gio
|
||||
{
|
||||
|
||||
@@ -43,6 +54,9 @@ class GIOMM_API ActionGroup
|
||||
_CLASS_GOBJECT(ActionGroup, GDBusActionGroup, G_DBUS_ACTION_GROUP, Glib::Object, GObject, , , GIOMM_API)
|
||||
_IMPLEMENTS_INTERFACE(::Gio::ActionGroup)
|
||||
_IMPLEMENTS_INTERFACE(RemoteActionGroup)
|
||||
+ _DO_NOT_DERIVE_GTYPE dnl// GDBusActionGroup is a final type since glib 2.89.2
|
||||
+ _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
|
||||
+ _STRUCT_NOT_HIDDEN
|
||||
|
||||
protected:
|
||||
_CTOR_DEFAULT
|
||||
diff --git a/gio/src/emblem.hg b/gio/src/emblem.hg
|
||||
index 3a0d3316..737fff24 100644
|
||||
--- a/gio/src/emblem.hg
|
||||
+++ b/gio/src/emblem.hg
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <glibmm/object.h>
|
||||
#include <giomm/icon.h>
|
||||
+#include <gio/gio.h>
|
||||
|
||||
_DEFS(giomm,gio)
|
||||
_PINCLUDE(glibmm/private/object_p.h)
|
||||
@@ -42,6 +43,9 @@ class GIOMM_API Emblem
|
||||
{
|
||||
_CLASS_GOBJECT(Emblem, GEmblem, G_EMBLEM, Glib::Object, GObject, , , GIOMM_API)
|
||||
_IMPLEMENTS_INTERFACE(Icon)
|
||||
+ _DO_NOT_DERIVE_GTYPE dnl// GEmblem is a final type since glib 2.89.2
|
||||
+ _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
|
||||
+ _STRUCT_NOT_HIDDEN
|
||||
|
||||
protected:
|
||||
/** Creates a new emblem for @a icon.
|
||||
--
|
||||
GitLab
|
||||
|
||||
From b353a8b0afc1aa78f3eec58229f02acd9fab6d3e Mon Sep 17 00:00:00 2001
|
||||
From: Kjell Ahlstedt <[email protected]>
|
||||
Date: Mon, 6 Jul 2026 12:23:57 +0200
|
||||
Subject: [PATCH] Gio::DBus::ActionGroup: Improve the test whether
|
||||
GDBusActionGroup is final
|
||||
|
||||
---
|
||||
gio/src/dbusactiongroup.hg | 15 ++++++++-------
|
||||
1 file changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gio/src/dbusactiongroup.hg b/gio/src/dbusactiongroup.hg
|
||||
index 27359bfe..777e8fd7 100644
|
||||
--- a/gio/src/dbusactiongroup.hg
|
||||
+++ b/gio/src/dbusactiongroup.hg
|
||||
@@ -22,13 +22,14 @@ _DEFS(giomm,gio)
|
||||
_PINCLUDE(glibmm/private/object_p.h)
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
-// Necessary if compiled against glib < 2.89.1, where GDBusActionGroup is not
|
||||
-// a final type, and GDBusActionGroupClass is not defined by G_DECLARE_FINAL_TYPE().
|
||||
-// (It was declared a final type somewhere between 2.89.1 and 2.89.2.
|
||||
-// The compiler will probably complain if you compile against a glib 2.89.1
|
||||
-// where GDBusActionGroup is not a final type.)
|
||||
-#if !GLIB_CHECK_VERSION(2,89,1)
|
||||
-using GDBusActionGroupClass = struct _GDBusActionGroupClass;
|
||||
+// GDBusActionGroup was declared a final type between GLib 2.89.1 and 2.89.2.
|
||||
+// Before that, GDBusActionGroupClass was not declared in GLib.
|
||||
+// The preprocessor macro G_DBUS_ACTION_GROUP_CLASS was defined, though.
|
||||
+#if !GLIB_CHECK_VERSION(2,89,1) || (!GLIB_CHECK_VERSION(2,89,2) && defined(G_DBUS_ACTION_GROUP_CLASS))
|
||||
+ // glib < 2.89.1 or (glib == 2.89.1 and G_DBUS_ACTION_GROUP_CLASS is a preprocessor macro)
|
||||
+ // GDBusActionGroup is not a final type,
|
||||
+ // GDBusActionGroupClass is not declared in GLib.
|
||||
+ using GDBusActionGroupClass = struct _GDBusActionGroupClass;
|
||||
#endif
|
||||
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
Reference in New Issue
Block a user