Commit | Line | Data |
---|---|---|
c1fbc66a RW |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2015 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 utils) | |
23 | #:use-module ((guix licenses) #:prefix license:) | |
24 | #:use-module (guix build-system gnu) | |
7775a186 RW |
25 | #:use-module (gnu packages) |
26 | #:use-module (gnu packages boost) | |
27 | #:use-module (gnu packages compression) | |
28 | #:use-module (gnu packages fontutils) | |
29 | #:use-module (gnu packages glib) | |
30 | #:use-module (gnu packages gnome) | |
31 | #:use-module (gnu packages graphics) | |
32 | #:use-module (gnu packages gtk) | |
33 | #:use-module (gnu packages image) | |
34 | #:use-module (gnu packages imagemagick) | |
35 | #:use-module (gnu packages pkg-config) | |
36 | #:use-module (gnu packages video)) | |
c1fbc66a RW |
37 | |
38 | (define-public etl | |
39 | (package | |
40 | (name "etl") | |
41 | (version "0.04.19") | |
42 | (source (origin | |
43 | (method url-fetch) | |
44 | ;; Keep this synchronized with the synfig release version. | |
45 | (uri (string-append "mirror://sourceforge/synfig/releases/" | |
46 | "1.0.2/source/ETL-" version ".tar.gz")) | |
47 | (sha256 | |
48 | (base32 | |
49 | "070c70slizrklq1gbgja8m49xfmq65wlcd6hz6418cpx0wd4r55s")))) | |
50 | (build-system gnu-build-system) | |
51 | (home-page "http://www.synfig.org") | |
52 | (synopsis "Extended C++ template library") | |
53 | (description | |
54 | "ETL is a class and template library designed to add new datatypes and | |
55 | functions which combine well with the existing types and functions from the | |
56 | C++ @dfn{Standard Template Library} (STL).") | |
57 | (license license:gpl3+))) | |
58 | ||
7775a186 RW |
59 | (define-public synfig |
60 | (package | |
61 | (name "synfig") | |
62 | (version "1.0.2") | |
63 | (source (origin | |
64 | (method url-fetch) | |
65 | (uri (string-append "mirror://sourceforge/synfig/releases/" | |
66 | version "/source/synfig-" version | |
67 | ".tar.gz")) | |
68 | (sha256 | |
69 | (base32 | |
70 | "1d3z2r78j3rkff47q3wl0ami69y3l4nyi5r9zclymb8ar7mgkk9l")) | |
fc1adab1 | 71 | (patches (search-patches "synfig-build-fix.patch")))) |
7775a186 RW |
72 | (build-system gnu-build-system) |
73 | (arguments | |
74 | `(#:configure-flags | |
75 | ;; The Boost library path is taken from the value of BOOST_LDFLAGS. | |
76 | (list (string-append "BOOST_LDFLAGS=-L" | |
77 | (assoc-ref %build-inputs "boost") | |
78 | "/lib")) | |
79 | #:phases | |
80 | (modify-phases %standard-phases | |
81 | (add-after 'unpack 'adapt-to-libxml++-changes | |
82 | (lambda _ | |
83 | (substitute* "configure" | |
84 | (("libxml\\+\\+-2\\.6") "libxml++-3.0")) | |
85 | (substitute* (append (find-files "src/modules/" "\\.cpp$") | |
86 | (find-files "src/synfig/" "\\.(cpp|h)$")) | |
87 | (("add_child\\(") "add_child_element(") | |
88 | (("get_child_text\\(") "get_first_child_text(") | |
89 | (("set_child_text\\(") "set_first_child_text(") | |
90 | (("remove_child\\(") "remove_node(")) | |
91 | (substitute* "src/modules/mod_svg/svg_parser.cpp" | |
92 | (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList")) | |
93 | #t)) | |
5989d4ea RW |
94 | (add-after 'unpack 'fix-isnan-error |
95 | (lambda _ | |
96 | (substitute* "src/synfig/time.cpp" | |
97 | (("return !::isnan") "return !std::isnan")) | |
98 | #t)) | |
7775a186 RW |
99 | (add-before 'configure 'set-flags |
100 | (lambda _ | |
101 | ;; Compile with C++11, required by libsigc++. | |
102 | (setenv "CXXFLAGS" "-D__STDC_CONSTANT_MACROS -std=gnu++11") | |
103 | #t))))) | |
104 | (inputs | |
105 | `(("boost" ,boost) | |
106 | ("ffmpeg" ,ffmpeg) | |
107 | ("libdv" ,libdv) | |
108 | ("libjpeg" ,libjpeg) | |
109 | ("libpng" ,libpng) | |
110 | ("libmng" ,libmng) | |
111 | ("zlib" ,zlib))) | |
112 | ;; synfig.pc lists the following as required: Magick++ freetype2 | |
113 | ;; fontconfig OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0 | |
114 | ;; cairo pango pangocairo mlt++ | |
115 | (propagated-inputs | |
116 | `(("cairo" ,cairo) | |
117 | ("etl" ,etl) | |
118 | ("fontconfig" ,fontconfig) | |
119 | ("freetype" ,freetype) | |
120 | ("glibmm" ,glibmm) | |
121 | ("imagemagick" ,imagemagick) | |
122 | ("libxml++" ,libxml++) | |
123 | ("libsigc++" ,libsigc++) | |
124 | ("mlt" ,mlt) | |
125 | ("openexr" ,openexr) | |
126 | ("pango" ,pango))) | |
127 | (native-inputs | |
128 | `(("pkg-config" ,pkg-config))) | |
129 | (home-page "http://www.synfig.org") | |
130 | (synopsis "Vector-based 2D animation renderer") | |
131 | (description | |
132 | "Synfig is a vector-based 2D animation package. It is designed to be | |
133 | capable of producing feature-film quality animation. It eliminates the need | |
134 | for tweening, preventing the need to hand-draw each frame.") | |
135 | (license license:gpl3+))) | |
56215e41 RW |
136 | |
137 | (define-public synfigstudio | |
138 | (package | |
139 | (name "synfigstudio") | |
140 | (version "1.0.2") | |
141 | (source (origin | |
142 | (method url-fetch) | |
143 | (uri (string-append "mirror://sourceforge/synfig/releases/" | |
144 | version "/source/synfigstudio-" version | |
145 | ".tar.gz")) | |
146 | (sha256 | |
147 | (base32 | |
148 | "1xa74dlgkpjn0gzdcs0x25z7wg0806v2wygvvi73f7sn1fm88ig4")) | |
149 | (modules '((guix build utils))) | |
150 | (snippet | |
151 | '(begin | |
152 | (substitute* "src/synfigapp/pluginmanager.cpp" | |
153 | (("xmlpp::Node\\* n =") "const xmlpp::Node* n =") | |
154 | (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList")) | |
155 | ;; Some files are ISO-8859-1 encoded. | |
156 | (with-fluids ((%default-port-encoding #f)) | |
157 | (substitute* (find-files "src/" "\\.(cpp|h)$") | |
158 | (("#include <sigc\\+\\+/retype\\.h>") | |
159 | "#include <sigc++/adaptors/retype.h>") | |
160 | (("#include <sigc\\+\\+/hide\\.h>") | |
161 | "#include <sigc++/adaptors/hide.h>") | |
162 | (("#include <sigc\\+\\+/object\\.h>") | |
163 | "#include <sigc++/trackable.h>"))) | |
164 | #t)))) | |
165 | (build-system gnu-build-system) | |
166 | (arguments | |
167 | `(#:configure-flags | |
168 | (list "CXXFLAGS=-std=gnu++11"))) | |
169 | (inputs | |
170 | `(("gtkmm" ,gtkmm) | |
171 | ("libsigc++" ,libsigc++) | |
172 | ("synfig" ,synfig))) | |
173 | (native-inputs | |
174 | `(("pkg-config" ,pkg-config) | |
175 | ("intltool" ,intltool))) | |
176 | (home-page "http://www.synfig.org") | |
177 | (synopsis "Vector-based 2D animation package (GUI)") | |
178 | (description | |
179 | "Synfig is a vector-based 2D animation package. It is designed to | |
180 | be capable of producing feature-film quality animation. It eliminates the | |
181 | need for tweening, preventing the need to hand-draw each frame. This package | |
182 | contains the graphical user interface for synfig.") | |
183 | (license license:gpl3+))) |