gnu: gnome: Depend on xdg-user-dirs.
[jackhill/guix/guix.git] / gnu / packages / animation.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2017 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)
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))
38
39 (define-public etl
40 (package
41 (name "etl")
42 (version "0.04.22")
43 (source (origin
44 (method url-fetch)
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"))
48 (sha256
49 (base32
50 "0ii73nsd3xzkhz6w1rnxwphl637j9w82xiy6apa9vin2isdynnmc"))))
51 (build-system gnu-build-system)
52 (home-page "http://www.synfig.org")
53 (synopsis "Extended C++ template library")
54 (description
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+)))
59
60 (define-public synfig
61 (package
62 (name "synfig")
63 (version "1.2.0")
64 (source (origin
65 (method url-fetch)
66 (uri (string-append "mirror://sourceforge/synfig/releases/"
67 version "/source/synfig-" version
68 ".tar.gz"))
69 (sha256
70 (base32
71 "1gqx4gn4c73rqwhsgzx0a460gr9hadmi28csp75rx30qavqsj7k1"))))
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)))))
94 (inputs
95 `(("boost" ,boost)
96 ("ffmpeg" ,ffmpeg)
97 ("libdv" ,libdv)
98 ("libjpeg" ,libjpeg)
99 ("libpng" ,libpng)
100 ("libmng" ,libmng)
101 ("zlib" ,zlib)))
102 ;; synfig.pc lists the following as required: Magick++ freetype2
103 ;; fontconfig fftw OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0
104 ;; cairo pango pangocairo mlt++
105 (propagated-inputs
106 `(("cairo" ,cairo)
107 ("etl" ,etl)
108 ("fftw" ,fftw)
109 ("fontconfig" ,fontconfig)
110 ("freetype" ,freetype)
111 ("glibmm" ,glibmm)
112 ("imagemagick" ,imagemagick)
113 ("libxml++" ,libxml++)
114 ("libsigc++" ,libsigc++)
115 ("mlt" ,mlt)
116 ("openexr" ,openexr)
117 ("pango" ,pango)))
118 (native-inputs
119 `(("pkg-config" ,pkg-config)))
120 (home-page "http://www.synfig.org")
121 (synopsis "Vector-based 2D animation renderer")
122 (description
123 "Synfig is a vector-based 2D animation package. It is designed to be
124 capable of producing feature-film quality animation. It eliminates the need
125 for tweening, preventing the need to hand-draw each frame.")
126 (license license:gpl3+)))
127
128 (define-public synfigstudio
129 (package
130 (name "synfigstudio")
131 (version "1.2.0")
132 (source (origin
133 (method url-fetch)
134 (uri (string-append "mirror://sourceforge/synfig/releases/"
135 version "/source/synfigstudio-" version
136 ".tar.gz"))
137 (sha256
138 (base32
139 "0fbckfbw8dzf0m2wv7vlmw492k1dqa3zf510z019d0as3zpnp6qm"))
140 (modules '((guix build utils)))
141 (snippet
142 '(begin
143 (substitute* "src/synfigapp/pluginmanager.cpp"
144 (("xmlpp::Node\\* n =") "const xmlpp::Node* n =")
145 (("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
146 #t))
147 (patches
148 (search-patches "synfigstudio-fix-ui-with-gtk3.patch"))))
149 (build-system gnu-build-system)
150 (arguments
151 `(#:phases
152 (modify-phases %standard-phases
153 ;; This fixes the file chooser crash that happens with GTK 3.
154 (add-after 'install 'wrap-program
155 (lambda* (#:key inputs outputs #:allow-other-keys)
156 (let* ((out (assoc-ref outputs "out"))
157 (gtk (assoc-ref inputs "gtk+"))
158 (gtk-share (string-append gtk "/share")))
159 (wrap-program (string-append out "/bin/synfigstudio")
160 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))
161 #t))))))
162 (inputs
163 `(("gtkmm" ,gtkmm)
164 ("gtk+" ,gtk+)
165 ("libsigc++" ,libsigc++)
166 ("synfig" ,synfig)))
167 (native-inputs
168 `(("pkg-config" ,pkg-config)
169 ("intltool" ,intltool)))
170 (home-page "http://www.synfig.org")
171 (synopsis "Vector-based 2D animation package (GUI)")
172 (description
173 "Synfig is a vector-based 2D animation package. It is designed to
174 be capable of producing feature-film quality animation. It eliminates the
175 need for tweening, preventing the need to hand-draw each frame. This package
176 contains the graphical user interface for synfig.")
177 (license license:gpl3+)))