1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 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 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))
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"))
49 "070c70slizrklq1gbgja8m49xfmq65wlcd6hz6418cpx0wd4r55s"))))
50 (build-system gnu-build-system)
51 (home-page "http://www.synfig.org")
52 (synopsis "Extended C++ template library")
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+)))
65 (uri (string-append "mirror://sourceforge/synfig/releases/"
66 version "/source/synfig-" version
70 "1d3z2r78j3rkff47q3wl0ami69y3l4nyi5r9zclymb8ar7mgkk9l"))
71 (patches (search-patches "synfig-build-fix.patch"))))
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 'adapt-to-libxml++-changes
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"))
94 (add-before 'configure 'set-flags
96 ;; Compile with C++11, required by libsigc++.
97 (setenv "CXXFLAGS" "-D__STDC_CONSTANT_MACROS -std=gnu++11")
107 ;; synfig.pc lists the following as required: Magick++ freetype2
108 ;; fontconfig OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0
109 ;; cairo pango pangocairo mlt++
113 ("fontconfig" ,fontconfig)
114 ("freetype" ,freetype)
116 ("imagemagick" ,imagemagick)
117 ("libxml++" ,libxml++)
118 ("libsigc++" ,libsigc++)
123 `(("pkg-config" ,pkg-config)))
124 (home-page "http://www.synfig.org")
125 (synopsis "Vector-based 2D animation renderer")
127 "Synfig is a vector-based 2D animation package. It is designed to be
128 capable of producing feature-film quality animation. It eliminates the need
129 for tweening, preventing the need to hand-draw each frame.")
130 (license license:gpl3+)))
132 (define-public synfigstudio
134 (name "synfigstudio")
138 (uri (string-append "mirror://sourceforge/synfig/releases/"
139 version "/source/synfigstudio-" version
143 "1xa74dlgkpjn0gzdcs0x25z7wg0806v2wygvvi73f7sn1fm88ig4"))
144 (modules '((guix build utils)))
147 (substitute* "src/synfigapp/pluginmanager.cpp"
148 (("xmlpp::Node\\* n =") "const xmlpp::Node* n =")
149 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
150 ;; Some files are ISO-8859-1 encoded.
151 (with-fluids ((%default-port-encoding #f))
152 (substitute* (find-files "src/" "\\.(cpp|h)$")
153 (("#include <sigc\\+\\+/retype\\.h>")
154 "#include <sigc++/adaptors/retype.h>")
155 (("#include <sigc\\+\\+/hide\\.h>")
156 "#include <sigc++/adaptors/hide.h>")
157 (("#include <sigc\\+\\+/object\\.h>")
158 "#include <sigc++/trackable.h>")))
160 (build-system gnu-build-system)
163 (list "CXXFLAGS=-std=gnu++11")))
166 ("libsigc++" ,libsigc++)
169 `(("pkg-config" ,pkg-config)
170 ("intltool" ,intltool)))
171 (home-page "http://www.synfig.org")
172 (synopsis "Vector-based 2D animation package (GUI)")
174 "Synfig is a vector-based 2D animation package. It is designed to
175 be capable of producing feature-film quality animation. It eliminates the
176 need for tweening, preventing the need to hand-draw each frame. This package
177 contains the graphical user interface for synfig.")
178 (license license:gpl3+)))