Upgrade to Wayland/Weston 1.9.0
[AGL/meta-agl.git] / meta-agl / recipes-graphics / wayland / weston_1.9.0.bb
1 SUMMARY = "Weston, a Wayland compositor"
2 DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
3 HOMEPAGE = "http://wayland.freedesktop.org"
4 LICENSE = "MIT"
5 LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
6                     file://src/compositor.c;endline=26;md5=e342df749174a8ee11065583157c7a38"
7
8 SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
9            file://weston.png \
10            file://weston.desktop \
11            file://make-lcms-explicitly-configurable.patch \
12            file://make-libwebp-explicitly-configurable.patch \
13            file://0001-make-error-portable.patch \
14 "
15 SRC_URI[md5sum] = "66bbba12f546570b4d97f676bc79a28e"
16 SRC_URI[sha256sum] = "9c1b03f3184fa0b0dfdf67e215048085156e1a2ca344af6613fed36794ac48cf"
17
18 inherit autotools pkgconfig useradd
19
20 DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
21 DEPENDS += "wayland libinput virtual/egl pango"
22
23 EXTRA_OECONF = "--enable-setuid-install \
24                 --disable-xwayland \
25                 --enable-simple-clients \
26                 --enable-clients \
27                 --enable-demo-clients-install \
28                 --disable-rpi-compositor \
29                 --disable-rdp-compositor \
30                 "
31
32 EXTRA_OECONF_append_qemux86 = "\
33                 WESTON_NATIVE_BACKEND=fbdev-backend.so \
34                 "
35 EXTRA_OECONF_append_qemux86-64 = "\
36                 WESTON_NATIVE_BACKEND=fbdev-backend.so \
37                 "
38 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
39                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
40                    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
41                   "
42 #
43 # Compositor choices
44 #
45 # Weston on KMS
46 PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
47 # Weston on Wayland (nested Weston)
48 PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
49 # Weston on X11
50 PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
51 # Headless Weston
52 PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
53 # Weston on framebuffer
54 PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
55 # weston-launch
56 PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,libpam drm"
57 # VA-API desktop recorder
58 PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
59 # Weston with EGL support
60 PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
61 # Weston with cairo glesv2 support
62 PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
63 # Weston with lcms support
64 PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
65 # Weston with webp support
66 PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
67 # Weston with unwinding support
68 PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
69
70 do_install_append() {
71         # Weston doesn't need the .la files to load modules, so wipe them
72         rm -f ${D}/${libdir}/weston/*.la
73
74         # If X11, ship a desktop file to launch it
75         if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
76                 install -d ${D}${datadir}/applications
77                 install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
78
79                 install -d ${D}${datadir}/icons/hicolor/48x48/apps
80                 install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
81         fi
82 }
83
84 PACKAGES += "${PN}-examples"
85
86 FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
87 FILES_${PN}-examples = "${bindir}/*"
88
89 RDEPENDS_${PN} += "xkeyboard-config"
90 RRECOMMENDS_${PN} = "liberation-fonts"
91
92 USERADD_PACKAGES = "${PN}"
93 GROUPADD_PARAM_${PN} = "--system weston-launch"