new file mode 100644
@@ -0,0 +1,40 @@
+From ad0bbc5099d99bbb0c914b39cb5ab4920fd6eeda Mon Sep 17 00:00:00 2001
+From: Gyorgy Sarvari <skandigraun@gmail.com>
+Date: Sun, 16 Feb 2025 14:23:40 +0100
+Subject: [PATCH] Fix compiling demos without nuklear
+
+Demos can't be compiled if nuklear headers are not present, because
+the implementation of parse_args function is guarded by HAVE_NUKLEAR macro.
+
+To allow compiling demos without the Nuklear headers, move the implementation
+outside of this ifdef.
+
+Upstream-Status: Submitted [https://github.com/haasn/libplacebo/pull/315]
+---
+ demos/settings.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/demos/settings.c b/demos/settings.c
+index 197e8b7e..73f0e5b9 100644
+--- a/demos/settings.c
++++ b/demos/settings.c
+@@ -14,9 +14,6 @@
+ #define PL_BASENAME basename
+ #endif
+
+-#ifdef HAVE_NUKLEAR
+-#include "ui.h"
+-
+ bool parse_args(struct plplay_args *args, int argc, char *argv[])
+ {
+ static struct option long_options[] = {
+@@ -89,6 +86,9 @@ error:
+ return false;
+ }
+
++#ifdef HAVE_NUKLEAR
++#include "ui.h"
++
+ static void add_hook(struct plplay *p, const struct pl_hook *hook, const char *path)
+ {
+ if (!hook)
@@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=435ed639f84d4585d93824e7da3d85da"
DEPENDS += "fastfloat glad-native python3-mako-native python3-jinja2-native vulkan-headers"
SRC_URI = "git://code.videolan.org/videolan/libplacebo.git;protocol=https;branch=v7.349 \
- file://0001-meson-add-glslang-lib-for-15.0.0-linking.patch"
+ file://0001-meson-add-glslang-lib-for-15.0.0-linking.patch \
+ file://0001-Fix-compiling-demos-without-nuklear.patch"
SRCREV = "1fd3c7bde7b943fe8985c893310b5269a09b46c5"
inherit meson pkgconfig
In case the demos PACKAGECONFIG is enabled, linking fails with the following error: | /usr/src/debug/libplacebo/7.349.0/demos/plplay.c:669:(.text.startup+0x90): undefined reference to `parse_args' | collect2: error: ld returned 1 exit status The implementation of the missing function is guarded erroneously by an ifdef flag (HAVE_NUKLEAR, which is only true in case headers from the nuklear library are present - but in this recipe they are not included). This patch moves the implementation of this function outside of the ifdef to avoid the build failure. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> --- v2: fix incorrect SRC_URI ...-Fix-compiling-demos-without-nuklear.patch | 40 +++++++++++++++++++ .../mplayer/libplacebo_7.349.0.bb | 3 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-multimedia/mplayer/libplacebo/0001-Fix-compiling-demos-without-nuklear.patch