1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages animation)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix git-download)
24 #:use-module (guix utils)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages algebra)
29 #:use-module (gnu packages boost)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages fontutils)
32 #:use-module (gnu packages glib)
33 #:use-module (gnu packages gnome)
34 #:use-module (gnu packages graphics)
35 #:use-module (gnu packages gtk)
36 #:use-module (gnu packages image)
37 #:use-module (gnu packages imagemagick)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages pulseaudio)
40 #:use-module (gnu packages qt)
41 #:use-module (gnu packages video))
49 ;; Keep this synchronized with the synfig release version.
50 (uri (string-append "mirror://sourceforge/synfig/releases/"
51 "1.2.0/source/ETL-" version ".tar.gz"))
54 "0ii73nsd3xzkhz6w1rnxwphl637j9w82xiy6apa9vin2isdynnmc"))))
55 (build-system gnu-build-system)
56 (home-page "https://www.synfig.org")
57 (synopsis "Extended C++ template library")
59 "ETL is a class and template library designed to add new datatypes and
60 functions which combine well with the existing types and functions from the
61 C++ @dfn{Standard Template Library} (STL).")
62 (license license:gpl3+)))
70 (uri (string-append "mirror://sourceforge/synfig/releases/"
71 version "/source/synfig-" version
75 "1gqx4gn4c73rqwhsgzx0a460gr9hadmi28csp75rx30qavqsj7k1"))))
76 (build-system gnu-build-system)
79 ;; The Boost library path is taken from the value of BOOST_LDFLAGS.
80 (list (string-append "BOOST_LDFLAGS=-L"
81 (assoc-ref %build-inputs "boost")
84 (modify-phases %standard-phases
85 (add-after 'unpack 'fix-boost-build-error
86 ;; A chain of Boost headers leads to this error: "make_array" is
87 ;; not a member of "boost::serialization". This can be avoided by
88 ;; loading the "array_wrapper" header first.
90 (substitute* "src/synfig/valuenodes/valuenode_dynamic.cpp"
91 (("#include <boost/numeric/odeint/integrate/integrate.hpp>" match)
93 "#include <boost/serialization/array_wrapper.hpp>\n" match)))
95 (add-after 'unpack 'adapt-to-libxml++-changes
97 (substitute* "configure"
98 (("libxml\\+\\+-2\\.6") "libxml++-3.0"))
99 (substitute* (append (find-files "src/modules/" "\\.cpp$")
100 (find-files "src/synfig/" "\\.(cpp|h)$"))
101 (("add_child\\(") "add_child_element(")
102 (("get_child_text\\(") "get_first_child_text(")
103 (("set_child_text\\(") "set_first_child_text(")
104 (("remove_child\\(") "remove_node("))
105 (substitute* "src/modules/mod_svg/svg_parser.cpp"
106 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
116 ;; synfig.pc lists the following as required: Magick++ freetype2
117 ;; fontconfig fftw OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0
118 ;; cairo pango pangocairo mlt++
123 ("fontconfig" ,fontconfig)
124 ("freetype" ,freetype)
126 ("imagemagick" ,imagemagick)
127 ("libxml++" ,libxml++)
128 ("libsigc++" ,libsigc++)
133 `(("pkg-config" ,pkg-config)))
134 (home-page "https://www.synfig.org")
135 (synopsis "Vector-based 2D animation renderer")
137 "Synfig is a vector-based 2D animation package. It is designed to be
138 capable of producing feature-film quality animation. It eliminates the need
139 for tweening, preventing the need to hand-draw each frame.")
140 (license license:gpl3+)))
142 (define-public synfigstudio
144 (name "synfigstudio")
148 (uri (string-append "mirror://sourceforge/synfig/releases/"
149 version "/source/synfigstudio-" version
153 "0fbckfbw8dzf0m2wv7vlmw492k1dqa3zf510z019d0as3zpnp6qm"))
154 (modules '((guix build utils)))
157 (substitute* "src/synfigapp/pluginmanager.cpp"
158 (("xmlpp::Node\\* n =") "const xmlpp::Node* n =")
159 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
162 (search-patches "synfigstudio-fix-ui-with-gtk3.patch"))))
163 (build-system gnu-build-system)
166 (modify-phases %standard-phases
167 ;; This fixes the file chooser crash that happens with GTK 3.
168 (add-after 'install 'wrap-program
169 (lambda* (#:key inputs outputs #:allow-other-keys)
170 (let* ((out (assoc-ref outputs "out"))
171 (gtk (assoc-ref inputs "gtk+"))
172 (gtk-share (string-append gtk "/share")))
173 (wrap-program (string-append out "/bin/synfigstudio")
174 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))
179 ("libsigc++" ,libsigc++)
182 `(("pkg-config" ,pkg-config)
183 ("intltool" ,intltool)))
184 (home-page "https://www.synfig.org")
185 (synopsis "Vector-based 2D animation package (GUI)")
187 "Synfig is a vector-based 2D animation package. It is designed to
188 be capable of producing feature-film quality animation. It eliminates the
189 need for tweening, preventing the need to hand-draw each frame. This package
190 contains the graphical user interface for synfig.")
191 (license license:gpl3+)))
193 (define-public papagayo
194 (let ((commit "e143684b30e59fe4a554f965cb655d23cbe93ee7")
198 (version (string-append "2.0b1-" revision "." (string-take commit 9)))
202 (url "https://github.com/LostMoho/Papagayo.git")
204 (file-name (git-file-name name version))
207 "1p9gffjhbph34jhrvgpg93yha75bf88vkvlnk06x1r9601ph5321"))
208 (modules '((guix build utils)))
209 ;; Delete bundled libsndfile sources.
212 (delete-file-recursively "libsndfile_1.0.19")
213 (delete-file-recursively "libsndfile_1.0.25")
215 (build-system gnu-build-system)
218 (modify-phases %standard-phases
220 (lambda* (#:key inputs outputs #:allow-other-keys)
221 (let ((libsndfile (assoc-ref inputs "libsndfile")))
222 ;; Do not use bundled libsndfile sources
223 (substitute* "Papagayo.pro"
225 (string-append "\nINCLUDEPATH += " libsndfile
227 "\nLIBS +=" libsndfile
228 "/lib/libsndfile.so\n"
231 (string-append "DESTDIR="
232 (assoc-ref outputs "out")
234 ;; Ensure that all required Qt plugins are found at runtime.
235 (add-after 'install 'wrap-executable
236 (lambda* (#:key inputs outputs #:allow-other-keys)
237 (let* ((out (assoc-ref outputs "out"))
238 (qt '("qt" "qtmultimedia")))
239 (wrap-program (string-append out "/bin/Papagayo")
240 `("QT_PLUGIN_PATH" ":" prefix
241 ,(map (lambda (label)
242 (string-append (assoc-ref inputs label)
243 "/lib/qt5/plugins/"))
248 ("qtmultimedia" ,qtmultimedia)
249 ("libsndfile" ,libsndfile)))
251 `(("qttools" ,qttools)))
252 (home-page "https://www.lostmarble.com/papagayo/")
253 (synopsis "Lip-syncing for animations")
255 "Papagayo is a lip-syncing program designed to help you line up
256 phonemes with the actual recorded sound of actors speaking. Papagayo makes it
257 easy to lip sync animated characters by making the process very simple – just
258 type in the words being spoken, then drag the words on top of the sound’s
259 waveform until they line up with the proper sounds.")
260 (license license:gpl3+))))