From de636fe2edb98a67f9016cfb6763d64a5072691f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 22 Aug 2024 23:18:06 -0700 Subject: mesa,mesa-gl: Rename bbappend to match core OE-core has renamed these recipes dropping _git from name Signed-off-by: Khem Raj --- recipes-graphics/mesa/mesa-gl.bbappend | 8 ++++++ recipes-graphics/mesa/mesa-gl_%.bbappend | 8 ------ recipes-graphics/mesa/mesa.bbappend | 49 ++++++++++++++++++++++++++++++++ recipes-graphics/mesa/mesa_%.bbappend | 49 -------------------------------- 4 files changed, 57 insertions(+), 57 deletions(-) create mode 100644 recipes-graphics/mesa/mesa-gl.bbappend delete mode 100644 recipes-graphics/mesa/mesa-gl_%.bbappend create mode 100644 recipes-graphics/mesa/mesa.bbappend delete mode 100644 recipes-graphics/mesa/mesa_%.bbappend diff --git a/recipes-graphics/mesa/mesa-gl.bbappend b/recipes-graphics/mesa/mesa-gl.bbappend new file mode 100644 index 000000000..6545571fa --- /dev/null +++ b/recipes-graphics/mesa/mesa-gl.bbappend @@ -0,0 +1,8 @@ +DEPENDS:append:imxgpu = " virtual/egl" + +do_install:append:imxgpu() { + # imx-gpu-viv and mali-imx both provide /usr/include/KHR, so drop the mesa-gl one + rm -rf ${D}${includedir}/KHR +} + +COMPATIBLE_MACHINE:imxgpu = "(imxgpu)" diff --git a/recipes-graphics/mesa/mesa-gl_%.bbappend b/recipes-graphics/mesa/mesa-gl_%.bbappend deleted file mode 100644 index 6545571fa..000000000 --- a/recipes-graphics/mesa/mesa-gl_%.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -DEPENDS:append:imxgpu = " virtual/egl" - -do_install:append:imxgpu() { - # imx-gpu-viv and mali-imx both provide /usr/include/KHR, so drop the mesa-gl one - rm -rf ${D}${includedir}/KHR -} - -COMPATIBLE_MACHINE:imxgpu = "(imxgpu)" diff --git a/recipes-graphics/mesa/mesa.bbappend b/recipes-graphics/mesa/mesa.bbappend new file mode 100644 index 000000000..f2375a55c --- /dev/null +++ b/recipes-graphics/mesa/mesa.bbappend @@ -0,0 +1,49 @@ +PROVIDES:remove:imxgpu = "virtual/egl" +PROVIDES:remove:imxgpu3d = "virtual/libgl virtual/libgles1 virtual/libgles2" + +SRC_URI:append:mx93-nxp-bsp = " file://0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch" +SRC_URI:append:imx-nxp-bsp = " file://0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch" + +PACKAGECONFIG:remove:imxgpu = "egl gbm" +PACKAGECONFIG:remove:imxgpu3d = "gles" + +# FIXME: mesa should support 'x11-no-tls' option +python () { + overrides = d.getVar("OVERRIDES").split(":") + if "imxgpu2d" not in overrides: + return + + x11flag = d.getVarFlag("PACKAGECONFIG", "x11", False) + d.setVarFlag("PACKAGECONFIG", "x11", x11flag.replace("--enable-glx-tls", "--enable-glx")) +} + +# Enable Etnaviv and Freedreno support +PACKAGECONFIG:append:use-mainline-bsp = " gallium etnaviv kmsro freedreno" + +# For NXP BSP, GPU drivers don't support dri +PACKAGECONFIG:remove:imxgpu:use-nxp-bsp = "dri" + +# mainline/etnaviv: +RRECOMMENDS:${PN}-megadriver:append:use-mainline-bsp = " libdrm-etnaviv mesa-etnaviv-env" + +BACKEND = \ + "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \ + 'fb', d), d)}" + +# FIXME: Dirty hack to allow use of Vivante GPU libGL binary +do_install:append:imxgpu3d () { + rm -f ${D}${libdir}/libGL.* \ + ${D}${includedir}/GL/gl.h \ + ${D}${includedir}/GL/glcorearb.h \ + ${D}${includedir}/GL/glext.h \ + ${D}${includedir}/GL/glx.h \ + ${D}${includedir}/GL/glxext.h + if [ "${BACKEND}" = "x11" ]; then + rm -f ${D}${libdir}/pkgconfig/gl.pc + fi +} + +do_install:append:imxgpu () { + rm -rf ${D}${includedir}/KHR +} diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend deleted file mode 100644 index f2375a55c..000000000 --- a/recipes-graphics/mesa/mesa_%.bbappend +++ /dev/null @@ -1,49 +0,0 @@ -PROVIDES:remove:imxgpu = "virtual/egl" -PROVIDES:remove:imxgpu3d = "virtual/libgl virtual/libgles1 virtual/libgles2" - -SRC_URI:append:mx93-nxp-bsp = " file://0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch" -SRC_URI:append:imx-nxp-bsp = " file://0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch" - -PACKAGECONFIG:remove:imxgpu = "egl gbm" -PACKAGECONFIG:remove:imxgpu3d = "gles" - -# FIXME: mesa should support 'x11-no-tls' option -python () { - overrides = d.getVar("OVERRIDES").split(":") - if "imxgpu2d" not in overrides: - return - - x11flag = d.getVarFlag("PACKAGECONFIG", "x11", False) - d.setVarFlag("PACKAGECONFIG", "x11", x11flag.replace("--enable-glx-tls", "--enable-glx")) -} - -# Enable Etnaviv and Freedreno support -PACKAGECONFIG:append:use-mainline-bsp = " gallium etnaviv kmsro freedreno" - -# For NXP BSP, GPU drivers don't support dri -PACKAGECONFIG:remove:imxgpu:use-nxp-bsp = "dri" - -# mainline/etnaviv: -RRECOMMENDS:${PN}-megadriver:append:use-mainline-bsp = " libdrm-etnaviv mesa-etnaviv-env" - -BACKEND = \ - "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \ - 'fb', d), d)}" - -# FIXME: Dirty hack to allow use of Vivante GPU libGL binary -do_install:append:imxgpu3d () { - rm -f ${D}${libdir}/libGL.* \ - ${D}${includedir}/GL/gl.h \ - ${D}${includedir}/GL/glcorearb.h \ - ${D}${includedir}/GL/glext.h \ - ${D}${includedir}/GL/glx.h \ - ${D}${includedir}/GL/glxext.h - if [ "${BACKEND}" = "x11" ]; then - rm -f ${D}${libdir}/pkgconfig/gl.pc - fi -} - -do_install:append:imxgpu () { - rm -rf ${D}${includedir}/KHR -} -- cgit v1.2.3-54-g00ecf