[PATCH 0/4] Update Ogre to 14.3.1.

  • Open
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal
M
M
Maxim Cournoyer wrote on 29 Oct 02:09 +0100
(address . guix-patches@gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
cover.1730164111.git.maxim.cournoyer@gmail.com
Also enable extra features such as Wayland, Vulkan and Bullet.

Maxim Cournoyer (4):
gnu: imgui: Update to 1.91.4.
gnu: ogre: Use gexps.
gnu: ogre: Update to 14.3.1.
gnu: ogre: Add support for Wayland, Vulkan and Bullet.

gnu/local.mk | 1 +
gnu/packages/graphics.scm | 104 ++++++++++++++----------
gnu/packages/patches/ogre-glslang.patch | 36 ++++++++
gnu/packages/toolkits.scm | 4 +-
4 files changed, 100 insertions(+), 45 deletions(-)
create mode 100644 gnu/packages/patches/ogre-glslang.patch


base-commit: 4009d1de954d694cb11af391d4113d29c5c1379d
--
2.46.0
M
M
Maxim Cournoyer wrote on 29 Oct 02:40 +0100
[PATCH v2 2/5] gnu: ogre: Use gexps.
(address . 74075@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
25f0b75b2224f626d7afb3e6e9e896483967884c.1730166007.git.maxim.cournoyer@gmail.com
* gnu/packages/graphics.scm (ogre) [arguments]: Use gexps.

Change-Id: I0e9ebeea06769dc849e9579501ffa44fbd4ebc3b
---

(no changes since v1)

gnu/packages/graphics.scm | 81 ++++++++++++++++++++-------------------
1 file changed, 41 insertions(+), 40 deletions(-)

Toggle diff (94 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 8686cac7f7..0e13208d80 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1188,46 +1188,47 @@ (define-public ogre
(base32 "157vpfzivg2wf349glyd0cpbyaw1j3fm4nggban70pghql3x48kb"))))
(build-system cmake-build-system)
(arguments
- '(#:phases
- (modify-phases %standard-phases
- (add-before 'configure 'unpack-imgui
- (lambda* (#:key inputs #:allow-other-keys)
- (copy-recursively (assoc-ref inputs "imgui-source")
- "../imgui-source")))
- (add-before 'configure 'pre-configure
- ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
- ;; a consequence, we cannot suggest ours in configure flags. Fix
- ;; it.
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* "CMakeLists.txt"
- (("set\\(CMAKE_INSTALL_RPATH .*") "")))))
- #:configure-flags
- (let* ((out (assoc-ref %outputs "out"))
- (runpath
- (string-join (list (string-append out "/lib")
- (string-append out "/lib/OGRE"))
- ";")))
- (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
- "-DIMGUI_DIR=../imgui-source"
- "-DOGRE_BUILD_DEPENDENCIES=OFF"
- "-DOGRE_BUILD_TESTS=TRUE"
- "-DOGRE_INSTALL_DOCS=TRUE"
- "-DOGRE_INSTALL_SAMPLES=TRUE"
- "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
- (native-inputs `(("doxygen" ,doxygen)
- ("imgui-source" ,(package-source imgui-1.86))
- ("googletest" ,googletest)
- ("pkg-config" ,pkg-config)
- ("python" ,python)))
- (inputs (list freeimage
- freetype
- libxaw
- libxrandr
- libxt
- mesa
- pugixml
- sdl2
- zlib))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'unpack-imgui
+ (lambda _
+ (copy-recursively #$(this-package-native-input "imgui-source")
+ "../imgui-source")))
+ (add-before 'configure 'pre-configure
+ ;; CMakeLists.txt forces a CMAKE_INSTALL_RPATH value. As
+ ;; a consequence, we cannot suggest ours in configure flags. Fix
+ ;; it.
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set\\(CMAKE_INSTALL_RPATH .*") "")))))
+ #:configure-flags
+ #~(let ((runpath (string-join (list (string-append #$output "/lib")
+ (string-append #$output "/lib/OGRE"))
+ ";")))
+ (list (string-append "-DCMAKE_INSTALL_RPATH=" runpath)
+ "-DIMGUI_DIR=../imgui-source"
+ "-DOGRE_BUILD_DEPENDENCIES=OFF"
+ "-DOGRE_BUILD_TESTS=TRUE"
+ "-DOGRE_INSTALL_DOCS=TRUE"
+ "-DOGRE_INSTALL_SAMPLES=TRUE"
+ "-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
+ (native-inputs
+ `(("doxygen" ,doxygen)
+ ("imgui-source" ,(package-source imgui-1.86))
+ ("googletest" ,googletest)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python)))
+ (inputs
+ (list freeimage
+ freetype
+ libxaw
+ libxrandr
+ libxt
+ mesa
+ pugixml
+ sdl2
+ zlib))
(synopsis "Scene-oriented, flexible 3D engine written in C++")
(description
"OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented,
--
2.46.0
M
M
Maxim Cournoyer wrote on 29 Oct 02:40 +0100
[PATCH v2 1/5] gnu: imgui: Update to 1.91.4.
(address . 74075@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
b7c3b115cefdfb85bab25a1233edbccbe30b4ac8.1730166007.git.maxim.cournoyer@gmail.com
* gnu/packages/toolkits.scm (imgui): Update to 1.91.4.

Change-Id: I9a8f03db59fc795e065ebe4eaee60ca994164349
---

(no changes since v1)

gnu/packages/toolkits.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/toolkits.scm b/gnu/packages/toolkits.scm
index 3ba3399899..50b30812f2 100644
--- a/gnu/packages/toolkits.scm
+++ b/gnu/packages/toolkits.scm
@@ -34,7 +34,7 @@ (define-module (gnu packages toolkits)
(define-public imgui
(package
(name "imgui")
- (version "1.89.9")
+ (version "1.91.4")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -43,7 +43,7 @@ (define-public imgui
(file-name (git-file-name name version))
(sha256
(base32
- "0db11pin6kdzyd07dnwch8sf0z3386h42ibki1lnzb2ln8m66kyj"))
+ "1lqcsyqj5m4d4g390x7n3jvjanrnsf64fgjxn51v1kc02dw28gpa"))
(modules '((guix build utils)))
(snippet
;; Remove bundled fonts.

base-commit: 4009d1de954d694cb11af391d4113d29c5c1379d
--
2.46.0
M
M
Maxim Cournoyer wrote on 29 Oct 02:40 +0100
[PATCH v2 5/5] gnu: mygui: Update to 3.4.3.
(address . 74075@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
57d6a8d0a5e0b32f11097db8c52760c49330a622.1730166008.git.maxim.cournoyer@gmail.com
* gnu/packages/game-development.scm (mygui): Update to 3.4.3.

Change-Id: I5732fc176c5cfafabe3346367f0790e6a5f4a8e9
---

(no changes since v1)

gnu/packages/game-development.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index ee869c9cc5..2c64388079 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -1825,7 +1825,7 @@ (define-public ois
(define-public mygui
(package
(name "mygui")
- (version "3.4.2")
+ (version "3.4.3")
(source
(origin
(method git-fetch)
@@ -1834,7 +1834,7 @@ (define-public mygui
(commit (string-append "MyGUI" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0gkfahz118gpqa2906cjb3d4w8g13rv8v3ma7s0ml9l5cci785f8"))))
+ (base32 "0nayw5shm5nly9bjp0g372kg5ia64dvn6mrmi1c6mdg0n6vgs9xa"))))
(build-system cmake-build-system)
(arguments
'(#:tests? #f ; No test target
--
2.46.0
M
M
Maxim Cournoyer wrote on 29 Oct 02:40 +0100
[PATCH v2 3/5] gnu: ogre: Update to 14.3.1.
(address . 74075@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
fd507c5239e37a0b74d37ca1537e458d7982fb90.1730166007.git.maxim.cournoyer@gmail.com
* gnu/packages/graphics.scm (ogre): Update to 14.3.1.
[phases] <do-not-attempt-building-gtest, run-x-server>: New phases.
[native-inputs]: Update imgui source to latest. Add xorg-server-for-tests.

Change-Id: Iabe6bb580106158976e7193bbb27d59df2466e29
---

(no changes since v1)

gnu/packages/graphics.scm | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)

Toggle diff (70 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 0e13208d80..7659bec27d 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -21,7 +21,7 @@
;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
-;;; Copyright © 2020, 2021, 2022, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020-2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com>
;;; Copyright © 2021 Antoine Côté <antoine.cote@posteo.net>
;;; Copyright © 2021 Andy Tai <atai@atai.org>
@@ -1176,7 +1176,7 @@ (define-public mangohud
(define-public ogre
(package
(name "ogre")
- (version "13.3.1")
+ (version "14.3.1")
(source
(origin
(method git-fetch)
@@ -1185,12 +1185,17 @@ (define-public ogre
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "157vpfzivg2wf349glyd0cpbyaw1j3fm4nggban70pghql3x48kb"))))
+ (base32 "0l5rlxk2jiz8sb5w4bd8xvyzrmwnas27sxzkar7xc5azs1x2vgxf"))))
(build-system cmake-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'do-not-attempt-building-gtest
+ (lambda _
+ (substitute* "Tests/CMakeLists.txt"
+ (("NOT EXISTS \\$\\{PROJECT_BINARY_DIR}/googletest-1.11.0")
+ "FALSE"))))
(add-before 'configure 'unpack-imgui
(lambda _
(copy-recursively #$(this-package-native-input "imgui-source")
@@ -1201,7 +1206,11 @@ (define-public ogre
;; it.
(lambda _
(substitute* "CMakeLists.txt"
- (("set\\(CMAKE_INSTALL_RPATH .*") "")))))
+ (("set\\(CMAKE_INSTALL_RPATH .*") ""))))
+ (add-before 'check 'run-x-server
+ (lambda _
+ (system "Xvfb &")
+ (setenv "DISPLAY" ":0"))))
#:configure-flags
#~(let ((runpath (string-join (list (string-append #$output "/lib")
(string-append #$output "/lib/OGRE"))
@@ -1215,10 +1224,11 @@ (define-public ogre
"-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE"))))
(native-inputs
`(("doxygen" ,doxygen)
- ("imgui-source" ,(package-source imgui-1.86))
+ ("imgui-source" ,(package-source imgui))
("googletest" ,googletest)
("pkg-config" ,pkg-config)
- ("python" ,python)))
+ ("python" ,python)
+ ("xorg-server-for-tests" ,xorg-server-for-tests)))
(inputs
(list freeimage
freetype
--
2.46.0
M
M
Maxim Cournoyer wrote on 29 Oct 02:40 +0100
[PATCH v2 4/5] gnu: ogre: Add support for Wayland, Vulkan and Bullet.
(address . 74075@debbugs.gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
41ab210b8582c7f709734d71fb30188ef120badb.1730166008.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

Toggle diff (101 lines)
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
L
L
Ludovic Courtès wrote 3 days ago
Re: [bug#74075] [PATCH 0/4] Update Ogre to 14.3.1.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 74075@debbugs.gnu.org)
87zflfqrat.fsf@gnu.org
Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (8 lines)
> Also enable extra features such as Wayland, Vulkan and Bullet.
>
> Maxim Cournoyer (4):
> gnu: imgui: Update to 1.91.4.
> gnu: ogre: Use gexps.
> gnu: ogre: Update to 14.3.1.
> gnu: ogre: Add support for Wayland, Vulkan and Bullet.

Hi! It looks like qa.guix didn’t pick it up but if you tested it, I
guess you can go ahead.

Ludo’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74075@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74075
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch