commit:     5cac8d2fb3113a788016ca1f316d3c424444490a
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 19 19:02:23 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 19 19:07:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cac8d2f

media-gfx/waifu2x-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/922512
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../waifu2x-ncnn-vulkan-20220728-no-glslang-libs.patch    | 15 +++++++++++++++
 .../waifu2x-ncnn-vulkan-20220728.ebuild                   |  8 +++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git 
a/media-gfx/waifu2x-ncnn-vulkan/files/waifu2x-ncnn-vulkan-20220728-no-glslang-libs.patch
 
b/media-gfx/waifu2x-ncnn-vulkan/files/waifu2x-ncnn-vulkan-20220728-no-glslang-libs.patch
new file mode 100644
index 000000000000..7743c4267180
--- /dev/null
+++ 
b/media-gfx/waifu2x-ncnn-vulkan/files/waifu2x-ncnn-vulkan-20220728-no-glslang-libs.patch
@@ -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/922512
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -55,3 +55,3 @@
+ 
+-if(USE_SYSTEM_NCNN)
++if(0)
+     set(GLSLANG_TARGET_DIR "GLSLANG-NOTFOUND" CACHE PATH "Absolute path to 
glslangTargets.cmake directory")

diff --git a/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20220728.ebuild 
b/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20220728.ebuild
index d67e89271687..333b2c58ac8d 100644
--- a/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20220728.ebuild
+++ b/media-gfx/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20220728.ebuild
@@ -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
@@ -20,12 +20,15 @@ RDEPEND="
 "
 DEPEND="
        ${RDEPEND}
-       dev-util/glslang
        dev-util/vulkan-headers
 "
+BDEPEND="
+       dev-util/glslang
+"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-20210521-no-lto.patch
+       "${FILESDIR}"/${PN}-20220728-no-glslang-libs.patch
 )
 
 src_prepare() {
@@ -39,7 +42,6 @@ src_prepare() {
 
 src_configure() {
        local mycmakeargs=(
-               -DGLSLANG_TARGET_DIR="${ESYSROOT}"/usr/$(get_libdir)/cmake
                -DUSE_SYSTEM_NCNN=ON
                -DUSE_SYSTEM_WEBP=ON
        )

Reply via email to