media-gfx/realesrgan-ncnn-vulkan: fix build "with" glslang-1.3.275

Do not quite see why this is even looking for glslang libraries
at all with USE_SYSTEM_NCNN, there is nothing that use it that
I can see. System ncnn *does* use glslang on the other hand
(maybe it's trying to check if system ncnn has support? ...but
then RDEPEND already ensures this).

Meanwhile system ncnn itself (which is more recent) seems to
be handling current glslang properly.

Let's just yank out the entire block.

That aside, this still looks for glslangValidator, so the
dependency should instead be BDEPEND.

Closes: https://bugs.gentoo.org/922511
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens 2024-01-19 14:01:40 -05:00
parent 99c9c25f85
commit 70e9f9a19f
No known key found for this signature in database
GPG Key ID: B24406B0B0AC4334
2 changed files with 20 additions and 3 deletions

View File

@ -0,0 +1,15 @@
With USE_SYSTEM_NCNN this seemingly(?) tries to check if glslang
libraries exists only to know if system ncnn has support which is
already ensured through DEPEND here.
And then the checks fail[1] with modern glslang, so yank out the
unnecessary block.
[1] https://bugs.gentoo.org/922511
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -99,3 +99,3 @@
-if(USE_SYSTEM_NCNN)
+if(0)
set(GLSLANG_TARGET_DIR "GLSLANG-NOTFOUND" CACHE PATH "Absolute path to glslangTargets.cmake directory")

View File

@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -25,12 +25,15 @@ RDEPEND="
"
DEPEND="
${RDEPEND}
dev-util/glslang
dev-util/vulkan-headers
"
BDEPEND="
dev-util/glslang
"
PATCHES=(
"${FILESDIR}"/${PN}-default-realesrgan-x4plus-model.patch
"${FILESDIR}"/${PN}-0.2.0-no-glslang-libs.patch
)
src_prepare() {
@ -46,7 +49,6 @@ src_prepare() {
src_configure() {
local mycmakeargs=(
-DGLSLANG_TARGET_DIR="${ESYSROOT}"/usr/$(get_libdir)/cmake
-DUSE_SYSTEM_NCNN=ON
-DUSE_SYSTEM_WEBP=ON
)