summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/wayland
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-graphics/wayland
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@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_1.5.0.bb41
-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/disable-wayland-scanner-pkg-check.patch13
-rw-r--r--meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch43
-rw-r--r--meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch37
-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.5.0.bb87
11 files changed, 373 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..cd8bc55842
--- /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 posix_fallocate])
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_1.5.0.bb b/meta/recipes-graphics/wayland/wayland_1.5.0.bb
new file mode 100644
index 0000000000..b1ae59ef13
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland_1.5.0.bb
@@ -0,0 +1,41 @@
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] = "1d882776b27329b91d2d500b6d66dd1d"
15SRC_URI[sha256sum] = "0069e1e9af888b3e05384380ad8cc6c976ea3e81d08ba19b7675ce1d693a41b5"
16SRC_URI_append_class-native = " \
17 file://disable-macro-checks-not-used-for-scanner.patch \
18 "
19EXTRA_OECONF_class-native = "--disable-documentation --enable-scanner"
20
21inherit autotools pkgconfig
22
23# We need wayland-native for the wayland-scanner utility
24BBCLASSEXTEND = "native"
25
26DEPENDS_class-native = "expat-native libffi-native"
27DEPENDS = "expat libffi wayland-native"
28
29EXTRA_OECONF = "--disable-documentation --disable-scanner"
30
31# Wayland installs a M4 macro for other projects to use, which uses the target
32# pkg-config to find files. Replace pkg-config with pkg-config-native.
33do_install_append_class-native() {
34 sed -e 's,PKG_CHECK_MODULES(.*),,g' \
35 -e 's,$PKG_CONFIG,pkg-config-native,g' \
36 -i ${D}/${datadir}/aclocal/wayland-scanner.m4
37}
38
39sysroot_stage_all_append_class-target () {
40 cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
41}
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/disable-wayland-scanner-pkg-check.patch b/meta/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch
new file mode 100644
index 0000000000..062da5cee5
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch
@@ -0,0 +1,13 @@
1Index: weston-1.5.0/configure.ac
2===================================================================
3--- weston-1.5.0.orig/configure.ac
4+++ weston-1.5.0/configure.ac
5@@ -503,7 +503,7 @@ if test x$wayland_scanner = x; then
6 AC_MSG_ERROR([wayland-scanner is needed to compile weston])
7 fi
8
9-PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner)
10+#PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner)
11
12 AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
13
diff --git a/meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch b/meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch
new file mode 100644
index 0000000000..35e6d6ff58
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch
@@ -0,0 +1,43 @@
1weston-1.5.0/configure.ac: make lcms explicitly configurable
2
3The lcms package is outside of openembedded-core, so make it
4explicitly configurable. Make it deterministic, so that if lcms
5dependencies are missing, autoconf throws a fatal error. Follow
6upstream style to make it more likely to be merged.
7
8Upstream-Status: Pending
9
10Index: weston-1.5.0/configure.ac
11===================================================================
12--- weston-1.5.0.orig/configure.ac
13+++ weston-1.5.0/configure.ac
14@@ -491,12 +491,24 @@ AC_ARG_ENABLE(demo-clients-install,
15 enable_demo_clients_install=no)
16 AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
17
18-PKG_CHECK_MODULES(LCMS, lcms2,
19- [have_lcms=yes], [have_lcms=no])
20-if test "x$have_lcms" = xyes; then
21- AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
22+AC_ARG_ENABLE(lcms,
23+ AS_HELP_STRING([--disable-lcms],
24+ [Disable lcms support]),,
25+ enable_lcms=auto)
26+AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes])
27+if test "x$enable_lcms" != "xno"; then
28+ PKG_CHECK_MODULES(LCMS,
29+ lcms2,
30+ [have_lcms=yes],
31+ [have_lcms=no])
32+ if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then
33+ AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found])
34+ fi
35+ if test "x$have_lcms" = "xyes"; then
36+ enable_lcms=yes
37+ AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
38+ fi
39 fi
40-AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
41
42 AC_PATH_PROG([wayland_scanner], [wayland-scanner])
43 if test x$wayland_scanner = x; then
diff --git a/meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch b/meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch
new file mode 100644
index 0000000000..ad07d4fc2d
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch
@@ -0,0 +1,37 @@
1
2The libwebp package is outside of openembedded-core, so make it
3explicitly configurable. Make it deterministic, so that if libwebp
4dependencies are missing, autoconf throws a fatal error.
5
6Upstream-Status: Pending
7
8Index: weston-1.5.0/configure.ac
9===================================================================
10--- weston-1.5.0.orig/configure.ac
11+++ weston-1.5.0/configure.ac
12@@ -268,9 +268,22 @@ fi
13
14 PKG_CHECK_MODULES(PIXMAN, [pixman-1])
15 PKG_CHECK_MODULES(PNG, [libpng])
16-PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])
17-AS_IF([test "x$have_webp" = "xyes"],
18- [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
19+AC_ARG_ENABLE(webp,
20+ AS_HELP_STRING([--disable-webp],
21+ [Disable libwebp support]),,
22+ enable_webp=auto)
23+AM_CONDITIONAL(HAVE_WEBP, [test "x$enable_webp" = xyes])
24+AS_IF([test "x$enable_webp" != "xno"],
25+ PKG_CHECK_MODULES(WEBP,
26+ [libwebp],
27+ [have_webp=yes],
28+ [have_webp=no])
29+ AS_IF([test "x$have_webp" = "xno" -a "x$enable_webp" = "xyes"],
30+ AC_MSG_ERROR([libwebp support explicitly request, but lipwebp could not be found]))
31+ AS_IF([test "x$have_webp" = "xyes"],
32+ [enable_webp=yes]
33+ [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
34+)
35
36 AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],,
37 enable_vaapi_recorder=auto)
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.5.0.bb b/meta/recipes-graphics/wayland/weston_1.5.0.bb
new file mode 100644
index 0000000000..4a8584f79a
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston_1.5.0.bb
@@ -0,0 +1,87 @@
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://disable-wayland-scanner-pkg-check.patch \
12 file://make-lcms-explicitly-configurable.patch \
13 file://make-libwebp-explicitly-configurable.patch \
14"
15SRC_URI[md5sum] = "8eb40d230efc2411f083c20656534780"
16SRC_URI[sha256sum] = "06388ba04ac79aa72d685cc1a8e646ddb2b8cfe11fcc742294f9addac48b7684"
17
18inherit autotools pkgconfig useradd
19
20DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
21DEPENDS += "wayland virtual/egl pango"
22
23EXTRA_OECONF = "--enable-setuid-install \
24 --disable-xwayland \
25 --enable-simple-clients \
26 --enable-clients \
27 --enable-demo-clients-install \
28 --disable-libunwind \
29 --disable-rpi-compositor \
30 --disable-rdp-compositor \
31 "
32
33
34PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
35 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
36 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
37 "
38#
39# Compositor choices
40#
41# Weston on KMS
42PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
43# Weston on Wayland (nested Weston)
44PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
45# Weston on X11
46PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
47# Headless Weston
48PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
49# Weston on framebuffer
50PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
51# weston-launch
52PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,libpam drm"
53# VA-API desktop recorder
54PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
55# Weston with EGL support
56PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
57# Weston with cairo glesv2 support
58PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
59# Weston with lcms support
60PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
61# Weston with webp support
62PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
63
64do_install_append() {
65 # Weston doesn't need the .la files to load modules, so wipe them
66 rm -f ${D}/${libdir}/weston/*.la
67
68 # If X11, ship a desktop file to launch it
69 if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
70 install -d ${D}${datadir}/applications
71 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
72
73 install -d ${D}${datadir}/icons/hicolor/48x48/apps
74 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
75 fi
76}
77
78PACKAGES += "${PN}-examples"
79
80FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${datadir}"
81FILES_${PN}-examples = "${bindir}/*"
82
83RDEPENDS_${PN} += "xkeyboard-config"
84RRECOMMENDS_${PN} = "liberation-fonts"
85
86USERADD_PACKAGES = "${PN}"
87GROUPADD_PARAM_${PN} = "--system weston-launch"