Skip to contentSkip to conversation

libcanberra: Do not assume all gdk displays to be X11

PATCH In review Khem Raj 2 participants 5 messages Apr 13, 2020 – Apr 16, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 libcanberra: Do not assume all gdk displays to be X11

---
 ...-all-GdkDisplays-are-GdkX11Displays-.patch | 63 +++++++++++++++++++
 .../libcanberra/libcanberra_0.30.bb           |  1 +
 2 files changed, 64 insertions(+)
 create mode 100644 meta-oe/recipes-support/libcanberra/files/0001-gtk-Don-t-assume-all-GdkDisplays-are-GdkX11Displays-.patch
meta-oe/recipes-support/libcanberra/files/0001-gtk-Don-t-assume-all-GdkDisplays-are-GdkX11Displays-.patch new file +63 -0
new file mode 100644
index 0000000000..ba6fa2c643
@@ -0,0 +1,63 @@
+From c0620e432650e81062c1967cc669829dbd29b310 Mon Sep 17 00:00:00 2001
+From: Michael Meeks <[email protected]>
+Date: Fri, 9 Nov 2012 16:16:40 +0000
+Subject: [PATCH] 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(+)
+
+--- a/src/canberra-gtk-module.c
++++ b/src/canberra-gtk-module.c
+@@ -307,6 +307,11 @@ static gint window_get_desktop(GdkDispla
+         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(GdkDispl
+         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(GdkDisp
+         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 */
+ 
+--- a/src/canberra-gtk.c
++++ b/src/canberra-gtk.c
+@@ -185,6 +185,11 @@ static gint window_get_desktop(GdkDispla
+         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,
meta-oe/recipes-support/libcanberra/libcanberra_0.30.bb +1 -0
index 72c93abe17..1495051d79 100644
@@ -11,6 +11,7 @@ inherit autotools gtk-doc
 SRC_URI = " \
     http://0pointer.de/lennart/projects/${BPN}/${BPN}-${PV}.tar.xz \
     file://0001-build-gtk-and-gtk3-version-for-canberra_gtk_play.patch \
+    file://0001-gtk-Don-t-assume-all-GdkDisplays-are-GdkX11Displays-.patch \
 "
 SRC_URI[md5sum] = "34cb7e4430afaf6f447c4ebdb9b42072"
 SRC_URI[sha256sum] = "c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72"
Signature · 1 line
2.26.0
author
#1 lore raw

PATCH 2/3 gnome-bluetooth: Add check to require x11

gnome-bluetooth needs libcanberra compiled with gtk+3 support, compiling libcanberra with gtk+3 support would need gtk+ which needs X11 to support the needed backend, other option is directfb which will not worrk work with wayland(without X) config either

---
 .../recipes-gnome/gnome-bluetooth/gnome-bluetooth_3.34.1.bb   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-gnome/recipes-gnome/gnome-bluetooth/gnome-bluetooth_3.34.1.bb +3 -1
index e7c1099a9a..77c89d95c2 100644
@@ -11,7 +11,9 @@ DEPENDS = "udev gtk+3 libnotify libcanberra bluez5"
 GNOMEBASEBUILDCLASS = "meson"
 GTKDOC_MESON_OPTION = "gtk_doc"
 
-inherit gnomebase gtk-icon-cache gtk-doc gobject-introspection upstream-version-is-even
+inherit features_check gnomebase gtk-icon-cache gtk-doc gobject-introspection upstream-version-is-even
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 # gtk-icon-cache bbclass will take care of this for us.
 EXTRA_OEMESON = "-Dicon_update=false"
Signature · 1 line
2.26.0
author
#2 lore raw

PATCH 3/3 vlc: Add check to require X11

In reply to Khem Raj

It needs X11 as of now to build. there is a possiblily to build it without X11, but lets keep this check until that path is fixed

Also fixes

TOPDIR/build/tmp/work/aarch64-yoe-linux/vlc/3.0.9.2-r0/recipe-sysroot-native/usr/bin/aarch64-yoe-linux/aarch64-yoe-linux-ld: cannot find -lGL

---
 meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb +3 -1
index 9e41512c3e..556e79c7e6 100644
@@ -25,7 +25,9 @@ SRC_URI = "http://download.videolan.org/pub/videolan/${BPN}/${PV}/${BP}.tar.xz \
 "
 SRC_URI[sha256sum] = "a9bdad293d81cd48516abad8d490d8ab4012964ae541ff19e00021e071e47601"
 
-inherit autotools gettext pkgconfig features_check mime-xdg
+inherit autotools features_check gettext pkgconfig features_check mime-xdg
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 ARM_INSTRUCTION_SET = "arm"
 export BUILDCC = "${BUILD_CC}"
Signature · 1 line
2.26.0
#3 lore raw

Re: [oe] [meta-multimedia][PATCH 3/3] vlc: Add check to require X11

Quoted 17 lines · Khem Raj

It needs X11 as of now to build. there is a possiblily to build it without X11, but lets keep this check until that path is fixed

Also fixes

TOPDIR/build/tmp/work/aarch64-yoe-linux/vlc/3.0.9.2-r0/recipe-sysroot-native/usr/bin/aarch64-yoe-linux/aarch64-yoe-linux-ld: cannot find -lGL

---
 meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb +0 -0
index 9e41512c3e..556e79c7e6 100644

meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb SRC_URI = "http://download.videolan.org/pub/videolan/${BPN}/${PV}/${BP}.tar.xz \ · line 28

Quoted 5 lines
meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb +1 -1
@@ -25,7 +25,9 @@ SRC_URI = "http://download.videolan.org/pub/videolan/${BPN}/${PV}/${BP}.tar.xz \
 "
 SRC_URI[sha256sum] = "a9bdad293d81cd48516abad8d490d8ab4012964ae541ff19e00021e071e47601"
 
-inherit autotools gettext pkgconfig features_check mime-xdg
+inherit autotools features_check gettext pkgconfig features_check mime-xdg

No big deal, but there already was features_check few words later (left over from REQUIRED_DISTRO_FEATURES removal in 0f2b3139521570ad494a72399f8a9dae76e69b16 which made x11 optional)

Quoted 10 lines
meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb +2 -0
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 ARM_INSTRUCTION_SET = "arm"
 export BUILDCC = "${BUILD_CC}"
Signature · 1 line
2.26.0
author
#4 lore raw

Re: [oe] [meta-multimedia][PATCH 3/3] vlc: Add check to require X11

Quoted 22 lines · Martin Jansa
Quoted 20 lines · Khem Raj

It needs X11 as of now to build. there is a possiblily to build it without X11, but lets keep this check until that path is fixed

Also fixes

TOPDIR/build/tmp/work/aarch64-yoe-linux/vlc/3.0.9.2-r0/recipe-sysroot-native/usr/bin/aarch64-yoe-linux/aarch64-yoe-linux-ld: cannot find -lGL

---
 meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb +0 -0
index 9e41512c3e..556e79c7e6 100644
@@ -25,7 +25,9 @@ SRC_URI = "http://download.videolan.org/pub/videolan/${BPN}/${PV}/${BP}.tar.xz \
 "
 SRC_URI[sha256sum] = "a9bdad293d81cd48516abad8d490d8ab4012964ae541ff19e00021e071e47601"
 
Quoted 7 lines

meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb SRC_URI = "http://download.videolan.org/pub/videolan/${BPN}/${PV}/${BP}.tar.xz \ · line 28

Quoted 2 lines
meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb +1 -1
-inherit autotools gettext pkgconfig features_check mime-xdg
+inherit autotools features_check gettext pkgconfig features_check mime-xdg

No big deal, but there already was features_check few words later (left over from REQUIRED_DISTRO_FEATURES removal in 0f2b3139521570ad494a72399f8a9dae76e69b16 which made x11 optional)

OK, I will send a follow up

Quoted 11 lines
Quoted 10 lines
meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb +2 -1
+
+REQUIRED_DISTRO_FEATURES = "x11"
 
 ARM_INSTRUCTION_SET = "arm"
 export BUILDCC = "${BUILD_CC}"
--

2.26.0