Skip to contentSkip to conversation

package/libdecor: new package

PATCH In review Bernd Kuhls 3 participants 6 messages Jul 16, 2023 – Sep 2, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/libdecor: new package

Needed for wayland support in mesa3d-demos.

---
 package/Config.in              |  1 +
 package/libdecor/Config.in     | 25 +++++++++++++++++++++++++
 package/libdecor/libdecor.hash |  3 +++
 package/libdecor/libdecor.mk   | 22 ++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 100644 package/libdecor/Config.in
 create mode 100644 package/libdecor/libdecor.hash
 create mode 100644 package/libdecor/libdecor.mk
package/Config.in +1 -0
index 57d3646566..1097d2deae 100644
@@ -1600,6 +1600,7 @@ menu "Graphics"
 	source "package/leptonica/Config.in"
 	source "package/lesstif/Config.in"
 	source "package/libart/Config.in"
+	source "package/libdecor/Config.in"
 	source "package/libdmtx/Config.in"
 	source "package/libdri2/Config.in"
 	source "package/libdrm/Config.in"
package/libdecor/Config.in new file +25 -0
new file mode 100644
index 0000000000..782fe855b4
@@ -0,0 +1,25 @@
+config BR2_PACKAGE_LIBDECOR
+	bool "libdecor"
+	depends on !BR2_STATIC_LIBS # wayland
+	depends on BR2_USE_MMU # pango
+	depends on BR2_USE_WCHAR # pango
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # pango
+	depends on BR2_INSTALL_LIBSTDCPP # pango
+	depends on BR2_TOOLCHAIN_HAS_THREADS # pango, wayland
+	select BR2_PACKAGE_CAIRO
+	select BR2_PACKAGE_PANGO
+	select BR2_PACKAGE_WAYLAND
+	select BR2_PACKAGE_WAYLAND_PROTOCOLS
+	help
+	  libdecor is a library that can help Wayland clients draw
+	  window decorations for them. It aims to provide multiple
+	  backends that implements the decoration drawing.
+
+	  https://gitlab.freedesktop.org/libdecor/libdecor
+
+comment "libdecor needs a toolchain w/ wchar, threads, C++, gcc >= 4.9"
+	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
package/libdecor/libdecor.hash new file +3 -0
new file mode 100644
index 0000000000..9e51e90593
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  82adece5baeb6194292b0d1a91b4b3d10da41115f352a5e6c5844b20b88a0512  libdecor-0.1.1.tar.gz
+sha256  508a77d2e7b51d98adeed32648ad124b7b30241a8e70b2e72c99f92d8e5874d1  LICENSE
package/libdecor/libdecor.mk new file +22 -0
new file mode 100644
index 0000000000..21505de785
@@ -0,0 +1,22 @@
+################################################################################
+#
+# libdecor
+#
+################################################################################
+
+LIBDECOR_VERSION = 0.1.1
+LIBDECOR_SITE = https://gitlab.freedesktop.org/libdecor/libdecor/-/archive/$(LIBDECOR_VERSION)
+LIBDECOR_LICENSE = MIT
+LIBDECOR_LICENSE_FILES = LICENSE
+LIBDECOR_INSTALL_STAGING = YES
+LIBDECOR_DEPENDENCIES = cairo dbus pango wayland wayland-protocols
+LIBDECOR_CONF_OPTS = -Ddemo=false
+
+ifeq ($(BR2_PACKAGE_DBUS),yx)
+LIBDECOR_CONF_OPTS += -Ddbus=enabled
+LIBDECOR_DEPENDENCIES += dbus
+else
+LIBDECOR_CONF_OPTS += -Ddbus=disabled
+endif
+
+$(eval $(meson-package))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/mesa3d-demos: add optional dependencies for wayland support

libdecor cannot be selected due to a circular dependency:

package/wayland/Config.in:1:error: recursive dependency detected! package/wayland/Config.in:1: symbol BR2_PACKAGE_WAYLAND is selected by BR2_PACKAGE_LIBDECOR package/libdecor/Config.in:1: symbol BR2_PACKAGE_LIBDECOR is selected by BR2_PACKAGE_MESA3D_DEMOS package/mesa3d-demos/Config.in:1: symbol BR2_PACKAGE_MESA3D_DEMOS is selected by BR2_PACKAGE_PIGLIT package/piglit/Config.in:1: symbol BR2_PACKAGE_PIGLIT depends on BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND package/waffle/Config.in:7: symbol BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND depends on BR2_PACKAGE_WAYLAND

---
 package/mesa3d-demos/Config.in       | 1 +
 package/mesa3d-demos/mesa3d-demos.mk | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
package/mesa3d-demos/Config.in +1 -0
index 7848bb6faf..1761494c3a 100644
@@ -7,6 +7,7 @@ config BR2_PACKAGE_MESA3D_DEMOS
 	select BR2_PACKAGE_LIBGLU if BR2_PACKAGE_XORG7 && BR2_PACKAGE_HAS_LIBGL
 	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 && BR2_PACKAGE_HAS_LIBGL
 	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 && BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_WAYLAND
 	help
 	  OpenGL demos from the Mesa 3D project.
 
package/mesa3d-demos/mesa3d-demos.mk +2 -2
index 29cb00bb8a..8acba9270a 100644
@@ -62,8 +62,8 @@ else
 MESA3D_DEMOS_CONF_OPTS += -Dosmesa=disabled
 endif
 
-ifeq ($(BR2_PACKAGE_WAYLAND),y)
-MESA3D_DEMOS_DEPENDENCIES += wayland
+ifeq ($(BR2_PACKAGE_LIBDECOR)$(BR2_PACKAGE_WAYLAND),yy)
+MESA3D_DEMOS_DEPENDENCIES += libdecor libxkbcommon wayland
 MESA3D_DEMOS_CONF_OPTS += -Dwayland=enabled
 else
 MESA3D_DEMOS_CONF_OPTS += -Dwayland=disabled
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/2] package/mesa3d-demos: add optional dependencies for wayland support

Hello,

+Yann for kconfig sorcery.

Quoted 9 lines · On Sun, 16 Jul 2023 16:50:03 +0200 Bernd Kuhls <[email protected]> wrote:

libdecor cannot be selected due to a circular dependency:

package/wayland/Config.in:1:error: recursive dependency detected! package/wayland/Config.in:1: symbol BR2_PACKAGE_WAYLAND is selected by BR2_PACKAGE_LIBDECOR package/libdecor/Config.in:1: symbol BR2_PACKAGE_LIBDECOR is selected by BR2_PACKAGE_MESA3D_DEMOS package/mesa3d-demos/Config.in:1: symbol BR2_PACKAGE_MESA3D_DEMOS is selected by BR2_PACKAGE_PIGLIT package/piglit/Config.in:1: symbol BR2_PACKAGE_PIGLIT depends on BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND package/waffle/Config.in:7: symbol BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND depends on BR2_PACKAGE_WAYLAND

Quoted 5 lines
---
 package/mesa3d-demos/Config.in       | 1 +
 package/mesa3d-demos/mesa3d-demos.mk | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

I've split this into two commits: one for libxkbcommon, one for libdecor, and added references to the autobuilder failures being fixed, and applied to master.

It's a bit a pity that we can't select BR2_PACKAGE_LIBDECOR due to the recursive dependency we have there reported by kconfig. To me, this recursive dependency is bogus, but I'll let Yann comment :-)

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by Tested-by on v1 1/2
#3 lore raw
In reply to Bernd Kuhls

Hello Bernd, hello all,

Quoted 4 lines · Bernd Kuhls

Needed for wayland support in mesa3d-demos.

It seems like this dependency is only required for wayland support with the mesa3d-demos upgrade to version 9.0.0 in commit 80304d9911f34f8a0173a4f37d52f93177478cc7.

Version 9.0.0 of mesa3d-demos also includes commit ef24aae22978d4d357340074ca9a1c04d9cf81e6 which seems to have added a dependency on glu for the demos which is not yet reflected in Buildroot. Does this mean we have to have libglu and therefore xorg7 and glx as a fixed dependency for mesa3d-demos?

test/test/build/mesa3d-demos-9.0.0/src/demos/meson.build:82:14: ERROR:
Unknown variable "dep_glu".

This patch looks fine to me however, all dependencies specified in the documentation are there and I successfully built the demos with wayland support activated once I built libglu.

Quoted 93 lines
---
 package/Config.in              |  1 +
 package/libdecor/Config.in     | 25 +++++++++++++++++++++++++
 package/libdecor/libdecor.hash |  3 +++
 package/libdecor/libdecor.mk   | 22 ++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 100644 package/libdecor/Config.in
 create mode 100644 package/libdecor/libdecor.hash
 create mode 100644 package/libdecor/libdecor.mk
package/Config.in +1 -0
index 57d3646566..1097d2deae 100644
@@ -1600,6 +1600,7 @@ menu "Graphics"
        source "package/leptonica/Config.in"
        source "package/lesstif/Config.in"
        source "package/libart/Config.in"
+       source "package/libdecor/Config.in"
        source "package/libdmtx/Config.in"
        source "package/libdri2/Config.in"
        source "package/libdrm/Config.in"
package/libdecor/Config.in new file +25 -0
new file mode 100644
index 0000000000..782fe855b4
@@ -0,0 +1,25 @@
+config BR2_PACKAGE_LIBDECOR
+       bool "libdecor"
+       depends on !BR2_STATIC_LIBS # wayland
+       depends on BR2_USE_MMU # pango
+       depends on BR2_USE_WCHAR # pango
+       depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango
+       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # pango
+       depends on BR2_INSTALL_LIBSTDCPP # pango
+       depends on BR2_TOOLCHAIN_HAS_THREADS # pango, wayland
+       select BR2_PACKAGE_CAIRO
+       select BR2_PACKAGE_PANGO
+       select BR2_PACKAGE_WAYLAND
+       select BR2_PACKAGE_WAYLAND_PROTOCOLS
+       help
+         libdecor is a library that can help Wayland clients draw
+         window decorations for them. It aims to provide multiple
+         backends that implements the decoration drawing.
+
+         https://gitlab.freedesktop.org/libdecor/libdecor
+
+comment "libdecor needs a toolchain w/ wchar, threads, C++, gcc >= 4.9"
+       depends on BR2_USE_MMU
+       depends on BR2_TOOLCHAIN_HAS_SYNC_4
+       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+               !BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
package/libdecor/libdecor.hash new file +3 -0
new file mode 100644
index 0000000000..9e51e90593
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  82adece5baeb6194292b0d1a91b4b3d10da41115f352a5e6c5844b20b88a0512  libdecor-0.1.1.tar.gz
+sha256  508a77d2e7b51d98adeed32648ad124b7b30241a8e70b2e72c99f92d8e5874d1  LICENSE
package/libdecor/libdecor.mk new file +22 -1
new file mode 100644
index 0000000000..21505de785
@@ -0,0 +1,22 @@
+################################################################################
+#
+# libdecor
+#
+################################################################################
+
+LIBDECOR_VERSION = 0.1.1
+LIBDECOR_SITE = https://gitlab.freedesktop.org/libdecor/libdecor/-/archive/$(LIBDECOR_VERSION)
+LIBDECOR_LICENSE = MIT
+LIBDECOR_LICENSE_FILES = LICENSE
+LIBDECOR_INSTALL_STAGING = YES
+LIBDECOR_DEPENDENCIES = cairo dbus pango wayland wayland-protocols
+LIBDECOR_CONF_OPTS = -Ddemo=false
+
+ifeq ($(BR2_PACKAGE_DBUS),yx)
+LIBDECOR_CONF_OPTS += -Ddbus=enabled
+LIBDECOR_DEPENDENCIES += dbus
+else
+LIBDECOR_CONF_OPTS += -Ddbus=disabled
+endif
+
+$(eval $(meson-package))
--

2.39.2

Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

Best regards,
Sebastian

Signature · 15 lines
Pour la planète, n'imprimez ce mail que si c'est nécessaire


10-12 Rue Nicolas Appert
44100 NANTES

Sebastian WEYER
Stagiaire production

[email protected]
http://www.smile.eu
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Hello Sebastian,

Quoted 9 lines · On Tue, 25 Jul 2023 10:54:34 +0200 Sebastian WEYER <[email protected]>…

It seems like this dependency is only required for wayland support with the mesa3d-demos upgrade to version 9.0.0 in commit 80304d9911f34f8a0173a4f37d52f93177478cc7.

Version 9.0.0 of mesa3d-demos also includes commit ef24aae22978d4d357340074ca9a1c04d9cf81e6 which seems to have added a dependency on glu for the demos which is not yet reflected in Buildroot. Does this mean we have to have libglu and therefore xorg7 and glx as a fixed dependency for mesa3d-demos?

I think this issue has been resolved by
https://gitlab.com/buildroot.org/buildroot/-/commit/39ae14faabb82703c2cee2ddf23e5925a0f0f251

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw
In reply to Bernd Kuhls

Hello,

Quoted 3 lines · On Sun, 16 Jul 2023 16:50:02 +0200 Bernd Kuhls <[email protected]> wrote:

Needed for wayland support in mesa3d-demos.

I've applied after doing some changes/fixes, see below.

Quoted 9 lines
---
 package/Config.in              |  1 +
 package/libdecor/Config.in     | 25 +++++++++++++++++++++++++
 package/libdecor/libdecor.hash |  3 +++
 package/libdecor/libdecor.mk   | 22 ++++++++++++++++++++++
 4 files changed, 51 insertions(+)
 create mode 100644 package/libdecor/Config.in
 create mode 100644 package/libdecor/libdecor.hash
 create mode 100644 package/libdecor/libdecor.mk

Entry in DEVELOPERS file was missing.

package/libdecor/libdecor.mk line 12

Quoted 6 lines
package/libdecor/libdecor.mk new file +6 -0
+LIBDECOR_VERSION = 0.1.1
+LIBDECOR_SITE = https://gitlab.freedesktop.org/libdecor/libdecor/-/archive/$(LIBDECOR_VERSION)
+LIBDECOR_LICENSE = MIT
+LIBDECOR_LICENSE_FILES = LICENSE
+LIBDECOR_INSTALL_STAGING = YES
+LIBDECOR_DEPENDENCIES = cairo dbus pango wayland wayland-protocols

You're adding dbus as a mandatory dependency here, but it's not selected in Config.in and it's actually an optional dependency.

package/libdecor/libdecor.mk line 15

Quoted 3 lines
package/libdecor/libdecor.mk new file +3 -0
+LIBDECOR_CONF_OPTS = -Ddemo=false
+
+ifeq ($(BR2_PACKAGE_DBUS),yx)

This condition would never be true due to the typo "yx" instead of just "y".

I fixed both issues and applied to master, as this package is needed to fix issues in master.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot