1*4882a593SmuzhiyunSUMMARY = "A C library for selecting an OpenGL API and window system at runtime" 2*4882a593SmuzhiyunDESCRIPTION = "A cross-platform C library that allows one to defer selection \ 3*4882a593Smuzhiyunof an OpenGL API and window system until runtime. For example, on Linux, Waffle \ 4*4882a593Smuzhiyunenables an application to select X11/EGL with an OpenGL 3.3 core profile, \ 5*4882a593SmuzhiyunWayland with OpenGL ES2, and other window system / API combinations." 6*4882a593SmuzhiyunHOMEPAGE = "https://gitlab.freedesktop.org/mesa/waffle" 7*4882a593SmuzhiyunBUGTRACKER = "https://gitlab.freedesktop.org/mesa/waffle" 8*4882a593SmuzhiyunLICENSE = "BSD-2-Clause" 9*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \ 10*4882a593Smuzhiyun file://include/waffle-1/waffle.h;endline=24;md5=61dbf8697f61c78645e75a93c585b1bf" 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunSRC_URI = "git://gitlab.freedesktop.org/mesa/waffle.git;protocol=https;branch=master \ 13*4882a593Smuzhiyun file://0001-waffle-do-not-make-core-protocol-into-the-library.patch \ 14*4882a593Smuzhiyun file://0001-meson.build-request-native-wayland-scanner.patch \ 15*4882a593Smuzhiyun " 16*4882a593SmuzhiyunSRCREV = "905c6c10f2483adf0cbfa024e2d3c2ed541fb300" 17*4882a593SmuzhiyunS = "${WORKDIR}/git" 18*4882a593Smuzhiyun 19*4882a593Smuzhiyuninherit meson features_check lib_package bash-completion pkgconfig 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunDEPENDS:append = " python3 cmake-native" 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun# This should be overridden per-machine to reflect the capabilities of the GL 24*4882a593Smuzhiyun# stack. 25*4882a593SmuzhiyunPACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11-egl', '', d)} \ 26*4882a593Smuzhiyun ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ 27*4882a593Smuzhiyun ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gbm surfaceless-egl', '', d)} \ 28*4882a593Smuzhiyun" 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun# virtual/libgl requires opengl in DISTRO_FEATURES. 31*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES += "${@bb.utils.contains('DEPENDS', 'virtual/${MLPREFIX}libgl', 'opengl', '', d)}" 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun# I say virtual/libgl, actually wants gl.pc 34*4882a593SmuzhiyunPACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,virtual/${MLPREFIX}libgl libx11" 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun# wants wayland-egl.pc, egl.pc, and the wayland 37*4882a593Smuzhiyun# DISTRO_FEATURE. 38*4882a593SmuzhiyunPACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,virtual/${MLPREFIX}egl wayland wayland-native wayland-protocols" 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun# wants gbm.pc egl.pc 41*4882a593SmuzhiyunPACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled,virtual/${MLPREFIX}egl virtual/${MLPREFIX}libgbm udev" 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun# wants egl.pc 44*4882a593SmuzhiyunPACKAGECONFIG[x11-egl] = "-Dx11_egl=enabled,-Dx11_egl=disabled,virtual/${MLPREFIX}egl libxcb" 45*4882a593SmuzhiyunPACKAGECONFIG[surfaceless-egl] = "-Dsurfaceless_egl=enabled,-Dsurfaceless_egl=disabled,virtual/${MLPREFIX}egl" 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun# TODO: optionally build manpages and examples 48*4882a593Smuzhiyun 49*4882a593Smuzhiyundo_install:append() { 50*4882a593Smuzhiyun sed -i -e "s,${WORKDIR},,g" ${D}/${libdir}/cmake/Waffle/WaffleConfig.cmake 51*4882a593Smuzhiyun} 52