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