weston_7.0.0.bb 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a"
  7. SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
  8. file://weston.png \
  9. file://weston.desktop \
  10. file://xwayland.weston-start \
  11. file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
  12. "
  13. SRC_URI[md5sum] = "cbfda483bc2501d0831af3f33c707850"
  14. SRC_URI[sha256sum] = "a00a6d207b6a45f95f4401c604772a307c3767e5e2beecf3d879110c43909a64"
  15. UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
  16. inherit meson pkgconfig useradd features_check
  17. # depends on virtual/egl
  18. REQUIRED_DISTRO_FEATURES = "opengl"
  19. DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
  20. DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
  21. WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
  22. EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false"
  23. PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
  24. ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
  25. ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
  26. ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
  27. clients launch"
  28. #
  29. # Compositor choices
  30. #
  31. # Weston on KMS
  32. PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev"
  33. # Weston on Wayland (nested Weston)
  34. PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2"
  35. # Weston on X11
  36. PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo"
  37. # Headless Weston
  38. PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
  39. # Weston on framebuffer
  40. PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
  41. # weston-launch
  42. PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm"
  43. # VA-API desktop recorder
  44. PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva"
  45. # Weston with EGL support
  46. PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl"
  47. # Weston with lcms support
  48. PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms"
  49. # Weston with webp support
  50. PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
  51. # Weston with systemd-login support
  52. PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
  53. # Weston with Xwayland support (requires X11 and Wayland)
  54. PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
  55. # colord CMS support
  56. PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
  57. # Clients support
  58. PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
  59. # Virtual remote output with GStreamer on DRM backend
  60. PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0"
  61. # Weston with PAM support
  62. PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
  63. do_install_append() {
  64. # Weston doesn't need the .la files to load modules, so wipe them
  65. rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la
  66. # If X11, ship a desktop file to launch it
  67. if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
  68. install -d ${D}${datadir}/applications
  69. install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
  70. install -d ${D}${datadir}/icons/hicolor/48x48/apps
  71. install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
  72. fi
  73. if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
  74. install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
  75. fi
  76. if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
  77. chmod u+s ${D}${bindir}/weston-launch
  78. fi
  79. }
  80. PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
  81. libweston-${WESTON_MAJOR_VERSION} ${PN}-examples"
  82. FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
  83. FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so"
  84. SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'."
  85. FILES_${PN}-examples = "${bindir}/*"
  86. FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
  87. RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
  88. RDEPENDS_${PN} += "xkeyboard-config"
  89. RRECOMMENDS_${PN} = "weston-init liberation-fonts"
  90. RRECOMMENDS_${PN}-dev += "wayland-protocols"
  91. USERADD_PACKAGES = "${PN}"
  92. GROUPADD_PARAM_${PN} = "--system weston-launch"