unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob a0711f8eadb09d20a6e3bdc67bc6124e3f7782aa 1452 bytes (raw)
name: gnu/packages/patches/ogre-glslang.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
From ab1a39e0610c737993ef605559d9b7998a975666 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Tue, 29 Oct 2024 09:52:48 +0900
Subject: [PATCH] build/glslang: Fix build when OSDependent library is missing.

The OSDependent glslang library is only available when it is built as
a static library, not a shared one; look for the library but do not
fail the  build when it doesn't exist.

Fixes: <https://github.com/OGRECave/ogre/issues/3248>
---
 PlugIns/GLSLang/CMakeLists.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/PlugIns/GLSLang/CMakeLists.txt b/PlugIns/GLSLang/CMakeLists.txt
index bfe03d9b8..7de816939 100644
--- a/PlugIns/GLSLang/CMakeLists.txt
+++ b/PlugIns/GLSLang/CMakeLists.txt
@@ -19,7 +19,11 @@ elseif(DEFINED ENV{VULKAN_SDK})
     target_link_directories(Plugin_GLSLangProgramManager PUBLIC $ENV{VULKAN_SDK}/lib)
     target_link_libraries(Plugin_GLSLangProgramManager PUBLIC OgreMain shaderc_combined)
 else()
-  set(GLSLANG_LIBS glslang OSDependent SPIRV SPIRV-Tools-opt SPIRV-Tools)
+  set(GLSLANG_LIBS glslang SPIRV SPIRV-Tools-opt SPIRV-Tools)
+  find_library(GLSLANG_OSDependent OSDependent)
+  if(GLSLANG_OGLCompiler)
+    set(GLSLANG_LIBS ${GLSLANG_LIBS} ${GLSLANG_OSDependent})
+  endif()
   find_library(GLSLANG_HLSL HLSL)
   if(GLSLANG_HLSL)
     set(GLSLANG_LIBS ${GLSLANG_LIBS} ${GLSLANG_HLSL})

base-commit: edb3d26fa6fa2a40498e80db03e2c0e17c51d46d
-- 
2.46.0


debug log:

solving a0711f8ead ...
found a0711f8ead in https://yhetil.org/guix-patches/41ab210b8582c7f709734d71fb30188ef120badb.1730166008.git.maxim.cournoyer@gmail.com/

applying [1/1] https://yhetil.org/guix-patches/41ab210b8582c7f709734d71fb30188ef120badb.1730166008.git.maxim.cournoyer@gmail.com/
diff --git a/gnu/packages/patches/ogre-glslang.patch b/gnu/packages/patches/ogre-glslang.patch
new file mode 100644
index 0000000000..a0711f8ead

1:40: trailing whitespace.
-- 
Checking patch gnu/packages/patches/ogre-glslang.patch...
1:42: new blank line at EOF.
+
Applied patch gnu/packages/patches/ogre-glslang.patch cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 a0711f8eadb09d20a6e3bdc67bc6124e3f7782aa	gnu/packages/patches/ogre-glslang.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).