commit:     0e1f8f4089ddfe21900556d71fd9a271684b5fbd
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  6 11:43:46 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Nov  7 19:27:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e1f8f40

media-libs/libplacebo: build fixes for stable

Just non-intrusive fixes partly backported from the ~arch ebuild:
* ensure use right python executble wrt bug #731728
* disable demos wrt bug #851927
* require <glslang-1.3.231 (~arch is fixed with newer)
* multilib usedep for unwind
* add := to glslang for upcoming subslot, albeit this won't really
  get to use it given the above

Bug: https://bugs.gentoo.org/731728
Bug: https://bugs.gentoo.org/851927
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../files/libplacebo-4.192.1-python-executable.patch     |  8 ++++++++
 ...bo-4.192.1-r1.ebuild => libplacebo-4.192.1-r2.ebuild} | 16 ++++++++++++----
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git 
a/media-libs/libplacebo/files/libplacebo-4.192.1-python-executable.patch 
b/media-libs/libplacebo/files/libplacebo-4.192.1-python-executable.patch
new file mode 100644
index 000000000000..8fbad683e397
--- /dev/null
+++ b/media-libs/libplacebo/files/libplacebo-4.192.1-python-executable.patch
@@ -0,0 +1,8 @@
+https://bugs.gentoo.org/731728
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -9,3 +9,3 @@
+ # Dependencies
+-prog_python = import('python').find_installation()
++prog_python = import('python').find_installation('python3')
+ libm = cc.find_library('m', required: false)

diff --git a/media-libs/libplacebo/libplacebo-4.192.1-r1.ebuild 
b/media-libs/libplacebo/libplacebo-4.192.1-r2.ebuild
similarity index 73%
rename from media-libs/libplacebo/libplacebo-4.192.1-r1.ebuild
rename to media-libs/libplacebo/libplacebo-4.192.1-r2.ebuild
index c047cd32fdf8..96e2470a8d31 100644
--- a/media-libs/libplacebo/libplacebo-4.192.1-r1.ebuild
+++ b/media-libs/libplacebo/libplacebo-4.192.1-r2.ebuild
@@ -26,11 +26,15 @@ IUSE="glslang lcms +opengl +shaderc test unwind +vulkan"
 REQUIRED_USE="vulkan? ( || ( glslang shaderc ) )"
 RESTRICT="!test? ( test )"
 
-RDEPEND="glslang? ( dev-util/glslang[${MULTILIB_USEDEP}] )
+# Build broken with newer glslang due to struct TBuiltInResource changes
+# (also breaks ABI wrt https://github.com/KhronosGroup/glslang/issues/3052).
+# Fixed in next libplacebo version, but this older one is needed for stable
+# mpv. Note glslang can be disabled, shaderc provides same functionality.
+RDEPEND="glslang? ( <dev-util/glslang-1.3.231:=[${MULTILIB_USEDEP}] )
        lcms? ( media-libs/lcms:2[${MULTILIB_USEDEP}] )
        opengl? ( media-libs/libepoxy[${MULTILIB_USEDEP}] )
        shaderc? ( >=media-libs/shaderc-2017.2[${MULTILIB_USEDEP}] )
-       unwind? ( sys-libs/libunwind:= )
+       unwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
        vulkan? (
                dev-util/vulkan-headers
                media-libs/vulkan-loader[${MULTILIB_USEDEP}]
@@ -43,7 +47,10 @@ BDEPEND="virtual/pkgconfig
                $(python_gen_any_dep 'dev-python/mako[${PYTHON_USEDEP}]')
        )"
 
-PATCHES=( "${FILESDIR}"/libplacebo-2.72.2-fix-vulkan-undeclared.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.72.2-fix-vulkan-undeclared.patch
+       "${FILESDIR}"/${P}-python-executable.patch
+)
 
 python_check_deps() {
        has_version -b "dev-python/mako[${PYTHON_USEDEP}]"
@@ -55,6 +62,7 @@ pkg_setup() {
 
 multilib_src_configure() {
        local emesonargs=(
+               -Ddemos=false #851927
                $(meson_feature glslang)
                $(meson_feature lcms)
                $(meson_feature opengl)
@@ -63,7 +71,7 @@ multilib_src_configure() {
                $(meson_feature vulkan)
                $(meson_use test tests)
                # hard-code path from dev-util/vulkan-headers
-               -Dvulkan-registry=/usr/share/vulkan/registry/vk.xml
+               -Dvulkan-registry="${ESYSROOT}"/usr/share/vulkan/registry/vk.xml
        )
        meson_src_configure
 }

Reply via email to