gnu: Use HTTPS for drobilla.net URIs.
[jackhill/guix/guix.git] / gnu / packages / animation.scm
... / ...
CommitLineData
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
3;;;
4;;; This file is part of GNU Guix.
5;;;
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.
10;;;
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.
15;;;
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/>.
18
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))
41
42(define-public etl
43 (package
44 (name "etl")
45 (version "0.04.22")
46 (source (origin
47 (method url-fetch)
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"))
51 (sha256
52 (base32
53 "0ii73nsd3xzkhz6w1rnxwphl637j9w82xiy6apa9vin2isdynnmc"))))
54 (build-system gnu-build-system)
55 (home-page "http://www.synfig.org")
56 (synopsis "Extended C++ template library")
57 (description
58 "ETL is a class and template library designed to add new datatypes and
59functions which combine well with the existing types and functions from the
60C++ @dfn{Standard Template Library} (STL).")
61 (license license:gpl3+)))
62
63(define-public synfig
64 (package
65 (name "synfig")
66 (version "1.2.0")
67 (source (origin
68 (method url-fetch)
69 (uri (string-append "mirror://sourceforge/synfig/releases/"
70 version "/source/synfig-" version
71 ".tar.gz"))
72 (sha256
73 (base32
74 "1gqx4gn4c73rqwhsgzx0a460gr9hadmi28csp75rx30qavqsj7k1"))))
75 (build-system gnu-build-system)
76 (arguments
77 `(#:configure-flags
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")
81 "/lib"))
82 #:phases
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.
88 (lambda _
89 (substitute* "src/synfig/valuenodes/valuenode_dynamic.cpp"
90 (("#include <boost/numeric/odeint/integrate/integrate.hpp>" match)
91 (string-append
92 "#include <boost/serialization/array_wrapper.hpp>\n" match)))
93 #t))
94 (add-after 'unpack 'adapt-to-libxml++-changes
95 (lambda _
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"))
106 #t)))))
107 (inputs
108 `(("boost" ,boost)
109 ("ffmpeg" ,ffmpeg)
110 ("libdv" ,libdv)
111 ("libjpeg" ,libjpeg)
112 ("libpng" ,libpng)
113 ("libmng" ,libmng)
114 ("zlib" ,zlib)))
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++
118 (propagated-inputs
119 `(("cairo" ,cairo)
120 ("etl" ,etl)
121 ("fftw" ,fftw)
122 ("fontconfig" ,fontconfig)
123 ("freetype" ,freetype)
124 ("glibmm" ,glibmm)
125 ("imagemagick" ,imagemagick)
126 ("libxml++" ,libxml++)
127 ("libsigc++" ,libsigc++)
128 ("mlt" ,mlt)
129 ("openexr" ,openexr)
130 ("pango" ,pango)))
131 (native-inputs
132 `(("pkg-config" ,pkg-config)))
133 (home-page "http://www.synfig.org")
134 (synopsis "Vector-based 2D animation renderer")
135 (description
136 "Synfig is a vector-based 2D animation package. It is designed to be
137capable of producing feature-film quality animation. It eliminates the need
138for tweening, preventing the need to hand-draw each frame.")
139 (license license:gpl3+)))
140
141(define-public synfigstudio
142 (package
143 (name "synfigstudio")
144 (version "1.2.0")
145 (source (origin
146 (method url-fetch)
147 (uri (string-append "mirror://sourceforge/synfig/releases/"
148 version "/source/synfigstudio-" version
149 ".tar.gz"))
150 (sha256
151 (base32
152 "0fbckfbw8dzf0m2wv7vlmw492k1dqa3zf510z019d0as3zpnp6qm"))
153 (modules '((guix build utils)))
154 (snippet
155 '(begin
156 (substitute* "src/synfigapp/pluginmanager.cpp"
157 (("xmlpp::Node\\* n =") "const xmlpp::Node* n =")
158 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
159 #t))
160 (patches
161 (search-patches "synfigstudio-fix-ui-with-gtk3.patch"))))
162 (build-system gnu-build-system)
163 (arguments
164 `(#:phases
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)))
174 #t))))))
175 (inputs
176 `(("gtkmm" ,gtkmm)
177 ("gtk+" ,gtk+)
178 ("libsigc++" ,libsigc++)
179 ("synfig" ,synfig)))
180 (native-inputs
181 `(("pkg-config" ,pkg-config)
182 ("intltool" ,intltool)))
183 (home-page "http://www.synfig.org")
184 (synopsis "Vector-based 2D animation package (GUI)")
185 (description
186 "Synfig is a vector-based 2D animation package. It is designed to
187be capable of producing feature-film quality animation. It eliminates the
188need for tweening, preventing the need to hand-draw each frame. This package
189contains the graphical user interface for synfig.")
190 (license license:gpl3+)))
191
192(define-public papagayo
193 (let ((commit "e143684b30e59fe4a554f965cb655d23cbe93ee7")
194 (revision "1"))
195 (package
196 (name "papagayo")
197 (version (string-append "2.0b1-" revision "." (string-take commit 9)))
198 (source (origin
199 (method git-fetch)
200 (uri (git-reference
201 (url "https://github.com/LostMoho/Papagayo.git")
202 (commit commit)))
203 (file-name (git-file-name name version))
204 (sha256
205 (base32
206 "1p9gffjhbph34jhrvgpg93yha75bf88vkvlnk06x1r9601ph5321"))
207 (modules '((guix build utils)))
208 ;; Delete bundled libsndfile sources.
209 (snippet
210 '(begin
211 (delete-file-recursively "libsndfile_1.0.19")
212 (delete-file-recursively "libsndfile_1.0.25")
213 #t))))
214 (build-system gnu-build-system)
215 (arguments
216 `(#:phases
217 (modify-phases %standard-phases
218 (replace 'configure
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"
223 (("else \\{")
224 (string-append "\nINCLUDEPATH += " libsndfile
225 "/include"
226 "\nLIBS +=" libsndfile
227 "/lib/libsndfile.so\n"
228 "win32 {"))))
229 (zero? (system* "qmake"
230 (string-append "DESTDIR="
231 (assoc-ref outputs "out")
232 "/bin")))))
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/"))
243 qt)))
244 #t))))))
245 (inputs
246 `(("qt" ,qtbase)
247 ("qtmultimedia" ,qtmultimedia)
248 ("libsndfile" ,libsndfile)))
249 (native-inputs
250 `(("qttools" ,qttools)))
251 (home-page "http://www.lostmarble.com/papagayo/")
252 (synopsis "Lip-syncing for animations")
253 (description
254 "Papagayo is a lip-syncing program designed to help you line up
255phonemes with the actual recorded sound of actors speaking. Papagayo makes it
256easy to lip sync animated characters by making the process very simple – just
257type in the words being spoken, then drag the words on top of the sound’s
258waveform until they line up with the proper sounds.")
259 (license license:gpl3+))))