Merge branch 'master' into core-updates
[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>
418c62ff 5;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
4a78fd46 6;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
fc381a33 7;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
3283f261 8;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
3befd0a9 9;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
506cbdb3 10;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
04162e83 11;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
bd677c2d
AE
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages qt)
225941b0 29 #:use-module ((guix licenses) #:prefix license:)
bd677c2d
AE
30 #:use-module (guix packages)
31 #:use-module (guix download)
f198ffd0 32 #:use-module (guix build utils)
9e81af9e 33 #:use-module (guix build-system cmake)
bd677c2d 34 #:use-module (guix build-system gnu)
2456153a 35 #:use-module (guix build-system trivial)
84ef83dd
AE
36 #:use-module (guix packages)
37 #:use-module (guix utils)
1e9ed0e3 38 #:use-module (gnu packages)
b332e366
AE
39 #:use-module (gnu packages bison)
40 #:use-module (gnu packages compression)
2cba3d6f
SB
41 #:use-module (gnu packages cups)
42 #:use-module (gnu packages databases)
aa8c0ada 43 #:use-module (gnu packages documentation)
b332e366 44 #:use-module (gnu packages fontutils)
0009ed71 45 #:use-module (gnu packages flex)
bc8ede01 46 #:use-module (gnu packages freedesktop)
8b6a5e0f 47 #:use-module (gnu packages gl)
b332e366 48 #:use-module (gnu packages glib)
0009ed71
SB
49 #:use-module (gnu packages gnuzilla)
50 #:use-module (gnu packages gperf)
04231311 51 #:use-module (gnu packages gstreamer)
f7fb0ccb 52 #:use-module (gnu packages gtk)
b332e366 53 #:use-module (gnu packages icu4c)
e55354b8 54 #:use-module (gnu packages image)
b332e366 55 #:use-module (gnu packages linux)
04f8decf 56 #:use-module (gnu packages maths)
0009ed71
SB
57 #:use-module (gnu packages pciutils)
58 #:use-module (gnu packages pcre)
b332e366
AE
59 #:use-module (gnu packages perl)
60 #:use-module (gnu packages pkg-config)
39fa8f6c 61 #:use-module (gnu packages pulseaudio)
b332e366 62 #:use-module (gnu packages python)
8b6a5e0f 63 #:use-module (gnu packages ruby)
51519fd3 64 #:use-module (gnu packages sdl)
cc2b77df 65 #:use-module (gnu packages tls)
0009ed71
SB
66 #:use-module (gnu packages xdisorg)
67 #:use-module (gnu packages xorg)
68 #:use-module (gnu packages xml))
bd677c2d 69
aa8c0ada
TD
70(define-public grantlee
71 (package
72 (name "grantlee")
73 (version "5.1.0")
74 (source
75 (origin
76 (method url-fetch)
77 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
78 version ".tar.gz"))
79 (file-name (string-append name "-" version ".tar.gz"))
80 (sha256
81 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
82 (native-inputs
868b1a02 83 ;; Optional: lcov and cccc, both are for code coverage
aa8c0ada
TD
84 `(("doxygen" ,doxygen)))
85 (inputs
86 `(("qtbase" ,qtbase)
87 ("qtscript" ,qtscript)))
88 (build-system cmake-build-system)
89 (arguments
90 `(#:phases
91 (modify-phases %standard-phases
868b1a02
HG
92 (add-before 'check 'check-setup
93 (lambda _
94 ;; make Qt render "offscreen", required for tests
95 (setenv "QT_QPA_PLATFORM" "offscreen")
96 #t)))))
aa8c0ada
TD
97 (home-page "https://github.com/steveire/grantlee")
98 (synopsis "Libraries for text templating with Qt")
99 (description "Grantlee Templates can be used for theming and generation of
100other text such as code. The syntax uses the syntax of the Django template
101system, and the core design of Django is reused in Grantlee.")
102 (license license:lgpl2.0+)))
103
b332e366
AE
104(define-public qt
105 (package
106 (name "qt")
418c62ff 107 (version "5.9.4")
5acd59ee 108 (outputs '("out" "examples"))
b332e366
AE
109 (source (origin
110 (method url-fetch)
f7fb0ccb
AE
111 (uri
112 (string-append
113 "http://download.qt.io/official_releases/qt/"
114 (version-major+minor version)
115 "/" version
116 "/single/qt-everywhere-opensource-src-"
117 version ".tar.xz"))
b332e366 118 (sha256
418c62ff
EF
119 (base32
120 "1mblh8k04l13nk9fhhrr43h5bcph1gbz94j5y7csx8zvxb5xkb73"))
14bcc1e1
AE
121 (modules '((guix build utils)))
122 (snippet
bc554b43
AE
123 '(begin
124 ;; Remove qtwebengine, which relies on a bundled copy of
125 ;; chromium. Not only does it fail compilation in qt 5.5:
126 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
127 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
128 ;; it might also pose security problems.
129 ;; Alternatively, we could use the "-skip qtwebengine"
130 ;; configuration option.
131 (delete-file-recursively "qtwebengine")
5acd59ee
EF
132 ;; The following snippets are copied from their mondular-qt counterparts.
133 (for-each
134 (lambda (dir)
135 (delete-file-recursively (string-append "qtbase/src/3rdparty/" dir)))
136 (list "double-conversion" "freetype" "harfbuzz-ng"
137 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
138 "xkbcommon" "zlib"))
139 (for-each
140 (lambda (dir)
141 (delete-file-recursively dir))
142 (list "qtimageformats/src/3rdparty"
143 "qtmultimedia/examples/multimedia/spectrum/3rdparty"
144 "qtwayland/examples"
145 "qtcanvas3d/examples/canvas3d/3rdparty"))
146 ;; Tests depend on this example, which depends on the 3rd party code.
147 (substitute* "qtmultimedia/examples/multimedia/multimedia.pro"
6cbee49d
MW
148 (("spectrum") "#"))
149 #t))))
b332e366 150 (build-system gnu-build-system)
ef0cf53e
AE
151 (propagated-inputs
152 `(("mesa" ,mesa)))
b332e366 153 (inputs
b332e366 154 `(("alsa-lib" ,alsa-lib)
5acd59ee 155 ("bluez" ,bluez)
2cba3d6f 156 ("cups" ,cups)
5acd59ee
EF
157 ("dbus" ,dbus)
158 ("double-conversion" ,double-conversion)
0009ed71 159 ("expat" ,expat)
b332e366
AE
160 ("fontconfig" ,fontconfig)
161 ("freetype" ,freetype)
162 ("glib" ,glib)
5acd59ee
EF
163 ("gstreamer" ,gstreamer)
164 ("gst-plugins-base" ,gst-plugins-base)
f7fb0ccb 165 ("harfbuzz" ,harfbuzz)
b332e366 166 ("icu4c" ,icu4c)
5acd59ee
EF
167 ("jasper" ,jasper)
168 ("libinput" ,libinput-minimal)
f198ffd0 169 ("libjpeg" ,libjpeg)
2cba3d6f 170 ("libmng" ,libmng)
0009ed71 171 ("libpci" ,pciutils)
b332e366 172 ("libpng" ,libpng)
5acd59ee
EF
173 ("libtiff" ,libtiff)
174 ("libwebp" ,libwebp)
b332e366 175 ("libx11" ,libx11)
0009ed71
SB
176 ("libxcomposite" ,libxcomposite)
177 ("libxcursor" ,libxcursor)
5acd59ee 178 ("libxext" ,libxext)
0009ed71 179 ("libxfixes" ,libxfixes)
b332e366 180 ("libxi" ,libxi)
0009ed71 181 ("libxinerama" ,libxinerama)
b332e366 182 ("libxkbcommon" ,libxkbcommon)
0009ed71
SB
183 ("libxml2" ,libxml2)
184 ("libxrandr" ,libxrandr)
b332e366 185 ("libxrender" ,libxrender)
0009ed71
SB
186 ("libxslt" ,libxslt)
187 ("libxtst" ,libxtst)
188 ("mtdev" ,mtdev)
3283f261 189 ("mariadb" ,mariadb)
0009ed71 190 ("nss" ,nss)
b332e366 191 ("openssl" ,openssl)
2cba3d6f 192 ("postgresql" ,postgresql)
39fa8f6c 193 ("pulseaudio" ,pulseaudio)
5acd59ee 194 ("pcre2" ,pcre2)
0009ed71
SB
195 ("sqlite" ,sqlite)
196 ("udev" ,eudev)
2cba3d6f 197 ("unixodbc" ,unixodbc)
5acd59ee 198 ("wayland" ,wayland)
b332e366
AE
199 ("xcb-util" ,xcb-util)
200 ("xcb-util-image" ,xcb-util-image)
201 ("xcb-util-keysyms" ,xcb-util-keysyms)
202 ("xcb-util-renderutil" ,xcb-util-renderutil)
203 ("xcb-util-wm" ,xcb-util-wm)
204 ("zlib" ,zlib)))
c4c4cc05 205 (native-inputs
0009ed71
SB
206 `(("bison" ,bison)
207 ("flex" ,flex)
208 ("gperf" ,gperf)
0009ed71
SB
209 ("perl" ,perl)
210 ("pkg-config" ,pkg-config)
211 ("python" ,python-2)
212 ("ruby" ,ruby)
ce0614dd 213 ("which" ,(@ (gnu packages base) which))))
b332e366 214 (arguments
5acd59ee 215 `(#:phases
cce28b0c 216 (modify-phases %standard-phases
2470d779
AE
217 (add-after 'configure 'patch-bin-sh
218 (lambda _
5acd59ee 219 (substitute* '("qtbase/configure"
2470d779
AE
220 "qtbase/mkspecs/features/qt_functions.prf"
221 "qtbase/qmake/library/qmakebuiltins.cpp")
222 (("/bin/sh") (which "sh")))
223 #t))
cce28b0c
AE
224 (replace 'configure
225 (lambda* (#:key outputs #:allow-other-keys)
5acd59ee
EF
226 (let ((out (assoc-ref outputs "out"))
227 (examples (assoc-ref outputs "examples")))
cce28b0c
AE
228 (substitute* '("configure" "qtbase/configure")
229 (("/bin/pwd") (which "pwd")))
230 (substitute* "qtbase/src/corelib/global/global.pri"
231 (("/bin/ls") (which "ls")))
232 ;; do not pass "--enable-fast-install", which makes the
233 ;; configure process fail
234 (zero? (system*
235 "./configure"
236 "-verbose"
237 "-prefix" out
5acd59ee 238 "-examplesdir" examples ; 89MiB
cce28b0c
AE
239 "-opensource"
240 "-confirm-license"
5acd59ee 241 ;; Do not build examples; for the time being, we
4dd0a8b6 242 ;; prefer to save the space and build time.
5acd59ee 243 "-no-compile-examples"
cce28b0c
AE
244 ;; Most "-system-..." are automatic, but some use
245 ;; the bundled copy by default.
246 "-system-sqlite"
247 "-system-harfbuzz"
248 ;; explicitly link with openssl instead of dlopening it
249 "-openssl-linked"
250 ;; explicitly link with dbus instead of dlopening it
251 "-dbus-linked"
5acd59ee
EF
252 ;; don't use the precompiled headers
253 "-no-pch"
cce28b0c
AE
254 ;; drop special machine instructions not supported
255 ;; on all instances of the target
256 ,@(if (string-prefix? "x86_64"
257 (or (%current-target-system)
258 (%current-system)))
259 '()
260 '("-no-sse2"))
cce28b0c
AE
261 "-no-mips_dsp"
262 "-no-mips_dspr2"))))))))
2e36f7e6 263 (home-page "https://www.qt.io/")
b332e366
AE
264 (synopsis "Cross-platform GUI library")
265 (description "Qt is a cross-platform application and UI framework for
266developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 267 (license license:lgpl2.1)
f47638a3
LC
268
269 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
270 ;; see <http://hydra.gnu.org/build/112828>.
271 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
272 (supported-systems (delete "mips64el-linux" %supported-systems))))
1e9ed0e3
AE
273
274(define-public qt-4
275 (package (inherit qt)
d22b9397 276 (version "4.8.7")
1e9ed0e3
AE
277 (source (origin
278 (method url-fetch)
279 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
280 (string-copy version 0 (string-rindex version #\.))
281 "/" version
89059aa1 282 "/qt-everywhere-opensource-src-"
1e9ed0e3
AE
283 version ".tar.gz"))
284 (sha256
285 (base32
d22b9397 286 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
fc1adab1 287 (patches (search-patches "qt4-ldflags.patch"))
7431edea
AE
288 (modules '((guix build utils)))
289 (snippet
290 ;; Remove webkit module, which is not built.
6cbee49d
MW
291 '(begin (delete-file-recursively "src/3rdparty/webkit")
292 #t))))
f7fb0ccb
AE
293 (inputs `(,@(alist-delete "harfbuzz"
294 (alist-delete "libjpeg" (package-inputs qt)))
e7e5a4f8
AE
295 ("libjepg" ,libjpeg-8)
296 ("libsm" ,libsm)))
31580979
LC
297
298 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
299 ;; but we can't make them a separate output because "out" and "examples"
300 ;; would refer to each other.
301 (outputs '("out" ;112MiB core + 37MiB examples
302 "doc")) ;280MiB of HTML + code
1e9ed0e3
AE
303 (arguments
304 `(#:phases
cba632c4
LC
305 (modify-phases %standard-phases
306 (replace
1e9ed0e3
AE
307 'configure
308 (lambda* (#:key outputs #:allow-other-keys)
31580979
LC
309 (let ((out (assoc-ref outputs "out"))
310 (doc (assoc-ref outputs "doc")))
1e9ed0e3 311 (substitute* '("configure")
d2984346
LC
312 (("/bin/pwd") (which "pwd")))
313
206a5208
AE
314 (zero? (system*
315 "./configure"
316 "-verbose"
317 "-prefix" out
4b0f2ef7
LC
318 ;; Note: Don't pass '-docdir' since 'qmake' and
319 ;; libQtCore would record its value, thereby defeating
320 ;; the whole point of having a separate output.
ff1989a5
LC
321 "-datadir" (string-append out "/share/qt-" ,version
322 "/data")
323 "-importdir" (string-append out "/lib/qt-4"
324 "/imports")
325 "-plugindir" (string-append out "/lib/qt-4"
326 "/plugins")
327 "-translationdir" (string-append out "/share/qt-" ,version
328 "/translations")
31580979
LC
329 "-demosdir" (string-append out "/share/qt-" ,version
330 "/demos")
331 "-examplesdir" (string-append out "/share/qt-" ,version
332 "/examples")
206a5208
AE
333 "-opensource"
334 "-confirm-license"
ff0a8c59
AE
335 ;; explicitly link with dbus instead of dlopening it
336 "-dbus-linked"
7431edea
AE
337 ;; Skip the webkit module; it fails to build on armhf
338 ;; and, apart from that, may pose security risks.
339 "-no-webkit"
206a5208
AE
340 ;; drop special machine instructions not supported
341 ;; on all instances of the target
342 ,@(if (string-prefix? "x86_64"
343 (or (%current-target-system)
344 (%current-system)))
345 '()
346 '("-no-mmx"
1e9ed0e3
AE
347 "-no-3dnow"
348 "-no-sse"
206a5208
AE
349 "-no-sse2"))
350 "-no-sse3"
351 "-no-ssse3"
352 "-no-sse4.1"
353 "-no-sse4.2"
84811c22 354 "-no-avx")))))
4b0f2ef7
LC
355 (add-after
356 'install 'move-doc
357 (lambda* (#:key outputs #:allow-other-keys)
358 ;; Because of qt4-documentation-path.patch, documentation ends up
359 ;; being installed in OUT. Move it to the right place.
360 (let* ((out (assoc-ref outputs "out"))
361 (doc (assoc-ref outputs "doc"))
362 (olddoc (string-append out "/doc"))
363 (docdir (string-append doc "/share/doc/qt-" ,version)))
364 (mkdir-p (dirname docdir))
365
366 ;; Note: We can't use 'rename-file' here because OUT and DOC are
367 ;; different "devices" due to bind-mounts.
368 (copy-recursively olddoc docdir)
369 (delete-file-recursively olddoc)
370 #t))))))))
84ef83dd 371
7868000f
AE
372(define-public qtbase
373 (package
374 (name "qtbase")
1f52eb7b 375 (version "5.11.0")
7868000f
AE
376 (source (origin
377 (method url-fetch)
378 (uri (string-append "https://download.qt.io/official_releases/qt/"
379 (version-major+minor version) "/" version
1f52eb7b 380 "/submodules/" name "-everywhere-src-"
7868000f
AE
381 version ".tar.xz"))
382 (sha256
c7386f4e 383 (base32
1f52eb7b 384 "0rny87ypnkkvyp9p76nim77v6np0cdf1dbjfmcilklzphkdlcvpd"))
64f390a4
HG
385 ;; Use TZDIR to avoid depending on package "tzdata".
386 (patches (search-patches "qtbase-use-TZDIR.patch"))
7868000f
AE
387 (modules '((guix build utils)))
388 (snippet
924e6ddf 389 ;; corelib uses bundled harfbuzz, md4, md5, sha3
7868000f 390 '(begin
924e6ddf
EF
391 (for-each
392 (lambda (dir)
393 (delete-file-recursively (string-append "src/3rdparty/" dir)))
394 (list "double-conversion" "freetype" "harfbuzz-ng"
1f52eb7b 395 "libpng" "libjpeg" "pcre2" "xcb"
924e6ddf
EF
396 "xkbcommon" "zlib"))
397 #t))))
7868000f 398 (build-system gnu-build-system)
48d4ce6e 399 (propagated-inputs
8075b623
SB
400 `(("mesa" ,mesa)
401 ("which" ,(@ (gnu packages base) which))))
7868000f
AE
402 (inputs
403 `(("alsa-lib" ,alsa-lib)
404 ("cups" ,cups)
405 ("dbus" ,dbus)
04f8decf 406 ("double-conversion" ,double-conversion)
f66970a7 407 ("eudev" ,eudev)
7868000f
AE
408 ("expat" ,expat)
409 ("fontconfig" ,fontconfig)
410 ("freetype" ,freetype)
411 ("glib" ,glib)
412 ("harfbuzz" ,harfbuzz)
413 ("icu4c" ,icu4c)
9ed9b44e 414 ("libinput" ,libinput-minimal)
7868000f
AE
415 ("libjpeg" ,libjpeg)
416 ("libmng" ,libmng)
417 ("libpng" ,libpng)
418 ("libx11" ,libx11)
419 ("libxcomposite" ,libxcomposite)
420 ("libxcursor" ,libxcursor)
421 ("libxfixes" ,libxfixes)
422 ("libxi" ,libxi)
423 ("libxinerama" ,libxinerama)
424 ("libxkbcommon" ,libxkbcommon)
425 ("libxml2" ,libxml2)
426 ("libxrandr" ,libxrandr)
427 ("libxrender" ,libxrender)
428 ("libxslt" ,libxslt)
429 ("libxtst" ,libxtst)
430 ("mtdev" ,mtdev)
07380d10 431 ("mariadb" ,mariadb)
7868000f
AE
432 ("nss" ,nss)
433 ("openssl" ,openssl)
924e6ddf 434 ("pcre2" ,pcre2)
7868000f
AE
435 ("postgresql" ,postgresql)
436 ("pulseaudio" ,pulseaudio)
1f52eb7b 437 ;("sqlite" ,sqlite)
7868000f
AE
438 ("unixodbc" ,unixodbc)
439 ("xcb-util" ,xcb-util)
440 ("xcb-util-image" ,xcb-util-image)
441 ("xcb-util-keysyms" ,xcb-util-keysyms)
442 ("xcb-util-renderutil" ,xcb-util-renderutil)
443 ("xcb-util-wm" ,xcb-util-wm)
444 ("zlib" ,zlib)))
445 (native-inputs
446 `(("bison" ,bison)
447 ("flex" ,flex)
448 ("gperf" ,gperf)
449 ("perl" ,perl)
450 ("pkg-config" ,pkg-config)
451 ("python" ,python-2)
8075b623 452 ("ruby" ,ruby)))
7868000f
AE
453 (arguments
454 `(#:phases
455 (modify-phases %standard-phases
456 (add-after 'configure 'patch-bin-sh
457 (lambda _
458 (substitute* '("config.status"
459 "configure"
460 "mkspecs/features/qt_functions.prf"
461 "qmake/library/qmakebuiltins.cpp")
462 (("/bin/sh") (which "sh")))
463 #t))
464 (replace 'configure
465 (lambda* (#:key outputs #:allow-other-keys)
466 (let ((out (assoc-ref outputs "out")))
467 (substitute* "configure"
468 (("/bin/pwd") (which "pwd")))
469 (substitute* "src/corelib/global/global.pri"
470 (("/bin/ls") (which "ls")))
7972d8a2
AE
471 ;; The configuration files for other Qt5 packages are searched
472 ;; through a call to "find_package" in Qt5Config.cmake, which
473 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
474 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
475 ;; components can be installed in different places.
476 (substitute* (find-files "." ".*\\.cmake")
477 (("NO_DEFAULT_PATH") ""))
7868000f
AE
478 ;; do not pass "--enable-fast-install", which makes the
479 ;; configure process fail
1f52eb7b
EF
480 (invoke
481 "./configure"
482 "-verbose"
483 "-prefix" out
484 "-docdir" (string-append out "/share/doc/qt5")
485 "-headerdir" (string-append out "/include/qt5")
486 "-archdatadir" (string-append out "/lib/qt5")
487 "-datadir" (string-append out "/share/qt5")
488 "-examplesdir" (string-append
489 out "/share/doc/qt5/examples")
490 "-opensource"
491 "-confirm-license"
65a9f6b6
RW
492
493 ;; These features require higher versions of Linux than the
494 ;; minimum version of the glibc. See
495 ;; src/corelib/global/minimum-linux_p.h. By disabling these
496 ;; features Qt5 applications can be used on the oldest
497 ;; kernels that the glibc supports, including the RHEL6
498 ;; (2.6.32) and RHEL7 (3.10) kernels.
499 "-no-feature-getentropy" ; requires Linux 3.17
500 "-no-feature-renameat2" ; requires Linux 3.16
501
1f52eb7b
EF
502 ;; Do not build examples; if desired, these could go
503 ;; into a separate output, but for the time being, we
504 ;; prefer to save the space and build time.
505 "-no-compile-examples"
506 ;; Most "-system-..." are automatic, but some use
507 ;; the bundled copy by default.
508 ;; System sqlite fails on 5.10+
509 ;;.obj/qsql_sqlite.o: In function `QSQLiteResultPrivate::initColumns(bool)':
510 ;;qsql_sqlite.cpp:(.text+0x190c): undefined reference to `sqlite3_column_table_name16'
511 ;"-system-sqlite"
512 "-system-harfbuzz"
513 "-system-pcre"
514 ;; explicitly link with openssl instead of dlopening it
515 "-openssl-linked"
516 ;; explicitly link with dbus instead of dlopening it
517 "-dbus-linked"
518 ;; don't use the precompiled headers
519 "-no-pch"
520 ;; drop special machine instructions that do not have
521 ;; runtime detection
522 ,@(if (string-prefix? "x86_64"
523 (or (%current-target-system)
524 (%current-system)))
525 '()
526 '("-no-sse2"))
527 "-no-mips_dsp"
528 "-no-mips_dspr2"))))
8075b623 529 (add-after 'install 'patch-mkspecs
5ca6ef95
SB
530 (lambda* (#:key outputs #:allow-other-keys)
531 (let* ((out (assoc-ref outputs "out"))
8075b623
SB
532 (archdata (string-append out "/lib/qt5"))
533 (mkspecs (string-append archdata "/mkspecs"))
5ca6ef95 534 (qt_config.prf (string-append
6fc0e157 535 mkspecs "/features/qt_config.prf")))
5ca6ef95
SB
536 ;; For each Qt module, let `qmake' uses search paths in the
537 ;; module directory instead of all in QT_INSTALL_PREFIX.
538 (substitute* qt_config.prf
539 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
6fc0e157 540 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
5ca6ef95 541 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
6fc0e157 542 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
5ca6ef95 543 (("\\$\\$\\[QT_HOST_LIBS\\]")
6fc0e157 544 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
5ca6ef95 545 (("\\$\\$\\[QT_INSTALL_BINS\\]")
6fc0e157 546 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
8075b623
SB
547
548 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
549 (substitute* (string-append mkspecs "/features/qt_functions.prf")
550 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
551 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
552
553 ;; Resolve qmake spec files within qtbase by absolute paths.
554 (substitute*
555 (map (lambda (file)
556 (string-append mkspecs "/features/" file))
557 '("device_config.prf" "moc.prf" "qt_build_config.prf"
558 "qt_config.prf" "winrt/package_manifest.prf"))
559 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
560 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
64f390a4
HG
561 #t)))
562 (add-after 'unpack 'patch-paths
563 ;; Use the absolute paths for dynamically loaded libs, otherwise
564 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
565 ;; not set in guix.
566 (lambda* (#:key inputs #:allow-other-keys)
567 ;; libresolve
568 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
569 "cross-libc" "libc"))))
570 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
571 "src/network/kernel/qhostinfo_unix.cpp")
572 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
573 (string-append a glibc "/lib/lib" b))))
574 ;; X11/locale (compose path)
575 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
576 ;; Don't search in /usr/…/X11/locale, …
577 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
578 (string-append "// " line))
579 ;; … but use libx11's path
580 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
581 (string-append a "\"" (assoc-ref inputs "libx11") b)))
582 ;; libGL
583 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
584 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
585 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
586 ;; libXcursor
587 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
588 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
589 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
590 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
591 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
592 #t)))))
5ca6ef95
SB
593 (native-search-paths
594 (list (search-path-specification
595 (variable "QMAKEPATH")
6fc0e157 596 (files '("lib/qt5")))
ed02e1fe
DC
597 (search-path-specification
598 (variable "QML2_IMPORT_PATH")
6fc0e157 599 (files '("lib/qt5/qml")))
ed02e1fe
DC
600 (search-path-specification
601 (variable "QT_PLUGIN_PATH")
6fc0e157 602 (files '("lib/qt5/plugins")))
ed02e1fe
DC
603 (search-path-specification
604 (variable "XDG_DATA_DIRS")
605 (files '("share")))
606 (search-path-specification
607 (variable "XDG_CONFIG_DIRS")
608 (files '("etc/xdg")))))
7868000f
AE
609 (home-page "https://www.qt.io/")
610 (synopsis "Cross-platform GUI library")
611 (description "Qt is a cross-platform application and UI framework for
612developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 613 (license (list license:lgpl2.1 license:lgpl3))))
7868000f 614
19c17631
EF
615(define-public qtsvg
616 (package (inherit qtbase)
617 (name "qtsvg")
1f52eb7b 618 (version "5.11.0")
19c17631
EF
619 (source (origin
620 (method url-fetch)
621 (uri (string-append "https://download.qt.io/official_releases/qt/"
622 (version-major+minor version) "/" version
1f52eb7b 623 "/submodules/" name "-everywhere-src-"
19c17631
EF
624 version ".tar.xz"))
625 (sha256
626 (base32
1f52eb7b 627 "0m0zglp0m5gv75ivma6l3hm8brb0cf44dhbc6lqwfdwacxhgx3jb"))))
48d4ce6e 628 (propagated-inputs `())
19c17631
EF
629 (native-inputs `(("perl" ,perl)))
630 (inputs
631 `(("mesa" ,mesa)
632 ("qtbase" ,qtbase)
633 ("zlib" ,zlib)))
634 (arguments
635 `(#:phases
636 (modify-phases %standard-phases
8075b623 637 (add-before 'configure 'configure-qmake
19c17631 638 (lambda* (#:key inputs outputs #:allow-other-keys)
8075b623
SB
639 (let* ((out (assoc-ref outputs "out"))
640 (qtbase (assoc-ref inputs "qtbase"))
641 (tmpdir (string-append (getenv "TMPDIR")))
642 (qmake (string-append tmpdir "/qmake"))
643 (qt.conf (string-append tmpdir "/qt.conf")))
644 ;; Use qmake with a customized qt.conf to override install
645 ;; paths to $out.
646 (symlink (which "qmake") qmake)
647 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
648 (with-output-to-file qt.conf
649 (lambda ()
650 (format #t "[Paths]
651Prefix=~a
652ArchData=lib/qt5
653Data=share/qt5
654Documentation=share/doc/qt5
655Headers=include/qt5
656Libraries=lib
657LibraryExecutables=lib/qt5/libexec
658Binaries=bin
659Tests=tests
660Plugins=lib/qt5/plugins
661Imports=lib/qt5/imports
662Qml2Imports=lib/qt5/qml
663Translations=share/qt5/translations
664Settings=etc/xdg
665Examples=share/doc/qt5/examples
666HostPrefix=~a
667HostData=lib/qt5
668HostBinaries=bin
669HostLibraries=lib
b000294e
SB
670
671[EffectiveSourcePaths]
672HostPrefix=~a
673HostData=lib/qt5
674" out out qtbase)))
c195b5ba 675 #t)))
8075b623
SB
676 (replace 'configure
677 (lambda* (#:key inputs outputs #:allow-other-keys)
678 ;; Valid QT_BUILD_PARTS variables are:
679 ;; libs tools tests examples demos docs translations
1f52eb7b 680 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
8075b623
SB
681 (add-before 'check 'set-display
682 (lambda _
683 ;; make Qt render "offscreen", required for tests
684 (setenv "QT_QPA_PLATFORM" "offscreen")
685 #t)))))
96412f34
EF
686 (synopsis "Qt module for displaying SVGs")
687 (description "The QtSvg module provides classes for displaying the
688 contents of SVG files.")))
19c17631 689
9b694210
EF
690(define-public qtimageformats
691 (package (inherit qtsvg)
692 (name "qtimageformats")
1f52eb7b 693 (version "5.11.0")
9b694210
EF
694 (source (origin
695 (method url-fetch)
696 (uri (string-append "https://download.qt.io/official_releases/qt/"
697 (version-major+minor version) "/" version
1f52eb7b 698 "/submodules/" name "-everywhere-src-"
9b694210
EF
699 version ".tar.xz"))
700 (sha256
701 (base32
1f52eb7b 702 "0w0yy7zzln3v7dm7ksjxkzhq8r0a9nwk823wv4f1x7vsa3pnyh2q"))
c04854da
EF
703 (modules '((guix build utils)))
704 (snippet
1f52eb7b
EF
705 '(begin
706 (delete-file-recursively "src/3rdparty")
707 #t))))
9b694210
EF
708 (native-inputs `())
709 (inputs
a532a671
EF
710 `(("jasper" ,jasper)
711 ("libmng" ,libmng)
9b694210
EF
712 ("libtiff" ,libtiff)
713 ("libwebp" ,libwebp)
714 ("mesa" ,mesa)
715 ("qtbase" ,qtbase)
96412f34
EF
716 ("zlib" ,zlib)))
717 (synopsis "Additional Image Format plugins for Qt")
718 (description "The QtImageFormats module contains plugins for adding
719support for MNG, TGA, TIFF and WBMP image formats.")))
9b694210 720
f6c13613
EF
721(define-public qtx11extras
722 (package (inherit qtsvg)
723 (name "qtx11extras")
1f52eb7b 724 (version "5.11.0")
f6c13613
EF
725 (source (origin
726 (method url-fetch)
727 (uri (string-append "https://download.qt.io/official_releases/qt/"
728 (version-major+minor version) "/" version
1f52eb7b 729 "/submodules/" name "-everywhere-src-"
f6c13613
EF
730 version ".tar.xz"))
731 (sha256
732 (base32
1f52eb7b 733 "13vbx61wcd8pnpgk3j5r665pm03s7jp2s98apvc6fhp1njlr0rhi"))))
c195b5ba
EF
734 (arguments
735 (substitute-keyword-arguments (package-arguments qtsvg)
736 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
f6c13613
EF
737 (native-inputs `(("perl" ,perl)))
738 (inputs
739 `(("mesa" ,mesa)
96412f34
EF
740 ("qtbase" ,qtbase)))
741 (synopsis "Qt Extras for X11")
742 (description "The QtX11Extras module includes the library to access X11
743from within Qt 5.")))
f6c13613 744
98eec712
EF
745(define-public qtxmlpatterns
746 (package (inherit qtsvg)
747 (name "qtxmlpatterns")
1f52eb7b 748 (version "5.11.0")
98eec712
EF
749 (source (origin
750 (method url-fetch)
751 (uri (string-append "https://download.qt.io/official_releases/qt/"
752 (version-major+minor version) "/" version
1f52eb7b 753 "/submodules/" name "-everywhere-src-"
98eec712
EF
754 version ".tar.xz"))
755 (sha256
756 (base32
1f52eb7b 757 "13nj2pa706sy874bqbv7y94ypicr4k09x6n2jyxkw93flb5pi8qr"))))
c195b5ba
EF
758 (arguments
759 (substitute-keyword-arguments (package-arguments qtsvg)
f66b3e15
EF
760 ((#:phases phases)
761 `(modify-phases ,phases
762 (add-after 'unpack 'disable-network-tests
763 (lambda _ (substitute* "tests/auto/auto.pro"
764 (("qxmlquery") "# qxmlquery")
a20e00dd 765 (("xmlpatterns ") "# xmlpatterns"))
f66b3e15 766 #t))))))
98eec712 767 (native-inputs `(("perl" ,perl)))
96412f34
EF
768 (inputs `(("qtbase" ,qtbase)))
769 (synopsis "Qt XML patterns module")
770 (description "The QtXmlPatterns module is a XQuery and XPath engine for
771XML and custom data models. It contains programs such as xmlpatterns and
772xmlpatternsvalidator.")))
98eec712 773
e3a2ed81
EF
774(define-public qtdeclarative
775 (package (inherit qtsvg)
776 (name "qtdeclarative")
1f52eb7b 777 (version "5.11.0")
e3a2ed81
EF
778 (source (origin
779 (method url-fetch)
780 (uri (string-append "https://download.qt.io/official_releases/qt/"
781 (version-major+minor version) "/" version
1f52eb7b 782 "/submodules/" name "-everywhere-src-"
e3a2ed81
EF
783 version ".tar.xz"))
784 (sha256
785 (base32
1f52eb7b 786 "1h2pbyr7dnak4q96373xpa6gk6rl528rnqima8xnvhdi2y5kgagf"))))
c195b5ba
EF
787 (arguments
788 (substitute-keyword-arguments (package-arguments qtsvg)
789 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
e3a2ed81
EF
790 (native-inputs
791 `(("perl" ,perl)
792 ("pkg-config" ,pkg-config)
793 ("python" ,python-2)
794 ("qtsvg" ,qtsvg)
795 ("qtxmlpatterns" ,qtxmlpatterns)))
796 (inputs
797 `(("mesa" ,mesa)
96412f34
EF
798 ("qtbase" ,qtbase)))
799 (synopsis "Qt QML module (Quick 2)")
800 (description "The Qt QML module provides a framework for developing
801applications and libraries with the QML language. It defines and implements the
802language and engine infrastructure, and provides an API to enable application
803developers to extend the QML language with custom types and integrate QML code
804with JavaScript and C++.")))
e3a2ed81 805
e98cb96d
EF
806(define-public qtconnectivity
807 (package (inherit qtsvg)
808 (name "qtconnectivity")
1f52eb7b 809 (version "5.11.0")
e98cb96d
EF
810 (source (origin
811 (method url-fetch)
812 (uri (string-append "https://download.qt.io/official_releases/qt/"
813 (version-major+minor version) "/" version
1f52eb7b 814 "/submodules/" name "-everywhere-src-"
e98cb96d
EF
815 version ".tar.xz"))
816 (sha256
817 (base32
1f52eb7b 818 "0wqq5q5saf007aphvpn5pvj6l0qp0z7wxvfba6v9iq5ylyqm6bnd"))))
e98cb96d
EF
819 (native-inputs
820 `(("perl" ,perl)
821 ("pkg-config" ,pkg-config)
822 ("qtdeclarative" ,qtdeclarative)))
823 (inputs
824 `(("bluez" ,bluez)
96412f34
EF
825 ("qtbase" ,qtbase)))
826 (synopsis "Qt Connectivity module")
827 (description "The Qt Connectivity modules provides modules for interacting
828with Bluetooth and NFC.")))
e98cb96d 829
cac893ec
EF
830(define-public qtwebsockets
831 (package (inherit qtsvg)
832 (name "qtwebsockets")
1f52eb7b 833 (version "5.11.0")
cac893ec
EF
834 (source (origin
835 (method url-fetch)
836 (uri (string-append "https://download.qt.io/official_releases/qt/"
837 (version-major+minor version) "/" version
1f52eb7b 838 "/submodules/" name "-everywhere-src-"
cac893ec
EF
839 version ".tar.xz"))
840 (sha256
841 (base32
1f52eb7b 842 "1drr6nxxbkwpmz39bhyfmmsqjhy11bj3w1nc3q9dwhpcbf04an3x"))))
c195b5ba
EF
843 (arguments
844 (substitute-keyword-arguments (package-arguments qtsvg)
845 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
cac893ec
EF
846 (native-inputs
847 `(("perl" ,perl)
848 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
849 (inputs `(("qtbase" ,qtbase)))
850 (synopsis "Qt Web Sockets module")
851 (description "WebSocket is a web-based protocol designed to enable two-way
852communication between a client application and a remote host. The Qt
853WebSockets module provides C++ and QML interfaces that enable Qt applications
854to act as a server that can process WebSocket requests, or a client that can
855consume data received from the server, or both.")))
cac893ec 856
3474767c
EF
857(define-public qtsensors
858 (package (inherit qtsvg)
859 (name "qtsensors")
1f52eb7b 860 (version "5.11.0")
3474767c
EF
861 (source (origin
862 (method url-fetch)
863 (uri (string-append "https://download.qt.io/official_releases/qt/"
864 (version-major+minor version) "/" version
1f52eb7b 865 "/submodules/" name "-everywhere-src-"
3474767c
EF
866 version ".tar.xz"))
867 (sha256
868 (base32
1f52eb7b 869 "1az22rdkpc1m44qb3dyh7cpiprplkvynzjr629ai05i8ngbfdi0g"))))
202afee2
EF
870 (arguments
871 (substitute-keyword-arguments (package-arguments qtsvg)
5ea35b42 872 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
202afee2
EF
873 ((#:phases phases)
874 `(modify-phases ,phases
04162e83 875 (add-after 'unpack 'fix-tests
202afee2
EF
876 (lambda _
877 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
04162e83
NG
878 (("2000") "5000") ;lengthen test timeout
879 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
202afee2 880 #t))))))
3474767c
EF
881 (native-inputs
882 `(("perl" ,perl)
883 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
884 (inputs `(("qtbase" ,qtbase)))
885 (synopsis "Qt Sensors module")
886 (description "The Qt Sensors API provides access to sensor hardware via QML
887and C++ interfaces. The Qt Sensors API also provides a motion gesture
888recognition API for devices.")))
3474767c 889
15378f93
EF
890(define-public qtmultimedia
891 (package (inherit qtsvg)
892 (name "qtmultimedia")
1f52eb7b 893 (version "5.11.0")
15378f93
EF
894 (source (origin
895 (method url-fetch)
896 (uri (string-append "https://download.qt.io/official_releases/qt/"
897 (version-major+minor version) "/" version
1f52eb7b 898 "/submodules/" name "-everywhere-src-"
15378f93
EF
899 version ".tar.xz"))
900 (sha256
901 (base32
1f52eb7b 902 "0g4x1w251imq58zp1px6yschwj6icsxzwl3fy7pjfbgd27qjhlzg"))
63d8f08f
EF
903 (modules '((guix build utils)))
904 (snippet
905 '(begin
906 (delete-file-recursively
c195b5ba
EF
907 "examples/multimedia/spectrum/3rdparty")
908 ;; We also prevent the spectrum example from being built.
909 (substitute* "examples/multimedia/multimedia.pro"
6cbee49d
MW
910 (("spectrum") "#"))
911 #t))))
c195b5ba
EF
912 (arguments
913 (substitute-keyword-arguments (package-arguments qtsvg)
04231311
RW
914 ((#:phases phases)
915 `(modify-phases ,phases
916 (replace 'configure
917 (lambda* (#:key outputs #:allow-other-keys)
918 (let ((out (assoc-ref outputs "out")))
1f52eb7b
EF
919 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
920 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
921 (string-append "PREFIX=" out)))))))
04231311 922 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
15378f93
EF
923 (native-inputs
924 `(("perl" ,perl)
925 ("pkg-config" ,pkg-config)
926 ("python" ,python-2)
927 ("qtdeclarative" ,qtdeclarative)))
928 (inputs
929 `(("alsa-lib" ,alsa-lib)
930 ("mesa" ,mesa)
931 ("pulseaudio" ,pulseaudio)
04231311
RW
932 ("qtbase" ,qtbase)
933 ;; Gstreamer is needed for the mediaplayer plugin
934 ("gstreamer" ,gstreamer)
96412f34
EF
935 ("gst-plugins-base" ,gst-plugins-base)))
936 (synopsis "Qt Multimedia module")
937 (description "The Qt Multimedia module provides set of APIs to play and
938record media, and manage a collection of media content. It also contains a
939set of plugins for interacting with pulseaudio and GStreamer.")))
15378f93 940
bc8ede01
EF
941(define-public qtwayland
942 (package (inherit qtsvg)
943 (name "qtwayland")
1f52eb7b 944 (version "5.11.0")
bc8ede01
EF
945 (source (origin
946 (method url-fetch)
947 (uri (string-append "https://download.qt.io/official_releases/qt/"
948 (version-major+minor version) "/" version
1f52eb7b 949 "/submodules/" name "-everywhere-src-"
bc8ede01
EF
950 version ".tar.xz"))
951 (sha256
952 (base32
1f52eb7b 953 "09s1ckqj0cgjmmi7jylsf039vgzlq7i9rr4swb590fkz427lx0b8"))
924e6ddf
EF
954 (modules '((guix build utils)))
955 (snippet
956 ;; The examples try to build and cause the build to fail
1f52eb7b
EF
957 '(begin
958 (delete-file-recursively "examples")
959 #t))))
6fc0e157
SB
960 (arguments
961 (substitute-keyword-arguments (package-arguments qtsvg)
962 ((#:phases phases)
963 `(modify-phases ,phases
964 (add-before 'check 'set-ld-library-path
965 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
966 ;;
967 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
968 ;; wayland platform plugin.
969 (lambda _
970 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
971 #t))))))
bc8ede01
EF
972 (native-inputs
973 `(("glib" ,glib)
974 ("perl" ,perl)
975 ("pkg-config" ,pkg-config)
976 ("qtdeclarative" ,qtdeclarative)))
977 (inputs
978 `(("fontconfig" ,fontconfig)
979 ("freetype" ,freetype)
980 ("libx11" ,libx11)
981 ("libxcomposite" ,libxcomposite)
982 ("libxext" ,libxext)
983 ("libxkbcommon" ,libxkbcommon)
984 ("libxrender" ,libxrender)
985 ("mesa" ,mesa)
986 ("mtdev" ,mtdev)
987 ("qtbase" ,qtbase)
96412f34
EF
988 ("wayland" ,wayland)))
989 (synopsis "Qt Wayland module")
990 (description "The Qt Wayland module provides the QtWayland client and
991compositor libraries.")))
bc8ede01 992
00806f2b
EF
993(define-public qtserialport
994 (package (inherit qtsvg)
995 (name "qtserialport")
1f52eb7b 996 (version "5.11.0")
00806f2b
EF
997 (source (origin
998 (method url-fetch)
999 (uri (string-append "https://download.qt.io/official_releases/qt/"
1000 (version-major+minor version) "/" version
1f52eb7b 1001 "/submodules/" name "-everywhere-src-"
00806f2b
EF
1002 version ".tar.xz"))
1003 (sha256
1004 (base32
1f52eb7b 1005 "1cbf1jsginp5p3y17cyb6dfhsafxal0bn9pya6aybz0q799zgvl5"))))
00806f2b 1006 (native-inputs `(("perl" ,perl)))
33741e16
EF
1007 (inputs
1008 `(("qtbase" ,qtbase)
96412f34 1009 ("eudev" ,eudev)))
042f7c26
HG
1010 (arguments
1011 (substitute-keyword-arguments (package-arguments qtsvg)
1012 ((#:phases phases)
1013 `(modify-phases ,phases
1014 (add-after 'unpack 'patch-dlopen-paths
1015 (lambda* (#:key inputs #:allow-other-keys)
1016 (substitute* "src/serialport/qtudev_p.h"
1017 ;; Use the absolute paths for dynamically loaded libs,
1018 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1019 ;; typically is not set in guix.
1020 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1021 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1022 #t))))))
96412f34
EF
1023 (synopsis "Qt Serial Port module")
1024 (description "The Qt Serial Port module provides the library for
1025interacting with serial ports from within Qt.")))
00806f2b 1026
a98ffab5
EF
1027(define-public qtserialbus
1028 (package (inherit qtsvg)
1029 (name "qtserialbus")
1f52eb7b 1030 (version "5.11.0")
a98ffab5
EF
1031 (source (origin
1032 (method url-fetch)
1033 (uri (string-append "https://download.qt.io/official_releases/qt/"
1034 (version-major+minor version) "/" version
1f52eb7b 1035 "/submodules/" name "-everywhere-src-"
a98ffab5
EF
1036 version ".tar.xz"))
1037 (sha256
1038 (base32
1f52eb7b 1039 "0r3crk7gw0xs6wk1gvw2k8r9s9vam3sfwrji1njhswavii9fbp85"))))
a98ffab5
EF
1040 (inputs
1041 `(("qtbase" ,qtbase)
96412f34
EF
1042 ("qtserialport" ,qtserialport)))
1043 (synopsis "Qt Serial Bus module")
1044 (description "The Qt Serial Bus API provides classes and functions to
1045access the various industrial serial buses and protocols, such as CAN, ModBus,
1046and others.")))
a98ffab5 1047
f5377013
EF
1048(define-public qtwebchannel
1049 (package (inherit qtsvg)
1050 (name "qtwebchannel")
1f52eb7b 1051 (version "5.11.0")
f5377013
EF
1052 (source (origin
1053 (method url-fetch)
1054 (uri (string-append "https://download.qt.io/official_releases/qt/"
1055 (version-major+minor version) "/" version
1f52eb7b 1056 "/submodules/" name "-everywhere-src-"
f5377013
EF
1057 version ".tar.xz"))
1058 (sha256
1059 (base32
1f52eb7b 1060 "05fa5pwvk24cjp8m6pbw3ma95vnls762crpjdgvygfk0h8xilxmh"))))
f5377013
EF
1061 (native-inputs
1062 `(("perl" ,perl)
1063 ("qtdeclarative" ,qtdeclarative)
1064 ("qtwebsockets" ,qtwebsockets)))
96412f34
EF
1065 (inputs `(("qtbase" ,qtbase)))
1066 (synopsis "Web communication library for Qt")
1067 (description "The Qt WebChannel module enables peer-to-peer communication
1068between the host (QML/C++ application) and the client (HTML/JavaScript
1069application). The transport mechanism is supported out of the box by the two
1070popular web engines, Qt WebKit 2 and Qt WebEngine.")))
f5377013 1071
d5ca54ce
EF
1072(define-public qtlocation
1073 (package (inherit qtsvg)
1074 (name "qtlocation")
1f52eb7b 1075 (version "5.11.0")
d5ca54ce
EF
1076 (source (origin
1077 (method url-fetch)
1078 (uri (string-append "https://download.qt.io/official_releases/qt/"
1079 (version-major+minor version) "/" version
1f52eb7b 1080 "/submodules/" name "-everywhere-src-"
d5ca54ce
EF
1081 version ".tar.xz"))
1082 (sha256
1083 (base32
1f52eb7b 1084 "074cjqhr14mqlsqj9rzagzdcqnayyichp31lq02k05q07wg93xi8"))))
c195b5ba
EF
1085 (arguments
1086 (substitute-keyword-arguments (package-arguments qtsvg)
1087 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d5ca54ce
EF
1088 (native-inputs
1089 `(("perl" ,perl)
1090 ("qtdeclarative" ,qtdeclarative)
9a935ef2 1091 ("qtquickcontrols" ,qtquickcontrols)
d5ca54ce 1092 ("qtserialport" ,qtserialport)))
924e6ddf
EF
1093 (inputs
1094 `(("icu4c" ,icu4c)
1095 ("openssl" ,openssl)
1096 ("qtbase" ,qtbase)
96412f34
EF
1097 ("zlib" ,zlib)))
1098 (synopsis "Qt Location and Positioning modules")
1099 (description "The Qt Location module provides an interface for location,
1100positioning and geolocation plugins.")))
d5ca54ce 1101
d438c968
EF
1102(define-public qttools
1103 (package (inherit qtsvg)
1104 (name "qttools")
1f52eb7b 1105 (version "5.11.0")
d438c968
EF
1106 (source (origin
1107 (method url-fetch)
1108 (uri (string-append "https://download.qt.io/official_releases/qt/"
1109 (version-major+minor version) "/" version
1f52eb7b 1110 "/submodules/" name "-everywhere-src-"
d438c968
EF
1111 version ".tar.xz"))
1112 (sha256
1113 (base32
1f52eb7b 1114 "1nb77bfs63nyy0wkhsci9qbqmahncy3sdcrwj4qr1prc4y2cm4wx"))))
c195b5ba
EF
1115 (arguments
1116 (substitute-keyword-arguments (package-arguments qtsvg)
1117 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d438c968
EF
1118 (native-inputs
1119 `(("perl" ,perl)
1120 ("qtdeclarative" ,qtdeclarative)))
1121 (inputs
1122 `(("mesa" ,mesa)
96412f34
EF
1123 ("qtbase" ,qtbase)))
1124 (synopsis "Qt Tools and Designer modules")
1125 (description "The Qt Tools module provides a set of applications to browse
1126the documentation, translate applications, generate help files and other stuff
1127that helps in Qt development.")))
d438c968 1128
4742c4de
EF
1129(define-public qtscript
1130 (package (inherit qtsvg)
1131 (name "qtscript")
1f52eb7b 1132 (version "5.11.0")
4742c4de
EF
1133 (source (origin
1134 (method url-fetch)
1135 (uri (string-append "https://download.qt.io/official_releases/qt/"
1136 (version-major+minor version) "/" version
1f52eb7b 1137 "/submodules/" name "-everywhere-src-"
4742c4de
EF
1138 version ".tar.xz"))
1139 (sha256
1140 (base32
1f52eb7b 1141 "1ib8a5gsxarbm2j94j5d097ly3ap4snqkx2imz3sl6xk6gknm4i5"))
7c5cf7a2 1142 (patches (search-patches "qtscript-disable-tests.patch"))))
4742c4de
EF
1143 (native-inputs
1144 `(("perl" ,perl)
1145 ("qttools" ,qttools)))
1146 (inputs
96412f34
EF
1147 `(("qtbase" ,qtbase)))
1148 (synopsis "Qt Script module")
1149 (description "Qt provides support for application scripting with ECMAScript.
1150The following guides and references cover aspects of programming with
1151ECMAScript and Qt.")))
4742c4de 1152
ae0e5133
DC
1153(define-public qtquickcontrols
1154 (package (inherit qtsvg)
1155 (name "qtquickcontrols")
1f52eb7b 1156 (version "5.11.0")
ae0e5133
DC
1157 (source (origin
1158 (method url-fetch)
1159 (uri (string-append "https://download.qt.io/official_releases/qt/"
1160 (version-major+minor version) "/" version
1f52eb7b 1161 "/submodules/" name "-everywhere-src-"
ae0e5133
DC
1162 version ".tar.xz"))
1163 (sha256
1164 (base32
1f52eb7b 1165 "01ziibf4afdhb5b3gfci8maprmviqwhdvma2z1jlq2ck45cpsqi6"))))
c195b5ba
EF
1166 (arguments
1167 (substitute-keyword-arguments (package-arguments qtsvg)
1168 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
ae0e5133
DC
1169 (inputs
1170 `(("qtbase" ,qtbase)
96412f34
EF
1171 ("qtdeclarative" ,qtdeclarative)))
1172 (synopsis "Qt Quick Controls and other Quick modules")
1173 (description "The QtScript module provides classes for making Qt
1174applications scriptable. This module provides a set of extra components that
1175can be used to build complete interfaces in Qt Quick.")))
ae0e5133 1176
42da1492
DC
1177(define-public qtquickcontrols2
1178 (package (inherit qtsvg)
1179 (name "qtquickcontrols2")
1f52eb7b 1180 (version "5.11.0")
42da1492
DC
1181 (source (origin
1182 (method url-fetch)
1183 (uri (string-append "https://download.qt.io/official_releases/qt/"
1184 (version-major+minor version) "/" version
1f52eb7b 1185 "/submodules/" name "-everywhere-src-"
42da1492
DC
1186 version ".tar.xz"))
1187 (sha256
1188 (base32
1f52eb7b 1189 "1hsa8n4dlqpyz9xq2kq1hsxrxsjc7ywzzfhqijylgzzclvlqgb7y"))))
c195b5ba
EF
1190 (arguments
1191 (substitute-keyword-arguments (package-arguments qtsvg)
1192 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
42da1492
DC
1193 (inputs
1194 `(("qtbase" ,qtbase)
96412f34
EF
1195 ("qtdeclarative" ,qtdeclarative)))
1196 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1197 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1198module that provides platform integration: native dialogs, menus and menu bars,
1199and tray icons. It falls back to Qt Widgets when a native implementation is
1200not available.")))
42da1492 1201
4e4ed0ee
DC
1202(define-public qtgraphicaleffects
1203 (package (inherit qtsvg)
1204 (name "qtgraphicaleffects")
1f52eb7b 1205 (version "5.11.0")
4e4ed0ee
DC
1206 (source (origin
1207 (method url-fetch)
1208 (uri (string-append "https://download.qt.io/official_releases/qt/"
1209 (version-major+minor version) "/" version
1f52eb7b 1210 "/submodules/" name "-everywhere-src-"
4e4ed0ee
DC
1211 version ".tar.xz"))
1212 (sha256
1213 (base32
1f52eb7b 1214 "0xzr4421w7idlgndxnd68wwc2asabycjiskkyl1f8nwqv34lcy3j"))))
c195b5ba
EF
1215 (arguments
1216 (substitute-keyword-arguments (package-arguments qtsvg)
1217 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
4e4ed0ee
DC
1218 (inputs
1219 `(("qtbase" ,qtbase)
96412f34
EF
1220 ("qtdeclarative" ,qtdeclarative)))
1221 (synopsis "Qt Graphical Effects module")
1222 (description "The Qt Graphical Effects module provides a set of QML types
1223for adding visually impressive and configurable effects to user interfaces.
1224Effects are visual items that can be added to Qt Quick user interface as UI
1225components. The API consists of over 20 effects provided as separate QML
1226types. The effects cover functional areas such as blending, masking, blurring,
1227coloring, and many more.")))
4e4ed0ee 1228
843bdfb7 1229(define-public qtdeclarative-render2d
a20e00dd 1230 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
843bdfb7
EF
1231 (package (inherit qtsvg)
1232 (name "qtdeclarative-render2d")
1233 (version "5.7.1")
1234 (source (origin
1235 (method url-fetch)
1236 (uri (string-append "https://download.qt.io/official_releases/qt/"
1237 (version-major+minor version) "/" version
1f52eb7b 1238 "/submodules/" name "-everywhere-src-"
843bdfb7
EF
1239 version ".tar.xz"))
1240 (sha256
1241 (base32
1242 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1243 (modules '((guix build utils)))
1244 (snippet
1f52eb7b
EF
1245 '(begin
1246 (delete-file-recursively "tools/opengldummy/3rdparty")
1247 #t))))
843bdfb7
EF
1248 (native-inputs `())
1249 (inputs
1250 `(("qtbase" ,qtbase)
a20e00dd 1251 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
1252 (synopsis "Qt Declarative Render module")
1253 (description "The Qt Declarative Render 2D module provides a Raster
1254backend for QtQuick scene graph.")
a20e00dd 1255 (properties `((superseded . ,qtdeclarative)))))
843bdfb7 1256
51519fd3
EF
1257(define-public qtgamepad
1258 (package (inherit qtsvg)
1259 (name "qtgamepad")
1f52eb7b 1260 (version "5.11.0")
51519fd3
EF
1261 (source (origin
1262 (method url-fetch)
1263 (uri (string-append "https://download.qt.io/official_releases/qt/"
1264 (version-major+minor version) "/" version
1f52eb7b 1265 "/submodules/" name "-everywhere-src-"
51519fd3
EF
1266 version ".tar.xz"))
1267 (sha256
1268 (base32
1f52eb7b 1269 "0g52c03gdgz57h7szdxvc5hdy45l7q7m29yfzhwqc57hwdfl98bi"))))
51519fd3
EF
1270 (native-inputs
1271 `(("perl" ,perl)
1272 ("pkg-config" ,pkg-config)))
1273 (inputs
1274 `(("fontconfig" ,fontconfig)
1275 ("freetype" ,freetype)
1276 ("libxrender" ,libxrender)
1277 ("sdl2" ,sdl2)
1278 ("qtbase" ,qtbase)
96412f34
EF
1279 ("qtdeclarative" ,qtdeclarative)))
1280 (synopsis "Qt Gamepad module")
1281 (description "The Qt Gamepad module is an add-on library that enables Qt
1282applications to support the use of gamepad hardware and in some cases remote
1283control equipment. The module provides both QML and C++ interfaces. The
1284primary target audience are embedded devices with fullscreen user interfaces,
1285and mobile applications targeting TV-like form factors.")))
51519fd3 1286
56cd88fd
EF
1287(define-public qtscxml
1288 (package (inherit qtsvg)
1289 (name "qtscxml")
1f52eb7b 1290 (version "5.11.0")
56cd88fd
EF
1291 (source (origin
1292 (method url-fetch)
1293 (uri (string-append "https://download.qt.io/official_releases/qt/"
1294 (version-major+minor version) "/" version
1f52eb7b 1295 "/submodules/" name "-everywhere-src-"
56cd88fd
EF
1296 version ".tar.xz"))
1297 (sha256
1298 (base32
1f52eb7b 1299 "00wb89ris8fyivhz9qpqn72mzpkh6mqdjss82j3q10g3c142072k"))
56cd88fd
EF
1300 (modules '((guix build utils)))
1301 (snippet
c195b5ba
EF
1302 '(begin
1303 (delete-file-recursively "tests/3rdparty")
1304 ;; the scion test refers to the bundled 3rd party test code.
1305 (substitute* "tests/auto/auto.pro"
6cbee49d
MW
1306 (("scion") "#"))
1307 #t))))
56cd88fd
EF
1308 (inputs
1309 `(("qtbase" ,qtbase)
96412f34
EF
1310 ("qtdeclarative" ,qtdeclarative)))
1311 (synopsis "Qt SCXML module")
1312 (description "The Qt SCXML module provides functionality to create state
1313machines from SCXML files. This includes both dynamically creating state
1314machines (loading the SCXML file and instantiating states and transitions) and
1315generating a C++ file that has a class implementing the state machine. It
1316also contains functionality to support data models and executable content.")))
56cd88fd 1317
de5e0180
EF
1318(define-public qtpurchasing
1319 (package (inherit qtsvg)
1320 (name "qtpurchasing")
1f52eb7b 1321 (version "5.11.0")
de5e0180
EF
1322 (source (origin
1323 (method url-fetch)
1324 (uri (string-append "https://download.qt.io/official_releases/qt/"
1325 (version-major+minor version) "/" version
1f52eb7b 1326 "/submodules/" name "-everywhere-src-"
de5e0180
EF
1327 version ".tar.xz"))
1328 (sha256
1329 (base32
1f52eb7b 1330 "1c92yv2yi38sic06nyr9r6zpq3y4sxnasmj14d3jmg50gc1ncqfs"))))
de5e0180
EF
1331 (inputs
1332 `(("qtbase" ,qtbase)
96412f34
EF
1333 ("qtdeclarative" ,qtdeclarative)))
1334 (synopsis "Qt Purchasing module")
1335 (description "The Qt Purchasing module provides and in-app API for
1336purchasing goods and services.")))
de5e0180 1337
173b54b9
EF
1338(define-public qtcanvas3d
1339 (package (inherit qtsvg)
1340 (name "qtcanvas3d")
1f52eb7b 1341 (version "5.11.0")
173b54b9
EF
1342 (source (origin
1343 (method url-fetch)
1344 (uri (string-append "https://download.qt.io/official_releases/qt/"
1345 (version-major+minor version) "/" version
1f52eb7b 1346 "/submodules/" name "-everywhere-src-"
173b54b9
EF
1347 version ".tar.xz"))
1348 (sha256
1349 (base32
1f52eb7b 1350 "1kqcaks6lkz8cp9s3pwrvgrr8381rjzf5fbf2bzshdw7psphxiiz"))
173b54b9
EF
1351 (modules '((guix build utils)))
1352 (snippet
1f52eb7b
EF
1353 '(begin
1354 (delete-file-recursively "examples/canvas3d/3rdparty")
1355 #t))))
c195b5ba
EF
1356 (arguments
1357 (substitute-keyword-arguments (package-arguments qtsvg)
1358 ;; Building the tests depends on the bundled 3rd party javascript files,
1359 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1360 ;; fail, so we skip building them for now.
1361 ((#:phases phases)
1362 `(modify-phases ,phases
1363 (replace 'configure
1364 (lambda* (#:key outputs #:allow-other-keys)
1365 (let ((out (assoc-ref outputs "out")))
1f52eb7b
EF
1366 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1367 (string-append "PREFIX=" out)))))))
c195b5ba 1368 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
173b54b9
EF
1369 (native-inputs `())
1370 (inputs
1371 `(("qtbase" ,qtbase)
96412f34
EF
1372 ("qtdeclarative" ,qtdeclarative)))
1373 (synopsis "Qt Canvas 3D module")
1374 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1375drawing calls from Qt Quick JavaScript.")))
173b54b9 1376
68bbe14b
EF
1377(define-public qtcharts
1378 (package (inherit qtsvg)
1379 (name "qtcharts")
1f52eb7b 1380 (version "5.11.0")
68bbe14b
EF
1381 (source (origin
1382 (method url-fetch)
1383 (uri (string-append "https://download.qt.io/official_releases/qt/"
1384 (version-major+minor version) "/" version
1f52eb7b 1385 "/submodules/" name "-everywhere-src-"
68bbe14b
EF
1386 version ".tar.xz"))
1387 (sha256
1388 (base32
1f52eb7b 1389 "0lg39vd6i0l76spjz6bhb1kkpbk2mgc0hxccj7733xxbxaz14vn4"))))
c195b5ba
EF
1390 (arguments
1391 (substitute-keyword-arguments (package-arguments qtsvg)
1392 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
68bbe14b
EF
1393 (inputs
1394 `(("qtbase" ,qtbase)
96412f34
EF
1395 ("qtdeclarative" ,qtdeclarative)))
1396 (synopsis "Qt Charts module")
1397 (description "The Qt Charts module provides a set of easy to use chart
1398components. It uses the Qt Graphics View Framework, therefore charts can be
1399easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1400QGraphicsWidget, or QML types. Users can easily create impressive graphs by
9c2c524d
EF
1401selecting one of the charts themes.")
1402 (license license:gpl3)))
68bbe14b 1403
a69945a7
EF
1404(define-public qtdatavis3d
1405 (package (inherit qtsvg)
1406 (name "qtdatavis3d")
1f52eb7b 1407 (version "5.11.0")
a69945a7
EF
1408 (source (origin
1409 (method url-fetch)
1410 (uri (string-append "https://download.qt.io/official_releases/qt/"
1411 (version-major+minor version) "/" version
1f52eb7b 1412 "/submodules/" name "-everywhere-src-"
a69945a7
EF
1413 version ".tar.xz"))
1414 (sha256
1415 (base32
1f52eb7b 1416 "1s7gmgh6g3aia74yiqahffrc6n8f4491vb7g3i4i10ilandipg34"))))
c195b5ba
EF
1417 (arguments
1418 (substitute-keyword-arguments (package-arguments qtsvg)
1419 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
a69945a7
EF
1420 (inputs
1421 `(("qtbase" ,qtbase)
96412f34
EF
1422 ("qtdeclarative" ,qtdeclarative)))
1423 (synopsis "Qt Data Visualization module")
1424 (description "The Qt Data Visualization module provides a way to visualize
1425data in 3D as bar, scatter, and surface graphs. It is especially useful for
1426visualizing depth maps and large quantities of rapidly changing data, such as
1427data received from multiple sensors. The look and feel of graphs can be
9c2c524d
EF
1428customized by using themes or by adding custom items and labels to them.")
1429 (license license:gpl3)))
f47d2793
EF
1430
1431(define-public qtnetworkauth
1432 (package (inherit qtsvg)
1433 (name "qtnetworkauth")
1f52eb7b 1434 (version "5.11.0")
f47d2793
EF
1435 (source (origin
1436 (method url-fetch)
1437 (uri (string-append "https://download.qt.io/official_releases/qt/"
1438 (version-major+minor version) "/" version
1f52eb7b 1439 "/submodules/" name "-everywhere-src-"
f47d2793
EF
1440 version ".tar.xz"))
1441 (sha256
1442 (base32
1f52eb7b 1443 "1kr8hwjsb8a5cypvqj48vrnkcvm2rcni102dh6i909i70a7hcsym"))))
f18c9470
EF
1444 (arguments
1445 (substitute-keyword-arguments (package-arguments qtsvg)
1446 ((#:phases phases)
1447 `(modify-phases ,phases
1448 (add-after 'unpack 'remove-failing-test
1449 (lambda _
1450 ;; These tests can't find their test data.
1451 (substitute* "tests/auto/auto.pro"
1452 (("oauth1 ") "# oauth1 "))
1453 #t))))))
f47d2793 1454 (inputs
96412f34
EF
1455 `(("qtbase" ,qtbase)))
1456 (synopsis "Qt Network Authorization module")
1457 (description "The Qt Network Authorization module provides an
1458implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
213238d9
EF
1459
1460(define-public qtremoteobjects
1461 (package (inherit qtsvg)
1462 (name "qtremoteobjects")
1f52eb7b 1463 (version "5.11.0")
213238d9
EF
1464 (source (origin
1465 (method url-fetch)
1466 (uri (string-append "https://download.qt.io/official_releases/qt/"
1467 (version-major+minor version) "/" version
1f52eb7b 1468 "/submodules/" name "-everywhere-src-"
213238d9
EF
1469 version ".tar.xz"))
1470 (sha256
1471 (base32
1f52eb7b
EF
1472 "1chn1xxhapfwvhrlv4chwfgf2dw8x8kn1lssdmpmg5s420z3pbq9"))))
1473 (arguments
1474 (substitute-keyword-arguments (package-arguments qtsvg)
1475 ((#:phases phases)
1476 `(modify-phases ,phases
1477 (add-after 'unpack 'remove-failing-test
1478 (lambda _
1479 ;; This test can't find its imports.
1480 (substitute* "tests/auto/qml/qml.pro"
1481 (("integration") "# integration"))
1482 #t))))))
213238d9
EF
1483 (inputs
1484 `(("qtbase" ,qtbase)
96412f34
EF
1485 ("qtdeclarative" ,qtdeclarative)))
1486 (synopsis "Qt Remote Objects module")
1487 (description "The Qt Remote Objects module is an @dfn{inter-process
1488communication} (IPC) module developed for Qt. The idea is to extend existing
1489Qt's functionalities to enable an easy exchange of information between
1490processes or computers.")))
b84cc89a
EF
1491
1492(define-public qtspeech
1493 (package (inherit qtsvg)
1494 (name "qtspeech")
1f52eb7b 1495 (version "5.11.0")
b84cc89a
EF
1496 (source (origin
1497 (method url-fetch)
1498 (uri (string-append "https://download.qt.io/official_releases/qt/"
1499 (version-major+minor version) "/" version
1f52eb7b 1500 "/submodules/" name "-everywhere-src-"
b84cc89a
EF
1501 version ".tar.xz"))
1502 (sha256
1503 (base32
1f52eb7b 1504 "1bgfg0akqf1nfzm28n8dhvhj0p1niwxrfs763gj7m0g6vpwjbhd1"))))
b84cc89a
EF
1505 (inputs
1506 `(("qtbase" ,qtbase)))
1507 (native-inputs
1508 `(("perl" ,perl)
1509 ("qtdeclarative" ,qtdeclarative)
1510 ("qtmultimedia" ,qtmultimedia)
96412f34
EF
1511 ("qtxmlpatterns" ,qtxmlpatterns)))
1512 (synopsis "Qt Speech module")
1513 (description "The Qt Speech module enables a Qt application to support
1514accessibility features such as text-to-speech, which is useful for end-users
1515who are visually challenged or cannot access the application for whatever
1516reason. The most common use case where text-to-speech comes in handy is when
1517the end-user is driving and cannot attend the incoming messages on the phone.
1518In such a scenario, the messaging application can read out the incoming
1519message.")))
a69945a7 1520
84ef83dd
AE
1521(define-public python-sip
1522 (package
1523 (name "python-sip")
079e6792 1524 (version "4.19.3")
84ef83dd
AE
1525 (source
1526 (origin
1527 (method url-fetch)
1528 (uri
1529 (string-append "mirror://sourceforge/pyqt/sip/"
8fa7f8d9 1530 "sip-" version "/sip-" version ".tar.gz"))
84ef83dd
AE
1531 (sha256
1532 (base32
079e6792 1533 "0x2bghbprwl3az1ni3p87i0bq8r99694la93kg65vi0cz12gh3bl"))))
84ef83dd
AE
1534 (build-system gnu-build-system)
1535 (native-inputs
1536 `(("python" ,python-wrapper)))
1537 (arguments
1538 `(#:tests? #f ; no check target
e8bdd73a
AE
1539 #:modules ((srfi srfi-1)
1540 ,@%gnu-build-system-modules)
84ef83dd 1541 #:phases
39766868
EF
1542 (modify-phases %standard-phases
1543 (replace 'configure
1544 (lambda* (#:key inputs outputs #:allow-other-keys)
1545 (let* ((out (assoc-ref outputs "out"))
1546 (bin (string-append out "/bin"))
1547 (include (string-append out "/include"))
1548 (python (assoc-ref inputs "python"))
1549 (python-version
1550 (last (string-split python #\-)))
1551 (python-major+minor
1552 (string-join
1553 (take (string-split python-version #\.) 2)
1554 "."))
1555 (lib (string-append out "/lib/python"
1556 python-major+minor
1557 "/site-packages")))
1558 (zero?
1559 (system* "python" "configure.py"
1560 "--bindir" bin
1561 "--destdir" lib
1562 "--incdir" include))))))))
1563 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
84ef83dd
AE
1564 (synopsis "Python binding creator for C and C++ libraries")
1565 (description
1566 "SIP is a tool to create Python bindings for C and C++ libraries. It
1567was originally developed to create PyQt, the Python bindings for the Qt
1568toolkit, but can be used to create bindings for any C or C++ library.
1569
1570SIP comprises a code generator and a Python module. The code generator
1571processes a set of specification files and generates C or C++ code, which
1572is then compiled to create the bindings extension module. The SIP Python
1573module provides support functions to the automatically generated code.")
1574 ;; There is a choice between a python like license, gpl2 and gpl3.
1575 ;; For compatibility with pyqt, we need gpl3.
225941b0 1576 (license license:gpl3)))
84ef83dd
AE
1577
1578(define-public python2-sip
1579 (package (inherit python-sip)
1580 (name "python2-sip")
1581 (native-inputs
1582 `(("python" ,python-2)))))
014e7dd8
AE
1583
1584(define-public python-pyqt
1585 (package
1586 (name "python-pyqt")
28d0b521 1587 (version "5.9")
014e7dd8
AE
1588 (source
1589 (origin
1590 (method url-fetch)
1591 (uri
1592 (string-append "mirror://sourceforge/pyqt/PyQt5/"
2be06813 1593 "PyQt-" version "/PyQt5_gpl-"
014e7dd8
AE
1594 version ".tar.gz"))
1595 (sha256
1596 (base32
28d0b521 1597 "15hh4z5vd45dcswjla58q6rrfr6ic7jfz2n7c8lwfb10rycpj3mb"))
fc1adab1 1598 (patches (search-patches "pyqt-configure.patch"))))
014e7dd8
AE
1599 (build-system gnu-build-system)
1600 (native-inputs
499991cf
EB
1601 `(("qtbase" ,qtbase))) ; for qmake
1602 (propagated-inputs
1603 `(("python-sip" ,python-sip)))
014e7dd8 1604 (inputs
e9adcd81
EF
1605 `(("python" ,python-wrapper)
1606 ("qtbase" ,qtbase)
1607 ("qtconnectivity" ,qtconnectivity)
1608 ("qtdeclarative" ,qtdeclarative)
1609 ("qtlocation" ,qtlocation)
1610 ("qtmultimedia" ,qtmultimedia)
1611 ("qtsensors" ,qtsensors)
1612 ("qtserialport" ,qtserialport)
1613 ("qtsvg" ,qtsvg)
1614 ("qttools" ,qttools)
1615 ("qtwebchannel" ,qtwebchannel)
1616 ("qtwebkit" ,qtwebkit)
1617 ("qtwebsockets" ,qtwebsockets)
1618 ("qtx11extras" ,qtx11extras)
1619 ("qtxmlpatterns" ,qtxmlpatterns)))
014e7dd8 1620 (arguments
e8bdd73a
AE
1621 `(#:modules ((srfi srfi-1)
1622 ,@%gnu-build-system-modules)
1623 #:phases
eef988c8
EF
1624 (modify-phases %standard-phases
1625 (replace 'configure
1626 (lambda* (#:key inputs outputs #:allow-other-keys)
1627 (let* ((out (assoc-ref outputs "out"))
1628 (bin (string-append out "/bin"))
1629 (sip (string-append out "/share/sip"))
1630 (plugins (string-append out "/plugins"))
1631 (designer (string-append plugins "/designer"))
1632 (qml (string-append plugins "/PyQt5"))
1633 (python (assoc-ref inputs "python"))
1634 (python-version
1635 (last (string-split python #\-)))
1636 (python-major+minor
1637 (string-join
1638 (take (string-split python-version #\.) 2)
1639 "."))
1640 (lib (string-append out "/lib/python"
1641 python-major+minor
43e8824d
HG
1642 "/site-packages"))
1643 (stubs (string-append lib "/PyQt5")))
eef988c8
EF
1644 (zero? (system* "python" "configure.py"
1645 "--confirm-license"
1646 "--bindir" bin
1647 "--destdir" lib
1648 "--designer-plugindir" designer
1649 "--qml-plugindir" qml
43e8824d
HG
1650 ; Where to install the PEP 484 Type Hints stub
1651 ; files. Without this the stubs are tried to be
1652 ; installed into the python package's
1653 ; site-package directory, which is read-only.
1654 "--stubsdir" stubs
eef988c8
EF
1655 "--sipdir" sip))))))))
1656 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
014e7dd8
AE
1657 (synopsis "Python bindings for Qt")
1658 (description
1659 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1660framework. The bindings are implemented as a set of Python modules and
1661contain over 620 classes.")
225941b0 1662 (license license:gpl3)))
014e7dd8
AE
1663
1664(define-public python2-pyqt
1665 (package (inherit python-pyqt)
1666 (name "python2-pyqt")
1667 (native-inputs
1668 `(("python-sip" ,python2-sip)
2be06813 1669 ("qtbase" ,qtbase)))
014e7dd8 1670 (inputs
e9adcd81
EF
1671 `(("python" ,python-2)
1672 ,@(alist-delete "python" (package-inputs python-pyqt))))))
3e291958
AE
1673
1674(define-public python-pyqt-4
1675 (package (inherit python-pyqt)
1676 (name "python-pyqt")
41fa164a 1677 (version "4.12")
3e291958
AE
1678 (source
1679 (origin
1680 (method url-fetch)
1681 (uri
1682 (string-append "mirror://sourceforge/pyqt/PyQt4/"
41fa164a 1683 "PyQt-" version "/PyQt4_gpl_x11-"
3e291958
AE
1684 version ".tar.gz"))
1685 (sha256
1686 (base32
41fa164a 1687 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
3e291958
AE
1688 (native-inputs
1689 `(("python-sip" ,python-sip)
1690 ("qt" ,qt-4)))
e9adcd81 1691 (inputs `(("python" ,python-wrapper)))
3e291958
AE
1692 (arguments
1693 `(#:tests? #f ; no check target
e8bdd73a
AE
1694 #:modules ((srfi srfi-1)
1695 ,@%gnu-build-system-modules)
3e291958 1696 #:phases
f9513086
EF
1697 (modify-phases %standard-phases
1698 (replace 'configure
1699 (lambda* (#:key inputs outputs #:allow-other-keys)
1700 (let* ((out (assoc-ref outputs "out"))
1701 (bin (string-append out "/bin"))
1702 (sip (string-append out "/share/sip"))
1703 (python (assoc-ref inputs "python"))
1704 (python-version
1705 (last (string-split python #\-)))
1706 (python-major+minor
1707 (string-join
1708 (take (string-split python-version #\.) 2)
1709 "."))
1710 (lib (string-append out "/lib/python"
1711 python-major+minor
1712 "/site-packages")))
1713 (zero? (system* "python" "configure.py"
1714 "--confirm-license"
1715 "--bindir" bin
1716 "--destdir" lib
1717 "--sipdir" sip))))))))
225941b0 1718 (license (list license:gpl2 license:gpl3)))) ; choice of either license
3e291958 1719
6d8e14d0 1720(define-public python2-pyqt-4
1721 (package (inherit python-pyqt-4)
9fde8778 1722 (name "python2-pyqt")
6d8e14d0 1723 (native-inputs
1724 `(("python-sip" ,python2-sip)
1725 ("qt" ,qt-4)))
1726 (inputs
1727 `(("python" ,python-2)))))
1728
3befd0a9
RW
1729(define-public qscintilla
1730 (package
1731 (name "qscintilla")
fbf94fb1 1732 (version "2.10.3")
3befd0a9
RW
1733 (source (origin
1734 (method url-fetch)
1735 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1736 "QScintilla-" version "/QScintilla_gpl-"
1737 version ".tar.gz"))
1738 (sha256
1739 (base32
fbf94fb1 1740 "1rw1nlwnyzj5pb86cc5kk56qhrvwvrjvjzgrkwh3g7b9wxl7lrfj"))))
3befd0a9
RW
1741 (build-system gnu-build-system)
1742 (arguments
1743 `(#:phases
1744 (modify-phases %standard-phases
1745 (replace 'configure
1746 (lambda* (#:key outputs #:allow-other-keys)
1747 (let ((out (assoc-ref outputs "out")))
1748 (chdir "Qt4Qt5")
1749 (substitute* "qscintilla.pro"
1750 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1751 (string-append out "/lib"))
1752 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1753 (string-append out "/include"))
1754 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1755 (string-append out "/translations"))
5430732b
HG
1756 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1757 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1758 (("\\$\\$\\[QT_HOST_DATA\\]")
1759 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
0af6ffdd 1760 (invoke "qmake")))))))
3befd0a9 1761 (native-inputs `(("qtbase" ,qtbase)))
d338321d 1762 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
3befd0a9
RW
1763 (synopsis "Qt port of the Scintilla C++ editor control")
1764 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1765editor control. QScintilla includes features especially useful when editing
1766and debugging source code. These include support for syntax styling, error
1767indicators, code completion and call tips.")
1768 (license license:gpl3+)))
1769
06d04dbc
RW
1770(define-public python-qscintilla
1771 (package (inherit qscintilla)
1772 (name "python-qscintilla")
1773 (arguments
1774 `(#:configure-flags
1775 (list "--pyqt=PyQt5"
1776 (string-append "--pyqt-sipdir="
1777 (assoc-ref %build-inputs "python-pyqt")
1778 "/share/sip")
1779 (string-append "--qsci-incdir="
1780 (assoc-ref %build-inputs "qscintilla")
1781 "/include")
1782 (string-append "--qsci-libdir="
1783 (assoc-ref %build-inputs "qscintilla")
1784 "/lib"))
1785 #:phases
1786 (modify-phases %standard-phases
1787 (replace 'configure
1788 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1789 (chdir "Python")
76c7fc43
MW
1790 (apply invoke "python3" "configure.py"
1791 configure-flags)
1792 ;; Install to the right directory
1793 (substitute* '("Makefile"
1794 "Qsci/Makefile")
1795 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
1796 (assoc-ref outputs "out")))
1797 #t)))))
06d04dbc
RW
1798 (inputs
1799 `(("qscintilla" ,qscintilla)
1800 ("python" ,python)
1801 ("python-pyqt" ,python-pyqt)))
1802 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1803editor control. QScintilla includes features especially useful when editing
1804and debugging source code. These include support for syntax styling, error
1805indicators, code completion and call tips.
1806
1807This package provides the Python bindings.")))
1808
2456153a
RW
1809;; PyQt only looks for modules in its own directory. It ignores environment
1810;; variables such as PYTHONPATH, so we need to build a union package to make
1811;; it work.
1812(define-public python-pyqt+qscintilla
1813 (package (inherit python-pyqt)
1814 (name "python-pyqt+qscintilla")
1815 (source #f)
1816 (build-system trivial-build-system)
1817 (arguments
1818 '(#:modules ((guix build union))
1819 #:builder (begin
1820 (use-modules (ice-9 match)
1821 (guix build union))
1822 (match %build-inputs
1823 (((names . directories) ...)
1824 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
1825 directories)
1826 #t)))))
2456153a
RW
1827 (inputs
1828 `(("python-pyqt" ,python-pyqt)
1829 ("python-qscintilla" ,python-qscintilla)))
1830 (synopsis "Union of PyQt and the Qscintilla extension")
1831 (description
1832 "This package contains the union of PyQt and the Qscintilla extension.")))
1833
9e81af9e
EF
1834(define-public qtkeychain
1835 (package
1836 (name "qtkeychain")
4ad70ad8 1837 (version "0.8.0")
9e81af9e
EF
1838 (source
1839 (origin
1840 (method url-fetch)
1841 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1842 "archive/v" version ".tar.gz"))
1843 (file-name (string-append name "-" version ".tar.gz"))
1844 (sha256
4ad70ad8 1845 (base32 "0bxi5pfhxdvwk8yxa06lk2d7lcibmfqhahbin82bqf3m341zd4ml"))))
9e81af9e 1846 (build-system cmake-build-system)
18174d8a 1847 (native-inputs
f8127d26
HG
1848 `(("pkg-config" ,pkg-config)
1849 ("qttools" ,qttools)))
9e81af9e 1850 (inputs
18174d8a 1851 `(("qtbase" ,qtbase)))
9e81af9e
EF
1852 (arguments
1853 `(#:tests? #f ; No tests included
1854 #:phases
1855 (modify-phases %standard-phases
1856 (add-before
1857 'configure 'set-qt-trans-dir
1858 (lambda _
1859 (substitute* "CMakeLists.txt"
1860 (("\\$\\{qt_translations_dir\\}")
4ad70ad8
EF
1861 "${CMAKE_INSTALL_PREFIX}/share/qt/translations"))
1862 #t)))))
9e81af9e
EF
1863 (home-page "https://github.com/frankosterfeld/qtkeychain")
1864 (synopsis "Qt API to store passwords")
1865 (description
1866 "QtKeychain is a Qt library to store passwords and other secret data
1867securely. It will not store any data unencrypted unless explicitly requested.")
225941b0 1868 (license license:bsd-3)))
fc381a33
TD
1869
1870(define-public qwt
1871 (package
1872 (name "qwt")
1873 (version "6.1.3")
1874 (source
1875 (origin
1876 (method url-fetch)
1877 (uri
1878 (string-append "mirror://sourceforge/qwt/qwt/"
1879 version "/qwt-" version ".tar.bz2"))
1880 (sha256
1881 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1882 (build-system gnu-build-system)
1883 (inputs
1884 `(("qtbase" ,qtbase)
1885 ("qtsvg" ,qtsvg)
1886 ("qttools" ,qttools)))
1887 (arguments
1888 `(#:phases
1889 (modify-phases %standard-phases
1890 (replace 'configure
1891 (lambda* (#:key outputs #:allow-other-keys)
163651cb
SB
1892 (let* ((out (assoc-ref outputs "out"))
1893 (docdir (string-append out "/share/doc/qwt"))
1894 (incdir (string-append out "/include/qwt"))
1895 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
1896 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
fc381a33 1897 (substitute* '("qwtconfig.pri")
163651cb
SB
1898 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
1899 (format #f "~a = ~a\n" x out))
1900 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
1901 (format #f "~a = ~a\n" x docdir))
1902 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
1903 (format #f "~a = ~a\n" x incdir))
1904 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
1905 (format #f "~a = ~a\n" x pluginsdir))
1906 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
1907 (format #f "~a = ~a\n" x featuresdir)))
1908 (substitute* '("doc/doc.pro")
1909 ;; We'll install them in the 'install-man-pages' phase.
1910 (("^unix:doc\\.files.*") ""))
fc381a33 1911 (zero? (system* "qmake")))))
163651cb 1912 (add-after 'install 'install-man-pages
fc381a33
TD
1913 (lambda* (#:key outputs #:allow-other-keys)
1914 (let* ((out (assoc-ref outputs "out"))
1915 (man (string-append out "/share/man")))
1916 ;; Remove some incomplete manual pages.
1917 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1918 (mkdir-p man)
1919 (copy-recursively "doc/man" man)
1920 #t))))))
1921 (home-page "http://qwt.sourceforge.net")
1922 (synopsis "Qt widgets for plots, scales, dials and other technical software
1923GUI components")
1924 (description
1925 "The Qwt library contains widgets and components which are primarily useful
1926for technical and scientific purposes. It includes a 2-D plotting widget,
1927different kinds of sliders, and much more.")
1928 (license
1929 (list
1930 ;; The Qwt license is LGPL2.1 with some exceptions.
1931 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1932 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1933 license:lgpl2.1 license:gpl3))))
47e1d280
TD
1934
1935(define-public qtwebkit
1936 (package
1937 (name "qtwebkit")
fdaf6cd3 1938 (version "5.9.1")
47e1d280
TD
1939 (source
1940 (origin
1941 (method url-fetch)
fdaf6cd3
EF
1942 (uri (string-append "https://download.qt.io/official_releases/qt/"
1943 (version-major+minor version) "/" version
1944 "/submodules/" name "-opensource-src-"
a20e00dd 1945 version ".tar.xz"))
47e1d280
TD
1946 (sha256
1947 (base32
fdaf6cd3 1948 "1ksjn1vjbfhdm4y4rg08ag4krk87ahp7qcdcpwll42l0rnz61998"))))
47e1d280
TD
1949 (build-system gnu-build-system)
1950 (native-inputs
1951 `(("perl" ,perl)
1952 ("python" ,python-2.7)
1953 ("ruby" ,ruby)
1954 ("bison" ,bison)
1955 ("flex" ,flex)
1956 ("gperf" ,gperf)
1957 ("pkg-config" ,pkg-config)))
1958 (inputs
1959 `(("icu" ,icu4c)
1960 ("libjpeg" ,libjpeg)
1961 ("libpng" ,libpng)
1962 ("libwebp" ,libwebp)
1963 ("sqlite" ,sqlite)
1964 ("fontconfig" ,fontconfig)
c695fb76 1965 ("libxrender" ,libxrender)
47e1d280
TD
1966 ("qtbase" ,qtbase)
1967 ("qtdeclarative" ,qtdeclarative)
1968 ("qtmultimedia" ,qtmultimedia)
1969 ("libxml2" ,libxml2)
1970 ("libxslt" ,libxslt)
1971 ("libx11" ,libx11)
1972 ("libxcomposite" ,libxcomposite)))
1973 (arguments
1974 `(#:phases
1975 (modify-phases %standard-phases
4eb972b9
HG
1976 (add-before 'configure 'fix-qmlwebkit-plugins-rpath
1977 (lambda _
1978 (substitute* "Source/WebKit/qt/declarative/experimental/experimental.pri"
1979 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1980 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../../lib"))
1981 (substitute* "Source/WebKit/qt/declarative/public.pri"
1982 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1983 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../lib"))
1984 #t))
47e1d280
TD
1985 (replace 'configure
1986 (lambda* (#:key outputs #:allow-other-keys)
1987 (let ((out (assoc-ref outputs "out")))
1988 (setenv "QMAKEPATH"
1989 (string-append (getcwd) "/Tools/qmake:"
1990 (getenv "QMAKEPATH")))
1991 (system* "qmake"))))
1992 ;; prevent webkit from trying to install into the qtbase store directory,
1993 ;; and replace references to the build directory in linker options:
1994 (add-before 'build 'patch-installpaths
1995 (lambda* (#:key outputs inputs #:allow-other-keys)
1996 (let* ((out (assoc-ref outputs "out"))
1997 (qtbase (assoc-ref inputs "qtbase"))
1998 (builddir (getcwd))
1999 (linkbuild (string-append "-L" builddir))
2000 (linkout (string-append "-L" out))
2001 (makefiles
2002 (map-in-order
2003 (lambda (i)
2004 (let* ((in (car i))
2005 (mf (string-append (dirname in) "/"
2006 (cdr i))))
2007 ;; by default, these Makefiles are
2008 ;; generated during install, but we need
2009 ;; to generate them now
2010 (system* "qmake" in "-o" mf)
2011 mf))
2012 '(("Source/api.pri" . "Makefile.api")
2013 ("Source/widgetsapi.pri"
2014 . "Makefile.widgetsapi")
2015 ("Source/WebKit2/WebProcess.pro"
2016 . "Makefile.WebProcess")
2017 ("Source/WebKit2/PluginProcess.pro"
2018 . "Makefile.PluginProcess")
2019 ("Source/WebKit/qt/declarative/public.pri"
2020 . "Makefile.declarative.public")
2021 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
2022 . "Makefile.declarative.experimental")
2023 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
2024 . "Makefile")))))
2025 ;; Order of qmake calls and substitutions matters here.
2026 (system* "qmake" "-prl" "Source/widgetsapi.pri"
2027 "-o" "Source/Makefile")
2028 (substitute* (find-files "lib" "libQt5.*\\.prl")
2029 ((linkbuild) linkout))
2030 (substitute* (find-files "lib"
2031 "libQt5WebKit.*\\.la")
2032 (("libdir='.*'")
2033 (string-append "libdir='" out "/lib'"))
2034 ((linkbuild) linkout))
2035 (substitute* (find-files "lib/pkgconfig"
2036 "Qt5WebKit.*\\.pc")
2037 (((string-append "prefix=" qtbase))
2038 (string-append "prefix=" out))
2039 ((linkbuild) linkout))
2040 ;; Makefiles must be modified after .prl/.la/.pc
2041 ;; files, lest they get rebuilt:
2042 (substitute* makefiles
2043 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
2044 out )
2045 (((string-append "-Wl,-rpath," builddir))
2046 (string-append "-Wl,-rpath," out)))))))))
2047 (home-page "https://www.webkit.org")
2048 (synopsis "Web browser engine and classes to render and interact with web
2049content")
2050 (description "QtWebKit provides a Web browser engine that makes it easy to
2051embed content from the World Wide Web into your Qt application. At the same
2052time Web content can be enhanced with native controls.")
2053
2054 (license license:lgpl2.1+)))
f048f12b 2055
2056(define-public dotherside
2057 (package
2058 (name "dotherside")
8895a968 2059 (version "0.6.3")
f048f12b 2060 (source
2061 (origin
2062 (method url-fetch)
2063 (uri (string-append "https://github.com/filcuc/DOtherSide/"
2064 "archive/v" version ".tar.gz"))
2065 (file-name (string-append name "-" version ".tar.gz"))
2066 (sha256
2067 (base32
8895a968 2068 "0azq7qlsrfdwbd6qsi7d3c1knn42qw0r47g43xf7clwbinapswpz"))))
f048f12b 2069 (build-system cmake-build-system)
2070 (native-inputs
2071 `(("qttools" ,qttools)))
2072 (inputs
2073 `(("qtbase" ,qtbase)
2074 ("qtdeclarative" ,qtdeclarative)))
2075 (home-page "https://github.com/frankosterfeld/qtkeychain")
2076 (synopsis "C language library for creating bindings for the Qt QML language")
2077 (description
2078 "DOtherSide is a C language library for creating bindings for the
2079QT QML language. The following features are implementable from
2080a binding language:
2081@itemize
2082@item Creating custom QObject
2083@item Creating custom QAbstractListModels
2084@item Creating custom properties, signals and slots
2085@item Creating from QML QObject defined in the binded language
2086@item Creating from Singleton QML QObject defined in the binded language
2087@end itemize\n")
2088 (license license:lgpl3))) ;version 3 only (+ exception)