diff mbox series

[meta-oe,1/3] libsdl2-ttf: require distro feature opengl

Message ID 20250903062503.122121-1-hongxu.jia@windriver.com
State Under Review
Headers show
Series [meta-oe,1/3] libsdl2-ttf: require distro feature opengl | expand

Commit Message

Hongxu Jia Sept. 3, 2025, 6:25 a.m. UTC
Make libsdl2-ttf require distro feature opengl. Otherwise it fails
to build world if 'opengl' doesn't exist in DISTRO_FEATURES.
...
|ERROR: Nothing PROVIDES 'virtual/egl' (but meta-openembedded/meta-oe/recipes-graphics/
libsdl/libsdl2-ttf_2.24.0.bb DEPENDS on or otherwise requires it). Close matches:
|  virtual/kernel
|  virtual/make
|  virtual/perf
|ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
|Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'libsdl2-ttf', 'virtual/egl']
...

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta-oe/recipes-graphics/libsdl/libsdl2-ttf_2.24.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Ross Burton Sept. 3, 2025, 10:24 a.m. UTC | #1
On 3 Sep 2025, at 07:25, hongxu via lists.openembedded.org <hongxu.jia=eng.windriver.com@lists.openembedded.org> wrote:
> 
> Make libsdl2-ttf require distro feature opengl. Otherwise it fails
> to build world if 'opengl' doesn't exist in DISTRO_FEATURES.
> ...
> |ERROR: Nothing PROVIDES 'virtual/egl' (but meta-openembedded/meta-oe/recipes-graphics/
> libsdl/libsdl2-ttf_2.24.0.bb DEPENDS on or otherwise requires it). Close matches:
> |  virtual/kernel
> |  virtual/make
> |  virtual/perf
> |ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
> |Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'libsdl2-ttf', 'virtual/egl']

GL is only used for an example binary, so it would be better to simply disable those with -DSDL2TTF_SAMPLES=OFF.

Ross
hongxu Sept. 4, 2025, 7:48 a.m. UTC | #2
On Wed, Sep 3, 2025 at 03:24 AM, Ross Burton wrote:

> 
> GL is only used for an example binary, so it would be better to simply
> disable those with -DSDL2TTF_SAMPLES=OFF.

Sure, I will add PACKAGECONFIG opengl to enable/disable it, please drop this review, v2 incoming

//Hongxu

> 
> Ross
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/libsdl/libsdl2-ttf_2.24.0.bb b/meta-oe/recipes-graphics/libsdl/libsdl2-ttf_2.24.0.bb
index d06f41bd0e..a3fb13c45d 100644
--- a/meta-oe/recipes-graphics/libsdl/libsdl2-ttf_2.24.0.bb
+++ b/meta-oe/recipes-graphics/libsdl/libsdl2-ttf_2.24.0.bb
@@ -7,7 +7,9 @@  LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=fbb0010b2f7cf6e8a13bcac1ef4d2455"
 SRC_URI = "http://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-${PV}.tar.gz"
 SRC_URI[sha256sum] = "0b2bf1e7b6568adbdbc9bb924643f79d9dedafe061fa1ed687d1d9ac4e453bfd"
 
-inherit cmake pkgconfig
+inherit cmake pkgconfig features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
 
 S = "${UNPACKDIR}/SDL2_ttf-${PV}"