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