Commit | Line | Data |
---|---|---|
c1fbc66a | 1 | ;;; GNU Guix --- Functional package management for GNU |
21fea1d1 | 2 | ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net> |
41b984cc | 3 | ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr> |
e5ad2cdf | 4 | ;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com> |
b62da256 | 5 | ;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net> |
05246c69 | 6 | ;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl> |
c1fbc66a RW |
7 | ;;; |
8 | ;;; This file is part of GNU Guix. | |
9 | ;;; | |
10 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
11 | ;;; under the terms of the GNU General Public License as published by | |
12 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
13 | ;;; your option) any later version. | |
14 | ;;; | |
15 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
16 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;;; GNU General Public License for more details. | |
19 | ;;; | |
20 | ;;; You should have received a copy of the GNU General Public License | |
21 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
22 | ||
23 | (define-module (gnu packages animation) | |
24 | #:use-module (guix packages) | |
25 | #:use-module (guix download) | |
2809a355 | 26 | #:use-module (guix git-download) |
c1fbc66a RW |
27 | #:use-module (guix utils) |
28 | #:use-module ((guix licenses) #:prefix license:) | |
d3dcb8c7 | 29 | #:use-module (guix build-system cmake) |
c1fbc66a | 30 | #:use-module (guix build-system gnu) |
179e97d5 | 31 | #:use-module (guix build-system meson) |
7775a186 | 32 | #:use-module (gnu packages) |
21fea1d1 | 33 | #:use-module (gnu packages algebra) |
d3dcb8c7 | 34 | #:use-module (gnu packages assembly) |
c76d0201 | 35 | #:use-module (gnu packages autotools) |
7775a186 | 36 | #:use-module (gnu packages boost) |
179e97d5 | 37 | #:use-module (gnu packages check) |
7775a186 | 38 | #:use-module (gnu packages compression) |
c76d0201 VM |
39 | #:use-module (gnu packages curl) |
40 | #:use-module (gnu packages dejagnu) | |
7775a186 | 41 | #:use-module (gnu packages fontutils) |
c76d0201 VM |
42 | #:use-module (gnu packages gettext) |
43 | #:use-module (gnu packages gl) | |
7775a186 RW |
44 | #:use-module (gnu packages glib) |
45 | #:use-module (gnu packages gnome) | |
46 | #:use-module (gnu packages graphics) | |
47 | #:use-module (gnu packages gtk) | |
48 | #:use-module (gnu packages image) | |
49 | #:use-module (gnu packages imagemagick) | |
c76d0201 | 50 | #:use-module (gnu packages jemalloc) |
05246c69 | 51 | #:use-module (gnu packages mp3) |
d3dcb8c7 VM |
52 | #:use-module (gnu packages networking) |
53 | #:use-module (gnu packages pcre) | |
c76d0201 | 54 | #:use-module (gnu packages perl) |
7775a186 | 55 | #:use-module (gnu packages pkg-config) |
2809a355 | 56 | #:use-module (gnu packages pulseaudio) |
c76d0201 | 57 | #:use-module (gnu packages python) |
2809a355 | 58 | #:use-module (gnu packages qt) |
c76d0201 VM |
59 | #:use-module (gnu packages sdl) |
60 | #:use-module (gnu packages tls) | |
61 | #:use-module (gnu packages video) | |
62 | #:use-module (gnu packages xiph)) | |
c1fbc66a | 63 | |
179e97d5 RG |
64 | (define-public rlottie |
65 | (package | |
66 | (name "rlottie") | |
67 | (version "0.2") | |
68 | (source | |
69 | (origin | |
70 | (method git-fetch) | |
71 | (uri | |
72 | (git-reference | |
73 | (url "https://github.com/Samsung/rlottie.git") | |
74 | (commit | |
75 | (string-append "v" version)))) | |
76 | (file-name | |
77 | (git-file-name name version)) | |
78 | (sha256 | |
79 | (base32 "10bxr1zf9wxl55d4cw2j02r6sgqln7mbxplhhfvhw0z92fi40kr3")))) | |
80 | (build-system meson-build-system) | |
81 | (arguments | |
82 | `(#:configure-flags | |
83 | (list | |
84 | "-Dlog=true" | |
85 | "-Dtest=true"))) | |
86 | (native-inputs | |
8394619b | 87 | (list googletest pkg-config)) |
179e97d5 RG |
88 | (synopsis "Lottie Animation Library") |
89 | (description "Rlottie is a platform independent standalone c++ library for | |
90 | rendering vector based animations and art in realtime.") | |
91 | (home-page "https://github.com/Samsung/rlottie/") | |
92 | (license license:expat))) | |
93 | ||
05f6b032 TGR |
94 | ;; ETL, synfig, and Synfig Studio are updated in tandem. |
95 | (define synfig-version "1.2.2") | |
96 | ||
c1fbc66a RW |
97 | (define-public etl |
98 | (package | |
99 | (name "etl") | |
05f6b032 | 100 | (version synfig-version) |
c1fbc66a RW |
101 | (source (origin |
102 | (method url-fetch) | |
c1fbc66a | 103 | (uri (string-append "mirror://sourceforge/synfig/releases/" |
36c8f1f1 | 104 | version "/source/ETL-" version ".tar.gz")) |
c1fbc66a RW |
105 | (sha256 |
106 | (base32 | |
36c8f1f1 | 107 | "12sd8pz8l5xcxcmapkvih3brihdhdb6xmxisr9a415lydid9rh8d")))) |
c1fbc66a | 108 | (build-system gnu-build-system) |
eeb8b0e6 | 109 | (home-page "https://www.synfig.org") |
c1fbc66a RW |
110 | (synopsis "Extended C++ template library") |
111 | (description | |
112 | "ETL is a class and template library designed to add new datatypes and | |
113 | functions which combine well with the existing types and functions from the | |
114 | C++ @dfn{Standard Template Library} (STL).") | |
115 | (license license:gpl3+))) | |
116 | ||
7775a186 RW |
117 | (define-public synfig |
118 | (package | |
119 | (name "synfig") | |
05f6b032 | 120 | (version synfig-version) |
7775a186 RW |
121 | (source (origin |
122 | (method url-fetch) | |
123 | (uri (string-append "mirror://sourceforge/synfig/releases/" | |
124 | version "/source/synfig-" version | |
125 | ".tar.gz")) | |
126 | (sha256 | |
127 | (base32 | |
05f6b032 | 128 | "1vy27kl68sbg41sfasa58k3p2nc1xfalvzk3k9gich9h90rpnpsz")))) |
7775a186 RW |
129 | (build-system gnu-build-system) |
130 | (arguments | |
131 | `(#:configure-flags | |
132 | ;; The Boost library path is taken from the value of BOOST_LDFLAGS. | |
133 | (list (string-append "BOOST_LDFLAGS=-L" | |
134 | (assoc-ref %build-inputs "boost") | |
135 | "/lib")) | |
136 | #:phases | |
137 | (modify-phases %standard-phases | |
d39238cf RW |
138 | (add-after 'unpack 'fix-boost-build-error |
139 | ;; A chain of Boost headers leads to this error: "make_array" is | |
140 | ;; not a member of "boost::serialization". This can be avoided by | |
141 | ;; loading the "array_wrapper" header first. | |
142 | (lambda _ | |
143 | (substitute* "src/synfig/valuenodes/valuenode_dynamic.cpp" | |
144 | (("#include <boost/numeric/odeint/integrate/integrate.hpp>" match) | |
145 | (string-append | |
146 | "#include <boost/serialization/array_wrapper.hpp>\n" match))) | |
147 | #t)) | |
7775a186 RW |
148 | (add-after 'unpack 'adapt-to-libxml++-changes |
149 | (lambda _ | |
150 | (substitute* "configure" | |
151 | (("libxml\\+\\+-2\\.6") "libxml++-3.0")) | |
152 | (substitute* (append (find-files "src/modules/" "\\.cpp$") | |
153 | (find-files "src/synfig/" "\\.(cpp|h)$")) | |
154 | (("add_child\\(") "add_child_element(") | |
155 | (("get_child_text\\(") "get_first_child_text(") | |
156 | (("set_child_text\\(") "set_first_child_text(") | |
157 | (("remove_child\\(") "remove_node(")) | |
158 | (substitute* "src/modules/mod_svg/svg_parser.cpp" | |
159 | (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList")) | |
7775a186 RW |
160 | #t))))) |
161 | (inputs | |
162 | `(("boost" ,boost) | |
163 | ("ffmpeg" ,ffmpeg) | |
164 | ("libdv" ,libdv) | |
4bd428a7 | 165 | ("libjpeg" ,libjpeg-turbo) |
7775a186 RW |
166 | ("libpng" ,libpng) |
167 | ("libmng" ,libmng) | |
168 | ("zlib" ,zlib))) | |
169 | ;; synfig.pc lists the following as required: Magick++ freetype2 | |
21fea1d1 | 170 | ;; fontconfig fftw OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0 |
7775a186 RW |
171 | ;; cairo pango pangocairo mlt++ |
172 | (propagated-inputs | |
173 | `(("cairo" ,cairo) | |
174 | ("etl" ,etl) | |
21fea1d1 | 175 | ("fftw" ,fftw) |
7775a186 RW |
176 | ("fontconfig" ,fontconfig) |
177 | ("freetype" ,freetype) | |
178 | ("glibmm" ,glibmm) | |
179 | ("imagemagick" ,imagemagick) | |
180 | ("libxml++" ,libxml++) | |
181 | ("libsigc++" ,libsigc++) | |
0913843e | 182 | ("mlt" ,mlt-6) |
d71336b2 | 183 | ("openexr" ,openexr-2) |
7775a186 RW |
184 | ("pango" ,pango))) |
185 | (native-inputs | |
8394619b | 186 | (list intltool pkg-config)) |
eeb8b0e6 | 187 | (home-page "https://www.synfig.org") |
7775a186 RW |
188 | (synopsis "Vector-based 2D animation renderer") |
189 | (description | |
190 | "Synfig is a vector-based 2D animation package. It is designed to be | |
191 | capable of producing feature-film quality animation. It eliminates the need | |
192 | for tweening, preventing the need to hand-draw each frame.") | |
193 | (license license:gpl3+))) | |
56215e41 RW |
194 | |
195 | (define-public synfigstudio | |
196 | (package | |
197 | (name "synfigstudio") | |
05f6b032 | 198 | (version synfig-version) |
56215e41 RW |
199 | (source (origin |
200 | (method url-fetch) | |
201 | (uri (string-append "mirror://sourceforge/synfig/releases/" | |
202 | version "/source/synfigstudio-" version | |
203 | ".tar.gz")) | |
204 | (sha256 | |
205 | (base32 | |
05f6b032 | 206 | "1ql92kh9z8w2j9yi3pr7hn7wh2r2j35xynwv9xlwyd7niackgykn")) |
56215e41 RW |
207 | (modules '((guix build utils))) |
208 | (snippet | |
209 | '(begin | |
210 | (substitute* "src/synfigapp/pluginmanager.cpp" | |
211 | (("xmlpp::Node\\* n =") "const xmlpp::Node* n =") | |
212 | (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList")) | |
05f6b032 | 213 | #t)))) |
56215e41 | 214 | (build-system gnu-build-system) |
ae44ebb9 RW |
215 | (arguments |
216 | `(#:phases | |
217 | (modify-phases %standard-phases | |
218 | ;; This fixes the file chooser crash that happens with GTK 3. | |
219 | (add-after 'install 'wrap-program | |
220 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
221 | (let* ((out (assoc-ref outputs "out")) | |
222 | (gtk (assoc-ref inputs "gtk+")) | |
223 | (gtk-share (string-append gtk "/share"))) | |
224 | (wrap-program (string-append out "/bin/synfigstudio") | |
225 | `("XDG_DATA_DIRS" ":" prefix (,gtk-share))) | |
226 | #t)))))) | |
56215e41 | 227 | (inputs |
8394619b | 228 | (list gtkmm-3 gtk+ libsigc++ synfig)) |
56215e41 | 229 | (native-inputs |
8394619b | 230 | (list pkg-config intltool)) |
eeb8b0e6 | 231 | (home-page "https://www.synfig.org") |
56215e41 RW |
232 | (synopsis "Vector-based 2D animation package (GUI)") |
233 | (description | |
234 | "Synfig is a vector-based 2D animation package. It is designed to | |
235 | be capable of producing feature-film quality animation. It eliminates the | |
236 | need for tweening, preventing the need to hand-draw each frame. This package | |
237 | contains the graphical user interface for synfig.") | |
238 | (license license:gpl3+))) | |
2809a355 | 239 | |
c76d0201 VM |
240 | ;; This package provides a standalone (no browser plugin) version of Gnash. |
241 | (define-public gnash | |
242 | ;; The last tagged release of Gnash was in 2013. | |
243 | (let ((commit "583ccbc1275c7701dc4843ec12142ff86bb305b4") | |
244 | (revision "0")) | |
245 | (package | |
246 | (name "gnash") | |
247 | (version (git-version "0.8.11" revision commit)) | |
248 | (source | |
249 | (origin | |
250 | (method git-fetch) | |
251 | (uri (git-reference | |
252 | (url "https://git.savannah.gnu.org/git/gnash.git/") | |
253 | (commit commit))) | |
254 | (file-name (git-file-name name version)) | |
255 | (patches (search-patches "gnash-fix-giflib-version.patch")) | |
256 | (sha256 | |
257 | (base32 "0fh0bljn0i6ypyh6l99afi855p7ki7lm869nq1qj6k8hrrwhmfry")))) | |
258 | (build-system gnu-build-system) | |
259 | (arguments | |
260 | `(#:configure-flags | |
261 | (list "--disable-static" | |
262 | ;; Plugins are based on XULRunner and NPAPI only. Disable. | |
263 | "--disable-plugins" | |
264 | "--enable-gui=gtk" | |
265 | "--enable-media=ffmpeg" | |
266 | (string-append "--with-boost-incl=" | |
267 | (assoc-ref %build-inputs "boost") "/include") | |
268 | (string-append "--with-boost-lib=" | |
269 | (assoc-ref %build-inputs "boost") "/lib") | |
270 | (string-append "--with-ffmpeg-incl=" | |
271 | (assoc-ref %build-inputs "ffmpeg") | |
272 | "/include/libavcodec") | |
273 | (string-append "--with-speex-incl=" | |
274 | (assoc-ref %build-inputs "speex") "/include") | |
275 | (string-append "--with-jemalloc-incl=" | |
276 | (assoc-ref %build-inputs "jemalloc") | |
277 | "/include/jemalloc") | |
278 | (string-append "--with-speex-lib=" | |
279 | (assoc-ref %build-inputs "speex") "/lib") | |
280 | (string-append "--with-jpeg-incl=" | |
281 | (assoc-ref %build-inputs "libjpeg") "/include") | |
282 | (string-append "--with-zlib-incl=" | |
283 | (assoc-ref %build-inputs "zlib") "/include") | |
284 | (string-append "--with-png-incl=" | |
285 | (assoc-ref %build-inputs "libpng") | |
286 | "/include")))) | |
287 | (native-inputs | |
288 | `(("autoconf" ,autoconf) | |
289 | ("automake" ,automake) | |
290 | ("dejagnu" ,dejagnu) ;for tests | |
291 | ("gettext" ,gettext-minimal) | |
292 | ("libtool" ,libtool) | |
293 | ("perl" ,perl) | |
294 | ("pkg-config" ,pkg-config) | |
295 | ("python" ,python-wrapper))) | |
296 | (inputs | |
297 | `(("agg" ,agg) | |
298 | ("atk" ,atk) | |
299 | ("boost" ,boost) | |
300 | ("curl" ,curl) | |
301 | ("ffmpeg" ,ffmpeg-2.8) | |
302 | ("freeglut" ,freeglut) | |
303 | ("gconf" ,gconf) | |
304 | ("giflib" ,giflib) | |
305 | ("glib" ,glib) | |
306 | ("gtk+" ,gtk+-2) | |
307 | ("gtkglext" ,gtkglext) | |
308 | ("jemalloc" ,jemalloc) | |
309 | ("libjpeg" ,libjpeg-turbo) | |
310 | ("libltdl" ,libltdl) | |
311 | ("libpng" ,libpng) | |
312 | ("pangox-compat" ,pangox-compat) | |
313 | ("sdl" ,sdl) | |
314 | ("speex" ,speex))) | |
315 | (synopsis "Flash movie player") | |
316 | (description | |
317 | "Gnash is a Flash movie player. It supports SWF version v7 and some | |
318 | of v8 and v9. It is possible to configure Gnash to use several different | |
319 | audio or video backends, ensuring good performance.") | |
320 | (home-page "https://www.gnu.org/software/gnash/") | |
321 | (license license:gpl3+)))) | |
322 | ||
d3dcb8c7 VM |
323 | ;; This package provides a standalone (no browser plugin) version of |
324 | ;; Lightspark. | |
325 | (define-public lightspark | |
326 | (package | |
327 | (name "lightspark") | |
9d829dc9 | 328 | (version "0.8.6") |
d3dcb8c7 VM |
329 | (source |
330 | (origin | |
331 | (method git-fetch) | |
332 | (uri (git-reference | |
333 | (url "https://github.com/lightspark/lightspark") | |
334 | (commit version))) | |
335 | (file-name (git-file-name name version)) | |
336 | (sha256 | |
9d829dc9 | 337 | (base32 "0v7d7vwb0xqkk3v8dyks0wyk52ga57v5lg93y74v1d2wh7spmmzw")))) |
d3dcb8c7 VM |
338 | (build-system cmake-build-system) |
339 | (arguments | |
340 | `(#:tests? #f ;requires Adobe Flex SDK, see README.tests | |
341 | ;; Disable browser plugins because neither NPAPI nor PPAPI is | |
342 | ;; supported in the browsers we have. | |
343 | #:configure-flags | |
344 | '("-DCOMPILE_NPAPI_PLUGIN=FALSE" | |
345 | "-DCOMPILE_PPAPI_PLUGIN=FALSE") | |
346 | #:phases | |
347 | (modify-phases %standard-phases | |
348 | (add-after 'unpack 'prepare-build-environment | |
349 | (lambda _ | |
350 | ;; Use relative etc path. | |
351 | (substitute* "CMakeLists.txt" (("\\/etc") "etc")))) | |
352 | (replace 'check | |
353 | (lambda* (#:key tests? #:allow-other-keys) | |
354 | (when tests? | |
355 | (invoke "./tests"))))))) | |
356 | (native-inputs | |
6defe340 VM |
357 | (list gettext-minimal |
358 | `(,glib "bin") | |
359 | nasm | |
360 | perl | |
361 | pkg-config | |
362 | python-wrapper)) | |
d3dcb8c7 | 363 | (inputs |
6defe340 VM |
364 | (list cairo |
365 | curl | |
366 | ffmpeg | |
367 | freeglut | |
368 | glew | |
369 | glibmm | |
370 | gnutls | |
371 | libjpeg-turbo | |
372 | openssl | |
373 | pango | |
374 | pcre2 | |
375 | rtmpdump | |
376 | sdl2 | |
377 | sdl2-mixer | |
378 | zlib)) | |
d3dcb8c7 VM |
379 | (home-page "https://lightspark.github.io/") |
380 | (synopsis "Flash player implementation") | |
381 | (description | |
382 | "Lightspark is a Flash player implementation for playing files in the SWF | |
383 | format. It supports SWF files written on all versions of the ActionScript | |
384 | language.") | |
385 | ;; NOTE: The bundled pugixml is a fork specific to Lightspark and | |
386 | ;; incompatible with the one we have. | |
387 | ;; FIXME: we also have jxrlib, but the build fails to find JXRMeta.h so we | |
388 | ;; use the bundled one for now. | |
389 | (license (list license:lgpl3+ ;lightspark | |
390 | license:mpl2.0 ;avmplus | |
391 | license:bsd-2 ;jxrlib | |
392 | license:expat)))) ;pugixml, PerlinNoise | |
393 | ||
2809a355 RW |
394 | (define-public papagayo |
395 | (let ((commit "e143684b30e59fe4a554f965cb655d23cbe93ee7") | |
396 | (revision "1")) | |
397 | (package | |
398 | (name "papagayo") | |
399 | (version (string-append "2.0b1-" revision "." (string-take commit 9))) | |
400 | (source (origin | |
401 | (method git-fetch) | |
402 | (uri (git-reference | |
b0e7b699 | 403 | (url "https://github.com/LostMoho/Papagayo") |
2809a355 | 404 | (commit commit))) |
a18ee793 | 405 | (file-name (git-file-name name version)) |
2809a355 RW |
406 | (sha256 |
407 | (base32 | |
408 | "1p9gffjhbph34jhrvgpg93yha75bf88vkvlnk06x1r9601ph5321")) | |
409 | (modules '((guix build utils))) | |
410 | ;; Delete bundled libsndfile sources. | |
411 | (snippet | |
412 | '(begin | |
413 | (delete-file-recursively "libsndfile_1.0.19") | |
414 | (delete-file-recursively "libsndfile_1.0.25") | |
415 | #t)))) | |
416 | (build-system gnu-build-system) | |
417 | (arguments | |
418 | `(#:phases | |
419 | (modify-phases %standard-phases | |
420 | (replace 'configure | |
421 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
422 | (let ((libsndfile (assoc-ref inputs "libsndfile"))) | |
423 | ;; Do not use bundled libsndfile sources | |
424 | (substitute* "Papagayo.pro" | |
425 | (("else \\{") | |
426 | (string-append "\nINCLUDEPATH += " libsndfile | |
427 | "/include" | |
428 | "\nLIBS +=" libsndfile | |
429 | "/lib/libsndfile.so\n" | |
430 | "win32 {")))) | |
6023fa36 TGR |
431 | (invoke "qmake" |
432 | (string-append "DESTDIR=" | |
433 | (assoc-ref outputs "out") | |
434 | "/bin")))) | |
2809a355 RW |
435 | ;; Ensure that all required Qt plugins are found at runtime. |
436 | (add-after 'install 'wrap-executable | |
437 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
438 | (let* ((out (assoc-ref outputs "out")) | |
5f228543 | 439 | (qt '("qt" "qtmultimedia-5"))) |
2809a355 RW |
440 | (wrap-program (string-append out "/bin/Papagayo") |
441 | `("QT_PLUGIN_PATH" ":" prefix | |
442 | ,(map (lambda (label) | |
443 | (string-append (assoc-ref inputs label) | |
444 | "/lib/qt5/plugins/")) | |
445 | qt))) | |
446 | #t)))))) | |
447 | (inputs | |
ea0a5107 | 448 | `(("qt" ,qtbase-5) |
5f228543 | 449 | ("qtmultimedia-5" ,qtmultimedia-5) |
2809a355 RW |
450 | ("libsndfile" ,libsndfile))) |
451 | (native-inputs | |
eef8e2ec | 452 | (list qttools-5)) |
eeb8b0e6 | 453 | (home-page "https://www.lostmarble.com/papagayo/") |
2809a355 RW |
454 | (synopsis "Lip-syncing for animations") |
455 | (description | |
456 | "Papagayo is a lip-syncing program designed to help you line up | |
457 | phonemes with the actual recorded sound of actors speaking. Papagayo makes it | |
458 | easy to lip sync animated characters by making the process very simple – just | |
459 | type in the words being spoken, then drag the words on top of the sound’s | |
460 | waveform until they line up with the proper sounds.") | |
461 | (license license:gpl3+)))) | |
e5ad2cdf P |
462 | |
463 | (define-public pencil2d | |
464 | (package | |
465 | (name "pencil2d") | |
41b984cc | 466 | (version "0.6.6") |
e5ad2cdf P |
467 | (source (origin |
468 | (method git-fetch) | |
469 | (uri (git-reference | |
470 | (url "https://github.com/pencil2d/pencil") | |
471 | (commit (string-append "v" version)))) | |
472 | (file-name (git-file-name name version)) | |
473 | (sha256 | |
474 | (base32 | |
41b984cc | 475 | "0b1nwiwyg01087q318vymg4si76dw41ykxbn2zwd6dqbxzbpr1dh")))) |
e5ad2cdf P |
476 | (build-system gnu-build-system) |
477 | (inputs | |
5f228543 | 478 | (list qtbase-5 qtxmlpatterns qtmultimedia-5 qtsvg-5)) |
e5ad2cdf P |
479 | (arguments |
480 | `(#:phases | |
481 | (modify-phases %standard-phases | |
482 | (replace 'configure | |
483 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
484 | (let ((out (assoc-ref outputs "out"))) | |
485 | (invoke "qmake" (string-append "PREFIX=" out))))) | |
486 | (add-after 'install 'wrap-executable | |
487 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
488 | (let ((out (assoc-ref outputs "out")) | |
489 | (plugin-path (getenv "QT_PLUGIN_PATH"))) | |
490 | (wrap-program (string-append out "/bin/pencil2d") | |
491 | `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))) | |
492 | #t)))))) | |
493 | (home-page "https://www.pencil2d.org") | |
494 | (synopsis "Make 2D hand-drawn animations") | |
495 | (description | |
496 | "Pencil2D is an easy-to-use and intuitive animation and drawing tool. It | |
497 | lets you create traditional hand-drawn animations (cartoons) using both bitmap | |
498 | and vector graphics.") | |
499 | (license license:gpl2))) | |
05246c69 TJ |
500 | |
501 | (define-public swftools | |
502 | ;; Last release of swftools was 0.9.2 on 2012-04-21 - it is really old and | |
503 | ;; does not compile with what's available in guix, master on the other hand works. | |
504 | (let ((commit "772e55a271f66818b06c6e8c9b839befa51248f4") | |
505 | (revision "1")) | |
506 | (package | |
507 | (name "swftools") | |
508 | (version (git-version "0.9.2" revision commit)) | |
509 | (source | |
510 | (origin | |
511 | (method git-fetch) | |
512 | (uri (git-reference | |
513 | (url "https://github.com/matthiaskramm/swftools") | |
514 | (commit commit))) | |
515 | (sha256 | |
516 | (base32 "0a8a29rn7gpxnba3spnvkpdgr7mdlssvr273mzw5b2wjvbzard3w")) | |
517 | (file-name (git-file-name name version)) | |
518 | (modules '((guix build utils))) | |
519 | (snippet | |
520 | '(begin | |
521 | ;; XXX: Swftools includes the source tarball of an old version of | |
522 | ;; xpdf. | |
523 | ||
524 | ;; To fix a linking error I followed the workaround in: | |
525 | ;; https://github.com/matthiaskramm/swftools/issues/178 | |
526 | ;; and implented it as a two-step snippet because substitute* | |
527 | ;; does not match multiline regexes. | |
528 | (substitute* "lib/lame/quantize.c" | |
529 | ;; move inline keywords to the same line as their function headers | |
530 | (("^inline.*\n") "inline ")) | |
531 | (substitute* "lib/lame/quantize.c" | |
532 | ;; make this particular function not inline | |
533 | (("inline (void bitpressure_strategy1)" _ f) f)))))) | |
534 | (build-system gnu-build-system) | |
535 | (arguments | |
536 | (list #:tests? #f)) ; no rule for check | |
537 | (inputs (list zlib freetype giflib libjpeg-turbo lame)) | |
538 | (home-page "http://www.swftools.org") | |
539 | (synopsis "Collection of utilities for working with Adobe Flash files") | |
540 | ||
541 | ;; XXX: This package will built all of swftools' tools but one: PDF2SWF, | |
542 | ;; purposefuly commented out of the description below. | |
543 | (description "SWFTools is a collection of utilities for working with | |
544 | Adobe Flash files (SWF files). The tool collection includes programs for | |
545 | reading SWF files, combining them, and creating them from other content (like | |
546 | images, sound files, videos or sourcecode). The current collection is | |
547 | comprised of the programs detailed below: | |
548 | ||
549 | @itemize | |
550 | @comment PDF2SWF is not currentlybeing build alongside other tools. The next | |
551 | @comment two lines should be uncommented if this will ever get fixed. | |
552 | @comment @item | |
553 | @comment @command{pdf2swf} A PDF to SWF Converter. | |
554 | ||
555 | @item | |
556 | @command{swfcombine} A multi-function tool for inserting, contatenating, | |
557 | stacking and changing parameters in SWFs. | |
558 | ||
559 | @item | |
560 | @command{swfstrings} Scans SWFs for text data. | |
561 | @item | |
562 | @command{swfdump} Prints out various informations about SWFs. | |
563 | ||
564 | @item | |
565 | @command{jpeg2swf} Takes one or more JPEG pictures and generates a SWF | |
566 | slideshow from them. | |
567 | ||
568 | @item | |
569 | @command{png2swf} Like JPEG2SWF, only for PNGs. | |
570 | ||
571 | @item | |
572 | @command{gif2swf} Converts GIFs to SWF. Also able to handle animated GIFs. | |
573 | ||
574 | @item | |
575 | @command{wav2swf} Converts WAV audio files to SWFs, using the LAME MP3 | |
576 | encoder library. | |
577 | ||
578 | @item | |
579 | @command{font2swf} Converts font files (TTF, Type1) to SWF. | |
580 | ||
581 | @item | |
582 | @command{swfbbox} Allows to read out, optimize and readjust SWF bounding boxes. | |
583 | ||
584 | @item | |
585 | @command{swfc} A tool for creating SWF files from simple script files. Supports | |
586 | both ActionScript 2.0 aand 3.0. | |
587 | ||
588 | @item | |
589 | @command{swfextract} Allows to extract Movieclips, Sounds, Images etc. from SWF | |
590 | files. | |
591 | ||
592 | @item | |
593 | @command{as3compile} A standalone ActionScript 3.0 compiler. Mostly compatible | |
594 | with Flex. | |
595 | @end itemize") | |
596 | (license license:gpl2+)))) |