Skip to contentSkip to conversation

mesa: remove obsolete deletion of .la files

PATCH In review Ross Burton 2 participants 3 messages Apr 14, 2025 – Apr 15, 2025 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mesa: remove obsolete deletion of .la files

As Mesa is built with Meson now, there's no need to delete the .la files as they're not installed in the first place.

---
 meta/recipes-graphics/mesa/mesa.inc | 6 ------
 1 file changed, 6 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +0 -6
index aca34983e97..2a0c88c89a4 100644
@@ -279,12 +279,6 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \
             "
 
 do_install:append () {
-    # Drivers never need libtool .la files
-    rm -f ${D}${libdir}/dri/*.la
-    rm -f ${D}${libdir}/egl/*.la
-    rm -f ${D}${libdir}/gallium-pipe/*.la
-    rm -f ${D}${libdir}/gbm/*.la
-
     # libwayland-egl has been moved to wayland 1.15+
     rm -f ${D}${libdir}/libwayland-egl*
     rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 mesa-demos: fix detection of GLX headers

Backport a patch from upstream to fix the build when glx.pc isn't found, but the glx headers are available. As libglvnd is the only provider of glx.pc and by default we build without libglvnd, this is common.

This solves the problem where mesa-demo is missing the GLX demos, such as glxgears.

[ YOCTO #15825 ]

---
 ...eson-fix-glx-detection-without-glvnd.patch | 46 +++++++++++++++++++
 .../recipes-graphics/mesa/mesa-demos_9.0.0.bb |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 meta/recipes-graphics/mesa/mesa-demos/0001-meson-fix-glx-detection-without-glvnd.patch
meta/recipes-graphics/mesa/mesa-demos/0001-meson-fix-glx-detection-without-glvnd.patch new file +46 -0
new file mode 100644
index 00000000000..f16ba4a24c4
@@ -0,0 +1,46 @@
+From e16117fc92688d76a042ad2c590c77d5a987a4ac Mon Sep 17 00:00:00 2001
+From: Erik Faye-Lund <[email protected]>
+Date: Fri, 24 Mar 2023 13:31:58 +0100
+Subject: [PATCH] meson: fix glx-detection without glvnd
+
+When build without GLVND, Mesa provides GLX as a part of libGL, just
+like XQuartz does on MacOS. There's nothing really macOS specific about
+this fallback, so let's drop the condition.
+
+And just for good measure, let's add in dep_gl as a dependency for
+the header-check here, in case some one decides to install libGL outside
+of the default include directory.
+
+Fixes: 34300551 ("meson: explicitly check for glx dependency")
+Closes: https://gitlab.freedesktop.org/mesa/demos/-/issues/36
+Reviewed-by: Hoe Hao Cheng <[email protected]>
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <[email protected]>
+---
+ meson.build | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index c1853f94..bc3278e1 100644
+--- a/meson.build
++++ b/meson.build
+@@ -99,10 +99,11 @@ if not dep_glu.found() and host_machine.system() != 'darwin'
+ endif
+ 
+ dep_glx = dependency('glx', required: false, disabler : true)
+-if not dep_glx.found() and host_machine.system() == 'darwin'
+-  # xquartz doesn't have a glx.pc, but it does have the header. And all the
+-  # symbols reside in libGL, so let's just use that.
+-  if cc.check_header('GL/glx.h', dependencies: dep_x11)
++if not dep_glx.found()
++  # Both Mesa build without GLVND and XQuartz lacks a glx.pc, but does
++  # provide the header. And all the symbols reside in libGL, so let's
++  # just use that.
++  if cc.check_header('GL/glx.h', dependencies: [dep_x11, dep_gl])
+     dep_glx = dep_gl
+   endif
+ endif
+-- 
+2.43.0
+
meta/recipes-graphics/mesa/mesa-demos_9.0.0.bb +1 -0
index 0301b553611..d92f1ddc5ba 100644
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=9142
                     file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
 
 SRC_URI = "https://archive.mesa3d.org/demos/${BPN}-${PV}.tar.xz \
+           file://0001-meson-fix-glx-detection-without-glvnd.patch \
            "
 SRC_URI[sha256sum] = "3046a3d26a7b051af7ebdd257a5f23bfeb160cad6ed952329cdff1e9f1ed496b"
 
Signature · 1 line
2.43.0
#2 lore raw

Re: [OE-core] [PATCH 2/2] mesa-demos: fix detection of GLX headers

Quoted 10 lines

Op 14 apr 2025, om 21:22 heeft Ross Burton via lists.openembedded.org <[email protected]> het volgende geschreven:

Backport a patch from upstream to fix the build when glx.pc isn't found, but the glx headers are available. As libglvnd is the only provider of glx.pc and by default we build without libglvnd, this is common.

This solves the problem where mesa-demo is missing the GLX demos, such as glxgears.

Thanks for that! I was wondering why I had lots of *gears, but not the GLX ones I needed for testing GLX :)

regards,

Koen

Quoted 86 lines

[ YOCTO #15825 ]

---
...eson-fix-glx-detection-without-glvnd.patch | 46 +++++++++++++++++++ .../recipes-graphics/mesa/mesa-demos_9.0.0.bb | 1 +

2 files changed, 47 insertions(+)

create mode 100644 meta/recipes-graphics/mesa/mesa-demos/0001-meson-fix-glx-detection-without-glvnd.patch

meta/recipes-graphics/mesa/mesa-demos/0001-meson-fix-glx-detection-without-glvnd.patch new file +46 -0
new file mode 100644
index 00000000000..f16ba4a24c4
@@ -0,0 +1,46 @@
+From e16117fc92688d76a042ad2c590c77d5a987a4ac Mon Sep 17 00:00:00 2001
+From: Erik Faye-Lund <[email protected]>
+Date: Fri, 24 Mar 2023 13:31:58 +0100
+Subject: [PATCH] meson: fix glx-detection without glvnd
+
+When build without GLVND, Mesa provides GLX as a part of libGL, just
+like XQuartz does on MacOS. There's nothing really macOS specific about
+this fallback, so let's drop the condition.
+
+And just for good measure, let's add in dep_gl as a dependency for
+the header-check here, in case some one decides to install libGL outside
+of the default include directory.
+
+Fixes: 34300551 ("meson: explicitly check for glx dependency")
+Closes: https://gitlab.freedesktop.org/mesa/demos/-/issues/36
+Reviewed-by: Hoe Hao Cheng <[email protected]>
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <[email protected]>
+---
+ meson.build | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index c1853f94..bc3278e1 100644
+--- a/meson.build
++++ b/meson.build
+@@ -99,10 +99,11 @@ if not dep_glu.found() and host_machine.system() != 'darwin'
+ endif
+ 
+ dep_glx = dependency('glx', required: false, disabler : true)
+-if not dep_glx.found() and host_machine.system() == 'darwin'
+-  # xquartz doesn't have a glx.pc, but it does have the header. And all the
+-  # symbols reside in libGL, so let's just use that.
+-  if cc.check_header('GL/glx.h', dependencies: dep_x11)
++if not dep_glx.found()
++  # Both Mesa build without GLVND and XQuartz lacks a glx.pc, but does
++  # provide the header. And all the symbols reside in libGL, so let's
++  # just use that.
++  if cc.check_header('GL/glx.h', dependencies: [dep_x11, dep_gl])
+     dep_glx = dep_gl
+   endif
+ endif
+-- 
+2.43.0
+
meta/recipes-graphics/mesa/mesa-demos_9.0.0.bb +1 -0
index 0301b553611..d92f1ddc5ba 100644
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=9142
                    file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
 
 SRC_URI = "https://archive.mesa3d.org/demos/${BPN}-${PV}.tar.xz \
+           file://0001-meson-fix-glx-detection-without-glvnd.patch \
           "

SRC_URI[sha256sum] = "3046a3d26a7b051af7ebdd257a5f23bfeb160cad6ed952329cdff1e9f1ed496b"

Signature · 10 lines
2.43.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#214808): https://lists.openembedded.org/g/openembedded-core/message/214808
Mute This Topic: https://lists.openembedded.org/mt/112263751/9418801
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-