1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
5 ;;; Copyright © 2020 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 gnu)
29 #:use-module (guix build-system meson)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages algebra)
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages boost)
34 #:use-module (gnu packages check)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages curl)
37 #:use-module (gnu packages dejagnu)
38 #:use-module (gnu packages fontutils)
39 #:use-module (gnu packages gettext)
40 #:use-module (gnu packages gl)
41 #:use-module (gnu packages glib)
42 #:use-module (gnu packages gnome)
43 #:use-module (gnu packages graphics)
44 #:use-module (gnu packages gtk)
45 #:use-module (gnu packages image)
46 #:use-module (gnu packages imagemagick)
47 #:use-module (gnu packages jemalloc)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages pulseaudio)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages qt)
53 #:use-module (gnu packages sdl)
54 #:use-module (gnu packages tls)
55 #:use-module (gnu packages video)
56 #:use-module (gnu packages xiph))
58 (define-public rlottie
67 (url "https://github.com/Samsung/rlottie.git")
69 (string-append "v" version))))
71 (git-file-name name version))
73 (base32 "10bxr1zf9wxl55d4cw2j02r6sgqln7mbxplhhfvhw0z92fi40kr3"))))
74 (build-system meson-build-system)
81 `(("googletest" ,googletest)
82 ("pkg-config" ,pkg-config)))
83 (synopsis "Lottie Animation Library")
84 (description "Rlottie is a platform independent standalone c++ library for
85 rendering vector based animations and art in realtime.")
86 (home-page "https://github.com/Samsung/rlottie/")
87 (license license:expat)))
89 ;; ETL, synfig, and Synfig Studio are updated in tandem.
90 (define synfig-version "1.2.2")
95 (version synfig-version)
98 (uri (string-append "mirror://sourceforge/synfig/releases/"
99 version "/source/ETL-" version ".tar.gz"))
102 "12sd8pz8l5xcxcmapkvih3brihdhdb6xmxisr9a415lydid9rh8d"))))
103 (build-system gnu-build-system)
104 (home-page "https://www.synfig.org")
105 (synopsis "Extended C++ template library")
107 "ETL is a class and template library designed to add new datatypes and
108 functions which combine well with the existing types and functions from the
109 C++ @dfn{Standard Template Library} (STL).")
110 (license license:gpl3+)))
112 (define-public synfig
115 (version synfig-version)
118 (uri (string-append "mirror://sourceforge/synfig/releases/"
119 version "/source/synfig-" version
123 "1vy27kl68sbg41sfasa58k3p2nc1xfalvzk3k9gich9h90rpnpsz"))))
124 (build-system gnu-build-system)
127 ;; The Boost library path is taken from the value of BOOST_LDFLAGS.
128 (list (string-append "BOOST_LDFLAGS=-L"
129 (assoc-ref %build-inputs "boost")
132 (modify-phases %standard-phases
133 (add-after 'unpack 'fix-boost-build-error
134 ;; A chain of Boost headers leads to this error: "make_array" is
135 ;; not a member of "boost::serialization". This can be avoided by
136 ;; loading the "array_wrapper" header first.
138 (substitute* "src/synfig/valuenodes/valuenode_dynamic.cpp"
139 (("#include <boost/numeric/odeint/integrate/integrate.hpp>" match)
141 "#include <boost/serialization/array_wrapper.hpp>\n" match)))
143 (add-after 'unpack 'adapt-to-libxml++-changes
145 (substitute* "configure"
146 (("libxml\\+\\+-2\\.6") "libxml++-3.0"))
147 (substitute* (append (find-files "src/modules/" "\\.cpp$")
148 (find-files "src/synfig/" "\\.(cpp|h)$"))
149 (("add_child\\(") "add_child_element(")
150 (("get_child_text\\(") "get_first_child_text(")
151 (("set_child_text\\(") "set_first_child_text(")
152 (("remove_child\\(") "remove_node("))
153 (substitute* "src/modules/mod_svg/svg_parser.cpp"
154 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
160 ("libjpeg" ,libjpeg-turbo)
164 ;; synfig.pc lists the following as required: Magick++ freetype2
165 ;; fontconfig fftw OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0
166 ;; cairo pango pangocairo mlt++
171 ("fontconfig" ,fontconfig)
172 ("freetype" ,freetype)
174 ("imagemagick" ,imagemagick)
175 ("libxml++" ,libxml++)
176 ("libsigc++" ,libsigc++)
181 `(("intltool" ,intltool)
182 ("pkg-config" ,pkg-config)))
183 (home-page "https://www.synfig.org")
184 (synopsis "Vector-based 2D animation renderer")
186 "Synfig is a vector-based 2D animation package. It is designed to be
187 capable of producing feature-film quality animation. It eliminates the need
188 for tweening, preventing the need to hand-draw each frame.")
189 (license license:gpl3+)))
191 (define-public synfigstudio
193 (name "synfigstudio")
194 (version synfig-version)
197 (uri (string-append "mirror://sourceforge/synfig/releases/"
198 version "/source/synfigstudio-" version
202 "1ql92kh9z8w2j9yi3pr7hn7wh2r2j35xynwv9xlwyd7niackgykn"))
203 (modules '((guix build utils)))
206 (substitute* "src/synfigapp/pluginmanager.cpp"
207 (("xmlpp::Node\\* n =") "const xmlpp::Node* n =")
208 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
210 (build-system gnu-build-system)
213 (modify-phases %standard-phases
214 ;; This fixes the file chooser crash that happens with GTK 3.
215 (add-after 'install 'wrap-program
216 (lambda* (#:key inputs outputs #:allow-other-keys)
217 (let* ((out (assoc-ref outputs "out"))
218 (gtk (assoc-ref inputs "gtk+"))
219 (gtk-share (string-append gtk "/share")))
220 (wrap-program (string-append out "/bin/synfigstudio")
221 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))
226 ("libsigc++" ,libsigc++)
229 `(("pkg-config" ,pkg-config)
230 ("intltool" ,intltool)))
231 (home-page "https://www.synfig.org")
232 (synopsis "Vector-based 2D animation package (GUI)")
234 "Synfig is a vector-based 2D animation package. It is designed to
235 be capable of producing feature-film quality animation. It eliminates the
236 need for tweening, preventing the need to hand-draw each frame. This package
237 contains the graphical user interface for synfig.")
238 (license license:gpl3+)))
240 ;; This package provides a standalone (no browser plugin) version of Gnash.
242 ;; The last tagged release of Gnash was in 2013.
243 (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
247 (version (git-version "0.8.11" revision commit))
252 (url "https://git.savannah.gnu.org/git/gnash.git/")
254 (file-name (git-file-name name version))
255 (patches (search-patches "gnash-fix-giflib-version.patch"))
257 (base32 "0fh0bljn0i6ypyh6l99afi855p7ki7lm869nq1qj6k8hrrwhmfry"))))
258 (build-system gnu-build-system)
261 (list "--disable-static"
262 ;; Plugins are based on XULRunner and NPAPI only. Disable.
265 "--enable-media=ffmpeg"
266 (string-append "--with-boost-incl="
267 (assoc-ref %build-inputs "boost") "/include")
268 (string-append "--with-boost-lib="
269 (assoc-ref %build-inputs "boost") "/lib")
270 (string-append "--with-ffmpeg-incl="
271 (assoc-ref %build-inputs "ffmpeg")
272 "/include/libavcodec")
273 (string-append "--with-speex-incl="
274 (assoc-ref %build-inputs "speex") "/include")
275 (string-append "--with-jemalloc-incl="
276 (assoc-ref %build-inputs "jemalloc")
278 (string-append "--with-speex-lib="
279 (assoc-ref %build-inputs "speex") "/lib")
280 (string-append "--with-jpeg-incl="
281 (assoc-ref %build-inputs "libjpeg") "/include")
282 (string-append "--with-zlib-incl="
283 (assoc-ref %build-inputs "zlib") "/include")
284 (string-append "--with-png-incl="
285 (assoc-ref %build-inputs "libpng")
288 `(("autoconf" ,autoconf)
289 ("automake" ,automake)
290 ("dejagnu" ,dejagnu) ;for tests
291 ("gettext" ,gettext-minimal)
294 ("pkg-config" ,pkg-config)
295 ("python" ,python-wrapper)))
301 ("ffmpeg" ,ffmpeg-2.8)
302 ("freeglut" ,freeglut)
307 ("gtkglext" ,gtkglext)
308 ("jemalloc" ,jemalloc)
309 ("libjpeg" ,libjpeg-turbo)
312 ("pangox-compat" ,pangox-compat)
315 (synopsis "Flash movie player")
317 "Gnash is a Flash movie player. It supports SWF version v7 and some
318 of v8 and v9. It is possible to configure Gnash to use several different
319 audio or video backends, ensuring good performance.")
320 (home-page "https://www.gnu.org/software/gnash/")
321 (license license:gpl3+))))
323 (define-public papagayo
324 (let ((commit "e143684b30e59fe4a554f965cb655d23cbe93ee7")
328 (version (string-append "2.0b1-" revision "." (string-take commit 9)))
332 (url "https://github.com/LostMoho/Papagayo")
334 (file-name (git-file-name name version))
337 "1p9gffjhbph34jhrvgpg93yha75bf88vkvlnk06x1r9601ph5321"))
338 (modules '((guix build utils)))
339 ;; Delete bundled libsndfile sources.
342 (delete-file-recursively "libsndfile_1.0.19")
343 (delete-file-recursively "libsndfile_1.0.25")
345 (build-system gnu-build-system)
348 (modify-phases %standard-phases
350 (lambda* (#:key inputs outputs #:allow-other-keys)
351 (let ((libsndfile (assoc-ref inputs "libsndfile")))
352 ;; Do not use bundled libsndfile sources
353 (substitute* "Papagayo.pro"
355 (string-append "\nINCLUDEPATH += " libsndfile
357 "\nLIBS +=" libsndfile
358 "/lib/libsndfile.so\n"
361 (string-append "DESTDIR="
362 (assoc-ref outputs "out")
364 ;; Ensure that all required Qt plugins are found at runtime.
365 (add-after 'install 'wrap-executable
366 (lambda* (#:key inputs outputs #:allow-other-keys)
367 (let* ((out (assoc-ref outputs "out"))
368 (qt '("qt" "qtmultimedia")))
369 (wrap-program (string-append out "/bin/Papagayo")
370 `("QT_PLUGIN_PATH" ":" prefix
371 ,(map (lambda (label)
372 (string-append (assoc-ref inputs label)
373 "/lib/qt5/plugins/"))
378 ("qtmultimedia" ,qtmultimedia)
379 ("libsndfile" ,libsndfile)))
381 `(("qttools" ,qttools)))
382 (home-page "https://www.lostmarble.com/papagayo/")
383 (synopsis "Lip-syncing for animations")
385 "Papagayo is a lip-syncing program designed to help you line up
386 phonemes with the actual recorded sound of actors speaking. Papagayo makes it
387 easy to lip sync animated characters by making the process very simple – just
388 type in the words being spoken, then drag the words on top of the sound’s
389 waveform until they line up with the proper sounds.")
390 (license license:gpl3+))))
392 (define-public pencil2d
399 (url "https://github.com/pencil2d/pencil")
400 (commit (string-append "v" version))))
401 (file-name (git-file-name name version))
404 "06l60wawkhb3wrsj79p5f7ka5cgcyly36pbvm95fvwbkmlvmjzf1"))))
405 (build-system gnu-build-system)
408 ("qtxmlpatterns" ,qtxmlpatterns)
409 ("qtmultimedia" ,qtmultimedia)
413 (modify-phases %standard-phases
415 (lambda* (#:key inputs outputs #:allow-other-keys)
416 (let ((out (assoc-ref outputs "out")))
417 (invoke "qmake" (string-append "PREFIX=" out)))))
418 (add-after 'install 'wrap-executable
419 (lambda* (#:key inputs outputs #:allow-other-keys)
420 (let ((out (assoc-ref outputs "out"))
421 (plugin-path (getenv "QT_PLUGIN_PATH")))
422 (wrap-program (string-append out "/bin/pencil2d")
423 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))
425 (home-page "https://www.pencil2d.org")
426 (synopsis "Make 2D hand-drawn animations")
428 "Pencil2D is an easy-to-use and intuitive animation and drawing tool. It
429 lets you create traditional hand-drawn animations (cartoons) using both bitmap
430 and vector graphics.")
431 (license license:gpl2)))