diff mbox series

[bug#67814,1/3] gnu: glad: Update to 2.0.4.

Message ID 2451c8b3511c2a3c20250fcfe690c59f7538e534.1702486251.git.zhengjunjie@iscas.ac.cn
State New
Headers show
Series gnu: mpv: Update to 0.37.0. | expand

Commit Message

Z572 Dec. 13, 2023, 4:57 p.m. UTC
* gnu/packages/gl.scm (glad): Update to 2.0.4.
[inputs]: Add python-jinja2.
[arguments]<#:phases>: Adjust install-cmakelists.txt phase.
(glad-0.1): Inherit above.
gnu/packages/electronics.scm (openboardview)
[native-inputs]: Use glad-0.1 replace glad.

Change-Id: I516d44dfc9272702c3ac31773df0b6c2d68ed99c
---
 gnu/packages/electronics.scm |  3 ++-
 gnu/packages/gl.scm          | 50 +++++++++++++++++++++++++++---------
 2 files changed, 40 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 7d0e58aeae..13f370c285 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -5,6 +5,7 @@ 
 ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -310,7 +311,7 @@  (define-public openboardview
     (native-inputs
      (list pkg-config
            python
-           glad
+           glad-0.1
            stb-image
            utf8-h))
     (inputs
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index c02a6f0a84..62e8efbb98 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -18,6 +18,7 @@ 
 ;;; Copyright © 2021, 2022, 2023 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -192,12 +193,9 @@  (define-public ftgl
 (define-public glad
   (package
     (name "glad")
-    (version "0.1.36")
+    (version "2.0.4")
     (source
      (origin
-       ;; We fetch the sources from the repository since the PyPI archive
-       ;; doesn't contain the CMakeLists.txt file which is useful for
-       ;; integration with other software, such as the openboardview package.
        (method git-fetch)
        (uri (git-reference
              (url "https://github.com/Dav1dde/glad")
@@ -205,22 +203,50 @@  (define-public glad
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0m55ya1zrmg6n2cljkajy80ilmi5sblln8742fm0k1sw9k7hzn8n"))))
+         "1pam6imhcmcyqrqi6wzzxprb23y8x6zdbvsjavnz26k72i9dbbja"))))
     (build-system python-build-system)
+    (inputs (list python-jinja2))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'install-cmakelists.txt
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (share (string-append out "/share/" ,name)))
-               (install-file "CMakeLists.txt" share)))))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'install-cmakelists.txt
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (let* ((out (assoc-ref outputs "out"))
+                          (share (string-append out "/share/" #$name)))
+                     (install-file "cmake/CMakeLists.txt" share)))))))
     (home-page "https://github.com/Dav1dde/glad")
     (synopsis "Multi-language GL/GLES/EGL/GLX/WGL loader generator")
     (description "Glad uses the official Khronos XML specifications to
 generate a GL/GLES/EGL/GLX/WGL loader tailored for specific requirements.")
     (license license:expat)))
 
+(define-public glad-0.1
+  (package
+    (inherit glad)
+    (name "glad")
+    (version "0.1.36")
+    (source
+     (origin
+       ;; We fetch the sources from the repository since the PyPI archive
+       ;; doesn't contain the CMakeLists.txt file which is useful for
+       ;; integration with other software, such as the openboardview package.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Dav1dde/glad")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0m55ya1zrmg6n2cljkajy80ilmi5sblln8742fm0k1sw9k7hzn8n"))))
+    (inputs (list))
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'install 'install-cmakelists.txt
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (share (string-append out "/share/" ,name)))
+                        (install-file "CMakeLists.txt" share)))))))))
+
 (define-public s2tc
   (package
     (name "s2tc")