gnu: Add eid-mw.
[jackhill/guix/guix.git] / gnu / packages / qt.scm
CommitLineData
bd677c2d 1;;; GNU Guix --- Functional package management for GNU
84ef83dd 2;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
5b490ab5 3;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
31580979 4;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
843bdfb7 5;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
f048f12b 6;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
fc381a33 7;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
3befd0a9
RW
8;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
9;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
bd677c2d
AE
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages qt)
225941b0 27 #:use-module ((guix licenses) #:prefix license:)
bd677c2d
AE
28 #:use-module (guix packages)
29 #:use-module (guix download)
f198ffd0 30 #:use-module (guix build utils)
9e81af9e 31 #:use-module (guix build-system cmake)
bd677c2d 32 #:use-module (guix build-system gnu)
2456153a 33 #:use-module (guix build-system trivial)
84ef83dd
AE
34 #:use-module (guix packages)
35 #:use-module (guix utils)
1e9ed0e3 36 #:use-module (gnu packages)
b332e366
AE
37 #:use-module (gnu packages bison)
38 #:use-module (gnu packages compression)
2cba3d6f
SB
39 #:use-module (gnu packages cups)
40 #:use-module (gnu packages databases)
aa8c0ada 41 #:use-module (gnu packages documentation)
b332e366 42 #:use-module (gnu packages fontutils)
0009ed71 43 #:use-module (gnu packages flex)
bc8ede01 44 #:use-module (gnu packages freedesktop)
8b6a5e0f 45 #:use-module (gnu packages gl)
b332e366 46 #:use-module (gnu packages glib)
0009ed71
SB
47 #:use-module (gnu packages gnuzilla)
48 #:use-module (gnu packages gperf)
04231311 49 #:use-module (gnu packages gstreamer)
f7fb0ccb 50 #:use-module (gnu packages gtk)
b332e366 51 #:use-module (gnu packages icu4c)
e55354b8 52 #:use-module (gnu packages image)
b332e366 53 #:use-module (gnu packages linux)
04f8decf 54 #:use-module (gnu packages maths)
0009ed71
SB
55 #:use-module (gnu packages pciutils)
56 #:use-module (gnu packages pcre)
b332e366
AE
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages pkg-config)
39fa8f6c 59 #:use-module (gnu packages pulseaudio)
b332e366 60 #:use-module (gnu packages python)
8b6a5e0f 61 #:use-module (gnu packages ruby)
51519fd3 62 #:use-module (gnu packages sdl)
cc2b77df 63 #:use-module (gnu packages tls)
0009ed71
SB
64 #:use-module (gnu packages xdisorg)
65 #:use-module (gnu packages xorg)
66 #:use-module (gnu packages xml))
bd677c2d 67
aa8c0ada
TD
68(define-public grantlee
69 (package
70 (name "grantlee")
71 (version "5.1.0")
72 (source
73 (origin
74 (method url-fetch)
75 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
76 version ".tar.gz"))
77 (file-name (string-append name "-" version ".tar.gz"))
78 (sha256
79 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
80 (native-inputs
81 `(("doxygen" ,doxygen)))
82 (inputs
83 `(("qtbase" ,qtbase)
84 ("qtscript" ,qtscript)))
85 (build-system cmake-build-system)
86 (arguments
87 `(#:phases
88 (modify-phases %standard-phases
89 (replace 'check
90 (lambda _
91 (zero? (system* "ctest" ;; exclude 2 tests which require a display
92 "-E" "htmlbuildertest|plainmarkupbuildertest")))))))
93 (home-page "https://github.com/steveire/grantlee")
94 (synopsis "Libraries for text templating with Qt")
95 (description "Grantlee Templates can be used for theming and generation of
96other text such as code. The syntax uses the syntax of the Django template
97system, and the core design of Django is reused in Grantlee.")
98 (license license:lgpl2.0+)))
99
b332e366
AE
100(define-public qt
101 (package
102 (name "qt")
2e36f7e6 103 (version "5.6.2")
b332e366
AE
104 (source (origin
105 (method url-fetch)
f7fb0ccb
AE
106 (uri
107 (string-append
108 "http://download.qt.io/official_releases/qt/"
109 (version-major+minor version)
110 "/" version
111 "/single/qt-everywhere-opensource-src-"
112 version ".tar.xz"))
b332e366 113 (sha256
f7fb0ccb 114 (base32
2e36f7e6 115 "1cw93mrlkqbwndfqyjpsvjzkpzi39px2is040xvk18mvg3y1prl3"))
14bcc1e1
AE
116 (modules '((guix build utils)))
117 (snippet
bc554b43
AE
118 '(begin
119 ;; Remove qtwebengine, which relies on a bundled copy of
120 ;; chromium. Not only does it fail compilation in qt 5.5:
121 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
122 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
123 ;; it might also pose security problems.
124 ;; Alternatively, we could use the "-skip qtwebengine"
125 ;; configuration option.
126 (delete-file-recursively "qtwebengine")
127 ;; Remove one of the two bundled harfbuzz copies in addition
128 ;; to passing "-system-harfbuzz".
9c32e1fe
AE
129 (delete-file-recursively "qtbase/src/3rdparty/harfbuzz-ng")
130 ;; Remove the bundled sqlite copy in addition to
131 ;; passing "-system-sqlite".
132 (delete-file-recursively "qtbase/src/3rdparty/sqlite")))))
b332e366 133 (build-system gnu-build-system)
ef0cf53e
AE
134 (propagated-inputs
135 `(("mesa" ,mesa)))
b332e366 136 (inputs
b332e366
AE
137 `(("alsa-lib" ,alsa-lib)
138 ("dbus" ,dbus)
2cba3d6f 139 ("cups" ,cups)
0009ed71 140 ("expat" ,expat)
b332e366
AE
141 ("fontconfig" ,fontconfig)
142 ("freetype" ,freetype)
143 ("glib" ,glib)
f7fb0ccb 144 ("harfbuzz" ,harfbuzz)
b332e366 145 ("icu4c" ,icu4c)
f198ffd0 146 ("libjpeg" ,libjpeg)
2cba3d6f 147 ("libmng" ,libmng)
0009ed71 148 ("libpci" ,pciutils)
b332e366
AE
149 ("libpng" ,libpng)
150 ("libx11" ,libx11)
0009ed71
SB
151 ("libxcomposite" ,libxcomposite)
152 ("libxcursor" ,libxcursor)
153 ("libxfixes" ,libxfixes)
b332e366 154 ("libxi" ,libxi)
0009ed71 155 ("libxinerama" ,libxinerama)
b332e366 156 ("libxkbcommon" ,libxkbcommon)
0009ed71
SB
157 ("libxml2" ,libxml2)
158 ("libxrandr" ,libxrandr)
b332e366 159 ("libxrender" ,libxrender)
0009ed71
SB
160 ("libxslt" ,libxslt)
161 ("libxtst" ,libxtst)
162 ("mtdev" ,mtdev)
b332e366 163 ("mysql" ,mysql)
0009ed71 164 ("nss" ,nss)
b332e366 165 ("openssl" ,openssl)
2cba3d6f 166 ("postgresql" ,postgresql)
39fa8f6c 167 ("pulseaudio" ,pulseaudio)
0009ed71
SB
168 ("pcre" ,pcre)
169 ("sqlite" ,sqlite)
170 ("udev" ,eudev)
2cba3d6f 171 ("unixodbc" ,unixodbc)
b332e366
AE
172 ("xcb-util" ,xcb-util)
173 ("xcb-util-image" ,xcb-util-image)
174 ("xcb-util-keysyms" ,xcb-util-keysyms)
175 ("xcb-util-renderutil" ,xcb-util-renderutil)
176 ("xcb-util-wm" ,xcb-util-wm)
177 ("zlib" ,zlib)))
c4c4cc05 178 (native-inputs
0009ed71
SB
179 `(("bison" ,bison)
180 ("flex" ,flex)
181 ("gperf" ,gperf)
0009ed71
SB
182 ("perl" ,perl)
183 ("pkg-config" ,pkg-config)
184 ("python" ,python-2)
185 ("ruby" ,ruby)
ce0614dd 186 ("which" ,(@ (gnu packages base) which))))
b332e366 187 (arguments
46854e99
AE
188 `(;; FIXME: Disabling parallel building is a quick hack to avoid the
189 ;; failure described in
190 ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
191 ;; A more structural fix is needed.
192 #:parallel-build? #f
193 #:phases
cce28b0c 194 (modify-phases %standard-phases
2470d779
AE
195 (add-after 'configure 'patch-bin-sh
196 (lambda _
197 (substitute* '("qtbase/config.status"
198 "qtbase/configure"
199 "qtbase/mkspecs/features/qt_functions.prf"
200 "qtbase/qmake/library/qmakebuiltins.cpp")
201 (("/bin/sh") (which "sh")))
202 #t))
cce28b0c
AE
203 (replace 'configure
204 (lambda* (#:key outputs #:allow-other-keys)
205 (let ((out (assoc-ref outputs "out")))
206 (substitute* '("configure" "qtbase/configure")
207 (("/bin/pwd") (which "pwd")))
208 (substitute* "qtbase/src/corelib/global/global.pri"
209 (("/bin/ls") (which "ls")))
210 ;; do not pass "--enable-fast-install", which makes the
211 ;; configure process fail
212 (zero? (system*
213 "./configure"
214 "-verbose"
215 "-prefix" out
216 "-opensource"
217 "-confirm-license"
4dd0a8b6
EF
218 ;; Do not build examples; if desired, these could go
219 ;; into a separate output, but for the time being, we
220 ;; prefer to save the space and build time.
221 "-nomake" "examples"
cce28b0c
AE
222 ;; Most "-system-..." are automatic, but some use
223 ;; the bundled copy by default.
224 "-system-sqlite"
225 "-system-harfbuzz"
226 ;; explicitly link with openssl instead of dlopening it
227 "-openssl-linked"
228 ;; explicitly link with dbus instead of dlopening it
229 "-dbus-linked"
230 ;; drop special machine instructions not supported
231 ;; on all instances of the target
232 ,@(if (string-prefix? "x86_64"
233 (or (%current-target-system)
234 (%current-system)))
235 '()
236 '("-no-sse2"))
237 "-no-sse3"
238 "-no-ssse3"
239 "-no-sse4.1"
240 "-no-sse4.2"
241 "-no-avx"
242 "-no-avx2"
243 "-no-mips_dsp"
244 "-no-mips_dspr2"))))))))
2e36f7e6 245 (home-page "https://www.qt.io/")
b332e366
AE
246 (synopsis "Cross-platform GUI library")
247 (description "Qt is a cross-platform application and UI framework for
248developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 249 (license license:lgpl2.1)
f47638a3
LC
250
251 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
252 ;; see <http://hydra.gnu.org/build/112828>.
253 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
254 (supported-systems (delete "mips64el-linux" %supported-systems))))
1e9ed0e3
AE
255
256(define-public qt-4
257 (package (inherit qt)
d22b9397 258 (version "4.8.7")
1e9ed0e3
AE
259 (source (origin
260 (method url-fetch)
261 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
262 (string-copy version 0 (string-rindex version #\.))
263 "/" version
89059aa1 264 "/qt-everywhere-opensource-src-"
1e9ed0e3
AE
265 version ".tar.gz"))
266 (sha256
267 (base32
d22b9397 268 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
fc1adab1 269 (patches (search-patches "qt4-ldflags.patch"))
7431edea
AE
270 (modules '((guix build utils)))
271 (snippet
272 ;; Remove webkit module, which is not built.
273 '(delete-file-recursively "src/3rdparty/webkit"))))
f7fb0ccb
AE
274 (inputs `(,@(alist-delete "harfbuzz"
275 (alist-delete "libjpeg" (package-inputs qt)))
e7e5a4f8
AE
276 ("libjepg" ,libjpeg-8)
277 ("libsm" ,libsm)))
31580979
LC
278
279 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
280 ;; but we can't make them a separate output because "out" and "examples"
281 ;; would refer to each other.
282 (outputs '("out" ;112MiB core + 37MiB examples
283 "doc")) ;280MiB of HTML + code
1e9ed0e3
AE
284 (arguments
285 `(#:phases
cba632c4
LC
286 (modify-phases %standard-phases
287 (replace
1e9ed0e3
AE
288 'configure
289 (lambda* (#:key outputs #:allow-other-keys)
31580979
LC
290 (let ((out (assoc-ref outputs "out"))
291 (doc (assoc-ref outputs "doc")))
1e9ed0e3 292 (substitute* '("configure")
d2984346
LC
293 (("/bin/pwd") (which "pwd")))
294
206a5208
AE
295 (zero? (system*
296 "./configure"
297 "-verbose"
298 "-prefix" out
4b0f2ef7
LC
299 ;; Note: Don't pass '-docdir' since 'qmake' and
300 ;; libQtCore would record its value, thereby defeating
301 ;; the whole point of having a separate output.
ff1989a5
LC
302 "-datadir" (string-append out "/share/qt-" ,version
303 "/data")
304 "-importdir" (string-append out "/lib/qt-4"
305 "/imports")
306 "-plugindir" (string-append out "/lib/qt-4"
307 "/plugins")
308 "-translationdir" (string-append out "/share/qt-" ,version
309 "/translations")
31580979
LC
310 "-demosdir" (string-append out "/share/qt-" ,version
311 "/demos")
312 "-examplesdir" (string-append out "/share/qt-" ,version
313 "/examples")
206a5208
AE
314 "-opensource"
315 "-confirm-license"
ff0a8c59
AE
316 ;; explicitly link with dbus instead of dlopening it
317 "-dbus-linked"
7431edea
AE
318 ;; Skip the webkit module; it fails to build on armhf
319 ;; and, apart from that, may pose security risks.
320 "-no-webkit"
206a5208
AE
321 ;; drop special machine instructions not supported
322 ;; on all instances of the target
323 ,@(if (string-prefix? "x86_64"
324 (or (%current-target-system)
325 (%current-system)))
326 '()
327 '("-no-mmx"
1e9ed0e3
AE
328 "-no-3dnow"
329 "-no-sse"
206a5208
AE
330 "-no-sse2"))
331 "-no-sse3"
332 "-no-ssse3"
333 "-no-sse4.1"
334 "-no-sse4.2"
84811c22 335 "-no-avx")))))
4b0f2ef7
LC
336 (add-after
337 'install 'move-doc
338 (lambda* (#:key outputs #:allow-other-keys)
339 ;; Because of qt4-documentation-path.patch, documentation ends up
340 ;; being installed in OUT. Move it to the right place.
341 (let* ((out (assoc-ref outputs "out"))
342 (doc (assoc-ref outputs "doc"))
343 (olddoc (string-append out "/doc"))
344 (docdir (string-append doc "/share/doc/qt-" ,version)))
345 (mkdir-p (dirname docdir))
346
347 ;; Note: We can't use 'rename-file' here because OUT and DOC are
348 ;; different "devices" due to bind-mounts.
349 (copy-recursively olddoc docdir)
350 (delete-file-recursively olddoc)
351 #t))))))))
84ef83dd 352
7868000f
AE
353(define-public qtbase
354 (package
355 (name "qtbase")
fdaf6cd3 356 (version "5.9.1")
7868000f
AE
357 (source (origin
358 (method url-fetch)
359 (uri (string-append "https://download.qt.io/official_releases/qt/"
360 (version-major+minor version) "/" version
361 "/submodules/" name "-opensource-src-"
362 version ".tar.xz"))
363 (sha256
c7386f4e 364 (base32
fdaf6cd3 365 "1ikm896jzyfyjv2qv8n3fd81sxb4y24zkygx36865ygzyvlj36mw"))
7868000f
AE
366 (modules '((guix build utils)))
367 (snippet
924e6ddf 368 ;; corelib uses bundled harfbuzz, md4, md5, sha3
7868000f 369 '(begin
924e6ddf
EF
370 (for-each
371 (lambda (dir)
372 (delete-file-recursively (string-append "src/3rdparty/" dir)))
373 (list "double-conversion" "freetype" "harfbuzz-ng"
374 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
375 "xkbcommon" "zlib"))
376 #t))))
7868000f 377 (build-system gnu-build-system)
48d4ce6e
EF
378 (propagated-inputs
379 `(("mesa" ,mesa)))
7868000f
AE
380 (inputs
381 `(("alsa-lib" ,alsa-lib)
382 ("cups" ,cups)
383 ("dbus" ,dbus)
04f8decf 384 ("double-conversion" ,double-conversion)
f66970a7 385 ("eudev" ,eudev)
7868000f
AE
386 ("expat" ,expat)
387 ("fontconfig" ,fontconfig)
388 ("freetype" ,freetype)
389 ("glib" ,glib)
390 ("harfbuzz" ,harfbuzz)
391 ("icu4c" ,icu4c)
f66970a7 392 ("libinput" ,libinput)
7868000f
AE
393 ("libjpeg" ,libjpeg)
394 ("libmng" ,libmng)
395 ("libpng" ,libpng)
396 ("libx11" ,libx11)
397 ("libxcomposite" ,libxcomposite)
398 ("libxcursor" ,libxcursor)
399 ("libxfixes" ,libxfixes)
400 ("libxi" ,libxi)
401 ("libxinerama" ,libxinerama)
402 ("libxkbcommon" ,libxkbcommon)
403 ("libxml2" ,libxml2)
404 ("libxrandr" ,libxrandr)
405 ("libxrender" ,libxrender)
406 ("libxslt" ,libxslt)
407 ("libxtst" ,libxtst)
408 ("mtdev" ,mtdev)
409 ("mysql" ,mysql)
410 ("nss" ,nss)
411 ("openssl" ,openssl)
924e6ddf 412 ("pcre2" ,pcre2)
7868000f
AE
413 ("postgresql" ,postgresql)
414 ("pulseaudio" ,pulseaudio)
415 ("sqlite" ,sqlite)
416 ("unixodbc" ,unixodbc)
417 ("xcb-util" ,xcb-util)
418 ("xcb-util-image" ,xcb-util-image)
419 ("xcb-util-keysyms" ,xcb-util-keysyms)
420 ("xcb-util-renderutil" ,xcb-util-renderutil)
421 ("xcb-util-wm" ,xcb-util-wm)
422 ("zlib" ,zlib)))
423 (native-inputs
424 `(("bison" ,bison)
425 ("flex" ,flex)
426 ("gperf" ,gperf)
427 ("perl" ,perl)
428 ("pkg-config" ,pkg-config)
429 ("python" ,python-2)
430 ("ruby" ,ruby)
431 ("which" ,(@ (gnu packages base) which))))
432 (arguments
433 `(#:phases
434 (modify-phases %standard-phases
435 (add-after 'configure 'patch-bin-sh
436 (lambda _
437 (substitute* '("config.status"
438 "configure"
439 "mkspecs/features/qt_functions.prf"
440 "qmake/library/qmakebuiltins.cpp")
441 (("/bin/sh") (which "sh")))
442 #t))
443 (replace 'configure
444 (lambda* (#:key outputs #:allow-other-keys)
445 (let ((out (assoc-ref outputs "out")))
446 (substitute* "configure"
447 (("/bin/pwd") (which "pwd")))
448 (substitute* "src/corelib/global/global.pri"
449 (("/bin/ls") (which "ls")))
7972d8a2
AE
450 ;; The configuration files for other Qt5 packages are searched
451 ;; through a call to "find_package" in Qt5Config.cmake, which
452 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
453 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
454 ;; components can be installed in different places.
455 (substitute* (find-files "." ".*\\.cmake")
456 (("NO_DEFAULT_PATH") ""))
7868000f
AE
457 ;; do not pass "--enable-fast-install", which makes the
458 ;; configure process fail
459 (zero? (system*
460 "./configure"
461 "-verbose"
462 "-prefix" out
463 "-opensource"
464 "-confirm-license"
465 ;; Do not build examples; if desired, these could go
466 ;; into a separate output, but for the time being, we
467 ;; prefer to save the space and build time.
924e6ddf 468 "-no-compile-examples"
7868000f
AE
469 ;; Most "-system-..." are automatic, but some use
470 ;; the bundled copy by default.
471 "-system-sqlite"
472 "-system-harfbuzz"
924e6ddf 473 "-system-pcre"
7868000f
AE
474 ;; explicitly link with openssl instead of dlopening it
475 "-openssl-linked"
476 ;; explicitly link with dbus instead of dlopening it
477 "-dbus-linked"
4e825e2d
EF
478 ;; don't use the precompiled headers
479 "-no-pch"
480 ;; drop special machine instructions that do not have
481 ;; runtime detection
7868000f
AE
482 ,@(if (string-prefix? "x86_64"
483 (or (%current-target-system)
484 (%current-system)))
485 '()
486 '("-no-sse2"))
7868000f 487 "-no-mips_dsp"
5ca6ef95
SB
488 "-no-mips_dspr2")))))
489 (add-after 'install 'patch-qt_config.prf
490 (lambda* (#:key outputs #:allow-other-keys)
491 (let* ((out (assoc-ref outputs "out"))
492 (qt_config.prf (string-append
493 out "/mkspecs/features/qt_config.prf")))
494 ;; For each Qt module, let `qmake' uses search paths in the
495 ;; module directory instead of all in QT_INSTALL_PREFIX.
496 (substitute* qt_config.prf
497 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
498 "$$replace(dir, mkspecs/modules, include)")
499 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
500 "$$replace(dir, mkspecs/modules, lib)")
501 (("\\$\\$\\[QT_HOST_LIBS\\]")
502 "$$replace(dir, mkspecs/modules, lib)")
503 (("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
504 "$$replace(dir, mkspecs/modules, plugins)")
505 (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
506 "$$replace(dir, mkspecs/modules, libexec)")
507 (("\\$\\$\\[QT_INSTALL_BINS\\]")
508 "$$replace(dir, mkspecs/modules, bin)")
509 (("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
510 "$$replace(dir, mkspecs/modules, imports)")
511 (("\\$\\$\\[QT_INSTALL_QML\\]")
512 "$$replace(dir, mkspecs/modules, qml)"))
513 #t))))))
514 (native-search-paths
515 (list (search-path-specification
516 (variable "QMAKEPATH")
ed02e1fe
DC
517 (files '("")))
518 (search-path-specification
519 (variable "QML2_IMPORT_PATH")
520 (files '("qml")))
521 (search-path-specification
522 (variable "QT_PLUGIN_PATH")
523 (files '("plugins")))
524 (search-path-specification
525 (variable "XDG_DATA_DIRS")
526 (files '("share")))
527 (search-path-specification
528 (variable "XDG_CONFIG_DIRS")
529 (files '("etc/xdg")))))
7868000f
AE
530 (home-page "https://www.qt.io/")
531 (synopsis "Cross-platform GUI library")
532 (description "Qt is a cross-platform application and UI framework for
533developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 534 (license (list license:lgpl2.1 license:lgpl3))))
7868000f 535
19c17631
EF
536(define-public qtsvg
537 (package (inherit qtbase)
538 (name "qtsvg")
fdaf6cd3 539 (version "5.9.1")
19c17631
EF
540 (source (origin
541 (method url-fetch)
542 (uri (string-append "https://download.qt.io/official_releases/qt/"
543 (version-major+minor version) "/" version
544 "/submodules/" name "-opensource-src-"
545 version ".tar.xz"))
546 (sha256
547 (base32
fdaf6cd3 548 "1rg2q4snh2g4n93zmk995swwkl0ab1jr9ka9xpj56ddifkw99wlr"))))
48d4ce6e 549 (propagated-inputs `())
19c17631
EF
550 (native-inputs `(("perl" ,perl)))
551 (inputs
552 `(("mesa" ,mesa)
553 ("qtbase" ,qtbase)
554 ("zlib" ,zlib)))
555 (arguments
556 `(#:phases
557 (modify-phases %standard-phases
558 (replace 'configure
559 (lambda* (#:key outputs #:allow-other-keys)
560 (let ((out (assoc-ref outputs "out")))
c195b5ba
EF
561 ;; Valid QT_BUILD_PARTS variables are:
562 ;; libs tools tests examples demos docs translations
563 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
564 (string-append "PREFIX=" out))))))
19c17631
EF
565 (add-before 'install 'fix-Makefiles
566 (lambda* (#:key inputs outputs #:allow-other-keys)
567 (let ((out (assoc-ref outputs "out"))
568 (qtbase (assoc-ref inputs "qtbase")))
569 (substitute* (find-files "." "Makefile")
570 (((string-append "INSTALL_ROOT)" qtbase))
c195b5ba
EF
571 (string-append "INSTALL_ROOT)" out)))
572 #t)))
573 (add-before 'check 'set-display
574 (lambda _
94e24d81 575 ;; make Qt render "offscreen", required for tests
c195b5ba
EF
576 (setenv "QT_QPA_PLATFORM" "offscreen")
577 #t)))))))
19c17631 578
9b694210
EF
579(define-public qtimageformats
580 (package (inherit qtsvg)
581 (name "qtimageformats")
fdaf6cd3 582 (version "5.9.1")
9b694210
EF
583 (source (origin
584 (method url-fetch)
585 (uri (string-append "https://download.qt.io/official_releases/qt/"
586 (version-major+minor version) "/" version
587 "/submodules/" name "-opensource-src-"
588 version ".tar.xz"))
589 (sha256
590 (base32
fdaf6cd3 591 "0iwa3dys5rv706cpxwhmgircv783pmlyl1yrsc5i0rha643y7zkr"))
c04854da
EF
592 (modules '((guix build utils)))
593 (snippet
a20e00dd 594 '(delete-file-recursively "src/3rdparty"))))
9b694210
EF
595 (native-inputs `())
596 (inputs
a532a671
EF
597 `(("jasper" ,jasper)
598 ("libmng" ,libmng)
9b694210
EF
599 ("libtiff" ,libtiff)
600 ("libwebp" ,libwebp)
601 ("mesa" ,mesa)
602 ("qtbase" ,qtbase)
603 ("zlib" ,zlib)))))
604
f6c13613
EF
605(define-public qtx11extras
606 (package (inherit qtsvg)
607 (name "qtx11extras")
fdaf6cd3 608 (version "5.9.1")
f6c13613
EF
609 (source (origin
610 (method url-fetch)
611 (uri (string-append "https://download.qt.io/official_releases/qt/"
612 (version-major+minor version) "/" version
613 "/submodules/" name "-opensource-src-"
614 version ".tar.xz"))
615 (sha256
616 (base32
fdaf6cd3 617 "00fn3bps48gjyw0pdqvvl9scknxdpmacby6hvdrdccc3jll0wgd6"))))
c195b5ba
EF
618 (arguments
619 (substitute-keyword-arguments (package-arguments qtsvg)
620 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
f6c13613
EF
621 (native-inputs `(("perl" ,perl)))
622 (inputs
623 `(("mesa" ,mesa)
624 ("qtbase" ,qtbase)))))
625
98eec712
EF
626(define-public qtxmlpatterns
627 (package (inherit qtsvg)
628 (name "qtxmlpatterns")
fdaf6cd3 629 (version "5.9.1")
98eec712
EF
630 (source (origin
631 (method url-fetch)
632 (uri (string-append "https://download.qt.io/official_releases/qt/"
633 (version-major+minor version) "/" version
634 "/submodules/" name "-opensource-src-"
635 version ".tar.xz"))
636 (sha256
637 (base32
fdaf6cd3 638 "094wwap2fsl23cys6rxh2ciw0gxbbiqbshnn4qs1n6xdjrj6i15m"))))
c195b5ba
EF
639 (arguments
640 (substitute-keyword-arguments (package-arguments qtsvg)
f66b3e15
EF
641 ((#:phases phases)
642 `(modify-phases ,phases
643 (add-after 'unpack 'disable-network-tests
644 (lambda _ (substitute* "tests/auto/auto.pro"
645 (("qxmlquery") "# qxmlquery")
a20e00dd 646 (("xmlpatterns ") "# xmlpatterns"))
f66b3e15 647 #t))))))
98eec712
EF
648 (native-inputs `(("perl" ,perl)))
649 (inputs `(("qtbase" ,qtbase)))))
650
e3a2ed81
EF
651(define-public qtdeclarative
652 (package (inherit qtsvg)
653 (name "qtdeclarative")
fdaf6cd3 654 (version "5.9.1")
e3a2ed81
EF
655 (source (origin
656 (method url-fetch)
657 (uri (string-append "https://download.qt.io/official_releases/qt/"
658 (version-major+minor version) "/" version
659 "/submodules/" name "-opensource-src-"
660 version ".tar.xz"))
661 (sha256
662 (base32
fdaf6cd3 663 "1zwlxrgraxhlsdkwsai3pjbz7f3a6rsnsg2mjrpay6cz3af6rznj"))))
c195b5ba
EF
664 (arguments
665 (substitute-keyword-arguments (package-arguments qtsvg)
666 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
e3a2ed81
EF
667 (native-inputs
668 `(("perl" ,perl)
669 ("pkg-config" ,pkg-config)
670 ("python" ,python-2)
671 ("qtsvg" ,qtsvg)
672 ("qtxmlpatterns" ,qtxmlpatterns)))
673 (inputs
674 `(("mesa" ,mesa)
675 ("qtbase" ,qtbase)))))
676
e98cb96d
EF
677(define-public qtconnectivity
678 (package (inherit qtsvg)
679 (name "qtconnectivity")
fdaf6cd3 680 (version "5.9.1")
e98cb96d
EF
681 (source (origin
682 (method url-fetch)
683 (uri (string-append "https://download.qt.io/official_releases/qt/"
684 (version-major+minor version) "/" version
685 "/submodules/" name "-opensource-src-"
686 version ".tar.xz"))
687 (sha256
688 (base32
fdaf6cd3 689 "1mbzmqix0388iq20a1ljd1pgdq259rm1xzp9kx8gigqpamqqnqs0"))))
45f5bc0e
EF
690 (arguments
691 (substitute-keyword-arguments (package-arguments qtsvg)
692 ((#:phases phases)
693 `(modify-phases ,phases
694 (add-after 'unpack 'disable-failing-tests
695 ;; this test fails on armhf and aarch64
696 (lambda _
697 (substitute* "tests/auto/qndefnfcsmartposterrecord/tst_qndefnfcsmartposterrecord.cpp"
698 (("QCOMPARE\\(record.action\\(\\), QNdefNfcSmartPosterRecord::UnspecifiedAction")
699 "//QCOMPARE(record.action(), QNdefNfcSmartPosterRecord::UnspecifiedAction"))
700 #t))))))
e98cb96d
EF
701 (native-inputs
702 `(("perl" ,perl)
703 ("pkg-config" ,pkg-config)
704 ("qtdeclarative" ,qtdeclarative)))
705 (inputs
706 `(("bluez" ,bluez)
707 ("qtbase" ,qtbase)))))
708
cac893ec
EF
709(define-public qtwebsockets
710 (package (inherit qtsvg)
711 (name "qtwebsockets")
fdaf6cd3 712 (version "5.9.1")
cac893ec
EF
713 (source (origin
714 (method url-fetch)
715 (uri (string-append "https://download.qt.io/official_releases/qt/"
716 (version-major+minor version) "/" version
717 "/submodules/" name "-opensource-src-"
718 version ".tar.xz"))
719 (sha256
720 (base32
fdaf6cd3 721 "0r1lya2jj3wfci82zfn0vk6vr8sk9k7xiphnkb0panhb8di769q1"))))
c195b5ba
EF
722 (arguments
723 (substitute-keyword-arguments (package-arguments qtsvg)
724 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
cac893ec
EF
725 (native-inputs
726 `(("perl" ,perl)
727 ("qtdeclarative" ,qtdeclarative)))
728 (inputs `(("qtbase" ,qtbase)))))
729
3474767c
EF
730(define-public qtsensors
731 (package (inherit qtsvg)
732 (name "qtsensors")
fdaf6cd3 733 (version "5.9.1")
3474767c
EF
734 (source (origin
735 (method url-fetch)
736 (uri (string-append "https://download.qt.io/official_releases/qt/"
737 (version-major+minor version) "/" version
738 "/submodules/" name "-opensource-src-"
739 version ".tar.xz"))
740 (sha256
741 (base32
fdaf6cd3 742 "1772x7r6y9xv2sv0w2dfz2yhagsq5bpa9kdpzg0qikccmabr7was"))))
202afee2
EF
743 (arguments
744 (substitute-keyword-arguments (package-arguments qtsvg)
745 ((#:phases phases)
746 `(modify-phases ,phases
747 (add-after 'unpack 'lengthen-test-timeout
748 (lambda _
749 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
750 (("2000") "5000"))
751 #t))))))
3474767c
EF
752 (native-inputs
753 `(("perl" ,perl)
754 ("qtdeclarative" ,qtdeclarative)))
755 (inputs `(("qtbase" ,qtbase)))))
756
15378f93
EF
757(define-public qtmultimedia
758 (package (inherit qtsvg)
759 (name "qtmultimedia")
fdaf6cd3 760 (version "5.9.1")
15378f93
EF
761 (source (origin
762 (method url-fetch)
763 (uri (string-append "https://download.qt.io/official_releases/qt/"
764 (version-major+minor version) "/" version
765 "/submodules/" name "-opensource-src-"
766 version ".tar.xz"))
767 (sha256
768 (base32
fdaf6cd3 769 "1r76zvbv6wwb7lgw9jwlx382iyw34i1amxaypb5bg3j1niqvx3z4"))
63d8f08f
EF
770 (modules '((guix build utils)))
771 (snippet
772 '(begin
773 (delete-file-recursively
c195b5ba
EF
774 "examples/multimedia/spectrum/3rdparty")
775 ;; We also prevent the spectrum example from being built.
776 (substitute* "examples/multimedia/multimedia.pro"
777 (("spectrum") "#"))))))
778 (arguments
779 (substitute-keyword-arguments (package-arguments qtsvg)
04231311
RW
780 ((#:phases phases)
781 `(modify-phases ,phases
782 (replace 'configure
783 (lambda* (#:key outputs #:allow-other-keys)
784 (let ((out (assoc-ref outputs "out")))
785 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
786 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
787 (string-append "PREFIX=" out))))))))
788 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
15378f93
EF
789 (native-inputs
790 `(("perl" ,perl)
791 ("pkg-config" ,pkg-config)
792 ("python" ,python-2)
793 ("qtdeclarative" ,qtdeclarative)))
794 (inputs
795 `(("alsa-lib" ,alsa-lib)
796 ("mesa" ,mesa)
797 ("pulseaudio" ,pulseaudio)
04231311
RW
798 ("qtbase" ,qtbase)
799 ;; Gstreamer is needed for the mediaplayer plugin
800 ("gstreamer" ,gstreamer)
801 ("gst-plugins-base" ,gst-plugins-base)))))
15378f93 802
bc8ede01
EF
803(define-public qtwayland
804 (package (inherit qtsvg)
805 (name "qtwayland")
fdaf6cd3 806 (version "5.9.1")
bc8ede01
EF
807 (source (origin
808 (method url-fetch)
809 (uri (string-append "https://download.qt.io/official_releases/qt/"
810 (version-major+minor version) "/" version
811 "/submodules/" name "-opensource-src-"
812 version ".tar.xz"))
813 (sha256
814 (base32
fdaf6cd3 815 "1yizvbmh26mx1ffq0qaci02g2wihy68ld0y7r3z8nx3v5acb236g"))
924e6ddf
EF
816 (modules '((guix build utils)))
817 (snippet
818 ;; The examples try to build and cause the build to fail
819 '(delete-file-recursively "examples"))))
bc8ede01
EF
820 (native-inputs
821 `(("glib" ,glib)
822 ("perl" ,perl)
823 ("pkg-config" ,pkg-config)
824 ("qtdeclarative" ,qtdeclarative)))
825 (inputs
826 `(("fontconfig" ,fontconfig)
827 ("freetype" ,freetype)
828 ("libx11" ,libx11)
829 ("libxcomposite" ,libxcomposite)
830 ("libxext" ,libxext)
831 ("libxkbcommon" ,libxkbcommon)
832 ("libxrender" ,libxrender)
833 ("mesa" ,mesa)
834 ("mtdev" ,mtdev)
835 ("qtbase" ,qtbase)
836 ("wayland" ,wayland)))))
837
00806f2b
EF
838(define-public qtserialport
839 (package (inherit qtsvg)
840 (name "qtserialport")
fdaf6cd3 841 (version "5.9.1")
00806f2b
EF
842 (source (origin
843 (method url-fetch)
844 (uri (string-append "https://download.qt.io/official_releases/qt/"
845 (version-major+minor version) "/" version
846 "/submodules/" name "-opensource-src-"
847 version ".tar.xz"))
848 (sha256
849 (base32
fdaf6cd3 850 "0sbsc7n701kxl16r247a907zg2afmbx1xlml5jkc6a9956zqbzp1"))))
00806f2b 851 (native-inputs `(("perl" ,perl)))
33741e16
EF
852 (inputs
853 `(("qtbase" ,qtbase)
854 ("eudev" ,eudev)))))
00806f2b 855
a98ffab5
EF
856(define-public qtserialbus
857 (package (inherit qtsvg)
858 (name "qtserialbus")
fdaf6cd3 859 (version "5.9.1")
a98ffab5
EF
860 (source (origin
861 (method url-fetch)
862 (uri (string-append "https://download.qt.io/official_releases/qt/"
863 (version-major+minor version) "/" version
864 "/submodules/" name "-opensource-src-"
865 version ".tar.xz"))
866 (sha256
867 (base32
fdaf6cd3 868 "1hzk377c3zl4dm5hxwvpxg2w096m160448y9df6v6l8xpzpzxafa"))))
a98ffab5
EF
869 (inputs
870 `(("qtbase" ,qtbase)
871 ("qtserialport" ,qtserialport)))))
872
f5377013
EF
873(define-public qtwebchannel
874 (package (inherit qtsvg)
875 (name "qtwebchannel")
fdaf6cd3 876 (version "5.9.1")
f5377013
EF
877 (source (origin
878 (method url-fetch)
879 (uri (string-append "https://download.qt.io/official_releases/qt/"
880 (version-major+minor version) "/" version
881 "/submodules/" name "-opensource-src-"
882 version ".tar.xz"))
883 (sha256
884 (base32
fdaf6cd3 885 "003h09mla82f2znb8jjigx13ivc68ikgv7w04594yy7qdmd5yhl0"))))
f5377013
EF
886 (native-inputs
887 `(("perl" ,perl)
888 ("qtdeclarative" ,qtdeclarative)
889 ("qtwebsockets" ,qtwebsockets)))
890 (inputs `(("qtbase" ,qtbase)))))
891
d5ca54ce
EF
892(define-public qtlocation
893 (package (inherit qtsvg)
894 (name "qtlocation")
fdaf6cd3 895 (version "5.9.1")
d5ca54ce
EF
896 (source (origin
897 (method url-fetch)
898 (uri (string-append "https://download.qt.io/official_releases/qt/"
899 (version-major+minor version) "/" version
900 "/submodules/" name "-opensource-src-"
901 version ".tar.xz"))
902 (sha256
903 (base32
fdaf6cd3 904 "058mgvlaml9rkfhkpr1n3avhi12zlva131sqhbwj4lwwyqfkri2b"))))
c195b5ba
EF
905 (arguments
906 (substitute-keyword-arguments (package-arguments qtsvg)
907 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d5ca54ce
EF
908 (native-inputs
909 `(("perl" ,perl)
910 ("qtdeclarative" ,qtdeclarative)
9a935ef2 911 ("qtquickcontrols" ,qtquickcontrols)
d5ca54ce 912 ("qtserialport" ,qtserialport)))
924e6ddf
EF
913 (inputs
914 `(("icu4c" ,icu4c)
915 ("openssl" ,openssl)
916 ("qtbase" ,qtbase)
917 ("zlib" ,zlib)))))
d5ca54ce 918
d438c968
EF
919(define-public qttools
920 (package (inherit qtsvg)
921 (name "qttools")
fdaf6cd3 922 (version "5.9.1")
d438c968
EF
923 (source (origin
924 (method url-fetch)
925 (uri (string-append "https://download.qt.io/official_releases/qt/"
926 (version-major+minor version) "/" version
927 "/submodules/" name "-opensource-src-"
928 version ".tar.xz"))
929 (sha256
930 (base32
fdaf6cd3 931 "1s50kh3sg5wc5gqhwwznnibh7jcnfginnmkv66w62mm74k7mdsy4"))))
c195b5ba
EF
932 (arguments
933 (substitute-keyword-arguments (package-arguments qtsvg)
934 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d438c968
EF
935 (native-inputs
936 `(("perl" ,perl)
937 ("qtdeclarative" ,qtdeclarative)))
938 (inputs
939 `(("mesa" ,mesa)
940 ("qtbase" ,qtbase)))))
941
4742c4de
EF
942(define-public qtscript
943 (package (inherit qtsvg)
944 (name "qtscript")
fdaf6cd3 945 (version "5.9.1")
4742c4de
EF
946 (source (origin
947 (method url-fetch)
948 (uri (string-append "https://download.qt.io/official_releases/qt/"
949 (version-major+minor version) "/" version
950 "/submodules/" name "-opensource-src-"
951 version ".tar.xz"))
952 (sha256
953 (base32
fdaf6cd3 954 "13qq2mjfhqdcvkmzrgxg1gr5kww1ygbwb7r71xxl6rjzbn30hshp"))
7c5cf7a2 955 (patches (search-patches "qtscript-disable-tests.patch"))))
4742c4de
EF
956 (native-inputs
957 `(("perl" ,perl)
958 ("qttools" ,qttools)))
959 (inputs
960 `(("qtbase" ,qtbase)))))
961
ae0e5133
DC
962(define-public qtquickcontrols
963 (package (inherit qtsvg)
964 (name "qtquickcontrols")
fdaf6cd3 965 (version "5.9.1")
ae0e5133
DC
966 (source (origin
967 (method url-fetch)
968 (uri (string-append "https://download.qt.io/official_releases/qt/"
969 (version-major+minor version) "/" version
970 "/submodules/" name "-opensource-src-"
971 version ".tar.xz"))
972 (sha256
973 (base32
fdaf6cd3 974 "0bpc465q822phw3dcbddn70wj1fjlc2hxskkp1z9gl7r23hx03jj"))))
c195b5ba
EF
975 (arguments
976 (substitute-keyword-arguments (package-arguments qtsvg)
977 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
ae0e5133
DC
978 (inputs
979 `(("qtbase" ,qtbase)
980 ("qtdeclarative" ,qtdeclarative)))))
981
42da1492
DC
982(define-public qtquickcontrols2
983 (package (inherit qtsvg)
984 (name "qtquickcontrols2")
fdaf6cd3 985 (version "5.9.1")
42da1492
DC
986 (source (origin
987 (method url-fetch)
988 (uri (string-append "https://download.qt.io/official_releases/qt/"
989 (version-major+minor version) "/" version
990 "/submodules/" name "-opensource-src-"
991 version ".tar.xz"))
992 (sha256
993 (base32
fdaf6cd3 994 "1zq86kqz85wm3n84jcxkxw5x1mrhkqzldkigf8xm3l8j24rf0fr0"))))
c195b5ba
EF
995 (arguments
996 (substitute-keyword-arguments (package-arguments qtsvg)
997 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
42da1492
DC
998 (inputs
999 `(("qtbase" ,qtbase)
1000 ("qtdeclarative" ,qtdeclarative)))))
1001
4e4ed0ee
DC
1002(define-public qtgraphicaleffects
1003 (package (inherit qtsvg)
1004 (name "qtgraphicaleffects")
fdaf6cd3 1005 (version "5.9.1")
4e4ed0ee
DC
1006 (source (origin
1007 (method url-fetch)
1008 (uri (string-append "https://download.qt.io/official_releases/qt/"
1009 (version-major+minor version) "/" version
1010 "/submodules/" name "-opensource-src-"
1011 version ".tar.xz"))
1012 (sha256
1013 (base32
fdaf6cd3 1014 "1zsr3a5dsmpvrb5h4m4h42wqmkvkks3d8mmyrx4k0mfr6s7c71jz"))))
c195b5ba
EF
1015 (arguments
1016 (substitute-keyword-arguments (package-arguments qtsvg)
1017 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
4e4ed0ee
DC
1018 (inputs
1019 `(("qtbase" ,qtbase)
1020 ("qtdeclarative" ,qtdeclarative)))))
1021
843bdfb7 1022(define-public qtdeclarative-render2d
a20e00dd 1023 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
843bdfb7
EF
1024 (package (inherit qtsvg)
1025 (name "qtdeclarative-render2d")
1026 (version "5.7.1")
1027 (source (origin
1028 (method url-fetch)
1029 (uri (string-append "https://download.qt.io/official_releases/qt/"
1030 (version-major+minor version) "/" version
1031 "/submodules/" name "-opensource-src-"
1032 version ".tar.xz"))
1033 (sha256
1034 (base32
1035 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1036 (modules '((guix build utils)))
1037 (snippet
1038 '(delete-file-recursively "tools/opengldummy/3rdparty"))))
1039 (native-inputs `())
1040 (inputs
1041 `(("qtbase" ,qtbase)
a20e00dd
EF
1042 ("qtdeclarative" ,qtdeclarative)))
1043 (properties `((superseded . ,qtdeclarative)))))
843bdfb7 1044
51519fd3
EF
1045(define-public qtgamepad
1046 (package (inherit qtsvg)
1047 (name "qtgamepad")
fdaf6cd3 1048 (version "5.9.1")
51519fd3
EF
1049 (source (origin
1050 (method url-fetch)
1051 (uri (string-append "https://download.qt.io/official_releases/qt/"
1052 (version-major+minor version) "/" version
1053 "/submodules/" name "-opensource-src-"
1054 version ".tar.xz"))
1055 (sha256
1056 (base32
fdaf6cd3 1057 "055w4649zi93q1sl32ngqwgnl2vxw1idnm040s9gjgjb67gi81zi"))))
51519fd3
EF
1058 (native-inputs
1059 `(("perl" ,perl)
1060 ("pkg-config" ,pkg-config)))
1061 (inputs
1062 `(("fontconfig" ,fontconfig)
1063 ("freetype" ,freetype)
1064 ("libxrender" ,libxrender)
1065 ("sdl2" ,sdl2)
1066 ("qtbase" ,qtbase)
1067 ("qtdeclarative" ,qtdeclarative)))))
1068
56cd88fd
EF
1069(define-public qtscxml
1070 (package (inherit qtsvg)
1071 (name "qtscxml")
fdaf6cd3 1072 (version "5.9.1")
56cd88fd
EF
1073 (source (origin
1074 (method url-fetch)
1075 (uri (string-append "https://download.qt.io/official_releases/qt/"
1076 (version-major+minor version) "/" version
1077 "/submodules/" name "-opensource-src-"
1078 version ".tar.xz"))
1079 (sha256
1080 (base32
fdaf6cd3 1081 "1m3b6wg5hqasdfc5igpj9bq3czql5kkvvn3rx1ig508kdlh5i5s0"))
56cd88fd
EF
1082 (modules '((guix build utils)))
1083 (snippet
c195b5ba
EF
1084 '(begin
1085 (delete-file-recursively "tests/3rdparty")
1086 ;; the scion test refers to the bundled 3rd party test code.
1087 (substitute* "tests/auto/auto.pro"
1088 (("scion") "#"))))))
56cd88fd
EF
1089 (inputs
1090 `(("qtbase" ,qtbase)
1091 ("qtdeclarative" ,qtdeclarative)))))
1092
de5e0180
EF
1093(define-public qtpurchasing
1094 (package (inherit qtsvg)
1095 (name "qtpurchasing")
fdaf6cd3 1096 (version "5.9.1")
de5e0180
EF
1097 (source (origin
1098 (method url-fetch)
1099 (uri (string-append "https://download.qt.io/official_releases/qt/"
1100 (version-major+minor version) "/" version
1101 "/submodules/" name "-opensource-src-"
1102 version ".tar.xz"))
1103 (sha256
1104 (base32
fdaf6cd3 1105 "0b1hlaq6rb7d6b6h8kqd26klcpzf9vcdjrv610kdj0drb00jg3ss"))))
de5e0180
EF
1106 (inputs
1107 `(("qtbase" ,qtbase)
1108 ("qtdeclarative" ,qtdeclarative)))))
1109
173b54b9
EF
1110(define-public qtcanvas3d
1111 (package (inherit qtsvg)
1112 (name "qtcanvas3d")
fdaf6cd3 1113 (version "5.9.1")
173b54b9
EF
1114 (source (origin
1115 (method url-fetch)
1116 (uri (string-append "https://download.qt.io/official_releases/qt/"
1117 (version-major+minor version) "/" version
1118 "/submodules/" name "-opensource-src-"
1119 version ".tar.xz"))
1120 (sha256
1121 (base32
fdaf6cd3 1122 "10fy8wqfw2yhha6lyky5g1a72137aj8pji7mk0wjnggh629z12sb"))
173b54b9
EF
1123 (modules '((guix build utils)))
1124 (snippet
1125 '(delete-file-recursively "examples/canvas3d/3rdparty"))))
c195b5ba
EF
1126 (arguments
1127 (substitute-keyword-arguments (package-arguments qtsvg)
1128 ;; Building the tests depends on the bundled 3rd party javascript files,
1129 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1130 ;; fail, so we skip building them for now.
1131 ((#:phases phases)
1132 `(modify-phases ,phases
1133 (replace 'configure
1134 (lambda* (#:key outputs #:allow-other-keys)
1135 (let ((out (assoc-ref outputs "out")))
1136 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools"
1137 (string-append "PREFIX=" out))))))))
1138 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
173b54b9
EF
1139 (native-inputs `())
1140 (inputs
1141 `(("qtbase" ,qtbase)
1142 ("qtdeclarative" ,qtdeclarative)))))
1143
68bbe14b
EF
1144(define-public qtcharts
1145 (package (inherit qtsvg)
1146 (name "qtcharts")
fdaf6cd3 1147 (version "5.9.1")
68bbe14b
EF
1148 (source (origin
1149 (method url-fetch)
1150 (uri (string-append "https://download.qt.io/official_releases/qt/"
1151 (version-major+minor version) "/" version
1152 "/submodules/" name "-opensource-src-"
1153 version ".tar.xz"))
1154 (sha256
1155 (base32
fdaf6cd3 1156 "180df5v7i1ki8hc3lgi6jcfdyz7f19pb73dvfkw402wa2gfcna3k"))))
c195b5ba
EF
1157 (arguments
1158 (substitute-keyword-arguments (package-arguments qtsvg)
1159 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
68bbe14b
EF
1160 (inputs
1161 `(("qtbase" ,qtbase)
1162 ("qtdeclarative" ,qtdeclarative)))))
1163
a69945a7
EF
1164(define-public qtdatavis3d
1165 (package (inherit qtsvg)
1166 (name "qtdatavis3d")
fdaf6cd3 1167 (version "5.9.1")
a69945a7
EF
1168 (source (origin
1169 (method url-fetch)
1170 (uri (string-append "https://download.qt.io/official_releases/qt/"
1171 (version-major+minor version) "/" version
1172 "/submodules/" name "-opensource-src-"
1173 version ".tar.xz"))
1174 (sha256
1175 (base32
fdaf6cd3 1176 "14d1q07winh6n1bkc616dapwfnsfkcjyg5zngdqjdj9mza8ang13"))))
c195b5ba
EF
1177 (arguments
1178 (substitute-keyword-arguments (package-arguments qtsvg)
1179 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
a69945a7
EF
1180 (inputs
1181 `(("qtbase" ,qtbase)
1182 ("qtdeclarative" ,qtdeclarative)))))
1183
84ef83dd
AE
1184(define-public python-sip
1185 (package
1186 (name "python-sip")
f6da41b5 1187 (version "4.19.2")
84ef83dd
AE
1188 (source
1189 (origin
1190 (method url-fetch)
1191 (uri
1192 (string-append "mirror://sourceforge/pyqt/sip/"
8fa7f8d9 1193 "sip-" version "/sip-" version ".tar.gz"))
84ef83dd
AE
1194 (sha256
1195 (base32
f6da41b5 1196 "0cq5r21fmjyw5v7a6l4sfbaj3zgm7k5b2cryj6bnjki54nnllas3"))))
84ef83dd
AE
1197 (build-system gnu-build-system)
1198 (native-inputs
1199 `(("python" ,python-wrapper)))
1200 (arguments
1201 `(#:tests? #f ; no check target
e8bdd73a
AE
1202 #:modules ((srfi srfi-1)
1203 ,@%gnu-build-system-modules)
84ef83dd 1204 #:phases
39766868
EF
1205 (modify-phases %standard-phases
1206 (replace 'configure
1207 (lambda* (#:key inputs outputs #:allow-other-keys)
1208 (let* ((out (assoc-ref outputs "out"))
1209 (bin (string-append out "/bin"))
1210 (include (string-append out "/include"))
1211 (python (assoc-ref inputs "python"))
1212 (python-version
1213 (last (string-split python #\-)))
1214 (python-major+minor
1215 (string-join
1216 (take (string-split python-version #\.) 2)
1217 "."))
1218 (lib (string-append out "/lib/python"
1219 python-major+minor
1220 "/site-packages")))
1221 (zero?
1222 (system* "python" "configure.py"
1223 "--bindir" bin
1224 "--destdir" lib
1225 "--incdir" include))))))))
1226 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
84ef83dd
AE
1227 (synopsis "Python binding creator for C and C++ libraries")
1228 (description
1229 "SIP is a tool to create Python bindings for C and C++ libraries. It
1230was originally developed to create PyQt, the Python bindings for the Qt
1231toolkit, but can be used to create bindings for any C or C++ library.
1232
1233SIP comprises a code generator and a Python module. The code generator
1234processes a set of specification files and generates C or C++ code, which
1235is then compiled to create the bindings extension module. The SIP Python
1236module provides support functions to the automatically generated code.")
1237 ;; There is a choice between a python like license, gpl2 and gpl3.
1238 ;; For compatibility with pyqt, we need gpl3.
225941b0 1239 (license license:gpl3)))
84ef83dd
AE
1240
1241(define-public python2-sip
1242 (package (inherit python-sip)
1243 (name "python2-sip")
1244 (native-inputs
1245 `(("python" ,python-2)))))
014e7dd8
AE
1246
1247(define-public python-pyqt
1248 (package
1249 (name "python-pyqt")
5ac3a671 1250 (version "5.8.2")
014e7dd8
AE
1251 (source
1252 (origin
1253 (method url-fetch)
1254 (uri
1255 (string-append "mirror://sourceforge/pyqt/PyQt5/"
2be06813 1256 "PyQt-" version "/PyQt5_gpl-"
014e7dd8
AE
1257 version ".tar.gz"))
1258 (sha256
1259 (base32
5ac3a671 1260 "1s1nalcspam9dc7f63jkqn1i2sv9lrqn57p2zsc61g8bncahbmzb"))
fc1adab1 1261 (patches (search-patches "pyqt-configure.patch"))))
014e7dd8
AE
1262 (build-system gnu-build-system)
1263 (native-inputs
499991cf
EB
1264 `(("qtbase" ,qtbase))) ; for qmake
1265 (propagated-inputs
1266 `(("python-sip" ,python-sip)))
014e7dd8 1267 (inputs
e9adcd81
EF
1268 `(("python" ,python-wrapper)
1269 ("qtbase" ,qtbase)
1270 ("qtconnectivity" ,qtconnectivity)
1271 ("qtdeclarative" ,qtdeclarative)
1272 ("qtlocation" ,qtlocation)
1273 ("qtmultimedia" ,qtmultimedia)
1274 ("qtsensors" ,qtsensors)
1275 ("qtserialport" ,qtserialport)
1276 ("qtsvg" ,qtsvg)
1277 ("qttools" ,qttools)
1278 ("qtwebchannel" ,qtwebchannel)
1279 ("qtwebkit" ,qtwebkit)
1280 ("qtwebsockets" ,qtwebsockets)
1281 ("qtx11extras" ,qtx11extras)
1282 ("qtxmlpatterns" ,qtxmlpatterns)))
014e7dd8 1283 (arguments
e8bdd73a
AE
1284 `(#:modules ((srfi srfi-1)
1285 ,@%gnu-build-system-modules)
1286 #:phases
eef988c8
EF
1287 (modify-phases %standard-phases
1288 (replace 'configure
1289 (lambda* (#:key inputs outputs #:allow-other-keys)
1290 (let* ((out (assoc-ref outputs "out"))
1291 (bin (string-append out "/bin"))
1292 (sip (string-append out "/share/sip"))
1293 (plugins (string-append out "/plugins"))
1294 (designer (string-append plugins "/designer"))
1295 (qml (string-append plugins "/PyQt5"))
1296 (python (assoc-ref inputs "python"))
1297 (python-version
1298 (last (string-split python #\-)))
1299 (python-major+minor
1300 (string-join
1301 (take (string-split python-version #\.) 2)
1302 "."))
1303 (lib (string-append out "/lib/python"
1304 python-major+minor
43e8824d
HG
1305 "/site-packages"))
1306 (stubs (string-append lib "/PyQt5")))
eef988c8
EF
1307 (zero? (system* "python" "configure.py"
1308 "--confirm-license"
1309 "--bindir" bin
1310 "--destdir" lib
1311 "--designer-plugindir" designer
1312 "--qml-plugindir" qml
43e8824d
HG
1313 ; Where to install the PEP 484 Type Hints stub
1314 ; files. Without this the stubs are tried to be
1315 ; installed into the python package's
1316 ; site-package directory, which is read-only.
1317 "--stubsdir" stubs
eef988c8
EF
1318 "--sipdir" sip))))))))
1319 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
014e7dd8
AE
1320 (synopsis "Python bindings for Qt")
1321 (description
1322 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1323framework. The bindings are implemented as a set of Python modules and
1324contain over 620 classes.")
225941b0 1325 (license license:gpl3)))
014e7dd8
AE
1326
1327(define-public python2-pyqt
1328 (package (inherit python-pyqt)
1329 (name "python2-pyqt")
1330 (native-inputs
1331 `(("python-sip" ,python2-sip)
2be06813 1332 ("qtbase" ,qtbase)))
014e7dd8 1333 (inputs
e9adcd81
EF
1334 `(("python" ,python-2)
1335 ,@(alist-delete "python" (package-inputs python-pyqt))))))
3e291958
AE
1336
1337(define-public python-pyqt-4
1338 (package (inherit python-pyqt)
1339 (name "python-pyqt")
41fa164a 1340 (version "4.12")
3e291958
AE
1341 (source
1342 (origin
1343 (method url-fetch)
1344 (uri
1345 (string-append "mirror://sourceforge/pyqt/PyQt4/"
41fa164a 1346 "PyQt-" version "/PyQt4_gpl_x11-"
3e291958
AE
1347 version ".tar.gz"))
1348 (sha256
1349 (base32
41fa164a 1350 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
3e291958
AE
1351 (native-inputs
1352 `(("python-sip" ,python-sip)
1353 ("qt" ,qt-4)))
e9adcd81 1354 (inputs `(("python" ,python-wrapper)))
3e291958
AE
1355 (arguments
1356 `(#:tests? #f ; no check target
e8bdd73a
AE
1357 #:modules ((srfi srfi-1)
1358 ,@%gnu-build-system-modules)
3e291958 1359 #:phases
f9513086
EF
1360 (modify-phases %standard-phases
1361 (replace 'configure
1362 (lambda* (#:key inputs outputs #:allow-other-keys)
1363 (let* ((out (assoc-ref outputs "out"))
1364 (bin (string-append out "/bin"))
1365 (sip (string-append out "/share/sip"))
1366 (python (assoc-ref inputs "python"))
1367 (python-version
1368 (last (string-split python #\-)))
1369 (python-major+minor
1370 (string-join
1371 (take (string-split python-version #\.) 2)
1372 "."))
1373 (lib (string-append out "/lib/python"
1374 python-major+minor
1375 "/site-packages")))
1376 (zero? (system* "python" "configure.py"
1377 "--confirm-license"
1378 "--bindir" bin
1379 "--destdir" lib
1380 "--sipdir" sip))))))))
225941b0 1381 (license (list license:gpl2 license:gpl3)))) ; choice of either license
3e291958 1382
6d8e14d0 1383(define-public python2-pyqt-4
1384 (package (inherit python-pyqt-4)
9fde8778 1385 (name "python2-pyqt")
6d8e14d0 1386 (native-inputs
1387 `(("python-sip" ,python2-sip)
1388 ("qt" ,qt-4)))
1389 (inputs
1390 `(("python" ,python-2)))))
1391
3befd0a9
RW
1392(define-public qscintilla
1393 (package
1394 (name "qscintilla")
1395 (version "2.10.1")
1396 (source (origin
1397 (method url-fetch)
1398 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1399 "QScintilla-" version "/QScintilla_gpl-"
1400 version ".tar.gz"))
1401 (sha256
1402 (base32
1403 "0r7s7ndblv3jc0xig1y4l64b6mfr879cdv3zwdndn27rj6fqmycp"))))
1404 (build-system gnu-build-system)
1405 (arguments
1406 `(#:phases
1407 (modify-phases %standard-phases
1408 (replace 'configure
1409 (lambda* (#:key outputs #:allow-other-keys)
1410 (let ((out (assoc-ref outputs "out")))
1411 (chdir "Qt4Qt5")
1412 (substitute* "qscintilla.pro"
1413 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1414 (string-append out "/lib"))
1415 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1416 (string-append out "/include"))
1417 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1418 (string-append out "/translations"))
1419 (("\\$\\$\\[QT_INSTALL_DATA\\]") out)
1420 (("\\$\\$\\[QT_HOST_DATA\\]") out))
1421 (zero? (system* "qmake"))))))))
1422 (native-inputs `(("qtbase" ,qtbase)))
1423 (home-page "http://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1424 (synopsis "Qt port of the Scintilla C++ editor control")
1425 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1426editor control. QScintilla includes features especially useful when editing
1427and debugging source code. These include support for syntax styling, error
1428indicators, code completion and call tips.")
1429 (license license:gpl3+)))
1430
06d04dbc
RW
1431(define-public python-qscintilla
1432 (package (inherit qscintilla)
1433 (name "python-qscintilla")
1434 (arguments
1435 `(#:configure-flags
1436 (list "--pyqt=PyQt5"
1437 (string-append "--pyqt-sipdir="
1438 (assoc-ref %build-inputs "python-pyqt")
1439 "/share/sip")
1440 (string-append "--qsci-incdir="
1441 (assoc-ref %build-inputs "qscintilla")
1442 "/include")
1443 (string-append "--qsci-libdir="
1444 (assoc-ref %build-inputs "qscintilla")
1445 "/lib"))
1446 #:phases
1447 (modify-phases %standard-phases
1448 (replace 'configure
1449 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1450 (chdir "Python")
1451 (and (zero? (apply system* "python3" "configure.py"
1452 configure-flags))
1453 ;; Install to the right directory
1454 (begin
1455 (substitute* '("Makefile"
1456 "Qsci/Makefile")
1457 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
1458 (assoc-ref outputs "out")))
1459 #t)))))))
1460 (inputs
1461 `(("qscintilla" ,qscintilla)
1462 ("python" ,python)
1463 ("python-pyqt" ,python-pyqt)))
1464 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1465editor control. QScintilla includes features especially useful when editing
1466and debugging source code. These include support for syntax styling, error
1467indicators, code completion and call tips.
1468
1469This package provides the Python bindings.")))
1470
2456153a
RW
1471;; PyQt only looks for modules in its own directory. It ignores environment
1472;; variables such as PYTHONPATH, so we need to build a union package to make
1473;; it work.
1474(define-public python-pyqt+qscintilla
1475 (package (inherit python-pyqt)
1476 (name "python-pyqt+qscintilla")
1477 (source #f)
1478 (build-system trivial-build-system)
1479 (arguments
1480 '(#:modules ((guix build union))
1481 #:builder (begin
1482 (use-modules (ice-9 match)
1483 (guix build union))
1484 (match %build-inputs
1485 (((names . directories) ...)
1486 (union-build (assoc-ref %outputs "out")
1487 directories))))))
1488 (inputs
1489 `(("python-pyqt" ,python-pyqt)
1490 ("python-qscintilla" ,python-qscintilla)))
1491 (synopsis "Union of PyQt and the Qscintilla extension")
1492 (description
1493 "This package contains the union of PyQt and the Qscintilla extension.")))
1494
9e81af9e
EF
1495(define-public qtkeychain
1496 (package
1497 (name "qtkeychain")
4ad70ad8 1498 (version "0.8.0")
9e81af9e
EF
1499 (source
1500 (origin
1501 (method url-fetch)
1502 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1503 "archive/v" version ".tar.gz"))
1504 (file-name (string-append name "-" version ".tar.gz"))
1505 (sha256
4ad70ad8 1506 (base32 "0bxi5pfhxdvwk8yxa06lk2d7lcibmfqhahbin82bqf3m341zd4ml"))))
9e81af9e 1507 (build-system cmake-build-system)
18174d8a
DC
1508 (native-inputs
1509 `(("qttools" ,qttools)))
9e81af9e 1510 (inputs
18174d8a 1511 `(("qtbase" ,qtbase)))
9e81af9e
EF
1512 (arguments
1513 `(#:tests? #f ; No tests included
1514 #:phases
1515 (modify-phases %standard-phases
1516 (add-before
1517 'configure 'set-qt-trans-dir
1518 (lambda _
1519 (substitute* "CMakeLists.txt"
1520 (("\\$\\{qt_translations_dir\\}")
4ad70ad8
EF
1521 "${CMAKE_INSTALL_PREFIX}/share/qt/translations"))
1522 #t)))))
9e81af9e
EF
1523 (home-page "https://github.com/frankosterfeld/qtkeychain")
1524 (synopsis "Qt API to store passwords")
1525 (description
1526 "QtKeychain is a Qt library to store passwords and other secret data
1527securely. It will not store any data unencrypted unless explicitly requested.")
225941b0 1528 (license license:bsd-3)))
fc381a33
TD
1529
1530(define-public qwt
1531 (package
1532 (name "qwt")
1533 (version "6.1.3")
1534 (source
1535 (origin
1536 (method url-fetch)
1537 (uri
1538 (string-append "mirror://sourceforge/qwt/qwt/"
1539 version "/qwt-" version ".tar.bz2"))
1540 (sha256
1541 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1542 (build-system gnu-build-system)
1543 (inputs
1544 `(("qtbase" ,qtbase)
1545 ("qtsvg" ,qtsvg)
1546 ("qttools" ,qttools)))
1547 (arguments
1548 `(#:phases
1549 (modify-phases %standard-phases
1550 (replace 'configure
1551 (lambda* (#:key outputs #:allow-other-keys)
1552 (let ((out (assoc-ref outputs "out")))
1553 (substitute* '("qwtconfig.pri")
1554 (("/usr/local/qwt-\\$\\$QWT\\_VERSION") out))
1555 (zero? (system* "qmake")))))
1556 (add-after 'install 'install-documentation
1557 (lambda* (#:key outputs #:allow-other-keys)
1558 (let* ((out (assoc-ref outputs "out"))
1559 (man (string-append out "/share/man")))
1560 ;; Remove some incomplete manual pages.
1561 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1562 (mkdir-p man)
1563 (copy-recursively "doc/man" man)
1564 #t))))))
1565 (home-page "http://qwt.sourceforge.net")
1566 (synopsis "Qt widgets for plots, scales, dials and other technical software
1567GUI components")
1568 (description
1569 "The Qwt library contains widgets and components which are primarily useful
1570for technical and scientific purposes. It includes a 2-D plotting widget,
1571different kinds of sliders, and much more.")
1572 (license
1573 (list
1574 ;; The Qwt license is LGPL2.1 with some exceptions.
1575 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1576 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1577 license:lgpl2.1 license:gpl3))))
47e1d280
TD
1578
1579(define-public qtwebkit
1580 (package
1581 (name "qtwebkit")
fdaf6cd3 1582 (version "5.9.1")
47e1d280
TD
1583 (source
1584 (origin
1585 (method url-fetch)
fdaf6cd3
EF
1586 (uri (string-append "https://download.qt.io/official_releases/qt/"
1587 (version-major+minor version) "/" version
1588 "/submodules/" name "-opensource-src-"
a20e00dd 1589 version ".tar.xz"))
47e1d280
TD
1590 (sha256
1591 (base32
fdaf6cd3 1592 "1ksjn1vjbfhdm4y4rg08ag4krk87ahp7qcdcpwll42l0rnz61998"))))
47e1d280
TD
1593 (build-system gnu-build-system)
1594 (native-inputs
1595 `(("perl" ,perl)
1596 ("python" ,python-2.7)
1597 ("ruby" ,ruby)
1598 ("bison" ,bison)
1599 ("flex" ,flex)
1600 ("gperf" ,gperf)
1601 ("pkg-config" ,pkg-config)))
1602 (inputs
1603 `(("icu" ,icu4c)
1604 ("libjpeg" ,libjpeg)
1605 ("libpng" ,libpng)
1606 ("libwebp" ,libwebp)
1607 ("sqlite" ,sqlite)
1608 ("fontconfig" ,fontconfig)
1609 ("libxrender", libxrender)
1610 ("qtbase" ,qtbase)
1611 ("qtdeclarative" ,qtdeclarative)
1612 ("qtmultimedia" ,qtmultimedia)
1613 ("libxml2" ,libxml2)
1614 ("libxslt" ,libxslt)
1615 ("libx11" ,libx11)
1616 ("libxcomposite" ,libxcomposite)))
1617 (arguments
1618 `(#:phases
1619 (modify-phases %standard-phases
1620 (replace 'configure
1621 (lambda* (#:key outputs #:allow-other-keys)
1622 (let ((out (assoc-ref outputs "out")))
1623 (setenv "QMAKEPATH"
1624 (string-append (getcwd) "/Tools/qmake:"
1625 (getenv "QMAKEPATH")))
1626 (system* "qmake"))))
1627 ;; prevent webkit from trying to install into the qtbase store directory,
1628 ;; and replace references to the build directory in linker options:
1629 (add-before 'build 'patch-installpaths
1630 (lambda* (#:key outputs inputs #:allow-other-keys)
1631 (let* ((out (assoc-ref outputs "out"))
1632 (qtbase (assoc-ref inputs "qtbase"))
1633 (builddir (getcwd))
1634 (linkbuild (string-append "-L" builddir))
1635 (linkout (string-append "-L" out))
1636 (makefiles
1637 (map-in-order
1638 (lambda (i)
1639 (let* ((in (car i))
1640 (mf (string-append (dirname in) "/"
1641 (cdr i))))
1642 ;; by default, these Makefiles are
1643 ;; generated during install, but we need
1644 ;; to generate them now
1645 (system* "qmake" in "-o" mf)
1646 mf))
1647 '(("Source/api.pri" . "Makefile.api")
1648 ("Source/widgetsapi.pri"
1649 . "Makefile.widgetsapi")
1650 ("Source/WebKit2/WebProcess.pro"
1651 . "Makefile.WebProcess")
1652 ("Source/WebKit2/PluginProcess.pro"
1653 . "Makefile.PluginProcess")
1654 ("Source/WebKit/qt/declarative/public.pri"
1655 . "Makefile.declarative.public")
1656 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
1657 . "Makefile.declarative.experimental")
1658 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
1659 . "Makefile")))))
1660 ;; Order of qmake calls and substitutions matters here.
1661 (system* "qmake" "-prl" "Source/widgetsapi.pri"
1662 "-o" "Source/Makefile")
1663 (substitute* (find-files "lib" "libQt5.*\\.prl")
1664 ((linkbuild) linkout))
1665 (substitute* (find-files "lib"
1666 "libQt5WebKit.*\\.la")
1667 (("libdir='.*'")
1668 (string-append "libdir='" out "/lib'"))
1669 ((linkbuild) linkout))
1670 (substitute* (find-files "lib/pkgconfig"
1671 "Qt5WebKit.*\\.pc")
1672 (((string-append "prefix=" qtbase))
1673 (string-append "prefix=" out))
1674 ((linkbuild) linkout))
1675 ;; Makefiles must be modified after .prl/.la/.pc
1676 ;; files, lest they get rebuilt:
1677 (substitute* makefiles
1678 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
1679 out )
1680 (((string-append "-Wl,-rpath," builddir))
1681 (string-append "-Wl,-rpath," out)))))))))
1682 (home-page "https://www.webkit.org")
1683 (synopsis "Web browser engine and classes to render and interact with web
1684content")
1685 (description "QtWebKit provides a Web browser engine that makes it easy to
1686embed content from the World Wide Web into your Qt application. At the same
1687time Web content can be enhanced with native controls.")
1688
1689 (license license:lgpl2.1+)))
f048f12b 1690
1691(define-public dotherside
1692 (package
1693 (name "dotherside")
1694 (version "0.5.2")
1695 (source
1696 (origin
1697 (method url-fetch)
1698 (uri (string-append "https://github.com/filcuc/DOtherSide/"
1699 "archive/v" version ".tar.gz"))
1700 (file-name (string-append name "-" version ".tar.gz"))
1701 (sha256
1702 (base32
1703 "0pqlrvy4ajjir80ra79ka3n0rjj0ir0f0m91cq86iz3nnw8w148z"))))
1704 (build-system cmake-build-system)
1705 (native-inputs
1706 `(("qttools" ,qttools)))
1707 (inputs
1708 `(("qtbase" ,qtbase)
1709 ("qtdeclarative" ,qtdeclarative)))
1710 (home-page "https://github.com/frankosterfeld/qtkeychain")
1711 (synopsis "C language library for creating bindings for the Qt QML language")
1712 (description
1713 "DOtherSide is a C language library for creating bindings for the
1714QT QML language. The following features are implementable from
1715a binding language:
1716@itemize
1717@item Creating custom QObject
1718@item Creating custom QAbstractListModels
1719@item Creating custom properties, signals and slots
1720@item Creating from QML QObject defined in the binded language
1721@item Creating from Singleton QML QObject defined in the binded language
1722@end itemize\n")
1723 (license license:lgpl3))) ;version 3 only (+ exception)