summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2025-02-16 15:02:04 +0100
committerKhem Raj <raj.khem@gmail.com>2025-02-16 08:10:20 -0800
commit964f55887ae464e9053fc484d55f7a38f5373b7c (patch)
treeb3f0446c312f22f26aaafd7fc086f4f063497c67
parent54030f5611e2d4038729197f3a6b47136d87c1b0 (diff)
downloadmeta-openembedded-964f55887ae464e9053fc484d55f7a38f5373b7c.tar.gz
libplacebo: fix glslang PACKAGECONFIG
In case glslang PACKAGECONFIG is enabled, compilation fails with a lot of errors about undefined references from the glslang namespace, e.g. | /usr/src/debug/libplacebo/7.349.0/src/glsl/glslang.cc:79:(.text+0x160): undefined reference to `glslang::TShader::TShader(EShLanguage)' This has been solved in the upstream project, and this change backports the commit that fixes the meson.build file to find the correct libraries during compilation. Additionally, fix also the TMPDIR QA error that popped up after fixing the above issue: remove the RECIPE_SYSROOT value from the generated pkgconf file (and instead of referring to the libraries by absolute path, just refer to them by name, as they are supposed to be present in the standard library lookup path). Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-multimedia/mplayer/libplacebo/0001-meson-add-glslang-lib-for-15.0.0-linking.patch34
-rw-r--r--meta-oe/recipes-multimedia/mplayer/libplacebo_7.349.0.bb10
2 files changed, 43 insertions, 1 deletions
diff --git a/meta-oe/recipes-multimedia/mplayer/libplacebo/0001-meson-add-glslang-lib-for-15.0.0-linking.patch b/meta-oe/recipes-multimedia/mplayer/libplacebo/0001-meson-add-glslang-lib-for-15.0.0-linking.patch
new file mode 100644
index 0000000000..8d784da0cc
--- /dev/null
+++ b/meta-oe/recipes-multimedia/mplayer/libplacebo/0001-meson-add-glslang-lib-for-15.0.0-linking.patch
@@ -0,0 +1,34 @@
1From d18a23cc275576bcefbdcc179d08ae643eeb3f3e Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
3Date: Mon, 2 Dec 2024 17:10:00 +0100
4Subject: [PATCH] meson: add glslang lib for 15.0.0 linking
5
6Glslang 15.0.0 moved some code around, add also linking to glslang,
7while this is not needed for older versions, it will still work.
8
9Unfortunately CMake config embedded in distributions is not usable
10without installing additional package like glslang-tools, because at
11least Ubuntu splits it. On Arch it would work, but generally the CMake
12config require cmake binary to work also, so let's keep it as-is for
13now.
14
15Upstream-Status: Backport [https://github.com/haasn/libplacebo/commit/056b852018db04aa2ebc0982e27713afcea8106b]
16---
17 src/glsl/meson.build | 4 ++++
18 1 file changed, 4 insertions(+)
19
20diff --git a/src/glsl/meson.build b/src/glsl/meson.build
21index 5a881960..8fb5e699 100644
22--- a/src/glsl/meson.build
23+++ b/src/glsl/meson.build
24@@ -39,6 +39,10 @@ elif not glslang_req.disabled()
25
26 glslang_deps += spirv
27
28+ # Glslang 15.0.0 moved some code around, add also linking to glslang, while
29+ # this is not needed for older versions, it will still work.
30+ glslang_deps += cxx.find_library('glslang', required: required, static: static)
31+
32 if static
33 glslang_deps += [
34 # Always required for static linking
diff --git a/meta-oe/recipes-multimedia/mplayer/libplacebo_7.349.0.bb b/meta-oe/recipes-multimedia/mplayer/libplacebo_7.349.0.bb
index 15f324ff49..a5b38db335 100644
--- a/meta-oe/recipes-multimedia/mplayer/libplacebo_7.349.0.bb
+++ b/meta-oe/recipes-multimedia/mplayer/libplacebo_7.349.0.bb
@@ -4,7 +4,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=435ed639f84d4585d93824e7da3d85da"
4 4
5DEPENDS += "fastfloat glad-native python3-mako-native python3-jinja2-native vulkan-headers" 5DEPENDS += "fastfloat glad-native python3-mako-native python3-jinja2-native vulkan-headers"
6 6
7SRC_URI = "git://code.videolan.org/videolan/libplacebo.git;protocol=https;branch=v7.349" 7SRC_URI = "git://code.videolan.org/videolan/libplacebo.git;protocol=https;branch=v7.349 \
8 file://0001-meson-add-glslang-lib-for-15.0.0-linking.patch"
8SRCREV = "1fd3c7bde7b943fe8985c893310b5269a09b46c5" 9SRCREV = "1fd3c7bde7b943fe8985c893310b5269a09b46c5"
9 10
10inherit meson pkgconfig 11inherit meson pkgconfig
@@ -20,3 +21,10 @@ PACKAGECONFIG[lcms] = "-Dlcms=enabled,-Dlcms=disabled,lcms"
20PACKAGECONFIG[demos] = "-Ddemos=true,-Ddemos=false,ffmpeg libsdl2 libsdl2-image" 21PACKAGECONFIG[demos] = "-Ddemos=true,-Ddemos=false,ffmpeg libsdl2 libsdl2-image"
21 22
22EXTRA_OEMESON = "-Dvulkan-registry=${STAGING_DATADIR}/vulkan/registry/vk.xml" 23EXTRA_OEMESON = "-Dvulkan-registry=${STAGING_DATADIR}/vulkan/registry/vk.xml"
24
25do_install:append(){
26 if [ -f ${D}${libdir}/pkgconfig/libplacebo.pc ]; then
27 sed -i "s,${RECIPE_SYSROOT}${libdir}/libSPIRV.so,-lSPIRV,g" ${D}${libdir}/pkgconfig/libplacebo.pc
28 sed -i "s,${RECIPE_SYSROOT}${libdir}/libglslang.so,-lglslang,g" ${D}${libdir}/pkgconfig/libplacebo.pc
29 fi
30}