Skip to contentSkip to conversation

Wayland/weston packages

PATCH Superseded Thomas Petazzoni 3 participants 10 messages Apr 22, 2013 – Apr 24, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Wayland/weston packages

Hello,

Here is a set of four patches that add support for Weston, the reference implementation of the Wayland protocol. So far, only the fbdev backend is supported, but it's in my plans to add support for the RPi compositor, and maybe the DRM one.

Note that the first patch does something a little bit ugly: it moves xkeyboard-config outside of the if BR2_PACKAGE_XORG7 ... endif clause, because we also need it for Wayland/Weston. The consequence is that it now appears "alone" right after the "X.org system" submenu in menuconfig, which is not entirely nice. Suggestions welcome.

Best regards,

Thomas

Thomas Petazzoni (4):
xkeyboard-config: make available outside of X.org, reduce
dependencies
libxkbcommon: new package
wayland: new package
weston: new package

 package/Config.in                                  |    3 ++
 package/libxkbcommon/Config.in                     |    8 ++++
 package/libxkbcommon/libxkbcommon.mk               |   16 +++++++
 package/wayland/Config.in                          |   10 +++++
 package/wayland/wayland.mk                         |   30 +++++++++++++
 package/weston/Config.in                           |   29 ++++++++++++
 ...pendent-code-only-when-the-DRM-compositor.patch |   47 ++++++++++++++++++++
 package/weston/weston.mk                           |   32 +++++++++++++
 package/x11r7/Config.in                            |    3 +-
 package/x11r7/xkeyboard-config/Config.in           |    7 +--
 package/x11r7/xkeyboard-config/xkeyboard-config.mk |    7 ++-
 11 files changed, 187 insertions(+), 5 deletions(-)
 create mode 100644 package/libxkbcommon/Config.in
 create mode 100644 package/libxkbcommon/libxkbcommon.mk
 create mode 100644 package/wayland/Config.in
 create mode 100644 package/wayland/wayland.mk
 create mode 100644 package/weston/Config.in
 create mode 100644 package/weston/weston-0001-Pull-DRM-dependent-code-only-when-the-DRM-compositor.patch
 create mode 100644 package/weston/weston.mk
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/4 xkeyboard-config: make available outside of X.org, reduce dependencies

xkeyboard-connfig was selectable only if X.org was enabled. However, weston, the reference implementation of the Wayland protocol, also needs xkeyboard-config, so we have to make this package available outside of the if BR2_PACKAGE_XORG7 ... endif conditional.

In addition to this, the xkeyboard-config currently pulls in xapp_xkbcomp as a runtime dependency, but this dependency is only needed with X.org. And it also pulls in xlib_libX11 and xproto_proto has build-time dependencies. But in fact those ones are runtime dependencies, and they are only needed under X.org. This helps reducing the number of dependencies of xkeyboard-config in a weston/wayland configuration.

---
 package/x11r7/Config.in                            |    3 ++-
 package/x11r7/xkeyboard-config/Config.in           |    7 ++++---
 package/x11r7/xkeyboard-config/xkeyboard-config.mk |    7 ++++++-
 3 files changed, 12 insertions(+), 5 deletions(-)
package/x11r7/Config.in +2 -1
index 971ef37..2be9ae0 100644
@@ -257,9 +257,10 @@ if BR2_PACKAGE_XORG7
 		source package/x11r7/xdata_xbitmaps/Config.in
 		source package/x11r7/xdata_xcursor-themes/Config.in
 		source package/x11r7/xcursor-transparent-theme/Config.in
-		source package/x11r7/xkeyboard-config/Config.in
 	endmenu
 endif
 
 comment "X.org requires a toolchain with WCHAR support"
         depends on !BR2_USE_WCHAR
+
+source package/x11r7/xkeyboard-config/Config.in
package/x11r7/xkeyboard-config/Config.in +4 -3
index 640bb1d..5d1d6a7 100644
@@ -1,8 +1,9 @@
 config BR2_PACKAGE_XKEYBOARD_CONFIG
 	bool "xkeyboard-config"
-	select BR2_PACKAGE_XAPP_XKBCOMP
-	select BR2_PACKAGE_XLIB_LIBX11
-	select BR2_PACKAGE_XPROTO_XPROTO
+	# Runtime dependencies
+	select BR2_PACKAGE_XAPP_XKBCOMP if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_XPROTO_XPROTO if BR2_PACKAGE_XORG7
 	help
 	  keyboard configuration database for X
 
package/x11r7/xkeyboard-config/xkeyboard-config.mk +6 -1
index 78ed1ee..cdddd95 100644
@@ -3,10 +3,15 @@
 # xkeyboard-config
 #
 #############################################################
+
 XKEYBOARD_CONFIG_VERSION = 2.6
 XKEYBOARD_CONFIG_SOURCE = xkeyboard-config-$(XKEYBOARD_CONFIG_VERSION).tar.bz2
 XKEYBOARD_CONFIG_SITE = http://www.x.org/releases/individual/data/xkeyboard-config/
-XKEYBOARD_CONFIG_DEPENDENCIES = host-gettext host-intltool host-xapp_xkbcomp xlib_libX11 xproto_xproto
+XKEYBOARD_CONFIG_LICENSE = MIT
+XKEYBAORD_CONFIG_LICENSE_FILES = COPYING
+
+XKEYBOARD_CONFIG_DEPENDENCIES = host-gettext host-intltool host-xapp_xkbcomp
+XKEYBOARD_CONFIG_CONF_OPT += --disable-runtime-deps
 
 $(eval $(autotools-package))
 
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/4 libxkbcommon: new package

In reply to Thomas Petazzoni
---
 package/Config.in                    |    1 +
 package/libxkbcommon/Config.in       |    8 ++++++++
 package/libxkbcommon/libxkbcommon.mk |   16 ++++++++++++++++
 3 files changed, 25 insertions(+)
 create mode 100644 package/libxkbcommon/Config.in
 create mode 100644 package/libxkbcommon/libxkbcommon.mk
package/Config.in +1 -0
index f28cedd..f3be210 100644
@@ -466,6 +466,7 @@ source "package/libnfc-llcp/Config.in"
 source "package/libusb/Config.in"
 source "package/libusb-compat/Config.in"
 source "package/libv4l/Config.in"
+source "package/libxkbcommon/Config.in"
 source "package/mtdev/Config.in"
 source "package/ne10/Config.in"
 source "package/neardal/Config.in"
package/libxkbcommon/Config.in new file +8 -0
new file mode 100644
index 0000000..0a52c6f
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBXKBCOMMON
+	bool "libxkbcommon"
+	help
+	  xkbcommon is a keymap compiler and support library which
+	  processes a reduced subset of keymaps as defined by the XKB
+	  specification.
+
+	  http://xkbcommon.org/
package/libxkbcommon/libxkbcommon.mk new file +16 -0
new file mode 100644
index 0000000..1ff851b
@@ -0,0 +1,16 @@
+#############################################################
+#
+# libxkbcommon
+#
+#############################################################
+
+LIBXKBCOMMON_VERSION = 0.3.0
+LIBXKBCOMMON_SITE = http://xkbcommon.org/download/
+LIBXKBCOMMON_SOURCE = libxkbcommon-$(LIBXKBCOMMON_VERSION).tar.xz
+LIBXKBCOMMON_LICENSE = MIT/X11
+LIBXKBCOMMON_LICENSE_FILES = COPYING
+
+LIBXKBCOMMON_INSTALL_STAGING = YES
+LIBXKBCOMMON_DEPENDENCIES = host-bison host-flex
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 3/4 wayland: new package

In reply to Thomas Petazzoni
---
 package/Config.in          |    1 +
 package/wayland/Config.in  |   10 ++++++++++
 package/wayland/wayland.mk |   30 ++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 package/wayland/Config.in
 create mode 100644 package/wayland/wayland.mk
package/Config.in +1 -0
index f3be210..41989c7 100644
@@ -445,6 +445,7 @@ source "package/opengl/Config.in"
 source "package/pango/Config.in"
 source "package/pixman/Config.in"
 source "package/tiff/Config.in"
+source "package/wayland/Config.in"
 source "package/webkit/Config.in"
 source "package/zxing/Config.in"
 endmenu
package/wayland/Config.in new file +10 -0
new file mode 100644
index 0000000..e5d2649
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_WAYLAND
+	bool "wayland"
+	select BR2_PACKAGE_LIBFFI
+	select BR2_PACKAGE_EXPAT
+	help
+	  Wayland is a project to define a protocol for a compositor
+	  to talk to its clients as well as a library implementation
+	  of the protocol.
+
+	  http://wayland.freedesktop.org/
package/wayland/wayland.mk new file +30 -0
new file mode 100644
index 0000000..65381ec
@@ -0,0 +1,30 @@
+#############################################################
+#
+# wayland
+#
+#############################################################
+
+WAYLAND_VERSION = 1.1.0
+WAYLAND_SITE = http://wayland.freedesktop.org/releases/
+WAYLAND_SOURCE = wayland-$(WAYLAND_VERSION).tar.xz
+WAYLAND_LICENSE = MIT
+WAYLAND_LICENSE_FILES = COPYING
+
+WAYLAND_INSTALL_STAGING = YES
+WAYLAND_DEPENDENCIES = libffi host-pkgconf expat host-expat
+
+# wayland needs a wayland-scanner program to generate some of its
+# source code. By default, it builds it with CC, so it doesn't in
+# cross-compilation. Therefore, we build it manually, and tell wayland
+# that the tool is already available.
+WAYLAND_CONF_OPT = --disable-scanner
+
+define WAYLAND_BUILD_SCANNER
+	(cd $(@D)/src/; \
+		$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
+			-o wayland-scanner scanner.c wayland-util.c -lexpat)
+endef
+
+WAYLAND_POST_CONFIGURE_HOOKS += WAYLAND_BUILD_SCANNER
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 4/4 weston: new package

In reply to Thomas Petazzoni
---
 package/Config.in                                  |    1 +
 package/weston/Config.in                           |   29 ++++++++++++
 ...pendent-code-only-when-the-DRM-compositor.patch |   47 ++++++++++++++++++++
 package/weston/weston.mk                           |   32 +++++++++++++
 4 files changed, 109 insertions(+)
 create mode 100644 package/weston/Config.in
 create mode 100644 package/weston/weston-0001-Pull-DRM-dependent-code-only-when-the-DRM-compositor.patch
 create mode 100644 package/weston/weston.mk
package/Config.in +1 -0
index 41989c7..5db377a 100644
@@ -150,6 +150,7 @@ endif
 
 source "package/qt5/Config.in"
 source "package/x11r7/Config.in"
+source "package/weston/Config.in"
 
 comment "X libraries and helper libraries"
 source "package/liberation/Config.in"
package/weston/Config.in new file +29 -0
new file mode 100644
index 0000000..15cc9e8
@@ -0,0 +1,29 @@
+comment "weston requires udev"
+	depends on BR2_PACKAGE_UDEV
+
+config BR2_PACKAGE_WESTON
+	bool "weston"
+	select BR2_PACKAGE_WAYLAND
+	select BR2_PACKAGE_LIBXKBCOMMON
+	select BR2_PACKAGE_CAIRO
+	select BR2_PACKAGE_CAIRO_PNG
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_MTDEV
+	depends on BR2_PACKAGE_UDEV
+	# Runtime dependency
+	select BR2_PACKAGE_XKEYBOARD_CONFIG
+	# Make sure at least one backend is selected
+	select BR2_PACKAGE_WESTON_FBDEV
+	help
+	  Weston is the reference implementation of a Wayland
+	  compositor, and a useful compositor in its own right.
+	  Weston has various backends that lets it run on Linux kernel
+	  modesetting and evdev input as well as under X11.
+
+if BR2_PACKAGE_WESTON
+
+config BR2_PACKAGE_WESTON_FBDEV
+	bool "fbdev compositor"
+
+endif
package/weston/weston-0001-Pull-DRM-dependent-code-only-when-the-DRM-compositor.patch new file +47 -0

47 lines not on this page · raw message

package/weston/weston.mk new file +32 -0
new file mode 100644
index 0000000..4e7cada
@@ -0,0 +1,32 @@
+#############################################################
+#
+# weston
+#
+#############################################################
+
+WESTON_VERSION = 1.1.0
+WESTON_SITE = http://wayland.freedesktop.org/releases/
+WESTON_SOURCE = weston-$(WAYLAND_VERSION).tar.xz
+WESTON_LICENSE = MIT
+WESTON_LICENSE_FILES = COPYING
+
+WESTON_DEPENDENCIES = wayland libxkbcommon pixman libpng jpeg mtdev udev
+WESTON_CONF_OPT = \
+	--disable-egl \
+	--disable-xwayland \
+	--disable-x11-compositor \
+	--disable-drm-compositor \
+	--disable-wayland-compositor \
+	--disable-headless-compositor \
+	--disable-rpi-compositor \
+	--disable-weston-launch \
+	--disable-libunwind
+
+ifeq ($(BR2_PACKAGE_WESTON_FBDEV),y)
+WESTON_CONF_OPT += --enable-fbdev-compositor
+else
+WESTON_CONF_OPT += --disable-fbdev-compositor
+endif
+
+$(eval $(autotools-package))
+
Signature · 1 line
1.7.9.5
#5 lore raw

cover Wayland/weston packages

In reply to Thomas Petazzoni
Quoted 5 lines · Thomas Petazzoni

Note that the first patch does something a little bit ugly: it moves xkeyboard-config outside of the if BR2_PACKAGE_XORG7 ... endif clause, because we also need it for Wayland/Weston. The consequence is that it now appears "alone" right after the "X.org system" submenu in menuconfig, which is not entirely nice. Suggestions welcome.

Maybe moving it into "X libraries and helper libraries" is more
relevant? I expect that other packages (mesa3d?) may also move there.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#6 lore raw

cover Wayland/weston packages

Dear Arnout Vandecappelle,

Quoted 2 lines · Arnout Vandecappelle

Maybe moving it into "X libraries and helper libraries" is more
relevant? I expect that other packages (mesa3d?) may also move there.

Good idea. However, it means that we have from package/Config.in an include to a Config.in in package/x11r7/<foo>/Config.in:

package/Config.in +1 -0
index ab514c7..3a19243 100644
@@ -155,6 +155,7 @@ source "package/x11r7/Config.in"
 comment "X libraries and helper libraries"
 source "package/liberation/Config.in"
 source "package/libsexy/Config.in"
+source "package/x11r7/xkeyboard-config/Config.in"
 

Does it matter, or should I also move the xkeyboard-config directory outside of package/x11r7/ ?

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#7 lore raw

cover Wayland/weston packages

Quoted 20 lines · Thomas Petazzoni

Dear Arnout Vandecappelle,

Quoted 2 lines · Arnout Vandecappelle

Maybe moving it into "X libraries and helper libraries" is more
relevant? I expect that other packages (mesa3d?) may also move there.

Good idea. However, it means that we have from package/Config.in an include to a Config.in in package/x11r7/<foo>/Config.in:

package/Config.in +1 -0
index ab514c7..3a19243 100644
@@ -155,6 +155,7 @@ source "package/x11r7/Config.in"
  comment "X libraries and helper libraries"
  source "package/liberation/Config.in"
  source "package/libsexy/Config.in"
+source "package/x11r7/xkeyboard-config/Config.in"
 
Quoted 2 lines

Does it matter, or should I also move the xkeyboard-config directory outside of package/x11r7/ ?

If it no longer depends on xorg7, I would vote to move it out.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#8 lore raw

cover Wayland/weston packages

Dear Arnout Vandecappelle,

Quoted 4 lines · Arnout Vandecappelle
Quoted 2 lines

Does it matter, or should I also move the xkeyboard-config directory outside of package/x11r7/ ?

If it no longer depends on xorg7, I would vote to move it out.

It still depends on host-xapp_xkbcomp, but since it's a host package, it can be used even if BR2_PACKAGE_XORG7 is not enabled, which is why I could move the xkeyboard-config/Config.in inclusion outside of the BR2_PACKAGE_XORG7. The other dependencies are runtime dependencies that are only needed in a X.org context.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#9 lore raw

cover Wayland/weston packages

Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

If it no longer depends on xorg7, I would vote to move it out.

Thomas> It still depends on host-xapp_xkbcomp, but since it's a host Thomas> package, it can be used even if BR2_PACKAGE_XORG7 is not Thomas> enabled, which is why I could move the
Thomas> xkeyboard-config/Config.in inclusion outside of the Thomas> BR2_PACKAGE_XORG7. The other dependencies are runtime Thomas> dependencies that are only needed in a X.org context.

Ok, sounds good.

Signature · 1 line
Bye, Peter Korsgaard