Signed-off-by: Jean-Francois Dagenais <jeff.dagen...@gmail.com>
---
Changes in v1:
        - v5.0.94 is a pre-release, so this is preliminary work. I wanted to
          submit this imperfect recipe now because I have to put aside working
          on weston for a while. Since I put a reasonable amount of work into
          this, I thought it may be useful for others to get the ball rolling
          quicker. Enjoy!

 meta/recipes-graphics/wayland/weston_git.bb | 102 ++++++++++++++++++++++++++++
 1 file changed, 102 insertions(+)
 create mode 100644 meta/recipes-graphics/wayland/weston_git.bb

diff --git a/meta/recipes-graphics/wayland/weston_git.bb 
b/meta/recipes-graphics/wayland/weston_git.bb
new file mode 100644
index 0000000000..f591550f9a
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston_git.bb
@@ -0,0 +1,102 @@
+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=d79ee9e66bb0f95d3386a7acae780b70 \
+                    
file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a"
+
+SRC_URI = "git://github.com/wayland-project/weston \
+           file://weston.png \
+           file://weston.desktop \
+           file://xwayland.weston-start \
+"
+
+S = "${WORKDIR}/git"
+SRCREV = "cc64cc3717ab39882df37bc244d1ac6cf8526f93"
+PV = "5.0.94+git${SRCPV}"
+# from meson.build:libweston_major
+WESTON_MAJOR_VERSION = "6"
+
+UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html";
+
+inherit meson useradd distro_features_check
+# depends on virtual/egl
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+DEPENDS = "libxkbcommon pixman cairo glib-2.0 jpeg"
+DEPENDS += "wayland wayland-protocols libinput virtual/egl pango 
wayland-native"
+
+EXTRA_OEMESON = " \
+                -Dbackend-default=auto \
+                -Dimage-jpeg=true \
+               -Dsimple-dmabuf-drm= \
+                "
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'drm 
fbdev egl', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 
'xwayland', '', d)} \
+                   ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \
+                   launch tools shell-desktop demo-clients simple-clients"
+
+WESTON_TOOLS ?= "calibrator,debug,info,terminal,touch-calibrator"
+
+#
+# see https://github.com/wayland-project/weston/raw/master/meson_options.txt
+#
+PACKAGECONFIG[drm] = "-Ddrm-compositor=true,-Ddrm-compositor=false,drm udev 
virtual/mesa virtual/libgbm mtdev"
+PACKAGECONFIG[vaapi] = 
"-Dbackend-drm-screencast-vaapir=true,-Dbackend-drm-screencast-vaapi=false,libva
 drm"
+PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false,"
+PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
+PACKAGECONFIG[screenshare] = "-Dscreenshare=true 
-Dshell-fullscreen=true,-Dscreenshare=false"
+PACKAGECONFIG[wayland] = 
"-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/mesa"
+PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,libxcb"
+PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor"
+PACKAGECONFIG[systemd] = 
"-Dlauncher-logind=true,-Dlauncher-logind=false,systemd dbus"
+PACKAGECONFIG[remote] = "-Dremoting=true,-Dremoting=false, gstreamer"
+PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
+PACKAGECONFIG[shell-fullscreen] = 
"-Dshell-fullscreen=true,-Dshell-fullscreen=false"
+PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
+PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,libinput 
mtdev udev (>=136)"
+PACKAGECONFIG[egl] = "-Drender-gl=true,-Drender-gl=false"
+PACKAGECONFIG[lcms] = 
"-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
+PACKAGECONFIG[colord] = 
"-Dcolor-management-colord=true,-Dcolor-management-colord=false,lcms"
+PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm libpam 
systemd"
+PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
+PACKAGECONFIG[tools] = "-Dtools=${WESTON_TOOLS},-Dtools=,"
+PACKAGECONFIG[demo-clients] = "-Ddemo-clients=true,-Ddemo-clients=false"
+PACKAGECONFIG[simple-clients] = "-Dsimple-clients=all,-Dsimple-clients="
+PACKAGECONFIG[wcap-decode] = "-Dwcap-decode=true,-Dwcap-decode=false"
+PACKAGECONFIG[test-junit-xml] = 
"-Dtest-junit-xml=true,-Dtest-junit-xml=false,libxml"
+
+do_install_append() {
+       # If X11, ship a desktop file to launch it
+       if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; 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
+
+       if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', 
d)}" = "yes" ]; then
+               install -Dm 644 ${WORKDIR}/xwayland.weston-start 
${D}${datadir}/weston-start/xwayland
+       fi
+}
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 
'${PN}-xwayland', '', d)} \
+             libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
+
+FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal 
${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode 
${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
+
+FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} 
${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
+SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 
'wayland window managers'."
+
+FILES_${PN}-examples = "${bindir}/*"
+
+FILES_${PN}-xwayland = 
"${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
+RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
+
+RDEPENDS_${PN} += "xkeyboard-config"
+RRECOMMENDS_${PN} = "weston-conf liberation-fonts"
+RRECOMMENDS_${PN}-dev += "wayland-protocols"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system weston-launch"
-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to