1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages animation)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix git-download)
25 #:use-module (guix utils)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages algebra)
30 #:use-module (gnu packages boost)
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages fontutils)
33 #:use-module (gnu packages glib)
34 #:use-module (gnu packages gnome)
35 #:use-module (gnu packages graphics)
36 #:use-module (gnu packages gtk)
37 #:use-module (gnu packages image)
38 #:use-module (gnu packages imagemagick)
39 #:use-module (gnu packages pkg-config)
40 #:use-module (gnu packages pulseaudio)
41 #:use-module (gnu packages qt)
42 #:use-module (gnu packages video))
44 ;; ETL, synfig, and Synfig Studio are updated in tandem.
45 (define synfig-version "1.2.2")
50 (version synfig-version)
53 (uri (string-append "mirror://sourceforge/synfig/releases/"
54 version "/source/ETL-" version ".tar.gz"))
57 "12sd8pz8l5xcxcmapkvih3brihdhdb6xmxisr9a415lydid9rh8d"))))
58 (build-system gnu-build-system)
59 (home-page "https://www.synfig.org")
60 (synopsis "Extended C++ template library")
62 "ETL is a class and template library designed to add new datatypes and
63 functions which combine well with the existing types and functions from the
64 C++ @dfn{Standard Template Library} (STL).")
65 (license license:gpl3+)))
70 (version synfig-version)
73 (uri (string-append "mirror://sourceforge/synfig/releases/"
74 version "/source/synfig-" version
78 "1vy27kl68sbg41sfasa58k3p2nc1xfalvzk3k9gich9h90rpnpsz"))))
79 (build-system gnu-build-system)
82 ;; The Boost library path is taken from the value of BOOST_LDFLAGS.
83 (list (string-append "BOOST_LDFLAGS=-L"
84 (assoc-ref %build-inputs "boost")
87 (modify-phases %standard-phases
88 (add-after 'unpack 'fix-boost-build-error
89 ;; A chain of Boost headers leads to this error: "make_array" is
90 ;; not a member of "boost::serialization". This can be avoided by
91 ;; loading the "array_wrapper" header first.
93 (substitute* "src/synfig/valuenodes/valuenode_dynamic.cpp"
94 (("#include <boost/numeric/odeint/integrate/integrate.hpp>" match)
96 "#include <boost/serialization/array_wrapper.hpp>\n" match)))
98 (add-after 'unpack 'adapt-to-libxml++-changes
100 (substitute* "configure"
101 (("libxml\\+\\+-2\\.6") "libxml++-3.0"))
102 (substitute* (append (find-files "src/modules/" "\\.cpp$")
103 (find-files "src/synfig/" "\\.(cpp|h)$"))
104 (("add_child\\(") "add_child_element(")
105 (("get_child_text\\(") "get_first_child_text(")
106 (("set_child_text\\(") "set_first_child_text(")
107 (("remove_child\\(") "remove_node("))
108 (substitute* "src/modules/mod_svg/svg_parser.cpp"
109 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
119 ;; synfig.pc lists the following as required: Magick++ freetype2
120 ;; fontconfig fftw OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0
121 ;; cairo pango pangocairo mlt++
126 ("fontconfig" ,fontconfig)
127 ("freetype" ,freetype)
129 ("imagemagick" ,imagemagick)
130 ("libxml++" ,libxml++)
131 ("libsigc++" ,libsigc++)
136 `(("intltool" ,intltool)
137 ("pkg-config" ,pkg-config)))
138 (home-page "https://www.synfig.org")
139 (synopsis "Vector-based 2D animation renderer")
141 "Synfig is a vector-based 2D animation package. It is designed to be
142 capable of producing feature-film quality animation. It eliminates the need
143 for tweening, preventing the need to hand-draw each frame.")
144 (license license:gpl3+)))
146 (define-public synfigstudio
148 (name "synfigstudio")
149 (version synfig-version)
152 (uri (string-append "mirror://sourceforge/synfig/releases/"
153 version "/source/synfigstudio-" version
157 "1ql92kh9z8w2j9yi3pr7hn7wh2r2j35xynwv9xlwyd7niackgykn"))
158 (modules '((guix build utils)))
161 (substitute* "src/synfigapp/pluginmanager.cpp"
162 (("xmlpp::Node\\* n =") "const xmlpp::Node* n =")
163 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
165 (build-system gnu-build-system)
168 (modify-phases %standard-phases
169 ;; This fixes the file chooser crash that happens with GTK 3.
170 (add-after 'install 'wrap-program
171 (lambda* (#:key inputs outputs #:allow-other-keys)
172 (let* ((out (assoc-ref outputs "out"))
173 (gtk (assoc-ref inputs "gtk+"))
174 (gtk-share (string-append gtk "/share")))
175 (wrap-program (string-append out "/bin/synfigstudio")
176 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))
181 ("libsigc++" ,libsigc++)
184 `(("pkg-config" ,pkg-config)
185 ("intltool" ,intltool)))
186 (home-page "https://www.synfig.org")
187 (synopsis "Vector-based 2D animation package (GUI)")
189 "Synfig is a vector-based 2D animation package. It is designed to
190 be capable of producing feature-film quality animation. It eliminates the
191 need for tweening, preventing the need to hand-draw each frame. This package
192 contains the graphical user interface for synfig.")
193 (license license:gpl3+)))
195 (define-public papagayo
196 (let ((commit "e143684b30e59fe4a554f965cb655d23cbe93ee7")
200 (version (string-append "2.0b1-" revision "." (string-take commit 9)))
204 (url "https://github.com/LostMoho/Papagayo.git")
206 (file-name (git-file-name name version))
209 "1p9gffjhbph34jhrvgpg93yha75bf88vkvlnk06x1r9601ph5321"))
210 (modules '((guix build utils)))
211 ;; Delete bundled libsndfile sources.
214 (delete-file-recursively "libsndfile_1.0.19")
215 (delete-file-recursively "libsndfile_1.0.25")
217 (build-system gnu-build-system)
220 (modify-phases %standard-phases
222 (lambda* (#:key inputs outputs #:allow-other-keys)
223 (let ((libsndfile (assoc-ref inputs "libsndfile")))
224 ;; Do not use bundled libsndfile sources
225 (substitute* "Papagayo.pro"
227 (string-append "\nINCLUDEPATH += " libsndfile
229 "\nLIBS +=" libsndfile
230 "/lib/libsndfile.so\n"
233 (string-append "DESTDIR="
234 (assoc-ref outputs "out")
236 ;; Ensure that all required Qt plugins are found at runtime.
237 (add-after 'install 'wrap-executable
238 (lambda* (#:key inputs outputs #:allow-other-keys)
239 (let* ((out (assoc-ref outputs "out"))
240 (qt '("qt" "qtmultimedia")))
241 (wrap-program (string-append out "/bin/Papagayo")
242 `("QT_PLUGIN_PATH" ":" prefix
243 ,(map (lambda (label)
244 (string-append (assoc-ref inputs label)
245 "/lib/qt5/plugins/"))
250 ("qtmultimedia" ,qtmultimedia)
251 ("libsndfile" ,libsndfile)))
253 `(("qttools" ,qttools)))
254 (home-page "https://www.lostmarble.com/papagayo/")
255 (synopsis "Lip-syncing for animations")
257 "Papagayo is a lip-syncing program designed to help you line up
258 phonemes with the actual recorded sound of actors speaking. Papagayo makes it
259 easy to lip sync animated characters by making the process very simple – just
260 type in the words being spoken, then drag the words on top of the sound’s
261 waveform until they line up with the proper sounds.")
262 (license license:gpl3+))))
264 (define-public pencil2d
271 (url "https://github.com/pencil2d/pencil")
272 (commit (string-append "v" version))))
273 (file-name (git-file-name name version))
276 "0zi8x0w8n817zds2lyw9l8j33c03kiybkrcyy3s5fg66mchmrwnr"))))
277 (build-system gnu-build-system)
280 ("qtxmlpatterns" ,qtxmlpatterns)
281 ("qtmultimedia" ,qtmultimedia)
285 (modify-phases %standard-phases
287 (lambda* (#:key inputs outputs #:allow-other-keys)
288 (let ((out (assoc-ref outputs "out")))
289 (invoke "qmake" (string-append "PREFIX=" out)))))
290 (add-after 'install 'wrap-executable
291 (lambda* (#:key inputs outputs #:allow-other-keys)
292 (let ((out (assoc-ref outputs "out"))
293 (plugin-path (getenv "QT_PLUGIN_PATH")))
294 (wrap-program (string-append out "/bin/pencil2d")
295 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))
297 (home-page "https://www.pencil2d.org")
298 (synopsis "Make 2D hand-drawn animations")
300 "Pencil2D is an easy-to-use and intuitive animation and drawing tool. It
301 lets you create traditional hand-drawn animations (cartoons) using both bitmap
302 and vector graphics.")
303 (license license:gpl2)))