all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 74075@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#74075] [PATCH v2 4/5] gnu: ogre: Add support for Wayland, Vulkan and Bullet.
Date: Tue, 29 Oct 2024 10:40:07 +0900	[thread overview]
Message-ID: <41ab210b8582c7f709734d71fb30188ef120badb.1730166008.git.maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <b7c3b115cefdfb85bab25a1233edbccbe30b4ac8.1730166007.git.maxim.cournoyer@gmail.com>

* gnu/packages/patches/ogre-glslang.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/graphics.scm (ogre): Apply patch.
[configure-flags]: Add -DOGRE_BUILD_RENDERSYSTEM_VULKAN=ON.
[native-inputs]: Add vulkan-headers.
[inputs]: Add bullet, glslang, spirv-tools and wayland.

Change-Id: I77f8964f36facd40f48a80006cfaa0a17c7971e5
---

(no changes since v1)

 gnu/local.mk                            |  1 +
 gnu/packages/graphics.scm               | 11 ++++++--
 gnu/packages/patches/ogre-glslang.patch | 36 +++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/ogre-glslang.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c432685775..ac53887aa3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1836,6 +1836,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ocaml-4.07-dynamically-allocate-signal-stack.patch	\
   %D%/packages/patches/ocaml-4.09-dynamically-allocate-signal-stack.patch	\
   %D%/packages/patches/ocaml-4.09-multiple-definitions.patch	\
+  %D%/packages/patches/ogre-glslang.patch			\
   %D%/packages/patches/omake-fix-non-determinism.patch	\
   %D%/packages/patches/oneko-remove-nonfree-characters.patch	\
   %D%/packages/patches/onionshare-cli-async-mode.patch		\
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 7659bec27d..bde89b487b 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1185,7 +1185,8 @@ (define-public ogre
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0l5rlxk2jiz8sb5w4bd8xvyzrmwnas27sxzkar7xc5azs1x2vgxf"))))
+        (base32 "0l5rlxk2jiz8sb5w4bd8xvyzrmwnas27sxzkar7xc5azs1x2vgxf"))
+       (patches (search-patches "ogre-glslang.patch"))))
     (build-system cmake-build-system)
     (arguments
      (list
@@ -1218,6 +1219,7 @@ (define-public ogre
           (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
                 "-DIMGUI_DIR=../imgui-source"
                 "-DOGRE_BUILD_DEPENDENCIES=OFF"
+                "-DOGRE_BUILD_RENDERSYSTEM_VULKAN=ON"
                 "-DOGRE_BUILD_TESTS=TRUE"
                 "-DOGRE_INSTALL_DOCS=TRUE"
                 "-DOGRE_INSTALL_SAMPLES=TRUE"
@@ -1228,16 +1230,21 @@ (define-public ogre
        ("googletest" ,googletest)
        ("pkg-config" ,pkg-config)
        ("python" ,python)
+       ("vulkan-headers" ,vulkan-headers)
        ("xorg-server-for-tests" ,xorg-server-for-tests)))
     (inputs
-     (list freeimage
+     (list bullet
+           freeimage
            freetype
+           glslang
            libxaw
            libxrandr
            libxt
            mesa
            pugixml
            sdl2
+           spirv-tools
+           wayland
            zlib))
     (synopsis "Scene-oriented, flexible 3D engine written in C++")
     (description
diff --git a/gnu/packages/patches/ogre-glslang.patch b/gnu/packages/patches/ogre-glslang.patch
new file mode 100644
index 0000000000..a0711f8ead
--- /dev/null
+++ b/gnu/packages/patches/ogre-glslang.patch
@@ -0,0 +1,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
+
-- 
2.46.0





  parent reply	other threads:[~2024-10-29  1:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29  1:09 [bug#74075] [PATCH 0/4] Update Ogre to 14.3.1 Maxim Cournoyer
2024-10-29  1:40 ` [bug#74075] [PATCH v2 1/5] gnu: imgui: Update to 1.91.4 Maxim Cournoyer
2024-10-29  1:40   ` [bug#74075] [PATCH v2 2/5] gnu: ogre: Use gexps Maxim Cournoyer
2024-10-29  1:40   ` [bug#74075] [PATCH v2 3/5] gnu: ogre: Update to 14.3.1 Maxim Cournoyer
2024-10-29  1:40   ` Maxim Cournoyer [this message]
2024-10-29  1:40   ` [bug#74075] [PATCH v2 5/5] gnu: mygui: Update to 3.4.3 Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41ab210b8582c7f709734d71fb30188ef120badb.1730166008.git.maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=74075@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.