gnu: icecat: Update to 78.10.0-guix0-preview1 [security fixes].
[jackhill/guix/guix.git] / gnu / packages / animation.scm
CommitLineData
c1fbc66a 1;;; GNU Guix --- Functional package management for GNU
21fea1d1 2;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
41b984cc 3;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
e5ad2cdf 4;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
c76d0201 5;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
c1fbc66a
RW
6;;;
7;;; This file is part of GNU Guix.
8;;;
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.
13;;;
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.
18;;;
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/>.
21
22(define-module (gnu packages animation)
23 #:use-module (guix packages)
24 #:use-module (guix download)
2809a355 25 #:use-module (guix git-download)
c1fbc66a
RW
26 #:use-module (guix utils)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix build-system gnu)
179e97d5 29 #:use-module (guix build-system meson)
7775a186 30 #:use-module (gnu packages)
21fea1d1 31 #:use-module (gnu packages algebra)
c76d0201 32 #:use-module (gnu packages autotools)
7775a186 33 #:use-module (gnu packages boost)
179e97d5 34 #:use-module (gnu packages check)
7775a186 35 #:use-module (gnu packages compression)
c76d0201
VM
36 #:use-module (gnu packages curl)
37 #:use-module (gnu packages dejagnu)
7775a186 38 #:use-module (gnu packages fontutils)
c76d0201
VM
39 #:use-module (gnu packages gettext)
40 #:use-module (gnu packages gl)
7775a186
RW
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)
c76d0201
VM
47 #:use-module (gnu packages jemalloc)
48 #:use-module (gnu packages perl)
7775a186 49 #:use-module (gnu packages pkg-config)
2809a355 50 #:use-module (gnu packages pulseaudio)
c76d0201 51 #:use-module (gnu packages python)
2809a355 52 #:use-module (gnu packages qt)
c76d0201
VM
53 #:use-module (gnu packages sdl)
54 #:use-module (gnu packages tls)
55 #:use-module (gnu packages video)
56 #:use-module (gnu packages xiph))
c1fbc66a 57
179e97d5
RG
58(define-public rlottie
59 (package
60 (name "rlottie")
61 (version "0.2")
62 (source
63 (origin
64 (method git-fetch)
65 (uri
66 (git-reference
67 (url "https://github.com/Samsung/rlottie.git")
68 (commit
69 (string-append "v" version))))
70 (file-name
71 (git-file-name name version))
72 (sha256
73 (base32 "10bxr1zf9wxl55d4cw2j02r6sgqln7mbxplhhfvhw0z92fi40kr3"))))
74 (build-system meson-build-system)
75 (arguments
76 `(#:configure-flags
77 (list
78 "-Dlog=true"
79 "-Dtest=true")))
80 (native-inputs
81 `(("googletest" ,googletest)
82 ("pkg-config" ,pkg-config)))
83 (synopsis "Lottie Animation Library")
84 (description "Rlottie is a platform independent standalone c++ library for
85rendering vector based animations and art in realtime.")
86 (home-page "https://github.com/Samsung/rlottie/")
87 (license license:expat)))
88
05f6b032
TGR
89;; ETL, synfig, and Synfig Studio are updated in tandem.
90(define synfig-version "1.2.2")
91
c1fbc66a
RW
92(define-public etl
93 (package
94 (name "etl")
05f6b032 95 (version synfig-version)
c1fbc66a
RW
96 (source (origin
97 (method url-fetch)
c1fbc66a 98 (uri (string-append "mirror://sourceforge/synfig/releases/"
36c8f1f1 99 version "/source/ETL-" version ".tar.gz"))
c1fbc66a
RW
100 (sha256
101 (base32
36c8f1f1 102 "12sd8pz8l5xcxcmapkvih3brihdhdb6xmxisr9a415lydid9rh8d"))))
c1fbc66a 103 (build-system gnu-build-system)
eeb8b0e6 104 (home-page "https://www.synfig.org")
c1fbc66a
RW
105 (synopsis "Extended C++ template library")
106 (description
107 "ETL is a class and template library designed to add new datatypes and
108functions which combine well with the existing types and functions from the
109C++ @dfn{Standard Template Library} (STL).")
110 (license license:gpl3+)))
111
7775a186
RW
112(define-public synfig
113 (package
114 (name "synfig")
05f6b032 115 (version synfig-version)
7775a186
RW
116 (source (origin
117 (method url-fetch)
118 (uri (string-append "mirror://sourceforge/synfig/releases/"
119 version "/source/synfig-" version
120 ".tar.gz"))
121 (sha256
122 (base32
05f6b032 123 "1vy27kl68sbg41sfasa58k3p2nc1xfalvzk3k9gich9h90rpnpsz"))))
7775a186
RW
124 (build-system gnu-build-system)
125 (arguments
126 `(#:configure-flags
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")
130 "/lib"))
131 #:phases
132 (modify-phases %standard-phases
d39238cf
RW
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.
137 (lambda _
138 (substitute* "src/synfig/valuenodes/valuenode_dynamic.cpp"
139 (("#include <boost/numeric/odeint/integrate/integrate.hpp>" match)
140 (string-append
141 "#include <boost/serialization/array_wrapper.hpp>\n" match)))
142 #t))
7775a186
RW
143 (add-after 'unpack 'adapt-to-libxml++-changes
144 (lambda _
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"))
7775a186
RW
155 #t)))))
156 (inputs
157 `(("boost" ,boost)
158 ("ffmpeg" ,ffmpeg)
159 ("libdv" ,libdv)
4bd428a7 160 ("libjpeg" ,libjpeg-turbo)
7775a186
RW
161 ("libpng" ,libpng)
162 ("libmng" ,libmng)
163 ("zlib" ,zlib)))
164 ;; synfig.pc lists the following as required: Magick++ freetype2
21fea1d1 165 ;; fontconfig fftw OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0
7775a186
RW
166 ;; cairo pango pangocairo mlt++
167 (propagated-inputs
168 `(("cairo" ,cairo)
169 ("etl" ,etl)
21fea1d1 170 ("fftw" ,fftw)
7775a186
RW
171 ("fontconfig" ,fontconfig)
172 ("freetype" ,freetype)
173 ("glibmm" ,glibmm)
174 ("imagemagick" ,imagemagick)
175 ("libxml++" ,libxml++)
176 ("libsigc++" ,libsigc++)
177 ("mlt" ,mlt)
178 ("openexr" ,openexr)
179 ("pango" ,pango)))
180 (native-inputs
05f6b032
TGR
181 `(("intltool" ,intltool)
182 ("pkg-config" ,pkg-config)))
eeb8b0e6 183 (home-page "https://www.synfig.org")
7775a186
RW
184 (synopsis "Vector-based 2D animation renderer")
185 (description
186 "Synfig is a vector-based 2D animation package. It is designed to be
187capable of producing feature-film quality animation. It eliminates the need
188for tweening, preventing the need to hand-draw each frame.")
189 (license license:gpl3+)))
56215e41
RW
190
191(define-public synfigstudio
192 (package
193 (name "synfigstudio")
05f6b032 194 (version synfig-version)
56215e41
RW
195 (source (origin
196 (method url-fetch)
197 (uri (string-append "mirror://sourceforge/synfig/releases/"
198 version "/source/synfigstudio-" version
199 ".tar.gz"))
200 (sha256
201 (base32
05f6b032 202 "1ql92kh9z8w2j9yi3pr7hn7wh2r2j35xynwv9xlwyd7niackgykn"))
56215e41
RW
203 (modules '((guix build utils)))
204 (snippet
205 '(begin
206 (substitute* "src/synfigapp/pluginmanager.cpp"
207 (("xmlpp::Node\\* n =") "const xmlpp::Node* n =")
208 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
05f6b032 209 #t))))
56215e41 210 (build-system gnu-build-system)
ae44ebb9
RW
211 (arguments
212 `(#:phases
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)))
222 #t))))))
56215e41
RW
223 (inputs
224 `(("gtkmm" ,gtkmm)
ae44ebb9 225 ("gtk+" ,gtk+)
56215e41
RW
226 ("libsigc++" ,libsigc++)
227 ("synfig" ,synfig)))
228 (native-inputs
229 `(("pkg-config" ,pkg-config)
230 ("intltool" ,intltool)))
eeb8b0e6 231 (home-page "https://www.synfig.org")
56215e41
RW
232 (synopsis "Vector-based 2D animation package (GUI)")
233 (description
234 "Synfig is a vector-based 2D animation package. It is designed to
235be capable of producing feature-film quality animation. It eliminates the
236need for tweening, preventing the need to hand-draw each frame. This package
237contains the graphical user interface for synfig.")
238 (license license:gpl3+)))
2809a355 239
c76d0201
VM
240;; This package provides a standalone (no browser plugin) version of Gnash.
241(define-public gnash
242 ;; The last tagged release of Gnash was in 2013.
243 (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
244 (revision "0"))
245 (package
246 (name "gnash")
247 (version (git-version "0.8.11" revision commit))
248 (source
249 (origin
250 (method git-fetch)
251 (uri (git-reference
252 (url "https://git.savannah.gnu.org/git/gnash.git/")
253 (commit commit)))
254 (file-name (git-file-name name version))
255 (patches (search-patches "gnash-fix-giflib-version.patch"))
256 (sha256
257 (base32 "0fh0bljn0i6ypyh6l99afi855p7ki7lm869nq1qj6k8hrrwhmfry"))))
258 (build-system gnu-build-system)
259 (arguments
260 `(#:configure-flags
261 (list "--disable-static"
262 ;; Plugins are based on XULRunner and NPAPI only. Disable.
263 "--disable-plugins"
264 "--enable-gui=gtk"
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")
277 "/include/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")
286 "/include"))))
287 (native-inputs
288 `(("autoconf" ,autoconf)
289 ("automake" ,automake)
290 ("dejagnu" ,dejagnu) ;for tests
291 ("gettext" ,gettext-minimal)
292 ("libtool" ,libtool)
293 ("perl" ,perl)
294 ("pkg-config" ,pkg-config)
295 ("python" ,python-wrapper)))
296 (inputs
297 `(("agg" ,agg)
298 ("atk" ,atk)
299 ("boost" ,boost)
300 ("curl" ,curl)
301 ("ffmpeg" ,ffmpeg-2.8)
302 ("freeglut" ,freeglut)
303 ("gconf" ,gconf)
304 ("giflib" ,giflib)
305 ("glib" ,glib)
306 ("gtk+" ,gtk+-2)
307 ("gtkglext" ,gtkglext)
308 ("jemalloc" ,jemalloc)
309 ("libjpeg" ,libjpeg-turbo)
310 ("libltdl" ,libltdl)
311 ("libpng" ,libpng)
312 ("pangox-compat" ,pangox-compat)
313 ("sdl" ,sdl)
314 ("speex" ,speex)))
315 (synopsis "Flash movie player")
316 (description
317 "Gnash is a Flash movie player. It supports SWF version v7 and some
318of v8 and v9. It is possible to configure Gnash to use several different
319audio or video backends, ensuring good performance.")
320 (home-page "https://www.gnu.org/software/gnash/")
321 (license license:gpl3+))))
322
2809a355
RW
323(define-public papagayo
324 (let ((commit "e143684b30e59fe4a554f965cb655d23cbe93ee7")
325 (revision "1"))
326 (package
327 (name "papagayo")
328 (version (string-append "2.0b1-" revision "." (string-take commit 9)))
329 (source (origin
330 (method git-fetch)
331 (uri (git-reference
b0e7b699 332 (url "https://github.com/LostMoho/Papagayo")
2809a355 333 (commit commit)))
a18ee793 334 (file-name (git-file-name name version))
2809a355
RW
335 (sha256
336 (base32
337 "1p9gffjhbph34jhrvgpg93yha75bf88vkvlnk06x1r9601ph5321"))
338 (modules '((guix build utils)))
339 ;; Delete bundled libsndfile sources.
340 (snippet
341 '(begin
342 (delete-file-recursively "libsndfile_1.0.19")
343 (delete-file-recursively "libsndfile_1.0.25")
344 #t))))
345 (build-system gnu-build-system)
346 (arguments
347 `(#:phases
348 (modify-phases %standard-phases
349 (replace 'configure
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"
354 (("else \\{")
355 (string-append "\nINCLUDEPATH += " libsndfile
356 "/include"
357 "\nLIBS +=" libsndfile
358 "/lib/libsndfile.so\n"
359 "win32 {"))))
6023fa36
TGR
360 (invoke "qmake"
361 (string-append "DESTDIR="
362 (assoc-ref outputs "out")
363 "/bin"))))
2809a355
RW
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/"))
374 qt)))
375 #t))))))
376 (inputs
377 `(("qt" ,qtbase)
378 ("qtmultimedia" ,qtmultimedia)
379 ("libsndfile" ,libsndfile)))
380 (native-inputs
381 `(("qttools" ,qttools)))
eeb8b0e6 382 (home-page "https://www.lostmarble.com/papagayo/")
2809a355
RW
383 (synopsis "Lip-syncing for animations")
384 (description
385 "Papagayo is a lip-syncing program designed to help you line up
386phonemes with the actual recorded sound of actors speaking. Papagayo makes it
387easy to lip sync animated characters by making the process very simple – just
388type in the words being spoken, then drag the words on top of the sound’s
389waveform until they line up with the proper sounds.")
390 (license license:gpl3+))))
e5ad2cdf
P
391
392(define-public pencil2d
393 (package
394 (name "pencil2d")
41b984cc 395 (version "0.6.6")
e5ad2cdf
P
396 (source (origin
397 (method git-fetch)
398 (uri (git-reference
399 (url "https://github.com/pencil2d/pencil")
400 (commit (string-append "v" version))))
401 (file-name (git-file-name name version))
402 (sha256
403 (base32
41b984cc 404 "0b1nwiwyg01087q318vymg4si76dw41ykxbn2zwd6dqbxzbpr1dh"))))
e5ad2cdf
P
405 (build-system gnu-build-system)
406 (inputs
407 `(("qtbase" ,qtbase)
408 ("qtxmlpatterns" ,qtxmlpatterns)
409 ("qtmultimedia" ,qtmultimedia)
410 ("qtsvg" ,qtsvg)))
411 (arguments
412 `(#:phases
413 (modify-phases %standard-phases
414 (replace 'configure
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)))
424 #t))))))
425 (home-page "https://www.pencil2d.org")
426 (synopsis "Make 2D hand-drawn animations")
427 (description
428 "Pencil2D is an easy-to-use and intuitive animation and drawing tool. It
429lets you create traditional hand-drawn animations (cartoons) using both bitmap
430and vector graphics.")
431 (license license:gpl2)))