From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- meta/recipes-graphics/wayland/mtdev_1.1.5.bb | 18 +++++ ...disable-macro-checks-not-used-for-scanner.patch | 50 ++++++++++++ meta/recipes-graphics/wayland/wayland_1.5.0.bb | 41 ++++++++++ meta/recipes-graphics/wayland/weston-init.bb | 19 +++++ meta/recipes-graphics/wayland/weston-init/init | 56 +++++++++++++ .../weston/disable-wayland-scanner-pkg-check.patch | 13 +++ .../weston/make-lcms-explicitly-configurable.patch | 43 ++++++++++ .../make-libwebp-explicitly-configurable.patch | 37 +++++++++ .../recipes-graphics/wayland/weston/weston.desktop | 9 +++ meta/recipes-graphics/wayland/weston/weston.png | Bin 0 -> 2383 bytes meta/recipes-graphics/wayland/weston_1.5.0.bb | 87 +++++++++++++++++++++ 11 files changed, 373 insertions(+) create mode 100644 meta/recipes-graphics/wayland/mtdev_1.1.5.bb create mode 100644 meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch create mode 100644 meta/recipes-graphics/wayland/wayland_1.5.0.bb create mode 100644 meta/recipes-graphics/wayland/weston-init.bb create mode 100644 meta/recipes-graphics/wayland/weston-init/init create mode 100644 meta/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch create mode 100644 meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch create mode 100644 meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch create mode 100644 meta/recipes-graphics/wayland/weston/weston.desktop create mode 100644 meta/recipes-graphics/wayland/weston/weston.png create mode 100644 meta/recipes-graphics/wayland/weston_1.5.0.bb (limited to 'meta/recipes-graphics/wayland') 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 @@ +SUMMARY = "Multitouch Protocol Translation Library" + +DESCRIPTION = "mtdev is a library which transforms all variants of kernel \ +multitouch events to the slotted type B protocol. The events put into mtdev may \ +be from any MT device, specifically type A without contact tracking, type A with \ +contact tracking, or type B with contact tracking" + +HOMEPAGE = "http://bitmath.org/code/mtdev/" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea6bd0268bb0fcd6b27698616ceee5d6" + +SRC_URI = "http://bitmath.org/code/${BPN}/${BP}.tar.bz2" +SRC_URI[md5sum] = "52c9610b6002f71d1642dc1a1cca5ec1" +SRC_URI[sha256sum] = "6677d5708a7948840de734d8b4675d5980d4561171c5a8e89e54adf7a13eba7f" + +inherit 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 @@ +disable macro checks not used for scanner + +We only build wayland-native for the scanner, so disable the bits we don't +actually need. This avoid build issue on older distro such as Centos 5.x: +| error: 'O_CLOEXEC' undeclared (first use in this function) +| error: sys/timerfd.h: No such file or directory +| error: 'CLOCK_MONOTONIC' undeclared (first use in this function) +| error: 'TFD_CLOEXEC' undeclared (first use in this function) +| error: 'SFD_CLOEXEC' undeclared (first use in this function) + +Upstream-Status: Pending + +Signed-off-by: Ting Liu +--- + configure.ac | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -41,16 +41,16 @@ AC_SUBST(GCC_CFLAGS) + + AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate]) + +-AC_CHECK_DECL(SFD_CLOEXEC,[], +- [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland")], +- [[#include ]]) +-AC_CHECK_DECL(TFD_CLOEXEC,[], +- [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland")], +- [[#include ]]) +-AC_CHECK_DECL(CLOCK_MONOTONIC,[], +- [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland")], +- [[#include ]]) +-AC_CHECK_HEADERS([execinfo.h]) ++##AC_CHECK_DECL(SFD_CLOEXEC,[], ++# [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland")], ++# [[#include ]]) ++#AC_CHECK_DECL(TFD_CLOEXEC,[], ++# [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland")], ++# [[#include ]]) ++#AC_CHECK_DECL(CLOCK_MONOTONIC,[], ++# [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland")], ++# [[#include ]]) ++#AC_CHECK_HEADERS([execinfo.h]) + + AC_ARG_ENABLE([scanner], + [AC_HELP_STRING([--disable-scanner], +-- +1.8.3.2 + 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 @@ +SUMMARY = "Wayland, a protocol between a compositor and clients" +DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \ +as well as a C library implementation of that protocol. The compositor can be \ +a standalone display server running on Linux kernel modesetting and evdev \ +input devices, an X application, or a wayland client itself. The clients can \ +be traditional applications, X servers (rootless or fullscreen) or other \ +display servers." +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=1d4476a7d98dd5691c53d4d43a510c72 \ + file://src/wayland-server.c;endline=21;md5=079ae21dbf98ada52ec23744851b0a5c" + +SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz" +SRC_URI[md5sum] = "1d882776b27329b91d2d500b6d66dd1d" +SRC_URI[sha256sum] = "0069e1e9af888b3e05384380ad8cc6c976ea3e81d08ba19b7675ce1d693a41b5" +SRC_URI_append_class-native = " \ + file://disable-macro-checks-not-used-for-scanner.patch \ + " +EXTRA_OECONF_class-native = "--disable-documentation --enable-scanner" + +inherit autotools pkgconfig + +# We need wayland-native for the wayland-scanner utility +BBCLASSEXTEND = "native" + +DEPENDS_class-native = "expat-native libffi-native" +DEPENDS = "expat libffi wayland-native" + +EXTRA_OECONF = "--disable-documentation --disable-scanner" + +# Wayland installs a M4 macro for other projects to use, which uses the target +# pkg-config to find files. Replace pkg-config with pkg-config-native. +do_install_append_class-native() { + sed -e 's,PKG_CHECK_MODULES(.*),,g' \ + -e 's,$PKG_CONFIG,pkg-config-native,g' \ + -i ${D}/${datadir}/aclocal/wayland-scanner.m4 +} + +sysroot_stage_all_append_class-target () { + cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/ +} 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 @@ +SUMMARY = "Startup script for the Weston Wayland compositor" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" + +SRC_URI = "file://init" + +S = "${WORKDIR}" + +do_install() { + install -d ${D}/${sysconfdir}/init.d + install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston +} + +inherit allarch update-rc.d + +RDEPENDS_${PN} = "weston kbd" + +INITSCRIPT_NAME = "weston" +INITSCRIPT_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 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: weston +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO + +killproc() { + pid=`/bin/pidof $1` + [ "$pid" != "" ] && kill $pid +} + +read CMDLINE < /proc/cmdline +for x in $CMDLINE; do + case $x in + weston=false) + echo "Weston disabled" + exit 0; + ;; + esac +done + +case "$1" in + start) + . /etc/profile + + # This is all a nasty hack + if test -z "$XDG_RUNTIME_DIR"; then + export XDG_RUNTIME_DIR=/run/user/root + mkdir --parents $XDG_RUNTIME_DIR + chmod 0700 $XDG_RUNTIME_DIR + fi + + openvt -s weston + ;; + + stop) + echo "Stopping Weston" + killproc weston + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop | restart }" + ;; +esac + +exit 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 @@ +Index: weston-1.5.0/configure.ac +=================================================================== +--- weston-1.5.0.orig/configure.ac ++++ weston-1.5.0/configure.ac +@@ -503,7 +503,7 @@ if test x$wayland_scanner = x; then + AC_MSG_ERROR([wayland-scanner is needed to compile weston]) + fi + +-PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner) ++#PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner) + + AC_CONFIG_FILES([Makefile src/version.h src/weston.pc]) + 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 @@ +weston-1.5.0/configure.ac: make lcms explicitly configurable + +The lcms package is outside of openembedded-core, so make it +explicitly configurable. Make it deterministic, so that if lcms +dependencies are missing, autoconf throws a fatal error. Follow +upstream style to make it more likely to be merged. + +Upstream-Status: Pending + +Index: weston-1.5.0/configure.ac +=================================================================== +--- weston-1.5.0.orig/configure.ac ++++ weston-1.5.0/configure.ac +@@ -491,12 +491,24 @@ AC_ARG_ENABLE(demo-clients-install, + enable_demo_clients_install=no) + AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"]) + +-PKG_CHECK_MODULES(LCMS, lcms2, +- [have_lcms=yes], [have_lcms=no]) +-if test "x$have_lcms" = xyes; then +- AC_DEFINE(HAVE_LCMS, 1, [Have lcms support]) ++AC_ARG_ENABLE(lcms, ++ AS_HELP_STRING([--disable-lcms], ++ [Disable lcms support]),, ++ enable_lcms=auto) ++AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes]) ++if test "x$enable_lcms" != "xno"; then ++ PKG_CHECK_MODULES(LCMS, ++ lcms2, ++ [have_lcms=yes], ++ [have_lcms=no]) ++ if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then ++ AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found]) ++ fi ++ if test "x$have_lcms" = "xyes"; then ++ enable_lcms=yes ++ AC_DEFINE(HAVE_LCMS, 1, [Have lcms support]) ++ fi + fi +-AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes]) + + AC_PATH_PROG([wayland_scanner], [wayland-scanner]) + 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 @@ + +The libwebp package is outside of openembedded-core, so make it +explicitly configurable. Make it deterministic, so that if libwebp +dependencies are missing, autoconf throws a fatal error. + +Upstream-Status: Pending + +Index: weston-1.5.0/configure.ac +=================================================================== +--- weston-1.5.0.orig/configure.ac ++++ weston-1.5.0/configure.ac +@@ -268,9 +268,22 @@ fi + + PKG_CHECK_MODULES(PIXMAN, [pixman-1]) + PKG_CHECK_MODULES(PNG, [libpng]) +-PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no]) +-AS_IF([test "x$have_webp" = "xyes"], +- [AC_DEFINE([HAVE_WEBP], [1], [Have webp])]) ++AC_ARG_ENABLE(webp, ++ AS_HELP_STRING([--disable-webp], ++ [Disable libwebp support]),, ++ enable_webp=auto) ++AM_CONDITIONAL(HAVE_WEBP, [test "x$enable_webp" = xyes]) ++AS_IF([test "x$enable_webp" != "xno"], ++ PKG_CHECK_MODULES(WEBP, ++ [libwebp], ++ [have_webp=yes], ++ [have_webp=no]) ++ AS_IF([test "x$have_webp" = "xno" -a "x$enable_webp" = "xyes"], ++ AC_MSG_ERROR([libwebp support explicitly request, but lipwebp could not be found])) ++ AS_IF([test "x$have_webp" = "xyes"], ++ [enable_webp=yes] ++ [AC_DEFINE([HAVE_WEBP], [1], [Have webp])]) ++) + + AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],, + 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 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Name=Weston +Comment=Wayland Compostitor +Exec=weston +Icon=weston +Terminal=false +Categories=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 Binary files /dev/null and b/meta/recipes-graphics/wayland/weston/weston.png 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 @@ +SUMMARY = "Weston, a Wayland compositor" +DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=275efac2559a224527bd4fd593d38466 \ + file://src/compositor.c;endline=23;md5=aa98a8db03480fe7d500d0b1f4b8850c" + +SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://disable-wayland-scanner-pkg-check.patch \ + file://make-lcms-explicitly-configurable.patch \ + file://make-libwebp-explicitly-configurable.patch \ +" +SRC_URI[md5sum] = "8eb40d230efc2411f083c20656534780" +SRC_URI[sha256sum] = "06388ba04ac79aa72d685cc1a8e646ddb2b8cfe11fcc742294f9addac48b7684" + +inherit autotools pkgconfig useradd + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" +DEPENDS += "wayland virtual/egl pango" + +EXTRA_OECONF = "--enable-setuid-install \ + --disable-xwayland \ + --enable-simple-clients \ + --enable-clients \ + --enable-demo-clients-install \ + --disable-libunwind \ + --disable-rpi-compositor \ + --disable-rdp-compositor \ + " + + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \ + " +# +# Compositor choices +# +# Weston on KMS +PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev" +# Weston on Wayland (nested Weston) +PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" +# Weston on X11 +PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" +# Headless Weston +PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" +# Weston on framebuffer +PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" +# weston-launch +PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,libpam drm" +# VA-API desktop recorder +PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" +# Weston with EGL support +PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl" +# Weston with cairo glesv2 support +PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo" +# Weston with lcms support +PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" +# Weston with webp support +PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" + +do_install_append() { + # Weston doesn't need the .la files to load modules, so wipe them + rm -f ${D}/${libdir}/weston/*.la + + # If X11, ship a desktop file to launch it + if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then + install -d ${D}${datadir}/applications + install ${WORKDIR}/weston.desktop ${D}${datadir}/applications + + install -d ${D}${datadir}/icons/hicolor/48x48/apps + install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps + fi +} + +PACKAGES += "${PN}-examples" + +FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${datadir}" +FILES_${PN}-examples = "${bindir}/*" + +RDEPENDS_${PN} += "xkeyboard-config" +RRECOMMENDS_${PN} = "liberation-fonts" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system weston-launch" -- cgit v1.2.3-54-g00ecf