gnu: qtimageformats: Fix build.
[jackhill/guix/guix.git] / gnu / packages / qt.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4 ;;; Copyright © 2015, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
10 ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
12 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
13 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
15 ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
16 ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
17 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
18 ;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
19 ;;; Copyright © 2020 TomZ <tomz@freedommail.ch>
20 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
21 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
22 ;;;
23 ;;; This file is part of GNU Guix.
24 ;;;
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
29 ;;;
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
34 ;;;
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
38 (define-module (gnu packages qt)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix build-system cmake)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system trivial)
46 #:use-module (guix build-system python)
47 #:use-module (guix packages)
48 #:use-module (guix deprecation)
49 #:use-module (guix utils)
50 #:use-module (gnu packages)
51 #:use-module (gnu packages base)
52 #:use-module (gnu packages bison)
53 #:use-module (gnu packages cmake)
54 #:use-module (gnu packages compression)
55 #:use-module (gnu packages cups)
56 #:use-module (gnu packages curl)
57 #:use-module (gnu packages databases)
58 #:use-module (gnu packages documentation)
59 #:use-module (gnu packages enchant)
60 #:use-module (gnu packages fontutils)
61 #:use-module (gnu packages flex)
62 #:use-module (gnu packages freedesktop)
63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages ghostscript)
65 #:use-module (gnu packages gl)
66 #:use-module (gnu packages glib)
67 #:use-module (gnu packages gnupg)
68 #:use-module (gnu packages gperf)
69 #:use-module (gnu packages gstreamer)
70 #:use-module (gnu packages gtk)
71 #:use-module (gnu packages icu4c)
72 #:use-module (gnu packages image)
73 #:use-module (gnu packages libevent)
74 #:use-module (gnu packages linux)
75 #:use-module (gnu packages llvm)
76 #:use-module (gnu packages maths)
77 #:use-module (gnu packages ninja)
78 #:use-module (gnu packages nss)
79 #:use-module (gnu packages pciutils)
80 #:use-module (gnu packages pcre)
81 #:use-module (gnu packages perl)
82 #:use-module (gnu packages pkg-config)
83 #:use-module (gnu packages pulseaudio)
84 #:use-module (gnu packages protobuf)
85 #:use-module (gnu packages python)
86 #:use-module (gnu packages python-xyz)
87 #:use-module (gnu packages regex)
88 #:use-module (gnu packages ruby)
89 #:use-module (gnu packages sdl)
90 #:use-module (gnu packages serialization)
91 #:use-module (gnu packages sqlite)
92 #:use-module (gnu packages telephony)
93 #:use-module (gnu packages tls)
94 #:use-module (gnu packages valgrind)
95 #:use-module (gnu packages video)
96 #:use-module (gnu packages vulkan)
97 #:use-module (gnu packages xdisorg)
98 #:use-module (gnu packages xiph)
99 #:use-module (gnu packages xorg)
100 #:use-module (gnu packages xml)
101 #:use-module (srfi srfi-1))
102
103 (define-public grantlee
104 (package
105 (name "grantlee")
106 (version "5.2.0")
107 (source
108 (origin
109 (method git-fetch)
110 (uri (git-reference
111 (url "https://github.com/steveire/grantlee")
112 (commit (string-append "v" version))))
113 (file-name (git-file-name name version))
114 (sha256
115 (base32 "02dyqxjyxiqxrlz5g7v9ly8f095vs3iha39l75q6s8axs36y01lq"))))
116 (native-inputs
117 ;; Optional: lcov and cccc, both are for code coverage
118 `(("doxygen" ,doxygen)))
119 (inputs
120 `(("qtbase" ,qtbase)
121 ("qtdeclarative" ,qtdeclarative)
122 ("qtscript" ,qtscript)))
123 (build-system cmake-build-system)
124 (arguments
125 `(#:phases
126 (modify-phases %standard-phases
127 (add-before 'check 'check-setup
128 (lambda _
129 ;; make Qt render "offscreen", required for tests
130 (setenv "QT_QPA_PLATFORM" "offscreen")
131 #t)))))
132 (home-page "https://github.com/steveire/grantlee")
133 (synopsis "Libraries for text templating with Qt")
134 (description "Grantlee Templates can be used for theming and generation of
135 other text such as code. The syntax uses the syntax of the Django template
136 system, and the core design of Django is reused in Grantlee.")
137 (license license:lgpl2.1+)))
138
139 (define-public qt-4
140 (package
141 (name "qt")
142 (version "4.8.7")
143 (source (origin
144 (method url-fetch)
145 (uri (string-append "http://download.qt-project.org/archive/qt/"
146 (string-copy version 0 (string-rindex version #\.))
147 "/" version
148 "/qt-everywhere-opensource-src-"
149 version ".tar.gz"))
150 (sha256
151 (base32
152 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
153 (patches (search-patches "qt4-ldflags.patch"))
154 (modules '((guix build utils)))
155 (snippet
156 ;; Remove webkit module, which is not built.
157 '(begin (delete-file-recursively "src/3rdparty/webkit")
158 #t))))
159 (build-system gnu-build-system)
160 (propagated-inputs
161 `(("mesa" ,mesa)))
162 (inputs
163 `(("alsa-lib" ,alsa-lib)
164 ("bluez" ,bluez)
165 ("cups" ,cups)
166 ("dbus" ,dbus)
167 ("double-conversion" ,double-conversion)
168 ("expat" ,expat)
169 ("fontconfig" ,fontconfig)
170 ("freetype" ,freetype)
171 ("glib" ,glib)
172 ("gstreamer" ,gstreamer)
173 ("gst-plugins-base" ,gst-plugins-base)
174 ("icu4c" ,icu4c)
175 ("jasper" ,jasper)
176 ("libinput" ,libinput-minimal)
177 ("libmng" ,libmng)
178 ("libpci" ,pciutils)
179 ("libpng" ,libpng)
180 ("libtiff" ,libtiff)
181 ("libwebp" ,libwebp)
182 ("libx11" ,libx11)
183 ("libxcomposite" ,libxcomposite)
184 ("libxcursor" ,libxcursor)
185 ("libxext" ,libxext)
186 ("libxfixes" ,libxfixes)
187 ("libxi" ,libxi)
188 ("libxinerama" ,libxinerama)
189 ("libxkbcommon" ,libxkbcommon)
190 ("libxml2" ,libxml2)
191 ("libxrandr" ,libxrandr)
192 ("libxrender" ,libxrender)
193 ("libxslt" ,libxslt)
194 ("libxtst" ,libxtst)
195 ("mtdev" ,mtdev)
196 ("mariadb" ,mariadb "lib")
197 ("mariadb-dev" ,mariadb "dev")
198 ("nss" ,nss)
199 ("postgresql" ,postgresql)
200 ("pulseaudio" ,pulseaudio)
201 ("pcre2" ,pcre2)
202 ("sqlite" ,sqlite)
203 ("udev" ,eudev)
204 ("unixodbc" ,unixodbc)
205 ("wayland" ,wayland)
206 ("xcb-util" ,xcb-util)
207 ("xcb-util-image" ,xcb-util-image)
208 ("xcb-util-keysyms" ,xcb-util-keysyms)
209 ("xcb-util-renderutil" ,xcb-util-renderutil)
210 ("xcb-util-wm" ,xcb-util-wm)
211 ("zlib" ,zlib)
212 ("libjpeg" ,libjpeg-turbo)
213 ("libsm" ,libsm)
214 ("openssl" ,openssl-1.0)))
215 (native-inputs
216 `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard.
217 ;; We could build it with -std=gnu++98, but then we'll get in trouble with
218 ;; ICU later. Just keep using GCC 5 for now.
219 ("gcc@5" ,gcc-5)
220 ("bison" ,bison)
221 ("flex" ,flex)
222 ("gperf" ,gperf)
223 ("perl" ,perl)
224 ("pkg-config" ,pkg-config)
225 ("python" ,python-2)
226 ("ruby" ,ruby)
227 ("which" ,(@ (gnu packages base) which))))
228 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
229 ;; but we can't make them a separate output because "out" and "examples"
230 ;; would refer to each other.
231 (outputs '("out" ;112MiB core + 37MiB examples
232 "doc")) ;280MiB of HTML + code
233 (arguments
234 `(#:phases
235 (modify-phases %standard-phases
236 (add-after 'set-paths 'hide-default-gcc
237 (lambda* (#:key inputs #:allow-other-keys)
238 (let ((gcc (assoc-ref inputs "gcc")))
239 ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent
240 ;; conflicts with the GCC 5 input.
241 (setenv "CPLUS_INCLUDE_PATH"
242 (string-join
243 (delete (string-append gcc "/include/c++")
244 (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
245 ":"))
246 #t)))
247 (replace
248 'configure
249 (lambda* (#:key outputs #:allow-other-keys)
250 (let ((out (assoc-ref outputs "out"))
251 (doc (assoc-ref outputs "doc")))
252 (substitute* '("configure")
253 (("/bin/pwd") (which "pwd")))
254 (substitute* "src/corelib/global/global.pri"
255 (("/bin/ls") (which "ls")))
256
257 (invoke
258 "./configure"
259 "-verbose"
260 "-prefix" out
261 "-nomake" "examples demos"
262 ;; Note: Don't pass '-docdir' since 'qmake' and
263 ;; libQtCore would record its value, thereby defeating
264 ;; the whole point of having a separate output.
265 "-datadir" (string-append out "/share/qt-" ,version
266 "/data")
267 "-importdir" (string-append out "/lib/qt-4"
268 "/imports")
269 "-plugindir" (string-append out "/lib/qt-4"
270 "/plugins")
271 "-translationdir" (string-append out "/share/qt-" ,version
272 "/translations")
273 "-demosdir" (string-append out "/share/qt-" ,version
274 "/demos")
275 "-examplesdir" (string-append out "/share/qt-" ,version
276 "/examples")
277 "-opensource"
278 "-confirm-license"
279 ;; explicitly link with dbus instead of dlopening it
280 "-dbus-linked"
281 ;; Skip the webkit module; it fails to build on armhf
282 ;; and, apart from that, may pose security risks.
283 "-no-webkit"
284 ;; don't use the precompiled headers
285 "-no-pch"
286 ;; drop special machine instructions not supported
287 ;; on all instances of the target
288 ,@(if (string-prefix? "x86_64"
289 (or (%current-target-system)
290 (%current-system)))
291 '()
292 '("-no-mmx"
293 "-no-3dnow"
294 "-no-sse"
295 "-no-sse2"))
296 "-no-sse3"
297 "-no-ssse3"
298 "-no-sse4.1"
299 "-no-sse4.2"
300 "-no-avx"))))
301 (add-after
302 'install 'move-doc
303 (lambda* (#:key outputs #:allow-other-keys)
304 ;; Because of qt4-documentation-path.patch, documentation ends up
305 ;; being installed in OUT. Move it to the right place.
306 (let* ((out (assoc-ref outputs "out"))
307 (doc (assoc-ref outputs "doc"))
308 (olddoc (string-append out "/doc"))
309 (docdir (string-append doc "/share/doc/qt-" ,version)))
310 (mkdir-p (dirname docdir))
311
312 ;; Note: We can't use 'rename-file' here because OUT and DOC are
313 ;; different "devices" due to bind-mounts.
314 (copy-recursively olddoc docdir)
315 (delete-file-recursively olddoc)
316 #t))))))
317 (native-search-paths
318 (list (search-path-specification
319 (variable "QMAKEPATH")
320 (files '("lib/qt5")))
321 (search-path-specification
322 (variable "QML2_IMPORT_PATH")
323 (files '("lib/qt5/qml")))
324 (search-path-specification
325 (variable "QT_PLUGIN_PATH")
326 (files '("lib/qt5/plugins")))
327 (search-path-specification
328 (variable "XDG_DATA_DIRS")
329 (files '("share")))
330 (search-path-specification
331 (variable "XDG_CONFIG_DIRS")
332 (files '("etc/xdg")))))
333 (home-page "https://www.qt.io/")
334 (synopsis "Cross-platform GUI library")
335 (description "Qt is a cross-platform application and UI framework for
336 developers using C++ or QML, a CSS & JavaScript like language.")
337 (license (list license:lgpl2.1 license:lgpl3))
338
339 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
340 ;; see <http://hydra.gnu.org/build/112828>.
341 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
342 (supported-systems (delete "mips64el-linux" %supported-systems))))
343
344 (define-public qtbase
345 (package
346 (name "qtbase")
347 ;; TODO Remove ((gnu packages kde) qtbase-for-krita) when upgrading qtbase.
348 (version "5.14.2")
349 (source (origin
350 (method url-fetch)
351 (uri (string-append "https://download.qt.io/official_releases/qt/"
352 (version-major+minor version) "/" version
353 "/submodules/" name "-everywhere-src-"
354 version ".tar.xz"))
355 (sha256
356 (base32
357 "12mjsahlma9rw3vz9a6b5h2s6ylg8b34hxc2vnlna5ll429fgfa8"))
358 ;; Use TZDIR to avoid depending on package "tzdata".
359 (patches (search-patches "qtbase-use-TZDIR.patch"
360 "qtbase-moc-ignore-gcc-macro.patch"))
361 (modules '((guix build utils)))
362 (snippet
363 ;; corelib uses bundled harfbuzz, md4, md5, sha3
364 '(begin
365 (with-directory-excursion "src/3rdparty"
366 (for-each delete-file-recursively
367 (list "double-conversion" "freetype" "harfbuzz-ng"
368 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
369 "zlib"))
370 #t)))))
371 (build-system gnu-build-system)
372 (propagated-inputs
373 `(("mesa" ,mesa)
374 ;; Use which the package, not the function
375 ("which" ,(@ (gnu packages base) which))))
376 (inputs
377 `(("alsa-lib" ,alsa-lib)
378 ("cups" ,cups)
379 ("dbus" ,dbus)
380 ("double-conversion" ,double-conversion)
381 ("eudev" ,eudev)
382 ("expat" ,expat)
383 ("fontconfig" ,fontconfig)
384 ("freetype" ,freetype)
385 ("glib" ,glib)
386 ("harfbuzz" ,harfbuzz)
387 ("icu4c" ,icu4c)
388 ("libinput" ,libinput-minimal)
389 ("libjpeg" ,libjpeg-turbo)
390 ("libmng" ,libmng)
391 ("libpng" ,libpng)
392 ("libx11" ,libx11)
393 ("libxcomposite" ,libxcomposite)
394 ("libxcursor" ,libxcursor)
395 ("libxfixes" ,libxfixes)
396 ("libxi" ,libxi)
397 ("libxinerama" ,libxinerama)
398 ("libxkbcommon" ,libxkbcommon)
399 ("libxml2" ,libxml2)
400 ("libxrandr" ,libxrandr)
401 ("libxrender" ,libxrender)
402 ("libxslt" ,libxslt)
403 ("libxtst" ,libxtst)
404 ("mtdev" ,mtdev)
405 ("mariadb" ,mariadb "lib")
406 ("mariadb-dev" ,mariadb "dev")
407 ("nss" ,nss)
408 ("openssl" ,openssl)
409 ("pcre2" ,pcre2)
410 ("postgresql" ,postgresql)
411 ("pulseaudio" ,pulseaudio)
412 ("sqlite" ,sqlite)
413 ("unixodbc" ,unixodbc)
414 ("xcb-util" ,xcb-util)
415 ("xcb-util-image" ,xcb-util-image)
416 ("xcb-util-keysyms" ,xcb-util-keysyms)
417 ("xcb-util-renderutil" ,xcb-util-renderutil)
418 ("xcb-util-wm" ,xcb-util-wm)
419 ("xdg-utils" ,xdg-utils)
420 ("zlib" ,zlib)))
421 (native-inputs
422 `(("bison" ,bison)
423 ("flex" ,flex)
424 ("gperf" ,gperf)
425 ("perl" ,perl)
426 ("pkg-config" ,pkg-config)
427 ("python" ,python)
428 ("vulkan-headers" ,vulkan-headers)
429 ("ruby" ,ruby)))
430 (arguments
431 `(#:phases
432 (modify-phases %standard-phases
433 (add-after 'configure 'patch-bin-sh
434 (lambda _
435 (substitute* '("config.status"
436 "configure"
437 "mkspecs/features/qt_functions.prf"
438 "qmake/library/qmakebuiltins.cpp")
439 (("/bin/sh") (which "sh")))
440 #t))
441 (add-after 'configure 'patch-xdg-open
442 (lambda _
443 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
444 (("^.*const char \\*browsers.*$" all)
445 (string-append "*browser = QStringLiteral(\""
446 (which "xdg-open")
447 "\"); return true; \n" all)))
448 #t))
449 (replace 'configure
450 (lambda* (#:key outputs #:allow-other-keys)
451 (let ((out (assoc-ref outputs "out")))
452 (substitute* "configure"
453 (("/bin/pwd") (which "pwd")))
454 (substitute* "src/corelib/global/global.pri"
455 (("/bin/ls") (which "ls")))
456 ;; The configuration files for other Qt5 packages are searched
457 ;; through a call to "find_package" in Qt5Config.cmake, which
458 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
459 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
460 ;; components can be installed in different places.
461 (substitute* (find-files "." ".*\\.cmake")
462 (("NO_DEFAULT_PATH") ""))
463 ;; do not pass "--enable-fast-install", which makes the
464 ;; configure process fail
465 (invoke
466 "./configure"
467 "-verbose"
468 "-prefix" out
469 "-docdir" (string-append out "/share/doc/qt5")
470 "-headerdir" (string-append out "/include/qt5")
471 "-archdatadir" (string-append out "/lib/qt5")
472 "-datadir" (string-append out "/share/qt5")
473 "-examplesdir" (string-append
474 out "/share/doc/qt5/examples")
475 "-opensource"
476 "-confirm-license"
477
478 ;; These features require higher versions of Linux than the
479 ;; minimum version of the glibc. See
480 ;; src/corelib/global/minimum-linux_p.h. By disabling these
481 ;; features Qt5 applications can be used on the oldest
482 ;; kernels that the glibc supports, including the RHEL6
483 ;; (2.6.32) and RHEL7 (3.10) kernels.
484 "-no-feature-getentropy" ; requires Linux 3.17
485 "-no-feature-renameat2" ; requires Linux 3.16
486
487 ;; Do not build examples; if desired, these could go
488 ;; into a separate output, but for the time being, we
489 ;; prefer to save the space and build time.
490 "-no-compile-examples"
491 ;; Most "-system-..." are automatic, but some use
492 ;; the bundled copy by default.
493 "-system-sqlite"
494 "-system-harfbuzz"
495 "-system-pcre"
496 ;; explicitly link with openssl instead of dlopening it
497 "-openssl-linked"
498 ;; explicitly link with dbus instead of dlopening it
499 "-dbus-linked"
500 ;; don't use the precompiled headers
501 "-no-pch"
502 ;; drop special machine instructions that do not have
503 ;; runtime detection
504 ,@(if (string-prefix? "x86_64"
505 (or (%current-target-system)
506 (%current-system)))
507 '()
508 '("-no-sse2"))
509 "-no-mips_dsp"
510 "-no-mips_dspr2"))))
511 (add-after 'install 'patch-mkspecs
512 (lambda* (#:key outputs #:allow-other-keys)
513 (let* ((out (assoc-ref outputs "out"))
514 (archdata (string-append out "/lib/qt5"))
515 (mkspecs (string-append archdata "/mkspecs"))
516 (qt_config.prf (string-append
517 mkspecs "/features/qt_config.prf")))
518 ;; For each Qt module, let `qmake' uses search paths in the
519 ;; module directory instead of all in QT_INSTALL_PREFIX.
520 (substitute* qt_config.prf
521 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
522 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
523 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
524 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
525 (("\\$\\$\\[QT_HOST_LIBS\\]")
526 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
527 (("\\$\\$\\[QT_INSTALL_BINS\\]")
528 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
529
530 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
531 (substitute* (string-append mkspecs "/features/qt_functions.prf")
532 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
533 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
534
535 ;; Resolve qmake spec files within qtbase by absolute paths.
536 (substitute*
537 (map (lambda (file)
538 (string-append mkspecs "/features/" file))
539 '("device_config.prf" "moc.prf" "qt_build_config.prf"
540 "qt_config.prf" "winrt/package_manifest.prf"))
541 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
542 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
543 #t)))
544 (add-after 'patch-mkspecs 'patch-prl-files
545 (lambda* (#:key outputs #:allow-other-keys)
546 (let ((out (assoc-ref outputs "out")))
547 ;; Insert absolute references to the qtbase libraries because
548 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
549 ;; on context. See <https://bugs.gnu.org/38405>
550 (substitute* (find-files (string-append out "/lib") "\\.prl$")
551 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
552 (string-append out "/lib")))
553 #t)))
554 (add-after 'unpack 'patch-paths
555 ;; Use the absolute paths for dynamically loaded libs, otherwise
556 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
557 ;; not set in guix.
558 (lambda* (#:key inputs #:allow-other-keys)
559 ;; libresolve
560 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
561 "cross-libc" "libc"))))
562 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
563 "src/network/kernel/qhostinfo_unix.cpp")
564 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
565 (string-append a glibc "/lib/lib" b))))
566 ;; libGL
567 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
568 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
569 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
570 ;; libXcursor
571 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
572 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
573 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
574 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
575 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
576 #t)))))
577 (native-search-paths
578 (list (search-path-specification
579 (variable "QMAKEPATH")
580 (files '("lib/qt5")))
581 (search-path-specification
582 (variable "QML2_IMPORT_PATH")
583 (files '("lib/qt5/qml")))
584 (search-path-specification
585 (variable "QT_PLUGIN_PATH")
586 (files '("lib/qt5/plugins")))
587 (search-path-specification
588 (variable "XDG_DATA_DIRS")
589 (files '("share")))
590 (search-path-specification
591 (variable "XDG_CONFIG_DIRS")
592 (files '("etc/xdg")))))
593 (home-page "https://www.qt.io/")
594 (synopsis "Cross-platform GUI library")
595 (description "Qt is a cross-platform application and UI framework for
596 developers using C++ or QML, a CSS & JavaScript like language.")
597 (license (list license:lgpl2.1 license:lgpl3))))
598
599 ;; qt used to refer to the monolithic Qt 5.x package
600 (define-deprecated qt qtbase)
601
602 ;; This variable is required by 'python-pyside-2-tools', which copies some
603 ;; qtbase executables that fail to run because RUNPATH refers to the
604 ;; wrong $ORIGIN. TODO: Merge with qtbase in the next rebuild cycle.
605 (define qtbase/next
606 (package
607 (inherit qtbase)
608 (source
609 (origin
610 (inherit (package-source qtbase))
611 (patches (append (origin-patches (package-source qtbase))
612 (search-patches "qtbase-absolute-runpath.patch")))))))
613
614 (define-public qtbase-for-krita
615 (hidden-package
616 (package
617 (inherit qtbase)
618 (source (origin
619 (inherit (package-source qtbase))
620 (patches (append (origin-patches (package-source qtbase))
621 (search-patches "qtbase-fix-krita-deadlock.patch"))))))))
622
623 (define-public qtsvg
624 (package (inherit qtbase)
625 (name "qtsvg")
626 (version "5.14.2")
627 (source (origin
628 (method url-fetch)
629 (uri (string-append "https://download.qt.io/official_releases/qt/"
630 (version-major+minor version) "/" version
631 "/submodules/" name "-everywhere-src-"
632 version ".tar.xz"))
633 (sha256
634 (base32
635 "18dmfc8s428fzbk7k5vl3212b25455ayrz7s716nwyiy3ahgmmy7"))))
636 (propagated-inputs `())
637 (native-inputs `(("perl" ,perl)))
638 (inputs
639 `(("mesa" ,mesa)
640 ("qtbase" ,qtbase)
641 ("zlib" ,zlib)))
642 (arguments
643 `(#:phases
644 (modify-phases %standard-phases
645 (add-before 'configure 'configure-qmake
646 (lambda* (#:key inputs outputs #:allow-other-keys)
647 (let* ((out (assoc-ref outputs "out"))
648 (qtbase (assoc-ref inputs "qtbase"))
649 (tmpdir (string-append (getenv "TMPDIR")))
650 (qmake (string-append tmpdir "/qmake"))
651 (qt.conf (string-append tmpdir "/qt.conf")))
652 ;; Use qmake with a customized qt.conf to override install
653 ;; paths to $out.
654 (symlink (which "qmake") qmake)
655 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
656 (with-output-to-file qt.conf
657 (lambda ()
658 (format #t "[Paths]
659 Prefix=~a
660 ArchData=lib/qt5
661 Data=share/qt5
662 Documentation=share/doc/qt5
663 Headers=include/qt5
664 Libraries=lib
665 LibraryExecutables=lib/qt5/libexec
666 Binaries=bin
667 Tests=tests
668 Plugins=lib/qt5/plugins
669 Imports=lib/qt5/imports
670 Qml2Imports=lib/qt5/qml
671 Translations=share/qt5/translations
672 Settings=etc/xdg
673 Examples=share/doc/qt5/examples
674 HostPrefix=~a
675 HostData=lib/qt5
676 HostBinaries=bin
677 HostLibraries=lib
678
679 [EffectiveSourcePaths]
680 HostPrefix=~a
681 HostData=lib/qt5
682 " out out qtbase)))
683 #t)))
684 (replace 'configure
685 (lambda* (#:key inputs outputs #:allow-other-keys)
686 ;; Valid QT_BUILD_PARTS variables are:
687 ;; libs tools tests examples demos docs translations
688 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
689 (add-before 'check 'set-display
690 (lambda _
691 ;; make Qt render "offscreen", required for tests
692 (setenv "QT_QPA_PLATFORM" "offscreen")
693 #t)))))
694 (synopsis "Qt module for displaying SVGs")
695 (description "The QtSvg module provides classes for displaying the
696 contents of SVG files.")))
697
698 (define-public qtimageformats
699 (package (inherit qtsvg)
700 (name "qtimageformats")
701 (version "5.14.2")
702 (source (origin
703 (method url-fetch)
704 (uri (string-append "https://download.qt.io/official_releases/qt/"
705 (version-major+minor version) "/" version
706 "/submodules/" name "-everywhere-src-"
707 version ".tar.xz"))
708 (sha256
709 (base32
710 "132g4rlm61pdcpcrclr1rwpbrxn7va4wjfb021mh8pn1cl0wlgkk"))
711 (modules '((guix build utils)))
712 (snippet
713 '(begin
714 (delete-file-recursively "src/3rdparty")
715 #t))))
716 (arguments
717 (substitute-keyword-arguments (package-arguments qtsvg)
718 ((#:phases phases)
719 `(modify-phases ,phases
720 (add-after 'unpack 'fix-build
721 (lambda _
722 (substitute* "src/plugins/imageformats/jp2/qjp2handler.cpp"
723 (("^#include <jasper/jasper.h>")
724 "#include <jasper/jasper.h>\n#include <QtCore/qmath.h>"))
725 #t))))))
726 (native-inputs `())
727 (inputs
728 `(("jasper" ,jasper)
729 ("libmng" ,libmng)
730 ("libtiff" ,libtiff)
731 ("libwebp" ,libwebp)
732 ("mesa" ,mesa)
733 ("qtbase" ,qtbase)
734 ("zlib" ,zlib)))
735 (synopsis "Additional Image Format plugins for Qt")
736 (description "The QtImageFormats module contains plugins for adding
737 support for MNG, TGA, TIFF and WBMP image formats.")))
738
739 (define-public qtx11extras
740 (package (inherit qtsvg)
741 (name "qtx11extras")
742 (version "5.14.2")
743 (source (origin
744 (method url-fetch)
745 (uri (string-append "https://download.qt.io/official_releases/qt/"
746 (version-major+minor version) "/" version
747 "/submodules/" name "-everywhere-src-"
748 version ".tar.xz"))
749 (sha256
750 (base32
751 "0njlh6d327nll7d8qaqrwr5x15m9yzgyar2j45qigs1f7ah896my"))))
752 (arguments
753 (substitute-keyword-arguments (package-arguments qtsvg)
754 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
755 (native-inputs `(("perl" ,perl)))
756 (inputs
757 `(("mesa" ,mesa)
758 ("qtbase" ,qtbase)))
759 (synopsis "Qt Extras for X11")
760 (description "The QtX11Extras module includes the library to access X11
761 from within Qt 5.")))
762
763 (define-public qtxmlpatterns
764 (package (inherit qtsvg)
765 (name "qtxmlpatterns")
766 (version "5.14.2")
767 (source (origin
768 (method url-fetch)
769 (uri (string-append "https://download.qt.io/official_releases/qt/"
770 (version-major+minor version) "/" version
771 "/submodules/" name "-everywhere-src-"
772 version ".tar.xz"))
773 (sha256
774 (base32
775 "1dyg1z4349k04yyzn8xbp4f5qjgm60gz6wgzp80khpilcmk8g6i1"))))
776 (arguments
777 (substitute-keyword-arguments (package-arguments qtsvg)
778 ((#:tests? _ #f) #f) ; TODO: Enable the tests
779 ((#:phases phases)
780 `(modify-phases ,phases
781 (add-after 'unpack 'disable-network-tests
782 (lambda _ (substitute* "tests/auto/auto.pro"
783 (("qxmlquery") "# qxmlquery")
784 (("xmlpatterns ") "# xmlpatterns"))
785 #t))))))
786 (native-inputs `(("perl" ,perl)
787 ("qtdeclarative" ,qtdeclarative)))
788 (inputs `(("qtbase" ,qtbase)))
789 (synopsis "Qt XML patterns module")
790 (description "The QtXmlPatterns module is a XQuery and XPath engine for
791 XML and custom data models. It contains programs such as xmlpatterns and
792 xmlpatternsvalidator.")))
793
794 (define-public qtdeclarative
795 (package (inherit qtsvg)
796 (name "qtdeclarative")
797 (version "5.14.2")
798 (source (origin
799 (method url-fetch)
800 (uri (string-append "https://download.qt.io/official_releases/qt/"
801 (version-major+minor version) "/" version
802 "/submodules/" name "-everywhere-src-"
803 version ".tar.xz"))
804 (sha256
805 (base32
806 "0l0nhc2si6dl9r4s1bs45z90qqigs8jnrsyjjdy38q4pvix63i53"))))
807 (arguments
808 (substitute-keyword-arguments (package-arguments qtsvg)
809 ((#:tests? _ #f) #f) ;TODO: Enable the tests
810 ((#:phases phases)
811 `(modify-phases ,phases
812 (add-after 'build 'fix-qt5core-install-prefix
813 (lambda* (#:key outputs #:allow-other-keys)
814 (let ((out (assoc-ref outputs "out")))
815 ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
816 ;; is provided by qtdeclarative.
817 (substitute*
818 "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
819 (("\\$\\{_qt5Core_install_prefix\\}") out)))
820 #t))))))
821 (native-inputs
822 `(("perl" ,perl)
823 ("pkg-config" ,pkg-config)
824 ("python" ,python)
825 ("python-wrapper" ,python-wrapper)
826 ("qtsvg" ,qtsvg)
827 ("vulkan-headers" ,vulkan-headers)))
828 (inputs
829 `(("mesa" ,mesa)
830 ("qtbase" ,qtbase)))
831 (synopsis "Qt QML module (Quick 2)")
832 (description "The Qt QML module provides a framework for developing
833 applications and libraries with the QML language. It defines and implements the
834 language and engine infrastructure, and provides an API to enable application
835 developers to extend the QML language with custom types and integrate QML code
836 with JavaScript and C++.")))
837
838 (define-public qtconnectivity
839 (package (inherit qtsvg)
840 (name "qtconnectivity")
841 (version "5.14.2")
842 (source (origin
843 (method url-fetch)
844 (uri (string-append "https://download.qt.io/official_releases/qt/"
845 (version-major+minor version) "/" version
846 "/submodules/" name "-everywhere-src-"
847 version ".tar.xz"))
848 (sha256
849 (base32
850 "0a5wzin635b926b8prdwfazgy1vhyf8m6an64wp2lpkp78z7prmb"))))
851 (native-inputs
852 `(("perl" ,perl)
853 ("pkg-config" ,pkg-config)
854 ("qtdeclarative" ,qtdeclarative)))
855 (inputs
856 `(("bluez" ,bluez)
857 ("qtbase" ,qtbase)))
858 (synopsis "Qt Connectivity module")
859 (description "The Qt Connectivity modules provides modules for interacting
860 with Bluetooth and NFC.")))
861
862 (define-public qtwebsockets
863 (package (inherit qtsvg)
864 (name "qtwebsockets")
865 (version "5.14.2")
866 (source (origin
867 (method url-fetch)
868 (uri (string-append "https://download.qt.io/official_releases/qt/"
869 (version-major+minor version) "/" version
870 "/submodules/" name "-everywhere-src-"
871 version ".tar.xz"))
872 (sha256
873 (base32
874 "116amx4mnv50k0fpswgpr5x8wjny8nbffrjmld01pzhkhfqn4vph"))))
875 (arguments
876 (substitute-keyword-arguments (package-arguments qtsvg)
877 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
878 (native-inputs
879 `(("perl" ,perl)
880 ("qtdeclarative" ,qtdeclarative)))
881 (inputs `(("qtbase" ,qtbase)))
882 (synopsis "Qt Web Sockets module")
883 (description "WebSocket is a web-based protocol designed to enable two-way
884 communication between a client application and a remote host. The Qt
885 WebSockets module provides C++ and QML interfaces that enable Qt applications
886 to act as a server that can process WebSocket requests, or a client that can
887 consume data received from the server, or both.")))
888
889 (define-public qtsensors
890 (package (inherit qtsvg)
891 (name "qtsensors")
892 (version "5.14.2")
893 (source (origin
894 (method url-fetch)
895 (uri (string-append "https://download.qt.io/official_releases/qt/"
896 (version-major+minor version) "/" version
897 "/submodules/" name "-everywhere-src-"
898 version ".tar.xz"))
899 (sha256
900 (base32
901 "0qccpgbhyg9k4x5nni7xm0pyvaqia3zrcd42cn7ksf5h21lwmkxw"))))
902 (arguments
903 (substitute-keyword-arguments (package-arguments qtsvg)
904 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
905 ((#:phases phases)
906 `(modify-phases ,phases
907 (add-after 'unpack 'fix-tests
908 (lambda _
909 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
910 (("2000") "5000") ;lengthen test timeout
911 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
912 #t))))))
913 (native-inputs
914 `(("perl" ,perl)
915 ("qtdeclarative" ,qtdeclarative)))
916 (inputs `(("qtbase" ,qtbase)))
917 (synopsis "Qt Sensors module")
918 (description "The Qt Sensors API provides access to sensor hardware via QML
919 and C++ interfaces. The Qt Sensors API also provides a motion gesture
920 recognition API for devices.")))
921
922 (define-public qtmultimedia
923 (package (inherit qtsvg)
924 (name "qtmultimedia")
925 (version "5.14.2")
926 (source (origin
927 (method url-fetch)
928 (uri (string-append "https://download.qt.io/official_releases/qt/"
929 (version-major+minor version) "/" version
930 "/submodules/" name "-everywhere-src-"
931 version ".tar.xz"))
932 (sha256
933 (base32
934 "1sczzcvk3c5gczz53yvp8ma6gp8aixk5pcq7wh344c9md3g8xkbs"))
935 (modules '((guix build utils)))
936 (snippet
937 '(begin
938 (delete-file-recursively
939 "examples/multimedia/spectrum/3rdparty")
940 ;; We also prevent the spectrum example from being built.
941 (substitute* "examples/multimedia/multimedia.pro"
942 (("spectrum") "#"))
943 #t))))
944 (arguments
945 (substitute-keyword-arguments (package-arguments qtsvg)
946 ((#:phases phases)
947 `(modify-phases ,phases
948 (replace 'configure
949 (lambda* (#:key outputs #:allow-other-keys)
950 (let ((out (assoc-ref outputs "out")))
951 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
952 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
953 (string-append "PREFIX=" out)))))))
954 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
955 (native-inputs
956 `(("perl" ,perl)
957 ("pkg-config" ,pkg-config)
958 ("python" ,python)
959 ("qtdeclarative" ,qtdeclarative)))
960 (inputs
961 `(("alsa-lib" ,alsa-lib)
962 ("mesa" ,mesa)
963 ("pulseaudio" ,pulseaudio)
964 ("qtbase" ,qtbase)
965 ;; Gstreamer is needed for the mediaplayer plugin
966 ("gstreamer" ,gstreamer)
967 ("gst-plugins-base" ,gst-plugins-base)))
968 (synopsis "Qt Multimedia module")
969 (description "The Qt Multimedia module provides set of APIs to play and
970 record media, and manage a collection of media content. It also contains a
971 set of plugins for interacting with pulseaudio and GStreamer.")))
972
973 (define-public qtwayland
974 (package (inherit qtsvg)
975 (name "qtwayland")
976 (version "5.14.2")
977 (source (origin
978 (method url-fetch)
979 (uri (string-append "https://download.qt.io/official_releases/qt/"
980 (version-major+minor version) "/" version
981 "/submodules/" name "-everywhere-src-"
982 version ".tar.xz"))
983 (sha256
984 (base32
985 "0al3yypy3fin62n8d1859jh0mn0fbpa161l7f37hgd4gf75365nk"))
986 (modules '((guix build utils)))
987 (snippet
988 ;; The examples try to build and cause the build to fail
989 '(begin
990 (delete-file-recursively "examples")
991 #t))))
992 (arguments
993 (substitute-keyword-arguments (package-arguments qtsvg)
994 ((#:phases phases)
995 `(modify-phases ,phases
996 (add-after 'unpack 'disable-failing-tests
997 (lambda _
998 ;; FIXME: tst_seatv4::animatedCursor() fails for no good
999 ;; reason and breaks these two tests.
1000 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
1001 (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
1002 "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
1003 "")
1004 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
1005 ""))
1006 #t))
1007 (add-before 'check 'set-test-environment
1008 (lambda _
1009 ;; Do not fail just because /etc/machine-id is missing.
1010 (setenv "DBUS_FATAL_WARNINGS" "0")
1011 #t))))))
1012 (native-inputs
1013 `(("glib" ,glib)
1014 ("perl" ,perl)
1015 ("pkg-config" ,pkg-config)
1016 ("qtdeclarative" ,qtdeclarative)))
1017 (inputs
1018 `(("fontconfig" ,fontconfig)
1019 ("freetype" ,freetype)
1020 ("libx11" ,libx11)
1021 ("libxcomposite" ,libxcomposite)
1022 ("libxext" ,libxext)
1023 ("libxkbcommon" ,libxkbcommon)
1024 ("libxrender" ,libxrender)
1025 ("mesa" ,mesa)
1026 ("mtdev" ,mtdev)
1027 ("qtbase" ,qtbase)
1028 ("wayland" ,wayland)))
1029 (synopsis "Qt Wayland module")
1030 (description "The Qt Wayland module provides the QtWayland client and
1031 compositor libraries.")))
1032
1033 (define-public qtserialport
1034 (package (inherit qtsvg)
1035 (name "qtserialport")
1036 (version "5.14.2")
1037 (source (origin
1038 (method url-fetch)
1039 (uri (string-append "https://download.qt.io/official_releases/qt/"
1040 (version-major+minor version) "/" version
1041 "/submodules/" name "-everywhere-src-"
1042 version ".tar.xz"))
1043 (sha256
1044 (base32
1045 "08ga9a1lwj83872nxablk602z1dq0la6jqsiicvd7m1sfbfpgnd6"))))
1046 (native-inputs `(("perl" ,perl)))
1047 (inputs
1048 `(("qtbase" ,qtbase)
1049 ("eudev" ,eudev)))
1050 (arguments
1051 (substitute-keyword-arguments (package-arguments qtsvg)
1052 ((#:phases phases)
1053 `(modify-phases ,phases
1054 (add-after 'unpack 'patch-dlopen-paths
1055 (lambda* (#:key inputs #:allow-other-keys)
1056 (substitute* "src/serialport/qtudev_p.h"
1057 ;; Use the absolute paths for dynamically loaded libs,
1058 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1059 ;; typically is not set in guix.
1060 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1061 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1062 #t))))))
1063 (synopsis "Qt Serial Port module")
1064 (description "The Qt Serial Port module provides the library for
1065 interacting with serial ports from within Qt.")))
1066
1067 (define-public qtserialbus
1068 (package (inherit qtsvg)
1069 (name "qtserialbus")
1070 (version "5.14.2")
1071 (source (origin
1072 (method url-fetch)
1073 (uri (string-append "https://download.qt.io/official_releases/qt/"
1074 (version-major+minor version) "/" version
1075 "/submodules/" name "-everywhere-src-"
1076 version ".tar.xz"))
1077 (sha256
1078 (base32
1079 "14bahg82jciciqkl74q9hvf3a8kp3pk5v731vp2416k4b8bn4xqb"))))
1080 (inputs
1081 `(("qtbase" ,qtbase)
1082 ("qtserialport" ,qtserialport)))
1083 (synopsis "Qt Serial Bus module")
1084 (description "The Qt Serial Bus API provides classes and functions to
1085 access the various industrial serial buses and protocols, such as CAN, ModBus,
1086 and others.")))
1087
1088 (define-public qtwebchannel
1089 (package (inherit qtsvg)
1090 (name "qtwebchannel")
1091 (version "5.14.2")
1092 (source (origin
1093 (method url-fetch)
1094 (uri (string-append "https://download.qt.io/official_releases/qt/"
1095 (version-major+minor version) "/" version
1096 "/submodules/" name "-everywhere-src-"
1097 version ".tar.xz"))
1098 (sha256
1099 (base32
1100 "0x7q66994pw6cd0f505bmirw1sssqs740zaw8lyqqqr32m2ch7bx"))))
1101 (native-inputs
1102 `(("perl" ,perl)
1103 ("qtdeclarative" ,qtdeclarative)
1104 ("qtwebsockets" ,qtwebsockets)))
1105 (inputs `(("qtbase" ,qtbase)))
1106 (synopsis "Web communication library for Qt")
1107 (description "The Qt WebChannel module enables peer-to-peer communication
1108 between the host (QML/C++ application) and the client (HTML/JavaScript
1109 application). The transport mechanism is supported out of the box by the two
1110 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1111
1112 (define-public qtwebglplugin
1113 (package (inherit qtsvg)
1114 (name "qtwebglplugin")
1115 (version "5.14.2")
1116 (source (origin
1117 (method url-fetch)
1118 (uri (string-append "https://download.qt.io/official_releases/qt/"
1119 (version-major+minor version) "/" version
1120 "/submodules/" name "-everywhere-src-"
1121 version ".tar.xz"))
1122 (sha256
1123 (base32
1124 "05rl657848fsprsnabdqb5z363c6drjc32k59223vl351f8ihhgb"))))
1125 (arguments
1126 (substitute-keyword-arguments (package-arguments qtsvg)
1127 ((#:phases phases)
1128 `(modify-phases ,phases
1129 (add-after 'unpack 'disable-network-tests
1130 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1131 (("webgl") "# webgl"))
1132 #t))))))
1133 (native-inputs '())
1134 (inputs
1135 `(("mesa" ,mesa)
1136 ("qtbase" ,qtbase)
1137 ("qtdeclarative" ,qtdeclarative)
1138 ("qtwebsockets" ,qtwebsockets)
1139 ("zlib" ,zlib)))
1140 (synopsis "QPA plugin for running an application via a browser using
1141 streamed WebGL commands")
1142 (description "Qt back end that uses WebGL for rendering. It allows Qt
1143 applications (with some limitations) to run in a web browser that supports
1144 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1145 compatible web browser without the use of plug-ins. The API is similar to
1146 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1147
1148 (define-public qtwebview
1149 (package (inherit qtsvg)
1150 (name "qtwebview")
1151 (version "5.14.2")
1152 (source (origin
1153 (method url-fetch)
1154 (uri (string-append "https://download.qt.io/official_releases/qt/"
1155 (version-major+minor version) "/" version
1156 "/submodules/" name "-everywhere-src-"
1157 version ".tar.xz"))
1158 (sha256
1159 (base32
1160 "0jzzcm7z5njkddzfhmyjz4dbbzq8h93980cci4479zc4xq9r47y6"))))
1161 (native-inputs
1162 `(("perl" ,perl)))
1163 (inputs
1164 `(("qtbase" ,qtbase)
1165 ("qtdeclarative" ,qtdeclarative)))
1166 (synopsis "Display web content in a QML application")
1167 (description "Qt WebView provides a way to display web content in a QML
1168 application without necessarily including a full web browser stack by using
1169 native APIs where it makes sense.")))
1170
1171 (define-public qtlocation
1172 (package (inherit qtsvg)
1173 (name "qtlocation")
1174 (version "5.14.2")
1175 (source (origin
1176 (method url-fetch)
1177 (uri (string-append "https://download.qt.io/official_releases/qt/"
1178 (version-major+minor version) "/" version
1179 "/submodules/" name "-everywhere-src-"
1180 version ".tar.xz"))
1181 (sha256
1182 (base32
1183 "1k3m8zhbv04yrqvj7jlnh8f9xczdsmla59j9gcwsqvbg76y0hxy3"))))
1184 (arguments
1185 (substitute-keyword-arguments (package-arguments qtsvg)
1186 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1187 (native-inputs
1188 `(("perl" ,perl)
1189 ("qtdeclarative" ,qtdeclarative)
1190 ("qtquickcontrols" ,qtquickcontrols)
1191 ("qtserialport" ,qtserialport)))
1192 (inputs
1193 `(("icu4c" ,icu4c)
1194 ("openssl" ,openssl)
1195 ("qtbase" ,qtbase)
1196 ("zlib" ,zlib)))
1197 (synopsis "Qt Location and Positioning modules")
1198 (description "The Qt Location module provides an interface for location,
1199 positioning and geolocation plugins.")))
1200
1201 (define-public qttools
1202 (package (inherit qtsvg)
1203 (name "qttools")
1204 (version "5.14.2")
1205 (source (origin
1206 (method url-fetch)
1207 (uri (string-append "https://download.qt.io/official_releases/qt/"
1208 (version-major+minor version) "/" version
1209 "/submodules/" name "-everywhere-src-"
1210 version ".tar.xz"))
1211 (sha256
1212 (base32
1213 "1iakl3hlyg51ri1czmis8mmb257b0y1zk2a2knybd3mq69wczc2v"))))
1214 (arguments
1215 (substitute-keyword-arguments (package-arguments qtsvg)
1216 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1217 (native-inputs
1218 `(("perl" ,perl)
1219 ("qtdeclarative" ,qtdeclarative)
1220 ("vulkan-headers" ,vulkan-headers)))
1221 (inputs
1222 `(("mesa" ,mesa)
1223 ("qtbase" ,qtbase)))
1224 (synopsis "Qt Tools and Designer modules")
1225 (description "The Qt Tools module provides a set of applications to browse
1226 the documentation, translate applications, generate help files and other stuff
1227 that helps in Qt development.")))
1228
1229 (define-public qtscript
1230 (package (inherit qtsvg)
1231 (name "qtscript")
1232 (version "5.14.2")
1233 (source (origin
1234 (method url-fetch)
1235 (uri (string-append "https://download.qt.io/official_releases/qt/"
1236 (version-major+minor version) "/" version
1237 "/submodules/" name "-everywhere-src-"
1238 version ".tar.xz"))
1239 (sha256
1240 (base32
1241 "1zlvg3hc6h70d789g3kv6dxbwswzkskkm00bdgl01grwrdy4izg9"))
1242 (patches (search-patches "qtscript-disable-tests.patch"))))
1243 (native-inputs
1244 `(("perl" ,perl)
1245 ("qttools" ,qttools)))
1246 (inputs
1247 `(("qtbase" ,qtbase)))
1248 (synopsis "Qt Script module")
1249 (description "Qt provides support for application scripting with ECMAScript.
1250 The following guides and references cover aspects of programming with
1251 ECMAScript and Qt.")))
1252
1253 (define-public qtquickcontrols
1254 (package (inherit qtsvg)
1255 (name "qtquickcontrols")
1256 (version "5.14.2")
1257 (source (origin
1258 (method url-fetch)
1259 (uri (string-append "https://download.qt.io/official_releases/qt/"
1260 (version-major+minor version) "/" version
1261 "/submodules/" name "-everywhere-src-"
1262 version ".tar.xz"))
1263 (sha256
1264 (base32
1265 "0qa4dlhn3iv9yvaic8hw86v6h8rn9sgq8xjfdaym04pfshfyypfm"))))
1266 (arguments
1267 (substitute-keyword-arguments (package-arguments qtsvg)
1268 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1269 (inputs
1270 `(("qtbase" ,qtbase)
1271 ("qtdeclarative" ,qtdeclarative)))
1272 (synopsis "Qt Quick Controls and other Quick modules")
1273 (description "The QtScript module provides classes for making Qt
1274 applications scriptable. This module provides a set of extra components that
1275 can be used to build complete interfaces in Qt Quick.")))
1276
1277 (define-public qtquickcontrols2
1278 (package (inherit qtsvg)
1279 (name "qtquickcontrols2")
1280 (version "5.14.2")
1281 (source (origin
1282 (method url-fetch)
1283 (uri (string-append "https://download.qt.io/official_releases/qt/"
1284 (version-major+minor version) "/" version
1285 "/submodules/" name "-everywhere-src-"
1286 version ".tar.xz"))
1287 (sha256
1288 (base32
1289 "0q0mk2mjlf9ll0gdrdzxy8096s6g9draaqiwrlvdpa7lv14x7xzs"))))
1290 (arguments
1291 (substitute-keyword-arguments (package-arguments qtsvg)
1292 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1293 (inputs
1294 `(("qtbase" ,qtbase)
1295 ("qtdeclarative" ,qtdeclarative)))
1296 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1297 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1298 module that provides platform integration: native dialogs, menus and menu bars,
1299 and tray icons. It falls back to Qt Widgets when a native implementation is
1300 not available.")))
1301
1302 (define-public qtgraphicaleffects
1303 (package (inherit qtsvg)
1304 (name "qtgraphicaleffects")
1305 (version "5.14.2")
1306 (source (origin
1307 (method url-fetch)
1308 (uri (string-append "https://download.qt.io/official_releases/qt/"
1309 (version-major+minor version) "/" version
1310 "/submodules/" name "-everywhere-src-"
1311 version ".tar.xz"))
1312 (sha256
1313 (base32
1314 "03xmwhapv0b2qj661iaqqrvhxc7qiid0acrp6rj85824ha2pyyj8"))))
1315 (arguments
1316 (substitute-keyword-arguments (package-arguments qtsvg)
1317 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1318 (inputs
1319 `(("qtbase" ,qtbase)
1320 ("qtdeclarative" ,qtdeclarative)))
1321 (synopsis "Qt Graphical Effects module")
1322 (description "The Qt Graphical Effects module provides a set of QML types
1323 for adding visually impressive and configurable effects to user interfaces.
1324 Effects are visual items that can be added to Qt Quick user interface as UI
1325 components. The API consists of over 20 effects provided as separate QML
1326 types. The effects cover functional areas such as blending, masking, blurring,
1327 coloring, and many more.")))
1328
1329 (define-public qtgamepad
1330 (package (inherit qtsvg)
1331 (name "qtgamepad")
1332 (version "5.14.2")
1333 (source (origin
1334 (method url-fetch)
1335 (uri (string-append "https://download.qt.io/official_releases/qt/"
1336 (version-major+minor version) "/" version
1337 "/submodules/" name "-everywhere-src-"
1338 version ".tar.xz"))
1339 (sha256
1340 (base32
1341 "00wd3h465waxdghg2vdhs5pkj0xikwjn88l12477dksm8zdslzgp"))))
1342 (native-inputs
1343 `(("perl" ,perl)
1344 ("pkg-config" ,pkg-config)))
1345 (inputs
1346 `(("fontconfig" ,fontconfig)
1347 ("freetype" ,freetype)
1348 ("libxrender" ,libxrender)
1349 ("sdl2" ,sdl2)
1350 ("qtbase" ,qtbase)
1351 ("qtdeclarative" ,qtdeclarative)))
1352 (synopsis "Qt Gamepad module")
1353 (description "The Qt Gamepad module is an add-on library that enables Qt
1354 applications to support the use of gamepad hardware and in some cases remote
1355 control equipment. The module provides both QML and C++ interfaces. The
1356 primary target audience are embedded devices with fullscreen user interfaces,
1357 and mobile applications targeting TV-like form factors.")))
1358
1359 (define-public qtscxml
1360 (package (inherit qtsvg)
1361 (name "qtscxml")
1362 (version "5.14.2")
1363 (source (origin
1364 (method url-fetch)
1365 (uri (string-append "https://download.qt.io/official_releases/qt/"
1366 (version-major+minor version) "/" version
1367 "/submodules/" name "-everywhere-src-"
1368 version ".tar.xz"))
1369 (sha256
1370 (base32
1371 "141pfschv6zmcvvn3pi7f5vb4nf96zpngy80f9bly1sn58syl303"))
1372 (modules '((guix build utils)))
1373 (snippet
1374 '(begin
1375 (delete-file-recursively "tests/3rdparty")
1376 ;; the scion test refers to the bundled 3rd party test code.
1377 (substitute* "tests/auto/auto.pro"
1378 (("scion") "#"))
1379 #t))))
1380 (inputs
1381 `(("qtbase" ,qtbase)
1382 ("qtdeclarative" ,qtdeclarative)))
1383 (synopsis "Qt SCXML module")
1384 (description "The Qt SCXML module provides functionality to create state
1385 machines from SCXML files. This includes both dynamically creating state
1386 machines (loading the SCXML file and instantiating states and transitions) and
1387 generating a C++ file that has a class implementing the state machine. It
1388 also contains functionality to support data models and executable content.")))
1389
1390 (define-public qtpurchasing
1391 (package (inherit qtsvg)
1392 (name "qtpurchasing")
1393 (version "5.14.2")
1394 (source (origin
1395 (method url-fetch)
1396 (uri (string-append "https://download.qt.io/official_releases/qt/"
1397 (version-major+minor version) "/" version
1398 "/submodules/" name "-everywhere-src-"
1399 version ".tar.xz"))
1400 (sha256
1401 (base32
1402 "0lg8x7g7dkf95xwxq8b4yw4ypdz68igkscya96xwbklg3q08gc39"))))
1403 (inputs
1404 `(("qtbase" ,qtbase)
1405 ("qtdeclarative" ,qtdeclarative)))
1406 (synopsis "Qt Purchasing module")
1407 (description "The Qt Purchasing module provides and in-app API for
1408 purchasing goods and services.")))
1409
1410 (define-public qtcharts
1411 (package (inherit qtsvg)
1412 (name "qtcharts")
1413 (version "5.14.2")
1414 (source (origin
1415 (method url-fetch)
1416 (uri (string-append "https://download.qt.io/official_releases/qt/"
1417 (version-major+minor version) "/" version
1418 "/submodules/" name "-everywhere-src-"
1419 version ".tar.xz"))
1420 (sha256
1421 (base32
1422 "1drvm15i6n10b6a1acgarig120ppvqh3r6fqqdn8i3blx81m5cmd"))))
1423 (arguments
1424 (substitute-keyword-arguments (package-arguments qtsvg)
1425 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1426 (inputs
1427 `(("qtbase" ,qtbase)
1428 ("qtdeclarative" ,qtdeclarative)))
1429 (synopsis "Qt Charts module")
1430 (description "The Qt Charts module provides a set of easy to use chart
1431 components. It uses the Qt Graphics View Framework, therefore charts can be
1432 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1433 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1434 selecting one of the charts themes.")
1435 (license license:gpl3)))
1436
1437 (define-public qtdatavis3d
1438 (package (inherit qtsvg)
1439 (name "qtdatavis3d")
1440 (version "5.14.2")
1441 (source (origin
1442 (method url-fetch)
1443 (uri (string-append "https://download.qt.io/official_releases/qt/"
1444 (version-major+minor version) "/" version
1445 "/submodules/" name "-everywhere-src-"
1446 version ".tar.xz"))
1447 (sha256
1448 (base32
1449 "080fkpxg70m3c697wfnkjhca58b7r1xsqd559jzb21985pdh6g3j"))))
1450 (arguments
1451 (substitute-keyword-arguments (package-arguments qtsvg)
1452 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1453 (inputs
1454 `(("qtbase" ,qtbase)
1455 ("qtdeclarative" ,qtdeclarative)))
1456 (synopsis "Qt Data Visualization module")
1457 (description "The Qt Data Visualization module provides a way to visualize
1458 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1459 visualizing depth maps and large quantities of rapidly changing data, such as
1460 data received from multiple sensors. The look and feel of graphs can be
1461 customized by using themes or by adding custom items and labels to them.")
1462 (license license:gpl3)))
1463
1464 (define-public qtnetworkauth
1465 (package (inherit qtsvg)
1466 (name "qtnetworkauth")
1467 (version "5.14.2")
1468 (source (origin
1469 (method url-fetch)
1470 (uri (string-append "https://download.qt.io/official_releases/qt/"
1471 (version-major+minor version) "/" version
1472 "/submodules/" name "-everywhere-src-"
1473 version ".tar.xz"))
1474 (sha256
1475 (base32
1476 "0pi6p7bq54kzij2p69cgib7n55k69jsq0yqq09yli645s4ym202g"))))
1477 (arguments
1478 (substitute-keyword-arguments (package-arguments qtsvg)
1479 ((#:phases phases)
1480 `(modify-phases ,phases
1481 (add-after 'unpack 'remove-failing-test
1482 (lambda _
1483 ;; These tests can't find their test data.
1484 (substitute* "tests/auto/auto.pro"
1485 (("oauth1 ") "# oauth1 "))
1486 #t))))))
1487 (inputs
1488 `(("qtbase" ,qtbase)))
1489 (synopsis "Qt Network Authorization module")
1490 (description "The Qt Network Authorization module provides an
1491 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1492
1493 (define-public qtremoteobjects
1494 (package (inherit qtsvg)
1495 (name "qtremoteobjects")
1496 (version "5.14.2")
1497 (source (origin
1498 (method url-fetch)
1499 (uri (string-append "https://download.qt.io/official_releases/qt/"
1500 (version-major+minor version) "/" version
1501 "/submodules/" name "-everywhere-src-"
1502 version ".tar.xz"))
1503 (sha256
1504 (base32
1505 "1mhlws5w0igf5hw0l90p6dz6k7w16dqfbnk2li0zxdmayk2039m6"))))
1506 (arguments
1507 (substitute-keyword-arguments (package-arguments qtsvg)
1508 ((#:phases phases)
1509 `(modify-phases ,phases
1510 (add-after 'unpack 'remove-failing-test
1511 (lambda _
1512 ;; This test can't find its imports.
1513 (substitute* "tests/auto/qml/qml.pro"
1514 (("integration") "# integration")
1515 (("usertypes") "# usertypes"))
1516 ;; disable failing tests: they need network
1517 (substitute* "tests/auto/auto.pro"
1518 (("integration_multiprocess proxy_multiprocess integration_external restart")
1519 "integration_multiprocess"))
1520 #t))))))
1521 (inputs
1522 `(("qtbase" ,qtbase)
1523 ("qtdeclarative" ,qtdeclarative)))
1524 (synopsis "Qt Remote Objects module")
1525 (description "The Qt Remote Objects module is an @dfn{inter-process
1526 communication} (IPC) module developed for Qt. The idea is to extend existing
1527 Qt's functionalities to enable an easy exchange of information between
1528 processes or computers.")))
1529
1530 (define-public qtspeech
1531 (package (inherit qtsvg)
1532 (name "qtspeech")
1533 (version "5.14.2")
1534 (source (origin
1535 (method url-fetch)
1536 (uri (string-append "https://download.qt.io/official_releases/qt/"
1537 (version-major+minor version) "/" version
1538 "/submodules/" name "-everywhere-src-"
1539 version ".tar.xz"))
1540 (sha256
1541 (base32
1542 "1nn6kspbp8hfkz1jhzc1qx1m9z7r1bgkdqgi9n4vl1q25yk8x7jy"))))
1543
1544 (arguments
1545 (substitute-keyword-arguments (package-arguments qtsvg)
1546 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1547 (inputs
1548 `(("qtbase" ,qtbase)))
1549 (native-inputs
1550 `(("perl" ,perl)
1551 ("qtdeclarative" ,qtdeclarative)
1552 ("qtmultimedia" ,qtmultimedia)
1553 ("qtxmlpatterns" ,qtxmlpatterns)))
1554 (synopsis "Qt Speech module")
1555 (description "The Qt Speech module enables a Qt application to support
1556 accessibility features such as text-to-speech, which is useful for end-users
1557 who are visually challenged or cannot access the application for whatever
1558 reason. The most common use case where text-to-speech comes in handy is when
1559 the end-user is driving and cannot attend the incoming messages on the phone.
1560 In such a scenario, the messaging application can read out the incoming
1561 message.")))
1562
1563 (define-public qtspell
1564 (package
1565 (name "qtspell")
1566 (version "0.9.0")
1567 (source
1568 (origin
1569 (method git-fetch)
1570 (uri (git-reference
1571 (url "https://github.com/manisandro/qtspell.git")
1572 (commit version)))
1573 (file-name (git-file-name name version))
1574 (sha256
1575 (base32 "1081makirjxixz44ghwz362vgnk5wcks6ni6w01pl667x8wggsd2"))))
1576 (build-system cmake-build-system)
1577 (arguments
1578 `(#:tests? #f)) ;no test
1579 (native-inputs
1580 `(("pkg-config" ,pkg-config)
1581 ("qttools" ,qttools)))
1582 (inputs
1583 `(("enchant" ,enchant)
1584 ("qtbase" ,qtbase)))
1585 (home-page "https://github.com/manisandro/qtspell")
1586 (synopsis "Spell checking for Qt text widgets")
1587 (description
1588 "QtSpell adds spell-checking functionality to Qt's text widgets,
1589 using the Enchant spell-checking library.")
1590 ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
1591 (license license:gpl2+)))
1592
1593 (define-public qtwebengine
1594 (package
1595 (inherit qtsvg)
1596 (name "qtwebengine")
1597 (version (package-version qtbase))
1598 (source
1599 (origin
1600 (method url-fetch)
1601 (uri (string-append "https://download.qt.io/official_releases/qt/"
1602 (version-major+minor version) "/" version
1603 "/submodules/" name "-everywhere-src-"
1604 version ".tar.xz"))
1605 (sha256
1606 (base32
1607 "0iy9lsl6zxlkca6x2p1506hbj3wmhnaipg23z027wfccbnkxcsg1"))
1608 (modules '((ice-9 ftw)
1609 (ice-9 match)
1610 (srfi srfi-1)
1611 (srfi srfi-26)
1612 (guix build utils)))
1613 (snippet
1614 '(begin
1615 (let ((preserved-third-party-files
1616 '("base/third_party/cityhash"
1617 "base/third_party/dmg_fp"
1618 "base/third_party/dynamic_annotations"
1619 "base/third_party/icu"
1620 "base/third_party/libevent"
1621 "base/third_party/nspr"
1622 "base/third_party/superfasthash"
1623 "base/third_party/symbolize"
1624 "base/third_party/xdg_mime"
1625 "base/third_party/xdg_user_dirs"
1626 "net/third_party/mozilla_security_manager"
1627 "net/third_party/nss"
1628 "net/third_party/quiche"
1629 "net/third_party/uri_template"
1630 "third_party/abseil-cpp"
1631 "third_party/angle"
1632 "third_party/angle/src/common/third_party/base"
1633 "third_party/angle/src/common/third_party/smhasher"
1634 "third_party/angle/src/common/third_party/xxhash"
1635 "third_party/angle/src/third_party/compiler"
1636 "third_party/axe-core"
1637 "third_party/blink"
1638 "third_party/boringssl"
1639 "third_party/boringssl/src/third_party/fiat"
1640 "third_party/boringssl/src/third_party/sike"
1641 "third_party/boringssl/linux-x86_64/crypto/third_party/sike"
1642 "third_party/boringssl/linux-aarch64/crypto/third_party/sike"
1643 "third_party/breakpad"
1644 "third_party/brotli"
1645 "third_party/ced"
1646 "third_party/cld_3"
1647 "third_party/crc32c"
1648 "third_party/dav1d"
1649 "third_party/dawn"
1650 "third_party/emoji-segmenter"
1651 "third_party/ffmpeg"
1652 "third_party/googletest"
1653 "third_party/hunspell"
1654 "third_party/iccjpeg"
1655 "third_party/icu"
1656 "third_party/inspector_protocol"
1657 "third_party/jinja2"
1658 "third_party/jsoncpp"
1659 "third_party/jstemplate"
1660 "third_party/khronos"
1661 "third_party/leveldatabase"
1662 "third_party/libaddressinput"
1663 "third_party/libjingle_xmpp"
1664 "third_party/libjpeg"
1665 "third_party/libpng"
1666 "third_party/libsrtp"
1667 "third_party/libsync"
1668 "third_party/libudev"
1669 "third_party/libvpx"
1670 "third_party/libwebm"
1671 "third_party/libwebp"
1672 "third_party/libxml"
1673 "third_party/libxslt"
1674 "third_party/libyuv"
1675 "third_party/lss"
1676 "third_party/markupsafe"
1677 "third_party/mesa_headers"
1678 "third_party/metrics_proto"
1679 "third_party/modp_b64"
1680 "third_party/nasm"
1681 "third_party/one_euro_filter"
1682 "third_party/opus"
1683 "third_party/ots"
1684 "third_party/perfetto"
1685 "third_party/pffft"
1686 "third_party/ply"
1687 "third_party/polymer"
1688 "third_party/protobuf"
1689 "third_party/pyjson5"
1690 "third_party/re2"
1691 "third_party/rnnoise"
1692 "third_party/skia"
1693 "third_party/skia/include/third_party/skcms/skcms.h"
1694 "third_party/skia/include/third_party/vulkan"
1695 "third_party/skia/third_party/gif"
1696 "third_party/skia/third_party/skcms"
1697 "third_party/skia/third_party/vulkanmemoryallocator"
1698 "third_party/smhasher"
1699 "third_party/snappy"
1700 "third_party/sqlite"
1701 "third_party/usb_ids"
1702 "third_party/usrsctp"
1703 "third_party/web-animations-js"
1704 "third_party/webrtc"
1705 "third_party/webrtc/common_audio/third_party/fft4g"
1706 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
1707 "third_party/webrtc/modules/third_party/fft"
1708 "third_party/webrtc/modules/third_party/g711"
1709 "third_party/webrtc/modules/third_party/g722"
1710 "third_party/webrtc/rtc_base/third_party/base64"
1711 "third_party/webrtc/rtc_base/third_party/sigslot"
1712 "third_party/webrtc_overrides"
1713 "third_party/widevine/cdm/widevine_cdm_common.h"
1714 "third_party/widevine/cdm/widevine_cdm_version.h"
1715 "third_party/woff2"
1716 "third_party/yasm"
1717 "third_party/zlib"
1718 "url/third_party/mozilla"
1719 "v8/src/third_party/utf8-decoder"
1720 "v8/src/third_party/valgrind"
1721 "v8/src/third_party/siphash"
1722 "v8/third_party/v8/builtins"
1723 "v8/third_party/inspector_protocol"))
1724 (protected (make-regexp "\\.(gn|gyp)i?$")))
1725 (define preserved-club
1726 (map (lambda (member)
1727 (string-append "./" member))
1728 preserved-third-party-files))
1729 (define (empty? dir)
1730 (equal? (scandir dir) '("." "..")))
1731 (define (third-party? file)
1732 (string-contains file "third_party/"))
1733 (define (useless? file)
1734 (any (cute string-suffix? <> file)
1735 '(".zip" ".so" ".dll" ".exe" ".jar")))
1736 (define (parents child)
1737 ;; Return all parent directories of CHILD up to and including
1738 ;; the closest "third_party".
1739 (let* ((dirs (match (string-split child #\/)
1740 ((dirs ... last) dirs)))
1741 (closest (list-index (lambda (dir)
1742 (string=? "third_party" dir))
1743 (reverse dirs)))
1744 (delim (- (length dirs) closest)))
1745 (fold (lambda (dir prev)
1746 (cons (string-append (car prev) "/" dir)
1747 prev))
1748 (list (string-join (list-head dirs delim) "/"))
1749 (list-tail dirs delim))))
1750 (define (remove-loudly file)
1751 (format #t "deleting ~a...~%" file)
1752 (force-output)
1753 (delete-file file))
1754 (define (delete-unwanted-files child stat flag base level)
1755 (match flag
1756 ((or 'regular 'symlink 'stale-symlink)
1757 (when (third-party? child)
1758 (unless (or (member child preserved-club)
1759 (any (cute member <> preserved-club)
1760 (parents child))
1761 (regexp-exec protected child))
1762 (remove-loudly child)))
1763 (when (and (useless? child) (file-exists? child))
1764 (remove-loudly child))
1765 #t)
1766 ('directory-processed
1767 (when (empty? child)
1768 (rmdir child))
1769 #t)
1770 (_ #t)))
1771
1772 (with-directory-excursion "src/3rdparty"
1773 ;; TODO: Try removing "gn" too for future versions of qtwebengine.
1774 (delete-file-recursively "ninja")
1775
1776 (with-directory-excursion "chromium"
1777 ;; Delete bundled software and binaries that were not explicitly
1778 ;; preserved above.
1779 (nftw "." delete-unwanted-files 'depth 'physical)
1780
1781 ;; Assert that each preserved item is present to catch removals.
1782 (for-each (lambda (third-party)
1783 (unless (file-exists? third-party)
1784 (error (format #f "~s does not exist!~%" third-party))))
1785 preserved-club)
1786
1787 ;; Use relative header locations instead of hard coded ones.
1788 (substitute*
1789 "base/third_party/dynamic_annotations/dynamic_annotations.c"
1790 (("base/third_party/valgrind") "valgrind"))
1791 (substitute*
1792 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
1793 (("third_party/curl") "curl"))
1794 (substitute*
1795 '("components/viz/common/gpu/vulkan_context_provider.h"
1796 "components/viz/common/resources/resource_format_utils.h"
1797 "gpu/config/gpu_util.cc")
1798 (("third_party/vulkan/include/")
1799 ""))
1800
1801 ;; Replace Google Analytics bundle with an empty file and hope
1802 ;; no one notices.
1803 (mkdir-p "third_party/analytics")
1804 (call-with-output-file
1805 "third_party/analytics/google-analytics-bundle.js"
1806 (lambda (port)
1807 (const #t)))))
1808 ;; Do not enable support for loading the Widevine DRM plugin.
1809 (substitute* "src/buildtools/config/common.pri"
1810 (("enable_widevine=true")
1811 "enable_widevine=false"))
1812 #t)))))
1813 (build-system gnu-build-system)
1814 (native-inputs
1815 `(("bison" ,bison)
1816 ("flex" ,flex)
1817 ("gperf" ,gperf)
1818 ("ninja" ,ninja)
1819 ("perl" ,perl)
1820 ("pkg-config" ,pkg-config)
1821 ("python-2" ,python-2)
1822 ("ruby" ,ruby)))
1823 (inputs
1824 `(("alsa-lib" ,alsa-lib)
1825 ("atk" ,atk)
1826 ("cups-minimal" ,cups-minimal)
1827 ("curl" ,curl)
1828 ("dbus" ,dbus)
1829 ("ffmpeg" ,ffmpeg)
1830 ("fontconfig" ,fontconfig)
1831 ("harbuzz" ,harfbuzz)
1832 ("icu4c" ,icu4c)
1833 ("jsoncpp" ,jsoncpp)
1834 ("lcms" ,lcms)
1835 ("libcap" ,libcap)
1836 ("libevent" ,libevent)
1837 ("libgcrypt" ,libgcrypt)
1838 ("libjpeg" ,libjpeg-turbo)
1839 ("libvpx" ,libvpx)
1840 ("libwebp" ,libwebp)
1841 ("libx11" ,libx11)
1842 ("libxcb" ,libxcb)
1843 ("libxcomposite" ,libxcomposite)
1844 ("libxcursor" ,libxcursor)
1845 ("libxi" ,libxi)
1846 ("libxkbcommon" ,libxkbcommon)
1847 ;; FIXME: libxml2 needs to built with icu support though it links to
1848 ;; libxml2 configure summary still states "Checking for compatible
1849 ;; system libxml2... no"
1850 ("libxml2" ,libxml2)
1851 ("libxrandr" ,libxrandr)
1852 ("libxrender" ,libxrender)
1853 ("libxslt" ,libxslt)
1854 ("libxtst" ,libxtst)
1855 ("mesa" ,mesa)
1856 ("minizip" ,minizip)
1857 ("nss" ,nss)
1858 ("opus" ,opus)
1859 ("pciutils" ,pciutils)
1860 ("protobuf" ,protobuf)
1861 ("pulseaudio" ,pulseaudio)
1862 ("qtbase" ,qtbase)
1863 ("qtdeclarative" ,qtdeclarative)
1864 ("qtmultimedia" ,qtmultimedia)
1865 ("qtwebchannel" ,qtwebchannel)
1866 ("re2" ,re2)
1867 ("snappy" ,snappy)
1868 ("udev" ,eudev)
1869 ("valgrind" ,valgrind)
1870 ("vulkan-headers" ,vulkan-headers)
1871 ("xcb-util" ,xcb-util)))
1872 (arguments
1873 (substitute-keyword-arguments (package-arguments qtsvg)
1874 ((#:phases phases)
1875 `(modify-phases ,phases
1876 (add-after 'unpack 'fix-build-with-newer-re2
1877 (lambda _
1878 ;; Adjust for API change in re2, taken from
1879 ;; https://chromium-review.googlesource.com/c/chromium/src/+/2145261
1880 (substitute* "src/3rdparty/chromium/components/autofill/core\
1881 /browser/address_rewriter.cc"
1882 (("options\\.set_utf8\\(true\\)")
1883 "options.set_encoding(RE2::Options::EncodingUTF8)"))
1884 #t))
1885 (add-after 'unpack 'patch-ninja-version-check
1886 (lambda _
1887 ;; The build system assumes the system Ninja is too old because
1888 ;; it only checks for versions 1.7 through 1.9. We have 1.10.
1889 (substitute* "configure.pri"
1890 (("1\\.\\[7-9\\]\\.\\*")
1891 "1.([7-9]|1[0-9]).*"))
1892 #t))
1893 (add-before 'configure 'substitute-source
1894 (lambda* (#:key inputs outputs #:allow-other-keys)
1895 (let ((out (assoc-ref outputs "out"))
1896 (nss (assoc-ref inputs "nss"))
1897 (udev (assoc-ref inputs "udev")))
1898 ;; Qtwebengine is not installed into the same prefix as
1899 ;; qtbase. Some qtbase QTLibraryInfo constants will not
1900 ;; work. Replace with the full path to the qtwebengine
1901 ;; translations and locales in the store.
1902 (substitute* "src/core/web_engine_library_info.cpp"
1903 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
1904 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
1905 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
1906 (string-append "QLatin1String(\"" out "/share/qt5\")")))
1907 ;; Substitute full dynamic library path for nss.
1908 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
1909 (("libnssckbi.so")
1910 (string-append nss "/lib/nss/libnssckbi.so")))
1911 ;; Substitute full dynamic library path for udev.
1912 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
1913 (("libudev.so.1")
1914 (string-append udev "/lib/libudev.so.1")))
1915 #t)))
1916 (add-before 'configure 'set-env
1917 (lambda _
1918 ;; Avoids potential race conditions.
1919 (setenv "PYTHONDONTWRITEBYTECODE" "1")
1920 (setenv "NINJAFLAGS"
1921 (string-append "-k1" ;less verbose build output
1922 ;; Respect the '--cores' option of 'guix build'.
1923 " -j" (number->string (parallel-job-count))))
1924 #t))
1925 (replace 'configure
1926 (lambda _
1927 ;; Valid QT_BUILD_PARTS variables are:
1928 ;; libs tools tests examples demos docs translations
1929 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
1930 "--webengine-printing-and-pdf=no"
1931 "--webengine-ffmpeg=system"
1932 "--webengine-icu=system"
1933 "--webengine-pepper-plugins=no")))))
1934 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
1935 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
1936 ;; before running tests.
1937 ((#:tests? _ #f) #f)))
1938 (native-search-paths
1939 (list (search-path-specification
1940 (file-type 'regular)
1941 (separator #f)
1942 (variable "QTWEBENGINEPROCESS_PATH")
1943 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
1944 (home-page "https://wiki.qt.io/QtWebEngine")
1945 (synopsis "Qt WebEngine module")
1946 (description "The Qt5WebEngine module provides support for web applications
1947 using the Chromium browser project. The Chromium source code has Google services
1948 and binaries removed, and adds modular support for using system libraries.")
1949 (license license:lgpl2.1+)))
1950
1951 (define-public python-sip
1952 (package
1953 (name "python-sip")
1954 (version "4.19.22")
1955 (source
1956 (origin
1957 (method url-fetch)
1958 (uri (string-append "https://www.riverbankcomputing.com/static/"
1959 "Downloads/sip/" version "/sip-" version ".tar.gz"))
1960 (sha256
1961 (base32
1962 "0idywc326l8v1m3maprg1aq2gph67mmnnsskvlwfx8n19s16idz1"))))
1963 (build-system gnu-build-system)
1964 (native-inputs
1965 `(("python" ,python-wrapper)))
1966 (arguments
1967 `(#:tests? #f ; no check target
1968 #:imported-modules ((guix build python-build-system)
1969 ,@%gnu-build-system-modules)
1970 #:modules ((srfi srfi-1)
1971 ((guix build python-build-system) #:select (python-version))
1972 ,@%gnu-build-system-modules)
1973 #:phases
1974 (modify-phases %standard-phases
1975 (replace 'configure
1976 (lambda* (#:key inputs outputs #:allow-other-keys)
1977 (let* ((out (assoc-ref outputs "out"))
1978 (bin (string-append out "/bin"))
1979 (include (string-append out "/include"))
1980 (python (assoc-ref inputs "python"))
1981 (lib (string-append out "/lib/python"
1982 (python-version python)
1983 "/site-packages")))
1984 (invoke "python" "configure.py"
1985 "--bindir" bin
1986 "--destdir" lib
1987 "--incdir" include)))))))
1988 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1989 (synopsis "Python binding creator for C and C++ libraries")
1990 (description
1991 "SIP is a tool to create Python bindings for C and C++ libraries. It
1992 was originally developed to create PyQt, the Python bindings for the Qt
1993 toolkit, but can be used to create bindings for any C or C++ library.
1994
1995 SIP comprises a code generator and a Python module. The code generator
1996 processes a set of specification files and generates C or C++ code, which
1997 is then compiled to create the bindings extension module. The SIP Python
1998 module provides support functions to the automatically generated code.")
1999 ;; There is a choice between a python like license, gpl2 and gpl3.
2000 ;; For compatibility with pyqt, we need gpl3.
2001 (license license:gpl3)))
2002
2003 (define-public python2-sip
2004 (package (inherit python-sip)
2005 (name "python2-sip")
2006 (native-inputs
2007 `(("python" ,python-2)))))
2008
2009 (define-public python-pyqt
2010 (package
2011 (name "python-pyqt")
2012 (version "5.14.2")
2013 (source
2014 (origin
2015 (method url-fetch)
2016 ;; PyPI is the canonical distribution point of PyQt. Older
2017 ;; releases are available from the web site.
2018 (uri (list (pypi-uri "PyQt5" version)
2019 (string-append "https://www.riverbankcomputing.com/static/"
2020 "Downloads/PyQt5/" version "/PyQt5-"
2021 version ".tar.gz")))
2022 (file-name (string-append "PyQt5-"version ".tar.gz"))
2023 (sha256
2024 (base32
2025 "1c4y4qi1l540gd125ikj0al00k5pg65kmqaixcfbzslrsrphq8xx"))
2026 (patches (search-patches "pyqt-configure.patch"
2027 "pyqt-public-sip.patch"))))
2028 (build-system gnu-build-system)
2029 (native-inputs
2030 `(("qtbase" ,qtbase))) ; for qmake
2031 (propagated-inputs
2032 `(("python-sip" ,python-sip)))
2033 (inputs
2034 `(("python" ,python-wrapper)
2035 ("qtbase" ,qtbase)
2036 ("qtconnectivity" ,qtconnectivity)
2037 ("qtdeclarative" ,qtdeclarative)
2038 ("qtlocation" ,qtlocation)
2039 ("qtmultimedia" ,qtmultimedia)
2040 ("qtsensors" ,qtsensors)
2041 ("qtserialport" ,qtserialport)
2042 ("qtsvg" ,qtsvg)
2043 ("qttools" ,qttools)
2044 ("qtwebchannel" ,qtwebchannel)
2045 ("qtwebkit" ,qtwebkit)
2046 ("qtwebsockets" ,qtwebsockets)
2047 ("qtx11extras" ,qtx11extras)
2048 ("qtxmlpatterns" ,qtxmlpatterns)))
2049 (arguments
2050 `(#:modules ((srfi srfi-1)
2051 ((guix build python-build-system) #:select (python-version))
2052 ,@%gnu-build-system-modules)
2053 #:imported-modules ((guix build python-build-system)
2054 ,@%gnu-build-system-modules)
2055 #:phases
2056 (modify-phases %standard-phases
2057 ;; When building python-pyqtwebengine, <qprinter.h> can not be
2058 ;; included. Here we substitute the full path to the header in the
2059 ;; store.
2060 (add-before 'configure 'substitute-source
2061 (lambda* (#:key inputs #:allow-other-keys)
2062 (let* ((qtbase (assoc-ref inputs "qtbase"))
2063 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
2064 (substitute* "sip/QtPrintSupport/qprinter.sip"
2065 (("<qprinter.h>")
2066 qtprinter.h))
2067 #t)))
2068 (replace 'configure
2069 (lambda* (#:key inputs outputs #:allow-other-keys)
2070 (let* ((out (assoc-ref outputs "out"))
2071 (bin (string-append out "/bin"))
2072 (sip (string-append out "/share/sip"))
2073 (plugins (string-append out "/lib/qt5/plugins"))
2074 (designer (string-append plugins "/designer"))
2075 (qml (string-append plugins "/PyQt5"))
2076 (python (assoc-ref inputs "python"))
2077 (lib (string-append out "/lib/python"
2078 (python-version python)
2079 "/site-packages"))
2080 (stubs (string-append lib "/PyQt5")))
2081 (invoke "python" "configure.py"
2082 "--confirm-license"
2083 "--bindir" bin
2084 "--destdir" lib
2085 "--designer-plugindir" designer
2086 "--qml-plugindir" qml
2087 ; Where to install the PEP 484 Type Hints stub
2088 ; files. Without this the stubs are tried to be
2089 ; installed into the python package's
2090 ; site-package directory, which is read-only.
2091 "--stubsdir" stubs
2092 "--sipdir" sip)))))))
2093 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
2094 (synopsis "Python bindings for Qt")
2095 (description
2096 "PyQt is a set of Python v2 and v3 bindings for the Qt application
2097 framework. The bindings are implemented as a set of Python modules and
2098 contain over 620 classes.")
2099 (license license:gpl3)))
2100
2101 (define-public python-pyqtwebengine
2102 (package
2103 (name "python-pyqtwebengine")
2104 (version "5.14.0")
2105 (source
2106 (origin
2107 (method url-fetch)
2108 ;; The newest releases are only available on PyPI. Older ones
2109 ;; are mirrored at the upstream home page.
2110 (uri (list (pypi-uri "PyQtWebEngine" version)
2111 (string-append "https://www.riverbankcomputing.com/static"
2112 "/Downloads/PyQtWebEngine/" version
2113 "/PyQtWebEngine-" version ".tar.gz")))
2114 (sha256
2115 (base32
2116 "14hw49akb35n9pgiw564x8ykmsifihn9p2ax2x4zmywb3w2ra5g1"))))
2117 (build-system gnu-build-system)
2118 (native-inputs
2119 `(("python" ,python)
2120 ("python-sip" ,python-sip)
2121 ;; qtbase is required for qmake
2122 ("qtbase" ,qtbase)))
2123 (inputs
2124 `(("python" ,python-wrapper)
2125 ("python-sip" ,python-sip)
2126 ("python-pyqt" ,python-pyqt)
2127 ("qtbase" ,qtbase)
2128 ("qtsvg" ,qtsvg)
2129 ("qtdeclarative" ,qtdeclarative)
2130 ("qtwebchannel" ,qtwebchannel)
2131 ("qtwebengine" ,qtwebengine)))
2132 (arguments
2133 `(#:modules ((srfi srfi-1)
2134 ((guix build python-build-system) #:select (python-version))
2135 ,@%gnu-build-system-modules)
2136 #:imported-modules ((guix build python-build-system)
2137 ,@%gnu-build-system-modules)
2138 #:phases
2139 (modify-phases %standard-phases
2140 (replace 'configure
2141 (lambda* (#:key inputs outputs #:allow-other-keys)
2142 (let* ((out (assoc-ref outputs "out"))
2143 (sipdir (string-append out "/share/sip"))
2144 (pyqt-sipdir (string-append
2145 (assoc-ref inputs "python-pyqt") "/share/sip"))
2146 (python (assoc-ref inputs "python"))
2147 (lib (string-append out "/lib/python"
2148 (python-version python)
2149 "/site-packages/PyQt5"))
2150 (stubs (string-append lib "/PyQt5")))
2151
2152 (mkdir-p sipdir)
2153 (invoke "python" "configure.py"
2154 "-w"
2155 "--no-dist-info"
2156 "--destdir" lib
2157 "--no-qsci-api"
2158 "--stubsdir" stubs
2159 "--sipdir" sipdir
2160 "--pyqt-sipdir" pyqt-sipdir))))
2161 ;; Because this has a different prefix than python-pyqt then we need
2162 ;; to make this a namespace of it's own
2163 (add-after 'install 'make-namespace
2164 (lambda* (#:key inputs outputs #:allow-other-keys)
2165 (let* ((__init__.py (string-append
2166 (assoc-ref outputs "out")
2167 "/lib/python"
2168 (python-version (assoc-ref inputs "python"))
2169 "/site-packages/PyQt5/__init__.py")))
2170 (with-output-to-file __init__.py
2171 (lambda _ (display "
2172 from pkgutil import extend_path
2173 __path__ = extend_path(__path__, __name__)
2174 ")))
2175 #t))))))
2176 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
2177 (synopsis "Python bindings for QtWebEngine")
2178 (description
2179 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
2180 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
2181 set of three modules. Prior to v5.12 these bindings were part of PyQt
2182 itself.")
2183 (license license:gpl3)))
2184
2185 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
2186 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
2187 ;; packages that could be used together.
2188 (define-public python-pyqt-without-qtwebkit
2189 (package (inherit python-pyqt)
2190 (name "python-pyqt-without-qtwebkit")
2191 (inputs
2192 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
2193
2194 (define-public python2-pyqt
2195 (package (inherit python-pyqt)
2196 (name "python2-pyqt")
2197 (propagated-inputs
2198 `(("python-enum34" ,python2-enum34)
2199 ("python-sip" ,python2-sip)))
2200 (native-inputs
2201 `(("python-sip" ,python2-sip)
2202 ("qtbase" ,qtbase)))
2203 (inputs
2204 `(("python" ,python-2)
2205 ("python2-enum34" ,python2-enum34)
2206 ,@(alist-delete "python" (package-inputs python-pyqt))))))
2207
2208 (define-public python2-pyqtwebengine
2209 (package/inherit
2210 python-pyqtwebengine
2211 (name "python2-pyqtwebengine")
2212 (native-inputs
2213 `(("python" ,python-2)
2214 ("python-sip" ,python2-sip)
2215 ;; qtbase is required for qmake
2216 ("qtbase" ,qtbase)))
2217 (inputs
2218 `(("python" ,python-2)
2219 ("python-sip" ,python2-sip)
2220 ("python-pyqt" ,python2-pyqt)
2221 ("qtbase" ,qtbase)
2222 ("qtsvg" ,qtsvg)
2223 ("qtdeclarative" ,qtdeclarative)
2224 ("qtwebchannel" ,qtwebchannel)
2225 ("qtwebengine" ,qtwebengine)))))
2226
2227 (define-public python2-pyqt-4
2228 (package (inherit python-pyqt)
2229 (name "python2-pyqt")
2230 (version "4.12")
2231 (source
2232 (origin
2233 (method url-fetch)
2234 (uri
2235 (string-append "mirror://sourceforge/pyqt/PyQt4/"
2236 "PyQt-" version "/PyQt4_gpl_x11-"
2237 version ".tar.gz"))
2238 (sha256
2239 (base32
2240 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
2241 (native-inputs
2242 `(("python-sip" ,python2-sip)
2243 ("qt" ,qt-4)))
2244 (inputs `(("python" ,python-2)))
2245 (arguments
2246 `(#:tests? #f ; no check target
2247 #:modules ((srfi srfi-1)
2248 ,@%gnu-build-system-modules)
2249 #:phases
2250 (modify-phases %standard-phases
2251 (replace 'configure
2252 (lambda* (#:key inputs outputs #:allow-other-keys)
2253 (let* ((out (assoc-ref outputs "out"))
2254 (bin (string-append out "/bin"))
2255 (sip (string-append out "/share/sip"))
2256 (python (assoc-ref inputs "python"))
2257 (python-version
2258 (last (string-split python #\-)))
2259 (python-major+minor
2260 (string-join
2261 (take (string-split python-version #\.) 2)
2262 "."))
2263 (lib (string-append out "/lib/python"
2264 python-major+minor
2265 "/site-packages")))
2266 (invoke "python" "configure.py"
2267 "--confirm-license"
2268 "--bindir" bin
2269 "--destdir" lib
2270 "--sipdir" sip)))))))
2271 (license (list license:gpl2 license:gpl3)))) ; choice of either license
2272
2273 (define-public qscintilla
2274 (package
2275 (name "qscintilla")
2276 (version "2.10.8")
2277 (source (origin
2278 (method url-fetch)
2279 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
2280 "QScintilla-" version "/QScintilla_gpl-"
2281 version ".tar.gz"))
2282 (sha256
2283 (base32
2284 "1swjr786w04r514pry9pn32ivza4il1cg35s60qy39cwc175pka6"))))
2285 (build-system gnu-build-system)
2286 (arguments
2287 `(#:phases
2288 (modify-phases %standard-phases
2289 (replace 'configure
2290 (lambda* (#:key outputs #:allow-other-keys)
2291 (let ((out (assoc-ref outputs "out")))
2292 (chdir "Qt4Qt5")
2293 (substitute* "qscintilla.pro"
2294 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
2295 (string-append out "/lib"))
2296 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
2297 (string-append out "/include"))
2298 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
2299 (string-append out "/translations"))
2300 (("\\$\\$\\[QT_INSTALL_DATA\\]")
2301 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
2302 (("\\$\\$\\[QT_HOST_DATA\\]")
2303 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
2304 (invoke "qmake")))))))
2305 (native-inputs `(("qtbase" ,qtbase)))
2306 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
2307 (synopsis "Qt port of the Scintilla C++ editor control")
2308 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2309 editor control. QScintilla includes features especially useful when editing
2310 and debugging source code. These include support for syntax styling, error
2311 indicators, code completion and call tips.")
2312 (license license:gpl3+)))
2313
2314 (define-public python-qscintilla
2315 (package (inherit qscintilla)
2316 (name "python-qscintilla")
2317 (arguments
2318 `(#:configure-flags
2319 (list "--pyqt=PyQt5"
2320 (string-append "--pyqt-sipdir="
2321 (assoc-ref %build-inputs "python-pyqt")
2322 "/share/sip")
2323 (string-append "--qsci-incdir="
2324 (assoc-ref %build-inputs "qscintilla")
2325 "/include")
2326 (string-append "--qsci-libdir="
2327 (assoc-ref %build-inputs "qscintilla")
2328 "/lib"))
2329 #:phases
2330 (modify-phases %standard-phases
2331 (replace 'configure
2332 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
2333 (let ((out (assoc-ref outputs "out"))
2334 (python (assoc-ref inputs "python")))
2335 (chdir "Python")
2336 (apply invoke "python3" "configure.py"
2337 configure-flags)
2338 ;; Install to the right directory
2339 (substitute* '("Makefile"
2340 "Qsci/Makefile")
2341 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
2342 (((string-append python "/lib"))
2343 (string-append out "/lib")))
2344 ;; And fix the installed.txt file
2345 (substitute* "installed.txt"
2346 (("/gnu/store/[^/]+") out)))
2347 #t)))))
2348 (inputs
2349 `(("qscintilla" ,qscintilla)
2350 ("python" ,python)
2351 ("python-pyqt" ,python-pyqt)))
2352 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2353 editor control. QScintilla includes features especially useful when editing
2354 and debugging source code. These include support for syntax styling, error
2355 indicators, code completion and call tips.
2356
2357 This package provides the Python bindings.")))
2358
2359 ;; PyQt only looks for modules in its own directory. It ignores environment
2360 ;; variables such as PYTHONPATH, so we need to build a union package to make
2361 ;; it work.
2362 (define-public python-pyqt+qscintilla
2363 (package (inherit python-pyqt)
2364 (name "python-pyqt+qscintilla")
2365 (source #f)
2366 (build-system trivial-build-system)
2367 (arguments
2368 '(#:modules ((guix build union))
2369 #:builder (begin
2370 (use-modules (ice-9 match)
2371 (guix build union))
2372 (match %build-inputs
2373 (((names . directories) ...)
2374 (union-build (assoc-ref %outputs "out")
2375 directories)
2376 #t)))))
2377 (inputs
2378 `(("python-pyqt" ,python-pyqt)
2379 ("python-qscintilla" ,python-qscintilla)))
2380 (synopsis "Union of PyQt and the Qscintilla extension")
2381 (description
2382 "This package contains the union of PyQt and the Qscintilla extension.")))
2383
2384 (define-public qtkeychain
2385 (package
2386 (name "qtkeychain")
2387 (version "0.9.1")
2388 (source
2389 (origin
2390 (method git-fetch)
2391 (uri (git-reference
2392 (url "https://github.com/frankosterfeld/qtkeychain/")
2393 (commit (string-append "v" version))))
2394 (file-name (git-file-name name version))
2395 (sha256
2396 (base32
2397 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
2398 (build-system cmake-build-system)
2399 (native-inputs
2400 `(("pkg-config" ,pkg-config)
2401 ("qttools" ,qttools)))
2402 (inputs
2403 `(("qtbase" ,qtbase)))
2404 (arguments
2405 `(#:tests? #f ; No tests included
2406 #:phases
2407 (modify-phases %standard-phases
2408 (add-before 'configure 'set-qt-trans-dir
2409 (lambda _
2410 (substitute* "CMakeLists.txt"
2411 (("\\$\\{qt_translations_dir\\}")
2412 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
2413 #t)))))
2414 (home-page "https://github.com/frankosterfeld/qtkeychain")
2415 (synopsis "Qt API to store passwords")
2416 (description
2417 "QtKeychain is a Qt library to store passwords and other secret data
2418 securely. It will not store any data unencrypted unless explicitly requested.")
2419 (license license:bsd-3)))
2420
2421 (define-public qwt
2422 (package
2423 (name "qwt")
2424 (version "6.1.5")
2425 (source
2426 (origin
2427 (method url-fetch)
2428 (uri
2429 (string-append "mirror://sourceforge/qwt/qwt/"
2430 version "/qwt-" version ".tar.bz2"))
2431 (sha256
2432 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
2433 (build-system gnu-build-system)
2434 (inputs
2435 `(("qtbase" ,qtbase)
2436 ("qtsvg" ,qtsvg)
2437 ("qttools" ,qttools)))
2438 (arguments
2439 `(#:phases
2440 (modify-phases %standard-phases
2441 (replace 'configure
2442 (lambda* (#:key outputs #:allow-other-keys)
2443 (let* ((out (assoc-ref outputs "out"))
2444 (docdir (string-append out "/share/doc/qwt"))
2445 (incdir (string-append out "/include/qwt"))
2446 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2447 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
2448 (substitute* '("qwtconfig.pri")
2449 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2450 (format #f "~a = ~a\n" x out))
2451 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2452 (format #f "~a = ~a\n" x docdir))
2453 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2454 (format #f "~a = ~a\n" x incdir))
2455 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2456 (format #f "~a = ~a\n" x pluginsdir))
2457 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2458 (format #f "~a = ~a\n" x featuresdir)))
2459 (substitute* '("doc/doc.pro")
2460 ;; We'll install them in the 'install-man-pages' phase.
2461 (("^unix:doc\\.files.*") ""))
2462 (invoke "qmake"))))
2463 (add-after 'install 'install-man-pages
2464 (lambda* (#:key outputs #:allow-other-keys)
2465 (let* ((out (assoc-ref outputs "out"))
2466 (man (string-append out "/share/man")))
2467 ;; Remove some incomplete manual pages.
2468 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2469 (mkdir-p man)
2470 (copy-recursively "doc/man" man)
2471 #t))))))
2472 (home-page "http://qwt.sourceforge.net")
2473 (synopsis "Qt widgets for plots, scales, dials and other technical software
2474 GUI components")
2475 (description
2476 "The Qwt library contains widgets and components which are primarily useful
2477 for technical and scientific purposes. It includes a 2-D plotting widget,
2478 different kinds of sliders, and much more.")
2479 (license
2480 (list
2481 ;; The Qwt license is LGPL2.1 with some exceptions.
2482 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2483 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2484 license:lgpl2.1 license:gpl3))))
2485
2486 (define-public qtwebkit
2487 (package
2488 (name "qtwebkit")
2489 (version "5.212.0-alpha4")
2490 (source
2491 (origin
2492 (method url-fetch)
2493 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
2494 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
2495 (sha256
2496 (base32
2497 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
2498 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
2499 (build-system cmake-build-system)
2500 (native-inputs
2501 `(("perl" ,perl)
2502 ("python" ,python)
2503 ("ruby" ,ruby)
2504 ("bison" ,bison)
2505 ("flex" ,flex)
2506 ("gperf" ,gperf)
2507 ("pkg-config" ,pkg-config)))
2508 (inputs
2509 `(("icu" ,icu4c)
2510 ("glib" ,glib)
2511 ("gst-plugins-base" ,gst-plugins-base)
2512 ("libjpeg" ,libjpeg-turbo)
2513 ("libpng" ,libpng)
2514 ("libwebp" ,libwebp)
2515 ("sqlite" ,sqlite)
2516 ("fontconfig" ,fontconfig)
2517 ("libxrender" ,libxrender)
2518 ("qtbase" ,qtbase)
2519 ("qtdeclarative" ,qtdeclarative)
2520 ("qtlocation" ,qtlocation)
2521 ("qtmultimedia" ,qtmultimedia)
2522 ("qtsensors" ,qtsensors)
2523 ("qtwebchannel" ,qtwebchannel)
2524 ("libxml2" ,libxml2)
2525 ("libxslt" ,libxslt)
2526 ("libx11" ,libx11)
2527 ("libxcomposite" ,libxcomposite)))
2528 (arguments
2529 `(#:tests? #f ; no apparent tests; it might be necessary to set
2530 ; ENABLE_API_TESTS, see CMakeLists.txt
2531
2532 ;; Parallel builds fail due to a race condition:
2533 ;; <https://bugs.gnu.org/34062>.
2534 #:parallel-build? #f
2535
2536 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2537 "-DPORT=Qt"
2538 "-DUSE_LIBHYPHEN=OFF"
2539 "-DUSE_SYSTEM_MALLOC=ON"
2540 ;; XXX: relative dir installs to build dir?
2541 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2542 %output "/lib/qt5/mkspecs/modules")
2543 ;; Sacrifice a little speed in order to link
2544 ;; libraries and test executables in a
2545 ;; reasonable amount of memory.
2546 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2547 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2548 (home-page "https://www.webkit.org")
2549 (synopsis "Web browser engine and classes to render and interact with web
2550 content")
2551 (description "QtWebKit provides a Web browser engine that makes it easy to
2552 embed content from the World Wide Web into your Qt application. At the same
2553 time Web content can be enhanced with native controls.")
2554 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2555 ;; room for slower or busy hardware.
2556 (properties '((timeout . 64800))) ;18 hours
2557
2558 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2559 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2560 ;; disable it on non-Intel platforms.
2561 (supported-systems '("x86_64-linux" "i686-linux"))
2562
2563 (license license:lgpl2.1+)))
2564
2565 (define-public dotherside
2566 (package
2567 (name "dotherside")
2568 (version "0.6.4")
2569 (source
2570 (origin
2571 (method git-fetch)
2572 (uri (git-reference
2573 (url "https://github.com/filcuc/DOtherSide")
2574 (commit (string-append "v" version))))
2575 (file-name (git-file-name name version))
2576 (sha256
2577 (base32
2578 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
2579 (build-system cmake-build-system)
2580 (native-inputs
2581 `(("qttools" ,qttools)))
2582 (inputs
2583 `(("qtbase" ,qtbase)
2584 ("qtdeclarative" ,qtdeclarative)))
2585 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2586 (synopsis "C language library for creating bindings for the Qt QML language")
2587 (description
2588 "DOtherSide is a C language library for creating bindings for the
2589 QT QML language. The following features are implementable from
2590 a binding language:
2591 @itemize
2592 @item Creating custom QObject
2593 @item Creating custom QAbstractListModels
2594 @item Creating custom properties, signals and slots
2595 @item Creating from QML QObject defined in the binded language
2596 @item Creating from Singleton QML QObject defined in the binded language
2597 @end itemize\n")
2598 (license license:lgpl3))) ;version 3 only (+ exception)
2599
2600 ;; There have been no public releases yet.
2601 (define-public qtcolorwidgets
2602 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2603 (revision "1"))
2604 (package
2605 (name "qtcolorwidgets")
2606 (version (git-version "0" revision commit))
2607 (source (origin
2608 (method git-fetch)
2609 (uri (git-reference
2610 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2611 (commit commit)))
2612 (file-name (git-file-name name version))
2613 (sha256
2614 (base32
2615 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2616 (build-system cmake-build-system)
2617 (arguments `(#:tests? #f)) ; There are no tests
2618 (native-inputs
2619 `(("qttools" ,qttools)))
2620 (inputs
2621 `(("qtbase" ,qtbase)))
2622 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2623 (synopsis "Color management widgets")
2624 (description "QtColorWidgets provides a Qt color dialog that is more
2625 user-friendly than the default @code{QColorDialog} and several other
2626 color-related widgets.")
2627 ;; Includes a license exception for combining with GPL2 code.
2628 (license license:lgpl3+))))
2629
2630 (define-public python-shiboken-2
2631 (package
2632 (name "python-shiboken-2")
2633 (version "5.14.2.3")
2634 (source (origin
2635 (method url-fetch)
2636 (uri (string-append "https://download.qt.io/official_releases"
2637 "/QtForPython/pyside2/PySide2-" version
2638 "-src/pyside-setup-opensource-src-"
2639 version ".tar.xz"))
2640 (sha256
2641 (base32
2642 "08lhqm0n3fjqpblcx9rshsp8g3bvf7yzbai5q99bly2wa04y6b83"))))
2643 (build-system cmake-build-system)
2644 (inputs
2645 `(("clang-toolchain" ,clang-toolchain)
2646 ("libxml2" ,libxml2)
2647 ("libxslt" ,libxslt)
2648 ("python-wrapper" ,python-wrapper)
2649 ("qtbase" ,qtbase)
2650 ("qtxmlpatterns" ,qtxmlpatterns)))
2651 (arguments
2652 `(#:tests? #f
2653 ;; FIXME: Building tests fails
2654 #:configure-flags '("-DBUILD_TESTS=off")
2655 #:phases
2656 (modify-phases %standard-phases
2657 (add-after 'unpack 'use-shiboken-dir-only
2658 (lambda _ (chdir "sources/shiboken2") #t))
2659 (add-before 'configure 'make-files-writable-and-update-timestamps
2660 (lambda _
2661 ;; The build scripts need to modify some files in
2662 ;; the read-only source directory, and also attempts
2663 ;; to create Zip files which fails because the Zip
2664 ;; format does not support timestamps before 1980.
2665 (let ((circa-1980 (* 10 366 24 60 60)))
2666 (for-each (lambda (file)
2667 (make-file-writable file)
2668 (utime file circa-1980 circa-1980))
2669 (find-files ".")))
2670 #t))
2671 (add-before 'configure 'set-build-env
2672 (lambda* (#:key inputs #:allow-other-keys)
2673 (let ((llvm (assoc-ref inputs "clang-toolchain")))
2674 (setenv "CLANG_INSTALL_DIR" llvm)
2675 #t))))))
2676 (home-page "https://wiki.qt.io/Qt_for_Python")
2677 (synopsis
2678 "Shiboken generates bindings for C++ libraries using CPython source code")
2679 (description
2680 "Shiboken generates bindings for C++ libraries using CPython source code")
2681 (license
2682 (list
2683 ;; The main code is GPL3 or LGPL3.
2684 ;; Examples are BSD-3.
2685 license:gpl3
2686 license:lgpl3
2687 license:bsd-3))))
2688
2689 (define-public python-pyside-2
2690 (package
2691 (name "python-pyside-2")
2692 (version (package-version python-shiboken-2))
2693 (source (package-source python-shiboken-2))
2694 (build-system cmake-build-system)
2695 (inputs
2696 `(("libxml2" ,libxml2)
2697 ("libxslt" ,libxslt)
2698 ("clang-toolchain" ,clang-toolchain)
2699 ("qtbase" ,qtbase)
2700 ("qtdatavis3d" ,qtdatavis3d)
2701 ("qtlocation" ,qtlocation)
2702 ("qtmultimedia" ,qtmultimedia)
2703 ("qtquickcontrols" ,qtquickcontrols)
2704 ("qtscript" ,qtscript)
2705 ("qtscxml" ,qtscxml)
2706 ("qtsensors" ,qtsensors)
2707 ("qtspeech" ,qtspeech)
2708 ("qtsvg" ,qtsvg)
2709 ("qtwebchannel" ,qtwebchannel)
2710 ("qtwebsockets" ,qtwebsockets)
2711 ("qtx11extras" ,qtx11extras)
2712 ("qtxmlpatterns" ,qtxmlpatterns)))
2713 (native-inputs
2714 `(("cmake" ,cmake-minimal)
2715 ("python-shiboken-2" ,python-shiboken-2)
2716 ("python" ,python-wrapper)
2717 ("qttools" ,qttools)
2718 ("which" ,which)))
2719 (arguments
2720 `(#:tests? #f
2721 ;; FIXME: Building tests fail.
2722 #:configure-flags
2723 (list "-DBUILD_TESTS=FALSE"
2724 (string-append "-DPYTHON_EXECUTABLE="
2725 (assoc-ref %build-inputs "python")
2726 "/bin/python"))
2727 #:phases
2728 (modify-phases %standard-phases
2729 (add-after 'unpack 'go-to-source-dir
2730 (lambda _ (chdir "sources/pyside2") #t))
2731 (add-before 'configure 'set-clang-dir
2732 (lambda* (#:key inputs #:allow-other-keys)
2733 (let ((clang (assoc-ref inputs "clang-toolchain")))
2734 (setenv "CLANG_INSTALL_DIR" clang)
2735 #t))))))
2736 (home-page "https://wiki.qt.io/Qt_for_Python")
2737 (synopsis
2738 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2739 (description
2740 "The Qt for Python product enables the use of Qt5 APIs in Python
2741 applications. It lets Python developers utilize the full potential of Qt,
2742 using the PySide2 module. The PySide2 module provides access to the
2743 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2744 comes with the Shiboken2 CPython binding code generator, which can be used to
2745 generate Python bindings for your C or C++ code.")
2746 (license (list
2747 license:lgpl3
2748 ;;They state that:
2749 ;; this file may be used under the terms of the GNU General
2750 ;; Public License version 2.0 or (at your option) the GNU
2751 ;; General Public license version 3 or any later version
2752 ;; approved by the KDE Free Qt Foundation.
2753 ;; Thus, it is currently v2 or v3, but no "+".
2754 license:gpl3
2755 license:gpl2))))
2756
2757 (define-public python-pyside-2-tools
2758 (package
2759 (name "python-pyside-2-tools")
2760 (version (package-version python-shiboken-2))
2761 (source (package-source python-shiboken-2))
2762 (build-system cmake-build-system)
2763 (inputs
2764 `(("python-pyside-2" ,python-pyside-2)
2765 ("python-shiboken-2" ,python-shiboken-2)
2766 ("qtbase" ,qtbase/next)))
2767 (native-inputs
2768 `(("python" ,python-wrapper)))
2769 (arguments
2770 `(#:tests? #f
2771 #:configure-flags
2772 (list "-DBUILD_TESTS=off"
2773 (string-append "-DPYTHON_EXECUTABLE="
2774 (assoc-ref %build-inputs "python")
2775 "/bin/python"))
2776 #:phases (modify-phases %standard-phases
2777 (add-after 'unpack 'go-to-source-dir
2778 (lambda _ (chdir "sources/pyside2-tools") #t)))))
2779 (home-page "https://wiki.qt.io/Qt_for_Python")
2780 (synopsis
2781 "Contains command line tools for PySide2")
2782 (description
2783 "Contains lupdate, rcc and uic tools for PySide2")
2784 (license license:gpl2)))
2785
2786 (define-public libqglviewer
2787 (package
2788 (name "libqglviewer")
2789 (version "2.7.2")
2790 (source (origin
2791 (method url-fetch)
2792 (uri
2793 (string-append "http://libqglviewer.com/src/libQGLViewer-"
2794 version ".tar.gz"))
2795 (sha256
2796 (base32
2797 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
2798 (build-system gnu-build-system)
2799 (arguments
2800 '(#:tests? #f ; no check target
2801 #:make-flags
2802 (list (string-append "PREFIX="
2803 (assoc-ref %outputs "out")))
2804 #:phases
2805 (modify-phases %standard-phases
2806 (replace 'configure
2807 (lambda* (#:key make-flags #:allow-other-keys)
2808 (apply invoke (cons "qmake" make-flags)))))))
2809 (native-inputs
2810 `(("qtbase" ,qtbase)
2811 ("qttools" ,qttools)))
2812 (inputs
2813 `(("glu" ,glu)))
2814 (home-page "http://libqglviewer.com")
2815 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
2816 (description
2817 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
2818 of OpenGL 3D viewers.
2819
2820 It provides some of the typical 3D viewer functionalities, such as the
2821 possibility to move the camera using the mouse, which lacks in most of the
2822 other APIs. Other features include mouse manipulated frames, interpolated
2823 keyFrames, object selection, stereo display, screenshot saving and much more.
2824 It can be used by OpenGL beginners as well as to create complex applications,
2825 being fully customizable and easy to extend.")
2826 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
2827 ;; be used.
2828 (license (list license:gpl2 license:gpl3))))