[neon/snap-packaging/kf5-core-sdk] /: Add libplasma needed by krunner, add libcanberra needed by
Scarlett Moore
null at kde.org
Mon Oct 21 14:27:58 BST 2024
Git commit ca8aef52439b666222ea7d9429c95b50aef6e9e3 by Scarlett Moore.
Committed on 21/10/2024 at 13:26.
Pushed by scarlettmoore into branch 'master'.
Add libplasma needed by krunner, add libcanberra needed by
knotifications.
A +77 -0 patches/libcanberra/libcanberra-0.30-wayland-1.patch
A +1 -0 patches/libcanberra/series
M +50 -0 snapcraft.yaml
https://invent.kde.org/neon/snap-packaging/kf5-core-sdk/-/commit/ca8aef52439b666222ea7d9429c95b50aef6e9e3
diff --git a/patches/libcanberra/libcanberra-0.30-wayland-1.patch b/patches/libcanberra/libcanberra-0.30-wayland-1.patch
new file mode 100644
index 0000000..9196ad6
--- /dev/null
+++ b/patches/libcanberra/libcanberra-0.30-wayland-1.patch
@@ -0,0 +1,77 @@
+Submitted by: Xi Ruoyao <xry111 at mengyan1223 dot wang>
+Date: 2020-09-21
+Initial Package Version: 0.30
+Upstream Status: Commited
+Origin: Upstream Git Repository
+Description: Fix a bug crashing some applications in Wayland desktops.
+
+From c0620e432650e81062c1967cc669829dbd29b310 Mon Sep 17 00:00:00 2001
+From: Michael Meeks <michael.meeks at suse.com>
+Date: Fri, 9 Nov 2012 16:16:40 +0000
+Subject: gtk: Don't assume all GdkDisplays are GdkX11Displays:
+ broadway/wayland
+
+---
+ src/canberra-gtk-module.c | 15 +++++++++++++++
+ src/canberra-gtk.c | 5 +++++
+ 2 files changed, 20 insertions(+)
+
+diff --git a/src/canberra-gtk-module.c b/src/canberra-gtk-module.c
+index 67791f0..c1532ab 100644
+--- a/src/canberra-gtk-module.c
++++ b/src/canberra-gtk-module.c
+@@ -307,6 +307,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
+ guchar *data = NULL;
+ gint ret = -1;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return 0;
++#endif
++
+ if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
+ gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
+ 0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+@@ -335,6 +340,11 @@ static gint display_get_desktop(GdkDisplay *d) {
+ guchar *data = NULL;
+ gint ret = -1;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return 0;
++#endif
++
+ if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), DefaultRootWindow(GDK_DISPLAY_XDISPLAY(d)),
+ gdk_x11_get_xatom_by_name_for_display(d, "_NET_CURRENT_DESKTOP"),
+ 0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+@@ -365,6 +375,11 @@ static gboolean window_is_xembed(GdkDisplay *d, GdkWindow *w) {
+ gboolean ret = FALSE;
+ Atom xembed;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return FALSE;
++#endif
++
+ /* Gnome Panel applets are XEMBED windows. We need to make sure we
+ * ignore them */
+
+diff --git a/src/canberra-gtk.c b/src/canberra-gtk.c
+index 34446f5..08cb668 100644
+--- a/src/canberra-gtk.c
++++ b/src/canberra-gtk.c
+@@ -185,6 +185,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
+ guchar *data = NULL;
+ gint ret = -1;
+
++#ifdef GDK_IS_X11_DISPLAY
++ if (!GDK_IS_X11_DISPLAY(d))
++ return 0;
++#endif
++
+ if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
+ gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
+ 0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+--
+cgit v1.2.1
+
diff --git a/patches/libcanberra/series b/patches/libcanberra/series
new file mode 100644
index 0000000..a66c9ec
--- /dev/null
+++ b/patches/libcanberra/series
@@ -0,0 +1 @@
+libcanberra-0.30-wayland-1.patch
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 16c5a61..3279a13 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -957,6 +957,24 @@ parts:
- "-DCMAKE_FIND_ROOT_PATH=$CRAFT_STAGE\\;/snap/kde-qt5-core22-sdk/current\\;/usr"
- "-DCMAKE_PREFIX_PATH=$CRAFT_STAGE\\;/snap/kde-qt5-core22-sdk/current\\;/usr"
build-environment: *buildenvironment
+ libcanberra:
+ source: https://0pointer.de/lennart/projects/libcanberra/libcanberra-0.30.tar.xz
+ build-packages:
+ - libvorbis-dev
+ - libasound2-dev
+ - libgstreamer1.0-dev
+ - libpulse-dev
+ build-snaps:
+ - kde-qt5-core22-sdk
+ plugin: cmake
+ cmake-generator: Ninja
+ cmake-parameters: *cmakeparameters
+ build-environment: *buildenvironment
+ override-pull: |
+ craftctl default
+ while read -r PATCHFILE ; do
+ patch -p1 < "$CRAFT_PROJECT_DIR/patches/libcanberra/$PATCHFILE"
+ done < $CRAFT_PROJECT_DIR/patches/libcanberra/series
knotifications:
after:
- extra-cmake-modules
@@ -1601,6 +1619,37 @@ parts:
cmake-generator: Ninja
cmake-parameters: *cmakeparameters
build-environment: *buildenvironment
+ libplasms:
+ after:
+ - extra-cmake-modules
+ - plasma-activities
+ - karchive
+ - kconfig
+ - kconfigwidgets
+ - kcoreaddons
+ - kdbusaddons
+ - kdeclarative
+ - kglobalaccel
+ - kguiaddons
+ - kiconthemes
+ - ki18n
+ - kio
+ - kwindowsystem
+ - kxmlgui
+ - knotifications
+ - kpackage
+ - kirigami
+ - kwayland
+ - kdoctools
+ source: https://invent.kde.org/plasma/libplasma
+ source-tag: kf5
+ source-depth: 1
+ build-snaps:
+ - kde-qt5-core22-sdk
+ plugin: cmake
+ cmake-generator: Ninja
+ cmake-parameters: *cmakeparameters
+ build-environment: *buildenvironment
krunner:
after:
- extra-cmake-modules
@@ -1609,6 +1658,7 @@ parts:
- threadweaver
- ki18n
- kitemmodels
+ - libplasma
source: https://invent.kde.org/frameworks/krunner.git
source-tag: *kf5-version
source-depth: 1
More information about the Neon-commits
mailing list