Subject: [PATCH v2] gnu: Add glaxnimate.

From: Vinicius Monego <[email-masked]>
Date: Sun, 19 May 2024 20:59:29 +0000

* gnu/packages/animation.scm (glaxnimate): New variable.

Change-Id: Ic5ac72c1b5f2296d45e49684c4fe5979ea48c2ff
---
Updating this old issue.

 gnu/packages/animation.scm | 65 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 64 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm
index 3bcf1cc8f0..e7689bf92f 100644
--- a/gnu/packages/animation.scm
+++ b/gnu/packages/animation.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2015, 2017, 2023 Ricardo Wurmus <[email-masked]>
 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2019 Pkill -9 <[email-masked]>
-;;; Copyright © 2020, 2021, 2022 Vinicius Monego <[email-masked]>
+;;; Copyright © 2020, 2021, 2022, 2024 Vinicius Monego <[email-masked]>
 ;;; Copyright © 2022 Tomasz Jeneralczyk <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -30,10 +30,12 @@ (define-module (gnu packages animation)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
+  #:use-module (guix build-system qt)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -49,6 +51,7 @@ (define-module (gnu packages animation)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages jemalloc)
+  #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages mp3)
   #:use-module (gnu packages networking)
   #:use-module (gnu packages pcre)
@@ -56,6 +59,7 @@ (define-module (gnu packages animation)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages tls)
@@ -356,6 +360,65 @@ (define-public lightspark
                    license:bsd-2 ;jxrlib
                    license:expat)))) ;pugixml, PerlinNoise
 
+(define-public glaxnimate
+  (package
+    (name "glaxnimate")
+    (version "0.5.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://invent.kde.org/graphics/glaxnimate.git/")
+                    (commit version)
+                    (recursive? #t)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0a42nxx7cpd902ssjc5d01d3svxc28wk0d1k9191rnsg0w4wk0gj"))
+              (modules '((guix build utils)))
+              ;; Some of the submodules are developed in-house.  Delete those
+              ;; that we have packaged.
+              ;; TODO: Try to unbundle pybind11.
+              (snippet '(begin
+                          (delete-file-recursively "data/icons/breeze-icons")
+                          (delete-file-recursively "external/potrace")))))
+    (build-system qt-build-system)
+    (arguments
+     (list
+      #:configure-flags #~(list "-DQT_VERSION_MAJOR=6")
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; Glaxnimate copies breeze icons from a submodule.  Use icons from
+          ;; our package instead.
+          (add-after 'unpack 'use-system-icons
+            (lambda _
+              (mkdir-p "data/icons/breeze-icons")
+              (symlink (string-append #$(this-package-input "breeze-icons")
+                                      "/share/icons/breeze")
+                       "data/icons/breeze-icons/icons")
+              (symlink (string-append #$(this-package-input "breeze-icons")
+                                      "/share/icons/breeze-dark")
+                       "data/icons/breeze-icons/icons-dark")))
+          ;; Must run 'make translations' before 'make install', see
+          ;; https://gitlab.com/mattbas/glaxnimate/-/issues/648
+          (add-before 'install 'make-translations
+            (lambda _
+              (invoke "make" "translations"))))))
+    (native-inputs (list qttools-5))
+    (inputs (list breeze-icons
+                  ffmpeg
+                  libarchive
+                  potrace
+                  python
+                  qtbase-5
+                  qtimageformats-5
+                  qtsvg-5
+                  zlib))
+    (home-page "https://glaxnimate.mattbas.org/")
+    (synopsis "Vector graphics animation program")
+    (description "Glaxnimate is a vector graphics animation program.")
+    (license license:gpl3+)))
+
 (define-public papagayo
   (let ((commit "e143684b30e59fe4a554f965cb655d23cbe93ee7")
         (revision "1"))

base-commit: 9d42741693c02396be54ccf548b4c36249e94ef2
prerequisite-patch-id: 773c85d1be2cd6c14792cefa3855e6c2f1962c73
prerequisite-patch-id: 40dee8ca9d21c3a433af58e9bf49422620721eb1
prerequisite-patch-id: da9af05380d56f1e7aab9c9ee3853d7361982d3c
prerequisite-patch-id: 86a8d9abf4ed3884ce07df56d07f3e3ccedc06d2
prerequisite-patch-id: 1b8c747f40718f0e8ef37fdc1a313aef4046e55c
prerequisite-patch-id: 93093b27f2fd6b8013058037757900f1a8843287
prerequisite-patch-id: 156543af099a1d1e046b7d63e36c7c2737206314
prerequisite-patch-id: d0806907cbc38fe932247bf01e3c53260c556329
prerequisite-patch-id: fc209edc8a8c3e12436441dc1715a97152e39549
prerequisite-patch-id: f00ba1e241d876a5ba137360a6cee679e0df4824
prerequisite-patch-id: 5ceb2fe63ad6f28cc91241bc7ac0259b63facdf0
prerequisite-patch-id: 628b8e654dda7d792c6354815fc38b5e3f18c17c
prerequisite-patch-id: 20932d01e4988a7f7992ad9678bdbe3e8a8bbcbd
prerequisite-patch-id: 9cb96d15b305f293019790c4511b415da7a3db39
prerequisite-patch-id: e8ccfa0a5343571af78ca212e1e95f780df5dec6
prerequisite-patch-id: 9efdc3f46da0450c5ee8cdb79c35b5bd78f5205a
prerequisite-patch-id: ac98e1a0cc0fb1dc3ecd1ac62d3eb2db13606b36
prerequisite-patch-id: 26236e3db525088e25d96a04d6c1a293ac0c6e53
prerequisite-patch-id: f1965b22b1426d5fc3161549cb6bd97386a262a6
prerequisite-patch-id: 6f20c439aa4f306a92a8f2854e880a52826b2e5c
prerequisite-patch-id: 1d2fb96cb99fa88bd1e32ceb5b76f7547fe59dd1
prerequisite-patch-id: e667db284a98d6455ef9983501d923693768e9d2
prerequisite-patch-id: d53e46b1acec4d1b8451aac2ee62d6552393bff7
-- 
2.39.2