Commit | Line | Data |
---|---|---|
c1fbc66a | 1 | ;;; GNU Guix --- Functional package management for GNU |
21fea1d1 | 2 | ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net> |
c21242d9 | 3 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
e5ad2cdf | 4 | ;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com> |
c1fbc66a RW |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
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. | |
12 | ;;; | |
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. | |
17 | ;;; | |
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/>. | |
20 | ||
21 | (define-module (gnu packages animation) | |
22 | #:use-module (guix packages) | |
23 | #:use-module (guix download) | |
2809a355 | 24 | #:use-module (guix git-download) |
c1fbc66a RW |
25 | #:use-module (guix utils) |
26 | #:use-module ((guix licenses) #:prefix license:) | |
27 | #:use-module (guix build-system gnu) | |
7775a186 | 28 | #:use-module (gnu packages) |
21fea1d1 | 29 | #:use-module (gnu packages algebra) |
7775a186 RW |
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) | |
2809a355 RW |
40 | #:use-module (gnu packages pulseaudio) |
41 | #:use-module (gnu packages qt) | |
7775a186 | 42 | #:use-module (gnu packages video)) |
c1fbc66a | 43 | |
05f6b032 TGR |
44 | ;; ETL, synfig, and Synfig Studio are updated in tandem. |
45 | (define synfig-version "1.2.2") | |
46 | ||
c1fbc66a RW |
47 | (define-public etl |
48 | (package | |
49 | (name "etl") | |
05f6b032 | 50 | (version synfig-version) |
c1fbc66a RW |
51 | (source (origin |
52 | (method url-fetch) | |
c1fbc66a | 53 | (uri (string-append "mirror://sourceforge/synfig/releases/" |
36c8f1f1 | 54 | version "/source/ETL-" version ".tar.gz")) |
c1fbc66a RW |
55 | (sha256 |
56 | (base32 | |
36c8f1f1 | 57 | "12sd8pz8l5xcxcmapkvih3brihdhdb6xmxisr9a415lydid9rh8d")))) |
c1fbc66a | 58 | (build-system gnu-build-system) |
eeb8b0e6 | 59 | (home-page "https://www.synfig.org") |
c1fbc66a RW |
60 | (synopsis "Extended C++ template library") |
61 | (description | |
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+))) | |
66 | ||
7775a186 RW |
67 | (define-public synfig |
68 | (package | |
69 | (name "synfig") | |
05f6b032 | 70 | (version synfig-version) |
7775a186 RW |
71 | (source (origin |
72 | (method url-fetch) | |
73 | (uri (string-append "mirror://sourceforge/synfig/releases/" | |
74 | version "/source/synfig-" version | |
75 | ".tar.gz")) | |
76 | (sha256 | |
77 | (base32 | |
05f6b032 | 78 | "1vy27kl68sbg41sfasa58k3p2nc1xfalvzk3k9gich9h90rpnpsz")))) |
7775a186 RW |
79 | (build-system gnu-build-system) |
80 | (arguments | |
81 | `(#:configure-flags | |
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") | |
85 | "/lib")) | |
86 | #:phases | |
87 | (modify-phases %standard-phases | |
d39238cf RW |
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. | |
92 | (lambda _ | |
93 | (substitute* "src/synfig/valuenodes/valuenode_dynamic.cpp" | |
94 | (("#include <boost/numeric/odeint/integrate/integrate.hpp>" match) | |
95 | (string-append | |
96 | "#include <boost/serialization/array_wrapper.hpp>\n" match))) | |
97 | #t)) | |
7775a186 RW |
98 | (add-after 'unpack 'adapt-to-libxml++-changes |
99 | (lambda _ | |
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")) | |
7775a186 RW |
110 | #t))))) |
111 | (inputs | |
112 | `(("boost" ,boost) | |
113 | ("ffmpeg" ,ffmpeg) | |
114 | ("libdv" ,libdv) | |
4bd428a7 | 115 | ("libjpeg" ,libjpeg-turbo) |
7775a186 RW |
116 | ("libpng" ,libpng) |
117 | ("libmng" ,libmng) | |
118 | ("zlib" ,zlib))) | |
119 | ;; synfig.pc lists the following as required: Magick++ freetype2 | |
21fea1d1 | 120 | ;; fontconfig fftw OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0 |
7775a186 RW |
121 | ;; cairo pango pangocairo mlt++ |
122 | (propagated-inputs | |
123 | `(("cairo" ,cairo) | |
124 | ("etl" ,etl) | |
21fea1d1 | 125 | ("fftw" ,fftw) |
7775a186 RW |
126 | ("fontconfig" ,fontconfig) |
127 | ("freetype" ,freetype) | |
128 | ("glibmm" ,glibmm) | |
129 | ("imagemagick" ,imagemagick) | |
130 | ("libxml++" ,libxml++) | |
131 | ("libsigc++" ,libsigc++) | |
132 | ("mlt" ,mlt) | |
133 | ("openexr" ,openexr) | |
134 | ("pango" ,pango))) | |
135 | (native-inputs | |
05f6b032 TGR |
136 | `(("intltool" ,intltool) |
137 | ("pkg-config" ,pkg-config))) | |
eeb8b0e6 | 138 | (home-page "https://www.synfig.org") |
7775a186 RW |
139 | (synopsis "Vector-based 2D animation renderer") |
140 | (description | |
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+))) | |
56215e41 RW |
145 | |
146 | (define-public synfigstudio | |
147 | (package | |
148 | (name "synfigstudio") | |
05f6b032 | 149 | (version synfig-version) |
56215e41 RW |
150 | (source (origin |
151 | (method url-fetch) | |
152 | (uri (string-append "mirror://sourceforge/synfig/releases/" | |
153 | version "/source/synfigstudio-" version | |
154 | ".tar.gz")) | |
155 | (sha256 | |
156 | (base32 | |
05f6b032 | 157 | "1ql92kh9z8w2j9yi3pr7hn7wh2r2j35xynwv9xlwyd7niackgykn")) |
56215e41 RW |
158 | (modules '((guix build utils))) |
159 | (snippet | |
160 | '(begin | |
161 | (substitute* "src/synfigapp/pluginmanager.cpp" | |
162 | (("xmlpp::Node\\* n =") "const xmlpp::Node* n =") | |
163 | (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList")) | |
05f6b032 | 164 | #t)))) |
56215e41 | 165 | (build-system gnu-build-system) |
ae44ebb9 RW |
166 | (arguments |
167 | `(#:phases | |
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))) | |
177 | #t)))))) | |
56215e41 RW |
178 | (inputs |
179 | `(("gtkmm" ,gtkmm) | |
ae44ebb9 | 180 | ("gtk+" ,gtk+) |
56215e41 RW |
181 | ("libsigc++" ,libsigc++) |
182 | ("synfig" ,synfig))) | |
183 | (native-inputs | |
184 | `(("pkg-config" ,pkg-config) | |
185 | ("intltool" ,intltool))) | |
eeb8b0e6 | 186 | (home-page "https://www.synfig.org") |
56215e41 RW |
187 | (synopsis "Vector-based 2D animation package (GUI)") |
188 | (description | |
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+))) | |
2809a355 RW |
194 | |
195 | (define-public papagayo | |
196 | (let ((commit "e143684b30e59fe4a554f965cb655d23cbe93ee7") | |
197 | (revision "1")) | |
198 | (package | |
199 | (name "papagayo") | |
200 | (version (string-append "2.0b1-" revision "." (string-take commit 9))) | |
201 | (source (origin | |
202 | (method git-fetch) | |
203 | (uri (git-reference | |
b0e7b699 | 204 | (url "https://github.com/LostMoho/Papagayo") |
2809a355 | 205 | (commit commit))) |
a18ee793 | 206 | (file-name (git-file-name name version)) |
2809a355 RW |
207 | (sha256 |
208 | (base32 | |
209 | "1p9gffjhbph34jhrvgpg93yha75bf88vkvlnk06x1r9601ph5321")) | |
210 | (modules '((guix build utils))) | |
211 | ;; Delete bundled libsndfile sources. | |
212 | (snippet | |
213 | '(begin | |
214 | (delete-file-recursively "libsndfile_1.0.19") | |
215 | (delete-file-recursively "libsndfile_1.0.25") | |
216 | #t)))) | |
217 | (build-system gnu-build-system) | |
218 | (arguments | |
219 | `(#:phases | |
220 | (modify-phases %standard-phases | |
221 | (replace 'configure | |
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" | |
226 | (("else \\{") | |
227 | (string-append "\nINCLUDEPATH += " libsndfile | |
228 | "/include" | |
229 | "\nLIBS +=" libsndfile | |
230 | "/lib/libsndfile.so\n" | |
231 | "win32 {")))) | |
6023fa36 TGR |
232 | (invoke "qmake" |
233 | (string-append "DESTDIR=" | |
234 | (assoc-ref outputs "out") | |
235 | "/bin")))) | |
2809a355 RW |
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/")) | |
246 | qt))) | |
247 | #t)))))) | |
248 | (inputs | |
249 | `(("qt" ,qtbase) | |
250 | ("qtmultimedia" ,qtmultimedia) | |
251 | ("libsndfile" ,libsndfile))) | |
252 | (native-inputs | |
253 | `(("qttools" ,qttools))) | |
eeb8b0e6 | 254 | (home-page "https://www.lostmarble.com/papagayo/") |
2809a355 RW |
255 | (synopsis "Lip-syncing for animations") |
256 | (description | |
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+)))) | |
e5ad2cdf P |
263 | |
264 | (define-public pencil2d | |
265 | (package | |
266 | (name "pencil2d") | |
9405f8b8 | 267 | (version "0.6.4") |
e5ad2cdf P |
268 | (source (origin |
269 | (method git-fetch) | |
270 | (uri (git-reference | |
271 | (url "https://github.com/pencil2d/pencil") | |
272 | (commit (string-append "v" version)))) | |
273 | (file-name (git-file-name name version)) | |
274 | (sha256 | |
275 | (base32 | |
9405f8b8 | 276 | "0zi8x0w8n817zds2lyw9l8j33c03kiybkrcyy3s5fg66mchmrwnr")))) |
e5ad2cdf P |
277 | (build-system gnu-build-system) |
278 | (inputs | |
279 | `(("qtbase" ,qtbase) | |
280 | ("qtxmlpatterns" ,qtxmlpatterns) | |
281 | ("qtmultimedia" ,qtmultimedia) | |
282 | ("qtsvg" ,qtsvg))) | |
283 | (arguments | |
284 | `(#:phases | |
285 | (modify-phases %standard-phases | |
286 | (replace 'configure | |
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))) | |
296 | #t)))))) | |
297 | (home-page "https://www.pencil2d.org") | |
298 | (synopsis "Make 2D hand-drawn animations") | |
299 | (description | |
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))) |