summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-06-27 17:02:53 +0000
committerJoonas Niilola <juippis@gentoo.org>2023-08-22 10:45:26 +0300
commit9117f92404caf36bb351c7c88a53fef5d86812db (patch)
tree45c7d680980e4338446b23ba0600a4662839170a /mate-base
parentmedia-video/lxdvdrip: Fix call to undeclared function ioctl (diff)
downloadgentoo-9117f92404caf36bb351c7c88a53fef5d86812db.tar.gz
gentoo-9117f92404caf36bb351c7c88a53fef5d86812db.tar.bz2
gentoo-9117f92404caf36bb351c7c88a53fef5d86812db.zip
mate-base/mate-settings-daemon: Fix incompatible function pointer types
The patch also fixes a memory leak, take from an open PR by mate dev. Closes: https://bugs.gentoo.org/881315 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/31624 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'mate-base')
-rw-r--r--mate-base/mate-settings-daemon/files/mate-settings-daemon-1.26.0-fix-buid-with-clang16.patch45
-rw-r--r--mate-base/mate-settings-daemon/mate-settings-daemon-1.26.0-r2.ebuild79
2 files changed, 124 insertions, 0 deletions
diff --git a/mate-base/mate-settings-daemon/files/mate-settings-daemon-1.26.0-fix-buid-with-clang16.patch b/mate-base/mate-settings-daemon/files/mate-settings-daemon-1.26.0-fix-buid-with-clang16.patch
new file mode 100644
index 000000000000..cf91dbc6412e
--- /dev/null
+++ b/mate-base/mate-settings-daemon/files/mate-settings-daemon-1.26.0-fix-buid-with-clang16.patch
@@ -0,0 +1,45 @@
+https://github.com/mate-desktop/mate-settings-daemon/commit/42e91f2805c508317b4d26166cb3db332dd313e8.patch
+From: Colomban Wendling <cwendling@hypra.fr>
+Date: Tue, 27 Jun 2023 12:21:16 +0200
+Subject: [PATCH] a11y-keyboard-atspi: Fix memory leak
+
+Fix fairly large memory leak when beeping on keys while caps lock is
+enabled. The libatspi2 docs and API were quite misleading, so I
+overlooked the fact the event parameter should be freed in the
+callback.
+
+This changes the constness of the callback argument, which is new in
+libatspi2 2.40 -- yet the actual behavior didn't change, only the
+qualifier was removed, see [1].
+This might however bring up a compiler warning when building against
+libatspi2 < 2.40; but on the other hand it fixed build with
+clang >= 16, see #399. As it is unlikely to build with clang >= 16
+and libatspi2 < 2.40, I think it's a good compromise.
+
+[1] https://gitlab.gnome.org/GNOME/at-spi2-core/-/commit/7dfb0b7fc2d1710ef7fad54f910fa4c6a5e3af17
+--- a/plugins/a11y-keyboard/msd-a11y-keyboard-atspi.c
++++ b/plugins/a11y-keyboard/msd-a11y-keyboard-atspi.c
+@@ -55,16 +55,16 @@ msd_a11y_keyboard_atspi_class_init (MsdA11yKeyboardAtspiClass *klass)
+ }
+
+ static gboolean
+-on_key_press_event (const AtspiDeviceEvent *event,
+- void *user_data G_GNUC_UNUSED)
++on_key_press_event (AtspiDeviceEvent *event,
++ void *user_data G_GNUC_UNUSED)
+ {
+ /* don't ring on capslock itself, that's taken care of by togglekeys
+ * if the user want it. */
+- if (event->id == GDK_KEY_Caps_Lock)
+- return FALSE;
+-
+- gdk_display_beep (gdk_display_get_default ());
++ if (event->id != GDK_KEY_Caps_Lock)
++ gdk_display_beep (gdk_display_get_default ());
+
++ /* cast the possible erroneous const away with atspi < 2.40 */
++ g_boxed_free (ATSPI_TYPE_DEVICE_EVENT, (gpointer) event);
+ return FALSE;
+ }
+
+
diff --git a/mate-base/mate-settings-daemon/mate-settings-daemon-1.26.0-r2.ebuild b/mate-base/mate-settings-daemon/mate-settings-daemon-1.26.0-r2.ebuild
new file mode 100644
index 000000000000..c80a74807cf3
--- /dev/null
+++ b/mate-base/mate-settings-daemon/mate-settings-daemon-1.26.0-r2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MATE_LA_PUNT="yes"
+
+inherit mate
+
+if [[ ${PV} != 9999 ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~x86"
+fi
+
+DESCRIPTION="MATE Settings Daemon"
+LICENSE="GPL-2+ GPL-3+ HPND LGPL-2+ LGPL-2.1+"
+SLOT="0"
+
+IUSE="X accessibility debug libnotify policykit pulseaudio rfkill smartcard +sound"
+
+REQUIRED_USE="pulseaudio? ( sound )"
+
+COMMON_DEPEND=">=dev-libs/dbus-glib-0.74
+ >=dev-libs/glib-2.50:2
+ >=gnome-base/dconf-0.13.4
+ >=mate-base/libmatekbd-1.17.0
+ >=mate-base/mate-desktop-1.25.0
+ media-libs/fontconfig:1.0
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-3.22:3
+ x11-libs/libX11
+ x11-libs/libXi
+ x11-libs/libXext
+ >=x11-libs/libxklavier-5.2
+ accessibility? ( >=app-accessibility/at-spi2-core-2.36.0 )
+ libnotify? ( >=x11-libs/libnotify-0.7:0 )
+ policykit? (
+ >=dev-libs/dbus-glib-0.71
+ >=sys-apps/dbus-1.10.0
+ >=sys-auth/polkit-0.97
+ )
+ pulseaudio? (
+ >=media-libs/libmatemixer-1.10[pulseaudio]
+ media-libs/libpulse
+ )
+ smartcard? ( >=dev-libs/nss-3.11.2 )
+ sound? (
+ >=media-libs/libmatemixer-1.10
+ media-libs/libcanberra[gtk3]
+ virtual/libintl
+ )
+"
+BDEPEND="
+ >=sys-devel/gettext-0.19.8
+ virtual/pkgconfig
+"
+
+RDEPEND="${COMMON_DEPEND}"
+
+DEPEND="${COMMON_DEPEND}
+ x11-base/xorg-proto
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.26.0-fix-buid-with-clang16.patch
+)
+
+src_configure() {
+ mate_src_configure \
+ $(use_with X x) \
+ $(use_with libnotify) \
+ $(use_with sound libcanberra) \
+ $(use_with sound libmatemixer) \
+ $(use_enable debug) \
+ $(use_enable policykit polkit) \
+ $(use_enable pulseaudio pulse) \
+ $(use_enable rfkill) \
+ $(use_enable smartcard smartcard-support)
+}