1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
5 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages animation)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix git-download)
26 #:use-module (guix utils)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix build-system cmake)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system meson)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages algebra)
33 #:use-module (gnu packages assembly)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages boost)
36 #:use-module (gnu packages check)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages curl)
39 #:use-module (gnu packages dejagnu)
40 #:use-module (gnu packages fontutils)
41 #:use-module (gnu packages gettext)
42 #:use-module (gnu packages gl)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gnome)
45 #:use-module (gnu packages graphics)
46 #:use-module (gnu packages gtk)
47 #:use-module (gnu packages image)
48 #:use-module (gnu packages imagemagick)
49 #:use-module (gnu packages jemalloc)
50 #:use-module (gnu packages networking)
51 #:use-module (gnu packages pcre)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages pulseaudio)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages qt)
57 #:use-module (gnu packages sdl)
58 #:use-module (gnu packages tls)
59 #:use-module (gnu packages video)
60 #:use-module (gnu packages xiph))
62 (define-public rlottie
71 (url "https://github.com/Samsung/rlottie.git")
73 (string-append "v" version))))
75 (git-file-name name version))
77 (base32 "10bxr1zf9wxl55d4cw2j02r6sgqln7mbxplhhfvhw0z92fi40kr3"))))
78 (build-system meson-build-system)
85 `(("googletest" ,googletest)
86 ("pkg-config" ,pkg-config)))
87 (synopsis "Lottie Animation Library")
88 (description "Rlottie is a platform independent standalone c++ library for
89 rendering vector based animations and art in realtime.")
90 (home-page "https://github.com/Samsung/rlottie/")
91 (license license:expat)))
93 ;; ETL, synfig, and Synfig Studio are updated in tandem.
94 (define synfig-version "1.2.2")
99 (version synfig-version)
102 (uri (string-append "mirror://sourceforge/synfig/releases/"
103 version "/source/ETL-" version ".tar.gz"))
106 "12sd8pz8l5xcxcmapkvih3brihdhdb6xmxisr9a415lydid9rh8d"))))
107 (build-system gnu-build-system)
108 (home-page "https://www.synfig.org")
109 (synopsis "Extended C++ template library")
111 "ETL is a class and template library designed to add new datatypes and
112 functions which combine well with the existing types and functions from the
113 C++ @dfn{Standard Template Library} (STL).")
114 (license license:gpl3+)))
116 (define-public synfig
119 (version synfig-version)
122 (uri (string-append "mirror://sourceforge/synfig/releases/"
123 version "/source/synfig-" version
127 "1vy27kl68sbg41sfasa58k3p2nc1xfalvzk3k9gich9h90rpnpsz"))))
128 (build-system gnu-build-system)
131 ;; The Boost library path is taken from the value of BOOST_LDFLAGS.
132 (list (string-append "BOOST_LDFLAGS=-L"
133 (assoc-ref %build-inputs "boost")
136 (modify-phases %standard-phases
137 (add-after 'unpack 'fix-boost-build-error
138 ;; A chain of Boost headers leads to this error: "make_array" is
139 ;; not a member of "boost::serialization". This can be avoided by
140 ;; loading the "array_wrapper" header first.
142 (substitute* "src/synfig/valuenodes/valuenode_dynamic.cpp"
143 (("#include <boost/numeric/odeint/integrate/integrate.hpp>" match)
145 "#include <boost/serialization/array_wrapper.hpp>\n" match)))
147 (add-after 'unpack 'adapt-to-libxml++-changes
149 (substitute* "configure"
150 (("libxml\\+\\+-2\\.6") "libxml++-3.0"))
151 (substitute* (append (find-files "src/modules/" "\\.cpp$")
152 (find-files "src/synfig/" "\\.(cpp|h)$"))
153 (("add_child\\(") "add_child_element(")
154 (("get_child_text\\(") "get_first_child_text(")
155 (("set_child_text\\(") "set_first_child_text(")
156 (("remove_child\\(") "remove_node("))
157 (substitute* "src/modules/mod_svg/svg_parser.cpp"
158 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
164 ("libjpeg" ,libjpeg-turbo)
168 ;; synfig.pc lists the following as required: Magick++ freetype2
169 ;; fontconfig fftw OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0
170 ;; cairo pango pangocairo mlt++
175 ("fontconfig" ,fontconfig)
176 ("freetype" ,freetype)
178 ("imagemagick" ,imagemagick)
179 ("libxml++" ,libxml++)
180 ("libsigc++" ,libsigc++)
185 `(("intltool" ,intltool)
186 ("pkg-config" ,pkg-config)))
187 (home-page "https://www.synfig.org")
188 (synopsis "Vector-based 2D animation renderer")
190 "Synfig is a vector-based 2D animation package. It is designed to be
191 capable of producing feature-film quality animation. It eliminates the need
192 for tweening, preventing the need to hand-draw each frame.")
193 (license license:gpl3+)))
195 (define-public synfigstudio
197 (name "synfigstudio")
198 (version synfig-version)
201 (uri (string-append "mirror://sourceforge/synfig/releases/"
202 version "/source/synfigstudio-" version
206 "1ql92kh9z8w2j9yi3pr7hn7wh2r2j35xynwv9xlwyd7niackgykn"))
207 (modules '((guix build utils)))
210 (substitute* "src/synfigapp/pluginmanager.cpp"
211 (("xmlpp::Node\\* n =") "const xmlpp::Node* n =")
212 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
214 (build-system gnu-build-system)
217 (modify-phases %standard-phases
218 ;; This fixes the file chooser crash that happens with GTK 3.
219 (add-after 'install 'wrap-program
220 (lambda* (#:key inputs outputs #:allow-other-keys)
221 (let* ((out (assoc-ref outputs "out"))
222 (gtk (assoc-ref inputs "gtk+"))
223 (gtk-share (string-append gtk "/share")))
224 (wrap-program (string-append out "/bin/synfigstudio")
225 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))
230 ("libsigc++" ,libsigc++)
233 `(("pkg-config" ,pkg-config)
234 ("intltool" ,intltool)))
235 (home-page "https://www.synfig.org")
236 (synopsis "Vector-based 2D animation package (GUI)")
238 "Synfig is a vector-based 2D animation package. It is designed to
239 be capable of producing feature-film quality animation. It eliminates the
240 need for tweening, preventing the need to hand-draw each frame. This package
241 contains the graphical user interface for synfig.")
242 (license license:gpl3+)))
244 ;; This package provides a standalone (no browser plugin) version of Gnash.
246 ;; The last tagged release of Gnash was in 2013.
247 (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
251 (version (git-version "0.8.11" revision commit))
256 (url "https://git.savannah.gnu.org/git/gnash.git/")
258 (file-name (git-file-name name version))
259 (patches (search-patches "gnash-fix-giflib-version.patch"))
261 (base32 "0fh0bljn0i6ypyh6l99afi855p7ki7lm869nq1qj6k8hrrwhmfry"))))
262 (build-system gnu-build-system)
265 (list "--disable-static"
266 ;; Plugins are based on XULRunner and NPAPI only. Disable.
269 "--enable-media=ffmpeg"
270 (string-append "--with-boost-incl="
271 (assoc-ref %build-inputs "boost") "/include")
272 (string-append "--with-boost-lib="
273 (assoc-ref %build-inputs "boost") "/lib")
274 (string-append "--with-ffmpeg-incl="
275 (assoc-ref %build-inputs "ffmpeg")
276 "/include/libavcodec")
277 (string-append "--with-speex-incl="
278 (assoc-ref %build-inputs "speex") "/include")
279 (string-append "--with-jemalloc-incl="
280 (assoc-ref %build-inputs "jemalloc")
282 (string-append "--with-speex-lib="
283 (assoc-ref %build-inputs "speex") "/lib")
284 (string-append "--with-jpeg-incl="
285 (assoc-ref %build-inputs "libjpeg") "/include")
286 (string-append "--with-zlib-incl="
287 (assoc-ref %build-inputs "zlib") "/include")
288 (string-append "--with-png-incl="
289 (assoc-ref %build-inputs "libpng")
292 `(("autoconf" ,autoconf)
293 ("automake" ,automake)
294 ("dejagnu" ,dejagnu) ;for tests
295 ("gettext" ,gettext-minimal)
298 ("pkg-config" ,pkg-config)
299 ("python" ,python-wrapper)))
305 ("ffmpeg" ,ffmpeg-2.8)
306 ("freeglut" ,freeglut)
311 ("gtkglext" ,gtkglext)
312 ("jemalloc" ,jemalloc)
313 ("libjpeg" ,libjpeg-turbo)
316 ("pangox-compat" ,pangox-compat)
319 (synopsis "Flash movie player")
321 "Gnash is a Flash movie player. It supports SWF version v7 and some
322 of v8 and v9. It is possible to configure Gnash to use several different
323 audio or video backends, ensuring good performance.")
324 (home-page "https://www.gnu.org/software/gnash/")
325 (license license:gpl3+))))
327 ;; This package provides a standalone (no browser plugin) version of
329 (define-public lightspark
337 (url "https://github.com/lightspark/lightspark")
339 (file-name (git-file-name name version))
341 (base32 "17l5gzb7p8nivx1a2frca2jklcjdsk2qj4jniv3z8bh307ksz254"))))
342 (build-system cmake-build-system)
344 `(#:tests? #f ;requires Adobe Flex SDK, see README.tests
345 ;; Disable browser plugins because neither NPAPI nor PPAPI is
346 ;; supported in the browsers we have.
348 '("-DCOMPILE_NPAPI_PLUGIN=FALSE"
349 "-DCOMPILE_PPAPI_PLUGIN=FALSE")
351 (modify-phases %standard-phases
352 (add-after 'unpack 'prepare-build-environment
354 ;; Use relative etc path.
355 (substitute* "CMakeLists.txt" (("\\/etc") "etc"))))
357 (lambda* (#:key tests? #:allow-other-keys)
359 (invoke "./tests")))))))
361 `(("gettext" ,gettext-minimal)
362 ("glib:bin" ,glib "bin")
365 ("pkg-config" ,pkg-config)
366 ("python" ,python-wrapper)))
371 ("freeglut" ,freeglut)
376 ("libjpeg" ,libjpeg-turbo)
380 ("rtmpdump" ,rtmpdump)
382 ("sdl2-mixer" ,sdl2-mixer)
384 (home-page "https://lightspark.github.io/")
385 (synopsis "Flash player implementation")
387 "Lightspark is a Flash player implementation for playing files in the SWF
388 format. It supports SWF files written on all versions of the ActionScript
390 ;; NOTE: The bundled pugixml is a fork specific to Lightspark and
391 ;; incompatible with the one we have.
392 ;; FIXME: we also have jxrlib, but the build fails to find JXRMeta.h so we
393 ;; use the bundled one for now.
394 (license (list license:lgpl3+ ;lightspark
395 license:mpl2.0 ;avmplus
396 license:bsd-2 ;jxrlib
397 license:expat)))) ;pugixml, PerlinNoise
399 (define-public papagayo
400 (let ((commit "e143684b30e59fe4a554f965cb655d23cbe93ee7")
404 (version (string-append "2.0b1-" revision "." (string-take commit 9)))
408 (url "https://github.com/LostMoho/Papagayo")
410 (file-name (git-file-name name version))
413 "1p9gffjhbph34jhrvgpg93yha75bf88vkvlnk06x1r9601ph5321"))
414 (modules '((guix build utils)))
415 ;; Delete bundled libsndfile sources.
418 (delete-file-recursively "libsndfile_1.0.19")
419 (delete-file-recursively "libsndfile_1.0.25")
421 (build-system gnu-build-system)
424 (modify-phases %standard-phases
426 (lambda* (#:key inputs outputs #:allow-other-keys)
427 (let ((libsndfile (assoc-ref inputs "libsndfile")))
428 ;; Do not use bundled libsndfile sources
429 (substitute* "Papagayo.pro"
431 (string-append "\nINCLUDEPATH += " libsndfile
433 "\nLIBS +=" libsndfile
434 "/lib/libsndfile.so\n"
437 (string-append "DESTDIR="
438 (assoc-ref outputs "out")
440 ;; Ensure that all required Qt plugins are found at runtime.
441 (add-after 'install 'wrap-executable
442 (lambda* (#:key inputs outputs #:allow-other-keys)
443 (let* ((out (assoc-ref outputs "out"))
444 (qt '("qt" "qtmultimedia")))
445 (wrap-program (string-append out "/bin/Papagayo")
446 `("QT_PLUGIN_PATH" ":" prefix
447 ,(map (lambda (label)
448 (string-append (assoc-ref inputs label)
449 "/lib/qt5/plugins/"))
454 ("qtmultimedia" ,qtmultimedia)
455 ("libsndfile" ,libsndfile)))
457 `(("qttools" ,qttools)))
458 (home-page "https://www.lostmarble.com/papagayo/")
459 (synopsis "Lip-syncing for animations")
461 "Papagayo is a lip-syncing program designed to help you line up
462 phonemes with the actual recorded sound of actors speaking. Papagayo makes it
463 easy to lip sync animated characters by making the process very simple – just
464 type in the words being spoken, then drag the words on top of the sound’s
465 waveform until they line up with the proper sounds.")
466 (license license:gpl3+))))
468 (define-public pencil2d
475 (url "https://github.com/pencil2d/pencil")
476 (commit (string-append "v" version))))
477 (file-name (git-file-name name version))
480 "0b1nwiwyg01087q318vymg4si76dw41ykxbn2zwd6dqbxzbpr1dh"))))
481 (build-system gnu-build-system)
483 `(("qtbase" ,qtbase-5)
484 ("qtxmlpatterns" ,qtxmlpatterns)
485 ("qtmultimedia" ,qtmultimedia)
489 (modify-phases %standard-phases
491 (lambda* (#:key inputs outputs #:allow-other-keys)
492 (let ((out (assoc-ref outputs "out")))
493 (invoke "qmake" (string-append "PREFIX=" out)))))
494 (add-after 'install 'wrap-executable
495 (lambda* (#:key inputs outputs #:allow-other-keys)
496 (let ((out (assoc-ref outputs "out"))
497 (plugin-path (getenv "QT_PLUGIN_PATH")))
498 (wrap-program (string-append out "/bin/pencil2d")
499 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))
501 (home-page "https://www.pencil2d.org")
502 (synopsis "Make 2D hand-drawn animations")
504 "Pencil2D is an easy-to-use and intuitive animation and drawing tool. It
505 lets you create traditional hand-drawn animations (cartoons) using both bitmap
506 and vector graphics.")
507 (license license:gpl2)))