From d4eeb30544c9681899b12fe27baf2ad5d20a4330 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Tue, 4 Jan 2022 16:48:39 -0500 Subject: [PATCH 3/4] gnu: dear-imgui: Update to 1.81, hide version 1.79. * gnu/packages/graphics.scm: Import (gnu packages game-development). (dear-imgui): Update to 1.81. [outputs]: Add static output. [phases]{unpack-debian-files}: Build the static library, remove references to non-existent stb library. {move-static-libraries}: New phase to install static libraries. [inputs]: Add allegro, freeglut, glew, glfw, mesa, sdl2, and vulkan-headers. (dear-imgui-1.79): New variable. Hidden package of the previous version of dear-imgui. (ogre)[native-inputs]: Use it. --- gnu/packages/graphics.scm | 122 ++++++++++++++++++++++++++++++++++---- 1 file changed, 110 insertions(+), 12 deletions(-) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index fe35aaad2d..438a01ba72 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -27,6 +27,7 @@ ;;; Copyright © 2021 Andy Tai ;;; Copyright © 2021 Ekaitz Zarraga ;;; Copyright © 2021 Vinicius Monego +;;; Copyright © 2022 John Kehayias ;;; ;;; This file is part of GNU Guix. ;;; @@ -62,6 +63,7 @@ (define-module (gnu packages graphics) #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) + #:use-module (gnu packages game-development) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) @@ -867,10 +869,81 @@ (define-public pstoedit @end itemize") (license license:gpl2+))) +(define-public dear-imgui-1.79 + (hidden-package + (package + (name "dear-imgui-1.79") + (version "1.79") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ocornut/imgui") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0x26igynxp6rlpp2wfc5dr7x6yh583ajb7p23pgycn9vqikn318q")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "CC=" ,(cc-for-target)) + (string-append "PREFIX=" (assoc-ref %outputs "out")) + (string-append "VERSION=" ,version)) + #:tests? #f ; no test suite + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-debian-files + (lambda* (#:key inputs #:allow-other-keys) + (invoke "tar" "xvf" (assoc-ref inputs "debian-files")) + (apply invoke "patch" "-Np1" "-i" + (find-files "debian/patches" "\\.patch$")) + (substitute* "Makefile" + (("