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 utils)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages algebra)
27 #:use-module (gnu packages boost)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages fontutils)
30 #:use-module (gnu packages glib)
31 #:use-module (gnu packages gnome)
32 #:use-module (gnu packages graphics)
33 #:use-module (gnu packages gtk)
34 #:use-module (gnu packages image)
35 #:use-module (gnu packages imagemagick)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages video))
45 ;; Keep this synchronized with the synfig release version.
46 (uri (string-append "mirror://sourceforge/synfig/releases/"
47 "1.2.0/source/ETL-" version ".tar.gz"))
50 "0ii73nsd3xzkhz6w1rnxwphl637j9w82xiy6apa9vin2isdynnmc"))))
51 (build-system gnu-build-system)
52 (home-page "http://www.synfig.org")
53 (synopsis "Extended C++ template library")
55 "ETL is a class and template library designed to add new datatypes and
56 functions which combine well with the existing types and functions from the
57 C++ @dfn{Standard Template Library} (STL).")
58 (license license:gpl3+)))
66 (uri (string-append "mirror://sourceforge/synfig/releases/"
67 version "/source/synfig-" version
71 "1gqx4gn4c73rqwhsgzx0a460gr9hadmi28csp75rx30qavqsj7k1"))))
72 (build-system gnu-build-system)
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")
80 (modify-phases %standard-phases
81 (add-after 'unpack 'fix-boost-build-error
82 ;; A chain of Boost headers leads to this error: "make_array" is
83 ;; not a member of "boost::serialization". This can be avoided by
84 ;; loading the "array_wrapper" header first.
86 (substitute* "src/synfig/valuenodes/valuenode_dynamic.cpp"
87 (("#include <boost/numeric/odeint/integrate/integrate.hpp>" match)
89 "#include <boost/serialization/array_wrapper.hpp>\n" match)))
91 (add-after 'unpack 'adapt-to-libxml++-changes
93 (substitute* "configure"
94 (("libxml\\+\\+-2\\.6") "libxml++-3.0"))
95 (substitute* (append (find-files "src/modules/" "\\.cpp$")
96 (find-files "src/synfig/" "\\.(cpp|h)$"))
97 (("add_child\\(") "add_child_element(")
98 (("get_child_text\\(") "get_first_child_text(")
99 (("set_child_text\\(") "set_first_child_text(")
100 (("remove_child\\(") "remove_node("))
101 (substitute* "src/modules/mod_svg/svg_parser.cpp"
102 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
112 ;; synfig.pc lists the following as required: Magick++ freetype2
113 ;; fontconfig fftw OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0
114 ;; cairo pango pangocairo mlt++
119 ("fontconfig" ,fontconfig)
120 ("freetype" ,freetype)
122 ("imagemagick" ,imagemagick)
123 ("libxml++" ,libxml++)
124 ("libsigc++" ,libsigc++)
129 `(("pkg-config" ,pkg-config)))
130 (home-page "http://www.synfig.org")
131 (synopsis "Vector-based 2D animation renderer")
133 "Synfig is a vector-based 2D animation package. It is designed to be
134 capable of producing feature-film quality animation. It eliminates the need
135 for tweening, preventing the need to hand-draw each frame.")
136 (license license:gpl3+)))
138 (define-public synfigstudio
140 (name "synfigstudio")
144 (uri (string-append "mirror://sourceforge/synfig/releases/"
145 version "/source/synfigstudio-" version
149 "0fbckfbw8dzf0m2wv7vlmw492k1dqa3zf510z019d0as3zpnp6qm"))
150 (modules '((guix build utils)))
153 (substitute* "src/synfigapp/pluginmanager.cpp"
154 (("xmlpp::Node\\* n =") "const xmlpp::Node* n =")
155 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
158 (search-patches "synfigstudio-fix-ui-with-gtk3.patch"))))
159 (build-system gnu-build-system)
162 (modify-phases %standard-phases
163 ;; This fixes the file chooser crash that happens with GTK 3.
164 (add-after 'install 'wrap-program
165 (lambda* (#:key inputs outputs #:allow-other-keys)
166 (let* ((out (assoc-ref outputs "out"))
167 (gtk (assoc-ref inputs "gtk+"))
168 (gtk-share (string-append gtk "/share")))
169 (wrap-program (string-append out "/bin/synfigstudio")
170 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))
175 ("libsigc++" ,libsigc++)
178 `(("pkg-config" ,pkg-config)
179 ("intltool" ,intltool)))
180 (home-page "http://www.synfig.org")
181 (synopsis "Vector-based 2D animation package (GUI)")
183 "Synfig is a vector-based 2D animation package. It is designed to
184 be capable of producing feature-film quality animation. It eliminates the
185 need for tweening, preventing the need to hand-draw each frame. This package
186 contains the graphical user interface for synfig.")
187 (license license:gpl3+)))