summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/wayland
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:36:22 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2014-06-26 15:32:53 +0200
commitf4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch)
tree487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-graphics/wayland
downloadpoky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-graphics/wayland')
-rw-r--r--meta/recipes-graphics/wayland/mtdev_1.1.5.bb18
-rw-r--r--meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch50
-rw-r--r--meta/recipes-graphics/wayland/wayland/just-scanner.patch49
-rw-r--r--meta/recipes-graphics/wayland/wayland_1.4.0.bb42
-rw-r--r--meta/recipes-graphics/wayland/weston-init.bb19
-rw-r--r--meta/recipes-graphics/wayland/weston-init/init56
-rw-r--r--meta/recipes-graphics/wayland/weston/0001-remove-dependence-on-wayland-scanner-flags.patch30
-rw-r--r--meta/recipes-graphics/wayland/weston/weston.desktop9
-rw-r--r--meta/recipes-graphics/wayland/weston/weston.pngbin0 -> 2383 bytes
-rw-r--r--meta/recipes-graphics/wayland/weston_1.4.0.bb80
10 files changed, 353 insertions, 0 deletions
diff --git a/meta/recipes-graphics/wayland/mtdev_1.1.5.bb b/meta/recipes-graphics/wayland/mtdev_1.1.5.bb
new file mode 100644
index 0000000000..ccd0ebbfce
--- /dev/null
+++ b/meta/recipes-graphics/wayland/mtdev_1.1.5.bb
@@ -0,0 +1,18 @@
1SUMMARY = "Multitouch Protocol Translation Library"
2
3DESCRIPTION = "mtdev is a library which transforms all variants of kernel \
4multitouch events to the slotted type B protocol. The events put into mtdev may \
5be from any MT device, specifically type A without contact tracking, type A with \
6contact tracking, or type B with contact tracking"
7
8HOMEPAGE = "http://bitmath.org/code/mtdev/"
9SECTION = "libs"
10
11LICENSE = "MIT"
12LIC_FILES_CHKSUM = "file://COPYING;md5=ea6bd0268bb0fcd6b27698616ceee5d6"
13
14SRC_URI = "http://bitmath.org/code/${BPN}/${BP}.tar.bz2"
15SRC_URI[md5sum] = "52c9610b6002f71d1642dc1a1cca5ec1"
16SRC_URI[sha256sum] = "6677d5708a7948840de734d8b4675d5980d4561171c5a8e89e54adf7a13eba7f"
17
18inherit autotools pkgconfig
diff --git a/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch b/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch
new file mode 100644
index 0000000000..bf499bb238
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch
@@ -0,0 +1,50 @@
1disable macro checks not used for scanner
2
3We only build wayland-native for the scanner, so disable the bits we don't
4actually need. This avoid build issue on older distro such as Centos 5.x:
5| error: 'O_CLOEXEC' undeclared (first use in this function)
6| error: sys/timerfd.h: No such file or directory
7| error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
8| error: 'TFD_CLOEXEC' undeclared (first use in this function)
9| error: 'SFD_CLOEXEC' undeclared (first use in this function)
10
11Upstream-Status: Pending
12
13Signed-off-by: Ting Liu <b28495@freescale.com>
14---
15 configure.ac | 20 ++++++++++----------
16 1 file changed, 10 insertions(+), 10 deletions(-)
17
18diff --git a/configure.ac b/configure.ac
19--- a/configure.ac
20+++ b/configure.ac
21@@ -41,16 +41,16 @@ AC_SUBST(GCC_CFLAGS)
22
23 AC_CHECK_FUNCS([accept4 mkostemp])
24
25-AC_CHECK_DECL(SFD_CLOEXEC,[],
26- [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland")],
27- [[#include <sys/signalfd.h>]])
28-AC_CHECK_DECL(TFD_CLOEXEC,[],
29- [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland")],
30- [[#include <sys/timerfd.h>]])
31-AC_CHECK_DECL(CLOCK_MONOTONIC,[],
32- [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland")],
33- [[#include <time.h>]])
34-AC_CHECK_HEADERS([execinfo.h])
35+##AC_CHECK_DECL(SFD_CLOEXEC,[],
36+# [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland")],
37+# [[#include <sys/signalfd.h>]])
38+#AC_CHECK_DECL(TFD_CLOEXEC,[],
39+# [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland")],
40+# [[#include <sys/timerfd.h>]])
41+#AC_CHECK_DECL(CLOCK_MONOTONIC,[],
42+# [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland")],
43+# [[#include <time.h>]])
44+#AC_CHECK_HEADERS([execinfo.h])
45
46 AC_ARG_ENABLE([scanner],
47 [AC_HELP_STRING([--disable-scanner],
48--
491.8.3.2
50
diff --git a/meta/recipes-graphics/wayland/wayland/just-scanner.patch b/meta/recipes-graphics/wayland/wayland/just-scanner.patch
new file mode 100644
index 0000000000..ae9935e089
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland/just-scanner.patch
@@ -0,0 +1,49 @@
1From f674544d4f6f5f763e449207da77a561b22eff97 Mon Sep 17 00:00:00 2001
2From: Valentin Popa <valentin.popa@intel.com>
3Date: Fri, 7 Feb 2014 16:36:47 +0200
4Subject: [PATCH] just scanner
5
6We only build wayland-native for the scanner, so disable the bits we don't
7actually need. This gives us a small speed up but importantly should allow
8wayland-native to compile on older hosts such as CentOS 5 which currently fails:
9
10| wayland-1.0.6/src/wayland-server.c:1245: error: 'O_CLOEXEC' undeclared (first use in this function)
11| wayland-1.0.6/src/event-loop.c:34:25: error: sys/timerfd.h: No such file or directory
12| wayland-1.0.6/src/event-loop.c:199: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
13| wayland-1.0.6/src/event-loop.c:199: error: 'TFD_CLOEXEC' undeclared (first use in this function)
14| wayland-1.0.6/src/event-loop.c:268: error: 'SFD_CLOEXEC' undeclared (first use in this function)
15
16Upstream-Status: Inappropriate
17Signed-off-by: Ross Burton <ross.burton@intel.com>
18Signed-off-by: Valentin Popa <valentin.popa@intel.com>
19---
20 Makefile.am | 2 +-
21 src/Makefile.am | 2 +-
22 2 files changed, 2 insertions(+), 2 deletions(-)
23
24diff --git a/Makefile.am b/Makefile.am
25index 99607b0..ecce1f1 100644
26--- a/Makefile.am
27+++ b/Makefile.am
28@@ -2,7 +2,7 @@ if BUILD_DOCS
29 doc_subdir = doc
30 endif
31
32-SUBDIRS = protocol src $(doc_subdir) tests cursor
33+SUBDIRS = protocol src $(doc_subdir)
34
35 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
36
37diff --git a/src/Makefile.am b/src/Makefile.am
38index 15f44a5..b938d17 100644
39--- a/src/Makefile.am
40+++ b/src/Makefile.am
41@@ -1,4 +1,4 @@
42-lib_LTLIBRARIES = libwayland-server.la libwayland-client.la
43+#lib_LTLIBRARIES = libwayland-server.la libwayland-client.la
44 noinst_LTLIBRARIES = libwayland-util.la
45
46 include_HEADERS = \
47--
481.8.3.2
49
diff --git a/meta/recipes-graphics/wayland/wayland_1.4.0.bb b/meta/recipes-graphics/wayland/wayland_1.4.0.bb
new file mode 100644
index 0000000000..9f6419d5fd
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland_1.4.0.bb
@@ -0,0 +1,42 @@
1SUMMARY = "Wayland, a protocol between a compositor and clients"
2DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
3as well as a C library implementation of that protocol. The compositor can be \
4a standalone display server running on Linux kernel modesetting and evdev \
5input devices, an X application, or a wayland client itself. The clients can \
6be traditional applications, X servers (rootless or fullscreen) or other \
7display servers."
8HOMEPAGE = "http://wayland.freedesktop.org"
9LICENSE = "MIT"
10LIC_FILES_CHKSUM = "file://COPYING;md5=1d4476a7d98dd5691c53d4d43a510c72 \
11 file://src/wayland-server.c;endline=21;md5=079ae21dbf98ada52ec23744851b0a5c"
12
13SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
14SRC_URI[md5sum] = "332cf9191837be12638a29265ed7cf46"
15SRC_URI[sha256sum] = "18f33b9f15b4c8b662fb1968e7636e7926b419dfc48de8a164b3a3d7095c5a58"
16
17SRC_URI_append_class-native = " file://just-scanner.patch \
18 file://disable-macro-checks-not-used-for-scanner.patch \
19 "
20EXTRA_OECONF_class-native = "--disable-documentation --enable-scanner"
21
22inherit autotools pkgconfig
23
24# We need wayland-native for the wayland-scanner utility
25BBCLASSEXTEND = "native"
26
27DEPENDS_class-native = "expat-native libffi-native"
28DEPENDS = "expat libffi wayland-native"
29
30EXTRA_OECONF = "--disable-documentation --disable-scanner"
31
32# Wayland installs a M4 macro for other projects to use, which uses the target
33# pkg-config to find files. Replace pkg-config with pkg-config-native.
34do_install_append_class-native() {
35 sed -e 's,PKG_CHECK_MODULES(.*),,g' \
36 -e 's,$PKG_CONFIG,pkg-config-native,g' \
37 -i ${D}/${datadir}/aclocal/wayland-scanner.m4
38}
39
40sysroot_stage_all_append_class-target () {
41 cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
42}
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
new file mode 100644
index 0000000000..38b78bcd02
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -0,0 +1,19 @@
1SUMMARY = "Startup script for the Weston Wayland compositor"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
4
5SRC_URI = "file://init"
6
7S = "${WORKDIR}"
8
9do_install() {
10 install -d ${D}/${sysconfdir}/init.d
11 install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
12}
13
14inherit allarch update-rc.d
15
16RDEPENDS_${PN} = "weston kbd"
17
18INITSCRIPT_NAME = "weston"
19INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
diff --git a/meta/recipes-graphics/wayland/weston-init/init b/meta/recipes-graphics/wayland/weston-init/init
new file mode 100644
index 0000000000..8e662e00a5
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/init
@@ -0,0 +1,56 @@
1#!/bin/sh
2#
3### BEGIN INIT INFO
4# Provides: weston
5# Required-Start: $local_fs $remote_fs
6# Required-Stop: $local_fs $remote_fs
7# Default-Start: 2 3 4 5
8# Default-Stop: 0 1 6
9### END INIT INFO
10
11killproc() {
12 pid=`/bin/pidof $1`
13 [ "$pid" != "" ] && kill $pid
14}
15
16read CMDLINE < /proc/cmdline
17for x in $CMDLINE; do
18 case $x in
19 weston=false)
20 echo "Weston disabled"
21 exit 0;
22 ;;
23 esac
24done
25
26case "$1" in
27 start)
28 . /etc/profile
29
30 # This is all a nasty hack
31 if test -z "$XDG_RUNTIME_DIR"; then
32 export XDG_RUNTIME_DIR=/run/user/root
33 mkdir --parents $XDG_RUNTIME_DIR
34 chmod 0700 $XDG_RUNTIME_DIR
35 fi
36
37 openvt -s weston
38 ;;
39
40 stop)
41 echo "Stopping Weston"
42 killproc weston
43 ;;
44
45 restart)
46 $0 stop
47 sleep 1
48 $0 start
49 ;;
50
51 *)
52 echo "usage: $0 { start | stop | restart }"
53 ;;
54esac
55
56exit 0
diff --git a/meta/recipes-graphics/wayland/weston/0001-remove-dependence-on-wayland-scanner-flags.patch b/meta/recipes-graphics/wayland/weston/0001-remove-dependence-on-wayland-scanner-flags.patch
new file mode 100644
index 0000000000..14606c86c3
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/0001-remove-dependence-on-wayland-scanner-flags.patch
@@ -0,0 +1,30 @@
1From a0335393ddde2228c84eda1081b5d7b175f78a94 Mon Sep 17 00:00:00 2001
2From: Valentin Popa <valentin.popa@intel.com>
3Date: Fri, 7 Feb 2014 16:59:58 +0200
4Subject: [PATCH] remove dependence on wayland-scanner flags
5
6weston doesn't make use of wayland-scanner flags,
7it only uses the -native- wayland-scanner for protocol.
8
9Upstream-Status: Pending
10Signed-off-by: Valentin Popa <valentin.popa@intel.com>
11---
12 configure.ac | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/configure.ac b/configure.ac
16index cce1850..8775eb9 100644
17--- a/configure.ac
18+++ b/configure.ac
19@@ -482,7 +482,7 @@ if test x$wayland_scanner = x; then
20 AC_MSG_ERROR([wayland-scanner is needed to compile weston])
21 fi
22
23-PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner)
24+#PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner)
25 AC_PATH_PROG(XMLLINT, xmllint)
26 AC_ARG_WITH([dtddir],
27 AS_HELP_STRING([--with-dtddir],
28--
291.8.3.2
30
diff --git a/meta/recipes-graphics/wayland/weston/weston.desktop b/meta/recipes-graphics/wayland/weston/weston.desktop
new file mode 100644
index 0000000000..1086ae8bf6
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/weston.desktop
@@ -0,0 +1,9 @@
1[Desktop Entry]
2Encoding=UTF-8
3Type=Application
4Name=Weston
5Comment=Wayland Compostitor
6Exec=weston
7Icon=weston
8Terminal=false
9Categories=Utility;
diff --git a/meta/recipes-graphics/wayland/weston/weston.png b/meta/recipes-graphics/wayland/weston/weston.png
new file mode 100644
index 0000000000..ea8b7e0e23
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/weston.png
Binary files differ
diff --git a/meta/recipes-graphics/wayland/weston_1.4.0.bb b/meta/recipes-graphics/wayland/weston_1.4.0.bb
new file mode 100644
index 0000000000..521316659c
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston_1.4.0.bb
@@ -0,0 +1,80 @@
1SUMMARY = "Weston, a Wayland compositor"
2DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
3HOMEPAGE = "http://wayland.freedesktop.org"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://COPYING;md5=275efac2559a224527bd4fd593d38466 \
6 file://src/compositor.c;endline=23;md5=aa98a8db03480fe7d500d0b1f4b8850c"
7
8SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
9 file://weston.png \
10 file://weston.desktop \
11 file://0001-remove-dependence-on-wayland-scanner-flags.patch"
12SRC_URI[md5sum] = "4438d2b1f3c9ba9a4a2b10d89fac6fd0"
13SRC_URI[sha256sum] = "74a2319d98e9cdb1acf24659699719aa89ac268cf549759271e326edc5f9ed64"
14
15
16inherit autotools pkgconfig useradd
17
18DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
19DEPENDS += "wayland virtual/egl pango"
20
21EXTRA_OECONF = "--enable-setuid-install \
22 --disable-xwayland \
23 --enable-simple-clients \
24 --enable-clients \
25 --enable-demo-clients-install \
26 --disable-libunwind \
27 --disable-rpi-compositor \
28 --disable-rdp-compositor"
29
30
31PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
32 ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
33 ${@base_contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
34 "
35#
36# Compositor choices
37#
38# Weston on KMS
39PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
40# Weston on Wayland (nested Weston)
41PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
42# Weston on X11
43PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
44# Headless Weston
45PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
46# Weston on framebuffer
47PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
48# weston-launch
49PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,libpam drm"
50# VA-API desktop recorder
51PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
52# Weston with EGL support
53PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
54# Weston with cairo glesv2 support
55PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
56
57do_install_append() {
58 # Weston doesn't need the .la files to load modules, so wipe them
59 rm -f ${D}/${libdir}/weston/*.la
60
61 # If X11, ship a desktop file to launch it
62 if [ "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
63 install -d ${D}${datadir}/applications
64 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
65
66 install -d ${D}${datadir}/icons/hicolor/48x48/apps
67 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
68 fi
69}
70
71PACKAGES += "${PN}-examples"
72
73FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${datadir}"
74FILES_${PN}-examples = "${bindir}/*"
75
76RDEPENDS_${PN} += "xkeyboard-config"
77RRECOMMENDS_${PN} = "liberation-fonts"
78
79USERADD_PACKAGES = "${PN}"
80GROUPADD_PARAM_${PN} = "--system weston-launch"