From 4f401540b2055fd6fb8a5edac6811199379dba90 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 3 Jun 2015 13:00:13 -0700 Subject: weston: Upgrade weston_1.6.0.bb -> weston_1.8.0.bb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make error() portable, Fix build on musl copyright year changed for weston compositor.c - * Copyright © 2012 Collabora, Ltd. + * Copyright © 2012-2015 Collabora, Ltd. Signed-off-by: Khem Raj --- .../wayland/weston/0001-make-error-portable.patch | 80 +++++++++++++++++++ .../weston/disable-wayland-scanner-pkg-check.patch | 20 +++-- meta/recipes-graphics/wayland/weston_1.6.0.bb | 89 --------------------- meta/recipes-graphics/wayland/weston_1.8.0.bb | 93 ++++++++++++++++++++++ 4 files changed, 185 insertions(+), 97 deletions(-) create mode 100644 meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch delete mode 100644 meta/recipes-graphics/wayland/weston_1.6.0.bb create mode 100644 meta/recipes-graphics/wayland/weston_1.8.0.bb (limited to 'meta/recipes-graphics') diff --git a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch new file mode 100644 index 0000000000..148848d8d2 --- /dev/null +++ b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch @@ -0,0 +1,80 @@ +From c22e90365d89346258394833cbcad03ff32b2e27 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 May 2015 20:56:00 -0700 +Subject: [PATCH weston] make error() portable + +error() is not posix but gnu extension so may not be available on all +kind of systemsi e.g. musl. + +Signed-off-by: Khem Raj +--- +Upstream-Status: Submitted + + configure.ac | 2 ++ + src/weston-error.h | 20 ++++++++++++++++++++ + src/weston-launch.c | 2 +- + 3 files changed, 23 insertions(+), 1 deletion(-) + create mode 100644 src/weston-error.h + +diff --git a/configure.ac b/configure.ac +index 263fc22..f52cd62 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -57,6 +57,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], + [[#include ]]) + AC_CHECK_HEADERS([execinfo.h]) + ++AC_CHECK_HEADERS([error.h]) ++ + AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) + + COMPOSITOR_MODULES="wayland-server >= 1.7.93 pixman-1 >= 0.25.2" +diff --git a/src/weston-error.h b/src/weston-error.h +new file mode 100644 +index 0000000..2089d02 +--- /dev/null ++++ b/src/weston-error.h +@@ -0,0 +1,20 @@ ++#ifndef _WESTON_ERROR_H ++#define _WESTON_ERROR_H ++ ++#if defined(HAVE_ERROR_H) ++#include ++#else ++#include ++#include ++#define _weston_error(S, E, F, ...) do { \ ++ if (E) \ ++ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \ ++ else \ ++ err(S, F, ##__VA_ARGS__); \ ++} while(0) ++ ++#define error _weston_error ++#endif ++ ++#endif ++ +diff --git a/src/weston-launch.c b/src/weston-launch.c +index 10c66de..3e6d30a 100644 +--- a/src/weston-launch.c ++++ b/src/weston-launch.c +@@ -30,7 +30,6 @@ + #include + #include + +-#include + #include + + #include +@@ -56,6 +55,7 @@ + #endif + + #include "weston-launch.h" ++#include "weston-error.h" + + #define DRM_MAJOR 226 + +-- +2.1.4 + 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 index 062da5cee5..68ba38ba8e 100644 --- a/meta/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch +++ b/meta/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch @@ -1,13 +1,17 @@ -Index: weston-1.5.0/configure.ac +Index: git/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]) +--- git.orig/configure.ac ++++ git/configure.ac +@@ -501,12 +501,6 @@ if test "x$have_lcms" = xyes; then fi + AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes]) --PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner) -+#PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner) - +-AC_PATH_PROG([wayland_scanner], [wayland-scanner]) +-if test x$wayland_scanner = x; then +- PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner]) +- wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` +-fi +- AC_CONFIG_FILES([Makefile src/version.h src/weston.pc]) + AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD]) diff --git a/meta/recipes-graphics/wayland/weston_1.6.0.bb b/meta/recipes-graphics/wayland/weston_1.6.0.bb deleted file mode 100644 index 74ad8162b9..0000000000 --- a/meta/recipes-graphics/wayland/weston_1.6.0.bb +++ /dev/null @@ -1,89 +0,0 @@ -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] = "c60ce9dde99a089db0539d8f6b557827" -SRC_URI[sha256sum] = "dc3ea5d13bbf025fabc006216c5ddc0d80d5f4ebe778912b8c4d1d4acaaa614d" - -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" -# Weston with libinput backend -PACKAGECONFIG[libinput] = "--enable-libinput-backend,--disable-libinput-backend,libinput" - -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} ${libdir}/${BPN}/*.so ${datadir}" -FILES_${PN}-examples = "${bindir}/*" - -RDEPENDS_${PN} += "xkeyboard-config" -RRECOMMENDS_${PN} = "liberation-fonts" - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "--system weston-launch" diff --git a/meta/recipes-graphics/wayland/weston_1.8.0.bb b/meta/recipes-graphics/wayland/weston_1.8.0.bb new file mode 100644 index 0000000000..ac6bd9784b --- /dev/null +++ b/meta/recipes-graphics/wayland/weston_1.8.0.bb @@ -0,0 +1,93 @@ +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=a9793f1edc8d1a4c344ca8ae252352fb" + +SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://make-lcms-explicitly-configurable.patch \ + file://make-libwebp-explicitly-configurable.patch \ + file://0001-make-error-portable.patch \ +" +SRC_URI[md5sum] = "24cb8a7ed0535b4fc3642643988dab36" +SRC_URI[sha256sum] = "8963e69f328e815cec42c58046c4af721476c7541bb7d9edc71740fada5ad312" + +inherit autotools pkgconfig useradd + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" +DEPENDS += "wayland libinput virtual/egl pango" + +EXTRA_OECONF = "--enable-setuid-install \ + --disable-xwayland \ + --enable-simple-clients \ + --enable-clients \ + --enable-demo-clients-install \ + --disable-rpi-compositor \ + --disable-rdp-compositor \ + " + +EXTRA_OECONF_append_qemux86 = "\ + WESTON_NATIVE_BACKEND=fbdev-backend.so \ + " +EXTRA_OECONF_append_qemux86-64 = "\ + WESTON_NATIVE_BACKEND=fbdev-backend.so \ + " +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" +# Weston with unwinding support +PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind" + +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} ${libdir}/${BPN}/*.so ${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