gnu: python-pyqt-4: Use 'modify-phases' syntax.
[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 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages qt)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build utils)
29 #:use-module (guix build-system cmake)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix packages)
32 #:use-module (guix utils)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages bison)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages cups)
37 #:use-module (gnu packages databases)
38 #:use-module (gnu packages documentation)
39 #:use-module (gnu packages fontutils)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages freedesktop)
42 #:use-module (gnu packages gl)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gnuzilla)
45 #:use-module (gnu packages gperf)
46 #:use-module (gnu packages gtk)
47 #:use-module (gnu packages icu4c)
48 #:use-module (gnu packages image)
49 #:use-module (gnu packages linux)
50 #:use-module (gnu packages databases)
51 #:use-module (gnu packages pciutils)
52 #:use-module (gnu packages pcre)
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages pulseaudio)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages ruby)
58 #:use-module (gnu packages tls)
59 #:use-module (gnu packages xdisorg)
60 #:use-module (gnu packages xorg)
61 #:use-module (gnu packages xml))
62
63 (define-public grantlee
64 (package
65 (name "grantlee")
66 (version "5.1.0")
67 (source
68 (origin
69 (method url-fetch)
70 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
71 version ".tar.gz"))
72 (file-name (string-append name "-" version ".tar.gz"))
73 (sha256
74 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
75 (native-inputs
76 `(("doxygen" ,doxygen)))
77 (inputs
78 `(("qtbase" ,qtbase)
79 ("qtscript" ,qtscript)))
80 (build-system cmake-build-system)
81 (arguments
82 `(#:phases
83 (modify-phases %standard-phases
84 (replace 'check
85 (lambda _
86 (zero? (system* "ctest" ;; exclude 2 tests which require a display
87 "-E" "htmlbuildertest|plainmarkupbuildertest")))))))
88 (home-page "https://github.com/steveire/grantlee")
89 (synopsis "Libraries for text templating with Qt")
90 (description "Grantlee Templates can be used for theming and generation of
91 other text such as code. The syntax uses the syntax of the Django template
92 system, and the core design of Django is reused in Grantlee.")
93 (license license:lgpl2.0+)))
94
95 (define-public qt
96 (package
97 (name "qt")
98 (version "5.6.2")
99 (source (origin
100 (method url-fetch)
101 (uri
102 (string-append
103 "http://download.qt.io/official_releases/qt/"
104 (version-major+minor version)
105 "/" version
106 "/single/qt-everywhere-opensource-src-"
107 version ".tar.xz"))
108 (sha256
109 (base32
110 "1cw93mrlkqbwndfqyjpsvjzkpzi39px2is040xvk18mvg3y1prl3"))
111 (modules '((guix build utils)))
112 (snippet
113 '(begin
114 ;; Remove qtwebengine, which relies on a bundled copy of
115 ;; chromium. Not only does it fail compilation in qt 5.5:
116 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
117 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
118 ;; it might also pose security problems.
119 ;; Alternatively, we could use the "-skip qtwebengine"
120 ;; configuration option.
121 (delete-file-recursively "qtwebengine")
122 ;; Remove one of the two bundled harfbuzz copies in addition
123 ;; to passing "-system-harfbuzz".
124 (delete-file-recursively "qtbase/src/3rdparty/harfbuzz-ng")
125 ;; Remove the bundled sqlite copy in addition to
126 ;; passing "-system-sqlite".
127 (delete-file-recursively "qtbase/src/3rdparty/sqlite")))))
128 (build-system gnu-build-system)
129 (propagated-inputs
130 `(("mesa" ,mesa)))
131 (inputs
132 `(("alsa-lib" ,alsa-lib)
133 ("dbus" ,dbus)
134 ("cups" ,cups)
135 ("expat" ,expat)
136 ("fontconfig" ,fontconfig)
137 ("freetype" ,freetype)
138 ("glib" ,glib)
139 ("harfbuzz" ,harfbuzz)
140 ("icu4c" ,icu4c)
141 ("libjpeg" ,libjpeg)
142 ("libmng" ,libmng)
143 ("libpci" ,pciutils)
144 ("libpng" ,libpng)
145 ("libx11" ,libx11)
146 ("libxcomposite" ,libxcomposite)
147 ("libxcursor" ,libxcursor)
148 ("libxfixes" ,libxfixes)
149 ("libxi" ,libxi)
150 ("libxinerama" ,libxinerama)
151 ("libxkbcommon" ,libxkbcommon)
152 ("libxml2" ,libxml2)
153 ("libxrandr" ,libxrandr)
154 ("libxrender" ,libxrender)
155 ("libxslt" ,libxslt)
156 ("libxtst" ,libxtst)
157 ("mtdev" ,mtdev)
158 ("mysql" ,mysql)
159 ("nss" ,nss)
160 ("openssl" ,openssl)
161 ("postgresql" ,postgresql)
162 ("pulseaudio" ,pulseaudio)
163 ("pcre" ,pcre)
164 ("sqlite" ,sqlite)
165 ("udev" ,eudev)
166 ("unixodbc" ,unixodbc)
167 ("xcb-util" ,xcb-util)
168 ("xcb-util-image" ,xcb-util-image)
169 ("xcb-util-keysyms" ,xcb-util-keysyms)
170 ("xcb-util-renderutil" ,xcb-util-renderutil)
171 ("xcb-util-wm" ,xcb-util-wm)
172 ("zlib" ,zlib)))
173 (native-inputs
174 `(("bison" ,bison)
175 ("flex" ,flex)
176 ("gperf" ,gperf)
177 ("perl" ,perl)
178 ("pkg-config" ,pkg-config)
179 ("python" ,python-2)
180 ("ruby" ,ruby)
181 ("which" ,(@ (gnu packages base) which))))
182 (arguments
183 `(;; FIXME: Disabling parallel building is a quick hack to avoid the
184 ;; failure described in
185 ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
186 ;; A more structural fix is needed.
187 #:parallel-build? #f
188 #:phases
189 (modify-phases %standard-phases
190 (add-after 'configure 'patch-bin-sh
191 (lambda _
192 (substitute* '("qtbase/config.status"
193 "qtbase/configure"
194 "qtbase/mkspecs/features/qt_functions.prf"
195 "qtbase/qmake/library/qmakebuiltins.cpp")
196 (("/bin/sh") (which "sh")))
197 #t))
198 (replace 'configure
199 (lambda* (#:key outputs #:allow-other-keys)
200 (let ((out (assoc-ref outputs "out")))
201 (substitute* '("configure" "qtbase/configure")
202 (("/bin/pwd") (which "pwd")))
203 (substitute* "qtbase/src/corelib/global/global.pri"
204 (("/bin/ls") (which "ls")))
205 ;; do not pass "--enable-fast-install", which makes the
206 ;; configure process fail
207 (zero? (system*
208 "./configure"
209 "-verbose"
210 "-prefix" out
211 "-opensource"
212 "-confirm-license"
213 ;; Do not build examples; if desired, these could go
214 ;; into a separate output, but for the time being, we
215 ;; prefer to save the space and build time.
216 "-nomake" "examples"
217 ;; Most "-system-..." are automatic, but some use
218 ;; the bundled copy by default.
219 "-system-sqlite"
220 "-system-harfbuzz"
221 ;; explicitly link with openssl instead of dlopening it
222 "-openssl-linked"
223 ;; explicitly link with dbus instead of dlopening it
224 "-dbus-linked"
225 ;; drop special machine instructions not supported
226 ;; on all instances of the target
227 ,@(if (string-prefix? "x86_64"
228 (or (%current-target-system)
229 (%current-system)))
230 '()
231 '("-no-sse2"))
232 "-no-sse3"
233 "-no-ssse3"
234 "-no-sse4.1"
235 "-no-sse4.2"
236 "-no-avx"
237 "-no-avx2"
238 "-no-mips_dsp"
239 "-no-mips_dspr2"))))))))
240 (home-page "https://www.qt.io/")
241 (synopsis "Cross-platform GUI library")
242 (description "Qt is a cross-platform application and UI framework for
243 developers using C++ or QML, a CSS & JavaScript like language.")
244 (license license:lgpl2.1)
245
246 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
247 ;; see <http://hydra.gnu.org/build/112828>.
248 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
249 (supported-systems (delete "mips64el-linux" %supported-systems))))
250
251 (define-public qt-4
252 (package (inherit qt)
253 (version "4.8.7")
254 (source (origin
255 (method url-fetch)
256 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
257 (string-copy version 0 (string-rindex version #\.))
258 "/" version
259 "/qt-everywhere-opensource-src-"
260 version ".tar.gz"))
261 (sha256
262 (base32
263 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
264 (patches (search-patches "qt4-ldflags.patch"))
265 (modules '((guix build utils)))
266 (snippet
267 ;; Remove webkit module, which is not built.
268 '(delete-file-recursively "src/3rdparty/webkit"))))
269 (inputs `(,@(alist-delete "harfbuzz"
270 (alist-delete "libjpeg" (package-inputs qt)))
271 ("libjepg" ,libjpeg-8)
272 ("libsm" ,libsm)))
273
274 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
275 ;; but we can't make them a separate output because "out" and "examples"
276 ;; would refer to each other.
277 (outputs '("out" ;112MiB core + 37MiB examples
278 "doc")) ;280MiB of HTML + code
279 (arguments
280 `(#:phases
281 (modify-phases %standard-phases
282 (replace
283 'configure
284 (lambda* (#:key outputs #:allow-other-keys)
285 (let ((out (assoc-ref outputs "out"))
286 (doc (assoc-ref outputs "doc")))
287 (substitute* '("configure")
288 (("/bin/pwd") (which "pwd")))
289
290 (zero? (system*
291 "./configure"
292 "-verbose"
293 "-prefix" out
294 ;; Note: Don't pass '-docdir' since 'qmake' and
295 ;; libQtCore would record its value, thereby defeating
296 ;; the whole point of having a separate output.
297 "-datadir" (string-append out "/share/qt-" ,version
298 "/data")
299 "-importdir" (string-append out "/lib/qt-4"
300 "/imports")
301 "-plugindir" (string-append out "/lib/qt-4"
302 "/plugins")
303 "-translationdir" (string-append out "/share/qt-" ,version
304 "/translations")
305 "-demosdir" (string-append out "/share/qt-" ,version
306 "/demos")
307 "-examplesdir" (string-append out "/share/qt-" ,version
308 "/examples")
309 "-opensource"
310 "-confirm-license"
311 ;; explicitly link with dbus instead of dlopening it
312 "-dbus-linked"
313 ;; Skip the webkit module; it fails to build on armhf
314 ;; and, apart from that, may pose security risks.
315 "-no-webkit"
316 ;; drop special machine instructions not supported
317 ;; on all instances of the target
318 ,@(if (string-prefix? "x86_64"
319 (or (%current-target-system)
320 (%current-system)))
321 '()
322 '("-no-mmx"
323 "-no-3dnow"
324 "-no-sse"
325 "-no-sse2"))
326 "-no-sse3"
327 "-no-ssse3"
328 "-no-sse4.1"
329 "-no-sse4.2"
330 "-no-avx")))))
331 (add-after
332 'install 'move-doc
333 (lambda* (#:key outputs #:allow-other-keys)
334 ;; Because of qt4-documentation-path.patch, documentation ends up
335 ;; being installed in OUT. Move it to the right place.
336 (let* ((out (assoc-ref outputs "out"))
337 (doc (assoc-ref outputs "doc"))
338 (olddoc (string-append out "/doc"))
339 (docdir (string-append doc "/share/doc/qt-" ,version)))
340 (mkdir-p (dirname docdir))
341
342 ;; Note: We can't use 'rename-file' here because OUT and DOC are
343 ;; different "devices" due to bind-mounts.
344 (copy-recursively olddoc docdir)
345 (delete-file-recursively olddoc)
346 #t))))))))
347
348 (define-public qtbase
349 (package
350 (name "qtbase")
351 (version "5.7.0")
352 (source (origin
353 (method url-fetch)
354 (uri (string-append "https://download.qt.io/official_releases/qt/"
355 (version-major+minor version) "/" version
356 "/submodules/" name "-opensource-src-"
357 version ".tar.xz"))
358 (sha256
359 (base32
360 "0ip6xnizsn269r4s1nq9lkx8cdxkjqr1fidwrj3sa8xb7h96syry"))
361 (modules '((guix build utils)))
362 (snippet
363 '(begin
364 ;; Remove one of the two bundled harfbuzz copies in addition
365 ;; to passing "-system-harfbuzz".
366 (delete-file-recursively "src/3rdparty/harfbuzz-ng")
367 ;; Remove the bundled sqlite copy in addition to
368 ;; passing "-system-sqlite".
369 (delete-file-recursively "src/3rdparty/sqlite")))))
370 (build-system gnu-build-system)
371 (propagated-inputs
372 `(("mesa" ,mesa)))
373 (inputs
374 `(("alsa-lib" ,alsa-lib)
375 ("cups" ,cups)
376 ("dbus" ,dbus)
377 ("eudev" ,eudev)
378 ("expat" ,expat)
379 ("fontconfig" ,fontconfig)
380 ("freetype" ,freetype)
381 ("glib" ,glib)
382 ("harfbuzz" ,harfbuzz)
383 ("icu4c" ,icu4c)
384 ("libinput" ,libinput)
385 ("libjpeg" ,libjpeg)
386 ("libmng" ,libmng)
387 ("libpng" ,libpng)
388 ("libx11" ,libx11)
389 ("libxcomposite" ,libxcomposite)
390 ("libxcursor" ,libxcursor)
391 ("libxfixes" ,libxfixes)
392 ("libxi" ,libxi)
393 ("libxinerama" ,libxinerama)
394 ("libxkbcommon" ,libxkbcommon)
395 ("libxml2" ,libxml2)
396 ("libxrandr" ,libxrandr)
397 ("libxrender" ,libxrender)
398 ("libxslt" ,libxslt)
399 ("libxtst" ,libxtst)
400 ("mtdev" ,mtdev)
401 ("mysql" ,mysql)
402 ("nss" ,nss)
403 ("openssl" ,openssl)
404 ("pcre" ,pcre)
405 ("postgresql" ,postgresql)
406 ("pulseaudio" ,pulseaudio)
407 ("sqlite" ,sqlite)
408 ("unixodbc" ,unixodbc)
409 ("xcb-util" ,xcb-util)
410 ("xcb-util-image" ,xcb-util-image)
411 ("xcb-util-keysyms" ,xcb-util-keysyms)
412 ("xcb-util-renderutil" ,xcb-util-renderutil)
413 ("xcb-util-wm" ,xcb-util-wm)
414 ("zlib" ,zlib)))
415 (native-inputs
416 `(("bison" ,bison)
417 ("flex" ,flex)
418 ("gperf" ,gperf)
419 ("perl" ,perl)
420 ("pkg-config" ,pkg-config)
421 ("python" ,python-2)
422 ("ruby" ,ruby)
423 ("which" ,(@ (gnu packages base) which))))
424 (arguments
425 `(#:phases
426 (modify-phases %standard-phases
427 (add-after 'configure 'patch-bin-sh
428 (lambda _
429 (substitute* '("config.status"
430 "configure"
431 "mkspecs/features/qt_functions.prf"
432 "qmake/library/qmakebuiltins.cpp")
433 (("/bin/sh") (which "sh")))
434 #t))
435 (replace 'configure
436 (lambda* (#:key outputs #:allow-other-keys)
437 (let ((out (assoc-ref outputs "out")))
438 (substitute* "configure"
439 (("/bin/pwd") (which "pwd")))
440 (substitute* "src/corelib/global/global.pri"
441 (("/bin/ls") (which "ls")))
442 ;; The configuration files for other Qt5 packages are searched
443 ;; through a call to "find_package" in Qt5Config.cmake, which
444 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
445 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
446 ;; components can be installed in different places.
447 (substitute* (find-files "." ".*\\.cmake")
448 (("NO_DEFAULT_PATH") ""))
449 ;; do not pass "--enable-fast-install", which makes the
450 ;; configure process fail
451 (zero? (system*
452 "./configure"
453 "-verbose"
454 "-prefix" out
455 "-opensource"
456 "-confirm-license"
457 ;; Do not build examples; if desired, these could go
458 ;; into a separate output, but for the time being, we
459 ;; prefer to save the space and build time.
460 "-nomake" "examples"
461 ;; Most "-system-..." are automatic, but some use
462 ;; the bundled copy by default.
463 "-system-sqlite"
464 "-system-harfbuzz"
465 ;; explicitly link with openssl instead of dlopening it
466 "-openssl-linked"
467 ;; explicitly link with dbus instead of dlopening it
468 "-dbus-linked"
469 ;; drop special machine instructions not supported
470 ;; on all instances of the target
471 ,@(if (string-prefix? "x86_64"
472 (or (%current-target-system)
473 (%current-system)))
474 '()
475 '("-no-sse2"))
476 "-no-sse3"
477 "-no-ssse3"
478 "-no-sse4.1"
479 "-no-sse4.2"
480 "-no-avx"
481 "-no-avx2"
482 "-no-mips_dsp"
483 "-no-mips_dspr2")))))
484 (add-after 'install 'patch-qt_config.prf
485 (lambda* (#:key outputs #:allow-other-keys)
486 (let* ((out (assoc-ref outputs "out"))
487 (qt_config.prf (string-append
488 out "/mkspecs/features/qt_config.prf")))
489 ;; For each Qt module, let `qmake' uses search paths in the
490 ;; module directory instead of all in QT_INSTALL_PREFIX.
491 (substitute* qt_config.prf
492 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
493 "$$replace(dir, mkspecs/modules, include)")
494 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
495 "$$replace(dir, mkspecs/modules, lib)")
496 (("\\$\\$\\[QT_HOST_LIBS\\]")
497 "$$replace(dir, mkspecs/modules, lib)")
498 (("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
499 "$$replace(dir, mkspecs/modules, plugins)")
500 (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
501 "$$replace(dir, mkspecs/modules, libexec)")
502 (("\\$\\$\\[QT_INSTALL_BINS\\]")
503 "$$replace(dir, mkspecs/modules, bin)")
504 (("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
505 "$$replace(dir, mkspecs/modules, imports)")
506 (("\\$\\$\\[QT_INSTALL_QML\\]")
507 "$$replace(dir, mkspecs/modules, qml)"))
508 #t))))))
509 (native-search-paths
510 (list (search-path-specification
511 (variable "QMAKEPATH")
512 (files '("")))
513 (search-path-specification
514 (variable "QML2_IMPORT_PATH")
515 (files '("qml")))
516 (search-path-specification
517 (variable "QT_PLUGIN_PATH")
518 (files '("plugins")))
519 (search-path-specification
520 (variable "XDG_DATA_DIRS")
521 (files '("share")))
522 (search-path-specification
523 (variable "XDG_CONFIG_DIRS")
524 (files '("etc/xdg")))))
525 (home-page "https://www.qt.io/")
526 (synopsis "Cross-platform GUI library")
527 (description "Qt is a cross-platform application and UI framework for
528 developers using C++ or QML, a CSS & JavaScript like language.")
529 (license (list license:lgpl2.1 license:lgpl3))))
530
531 (define-public qtsvg
532 (package (inherit qtbase)
533 (name "qtsvg")
534 (version "5.7.0")
535 (source (origin
536 (method url-fetch)
537 (uri (string-append "https://download.qt.io/official_releases/qt/"
538 (version-major+minor version) "/" version
539 "/submodules/" name "-opensource-src-"
540 version ".tar.xz"))
541 (sha256
542 (base32
543 "10fqrlqkiq83xhx79g8d2sjy7hjdnp28067z8f4byj7db81rzy51"))))
544 (propagated-inputs `())
545 (native-inputs `(("perl" ,perl)))
546 (inputs
547 `(("mesa" ,mesa)
548 ("qtbase" ,qtbase)
549 ("zlib" ,zlib)))
550 (arguments
551 `(#:phases
552 (modify-phases %standard-phases
553 (replace 'configure
554 (lambda* (#:key outputs #:allow-other-keys)
555 (let ((out (assoc-ref outputs "out")))
556 (zero? (system* "qmake" (string-append "PREFIX=" out))))))
557 (add-before 'install 'fix-Makefiles
558 (lambda* (#:key inputs outputs #:allow-other-keys)
559 (let ((out (assoc-ref outputs "out"))
560 (qtbase (assoc-ref inputs "qtbase")))
561 (substitute* (find-files "." "Makefile")
562 (((string-append "INSTALL_ROOT)" qtbase))
563 (string-append "INSTALL_ROOT)" out)))))))))))
564
565 (define-public qtimageformats
566 (package (inherit qtsvg)
567 (name "qtimageformats")
568 (version "5.7.0")
569 (source (origin
570 (method url-fetch)
571 (uri (string-append "https://download.qt.io/official_releases/qt/"
572 (version-major+minor version) "/" version
573 "/submodules/" name "-opensource-src-"
574 version ".tar.xz"))
575 (sha256
576 (base32
577 "1rb27x7i2pmvsck6wax2cg31gqpzaakciy45wm5l3lcl86j48czg"))
578 (modules '((guix build utils)))
579 (snippet
580 '(begin
581 (delete-file-recursively "src/3rdparty")))))
582 (native-inputs `())
583 (inputs
584 `(("libmng" ,libmng)
585 ("libtiff" ,libtiff)
586 ("libwebp" ,libwebp)
587 ("mesa" ,mesa)
588 ("qtbase" ,qtbase)
589 ("zlib" ,zlib)))))
590
591 (define-public qtx11extras
592 (package (inherit qtsvg)
593 (name "qtx11extras")
594 (version "5.7.0")
595 (source (origin
596 (method url-fetch)
597 (uri (string-append "https://download.qt.io/official_releases/qt/"
598 (version-major+minor version) "/" version
599 "/submodules/" name "-opensource-src-"
600 version ".tar.xz"))
601 (sha256
602 (base32
603 "1yrkn8pqdbvbqykas3wx1vdfimhjkgx3s5jgdxib9dgmgyx6vjzw"))))
604 (native-inputs `(("perl" ,perl)))
605 (inputs
606 `(("mesa" ,mesa)
607 ("qtbase" ,qtbase)))))
608
609 (define-public qtxmlpatterns
610 (package (inherit qtsvg)
611 (name "qtxmlpatterns")
612 (version "5.7.0")
613 (source (origin
614 (method url-fetch)
615 (uri (string-append "https://download.qt.io/official_releases/qt/"
616 (version-major+minor version) "/" version
617 "/submodules/" name "-opensource-src-"
618 version ".tar.xz"))
619 (sha256
620 (base32
621 "02z2qxamslg6sphnaykjcjfpypq4b69pb586s43vw4fplm72m21q"))))
622 (native-inputs `(("perl" ,perl)))
623 (inputs `(("qtbase" ,qtbase)))))
624
625 (define-public qtdeclarative
626 (package (inherit qtsvg)
627 (name "qtdeclarative")
628 (version "5.7.0")
629 (source (origin
630 (method url-fetch)
631 (uri (string-append "https://download.qt.io/official_releases/qt/"
632 (version-major+minor version) "/" version
633 "/submodules/" name "-opensource-src-"
634 version ".tar.xz"))
635 (sha256
636 (base32
637 "1x7rij423g5chlfd2kix54f393vxwjvdfsn1c7sybqmfycwn5pl6"))))
638 (native-inputs
639 `(("perl" ,perl)
640 ("pkg-config" ,pkg-config)
641 ("python" ,python-2)
642 ("qtsvg" ,qtsvg)
643 ("qtxmlpatterns" ,qtxmlpatterns)))
644 (inputs
645 `(("mesa" ,mesa)
646 ("qtbase" ,qtbase)))))
647
648 (define-public qtconnectivity
649 (package (inherit qtsvg)
650 (name "qtconnectivity")
651 (version "5.7.0")
652 (source (origin
653 (method url-fetch)
654 (uri (string-append "https://download.qt.io/official_releases/qt/"
655 (version-major+minor version) "/" version
656 "/submodules/" name "-opensource-src-"
657 version ".tar.xz"))
658 (sha256
659 (base32
660 "00r7lc1w3snfp2qfqmviqzv0cw16zd8m1sfpvxvpl65yqmzcli4q"))))
661 (native-inputs
662 `(("perl" ,perl)
663 ("pkg-config" ,pkg-config)
664 ("qtdeclarative" ,qtdeclarative)))
665 (inputs
666 `(("bluez" ,bluez)
667 ("qtbase" ,qtbase)))))
668
669 (define-public qtwebsockets
670 (package (inherit qtsvg)
671 (name "qtwebsockets")
672 (version "5.7.0")
673 (source (origin
674 (method url-fetch)
675 (uri (string-append "https://download.qt.io/official_releases/qt/"
676 (version-major+minor version) "/" version
677 "/submodules/" name "-opensource-src-"
678 version ".tar.xz"))
679 (sha256
680 (base32
681 "0hwb2l7iwf4wf7l95dli8j3b7h0nffp56skfg1x810kzj0df26vl"))))
682 (native-inputs
683 `(("perl" ,perl)
684 ("qtdeclarative" ,qtdeclarative)))
685 (inputs `(("qtbase" ,qtbase)))))
686
687 (define-public qtsensors
688 (package (inherit qtsvg)
689 (name "qtsensors")
690 (version "5.7.0")
691 (source (origin
692 (method url-fetch)
693 (uri (string-append "https://download.qt.io/official_releases/qt/"
694 (version-major+minor version) "/" version
695 "/submodules/" name "-opensource-src-"
696 version ".tar.xz"))
697 (sha256
698 (base32
699 "1gii6wg2xd3bkb86y5hgpmwcpl04xav030zscpl6fhscl9kcqg98"))))
700 (native-inputs
701 `(("perl" ,perl)
702 ("qtdeclarative" ,qtdeclarative)))
703 (inputs `(("qtbase" ,qtbase)))))
704
705 (define-public qtmultimedia
706 (package (inherit qtsvg)
707 (name "qtmultimedia")
708 (version "5.7.0")
709 (source (origin
710 (method url-fetch)
711 (uri (string-append "https://download.qt.io/official_releases/qt/"
712 (version-major+minor version) "/" version
713 "/submodules/" name "-opensource-src-"
714 version ".tar.xz"))
715 (sha256
716 (base32
717 "0ndmhiflmyr144nq8drd5njsdi282ixsm4730q5n0ji2v9dp1bh5"))
718 (modules '((guix build utils)))
719 (snippet
720 '(begin
721 (delete-file-recursively
722 "examples/multimedia/spectrum/3rdparty")))))
723 (native-inputs
724 `(("perl" ,perl)
725 ("pkg-config" ,pkg-config)
726 ("python" ,python-2)
727 ("qtdeclarative" ,qtdeclarative)))
728 (inputs
729 `(("alsa-lib" ,alsa-lib)
730 ("mesa" ,mesa)
731 ("pulseaudio" ,pulseaudio)
732 ("qtbase" ,qtbase)))))
733
734 (define-public qtwayland
735 (package (inherit qtsvg)
736 (name "qtwayland")
737 (version "5.7.0")
738 (source (origin
739 (method url-fetch)
740 (uri (string-append "https://download.qt.io/official_releases/qt/"
741 (version-major+minor version) "/" version
742 "/submodules/" name "-opensource-src-"
743 version ".tar.xz"))
744 (sha256
745 (base32
746 "04dynjcr6gxi3hcqdf688a4hkabi2l17slpcx9k0f3dxygwcgf96"))))
747 (native-inputs
748 `(("glib" ,glib)
749 ("perl" ,perl)
750 ("pkg-config" ,pkg-config)
751 ("qtdeclarative" ,qtdeclarative)))
752 (inputs
753 `(("fontconfig" ,fontconfig)
754 ("freetype" ,freetype)
755 ("libx11" ,libx11)
756 ("libxcomposite" ,libxcomposite)
757 ("libxext" ,libxext)
758 ("libxkbcommon" ,libxkbcommon)
759 ("libxrender" ,libxrender)
760 ("mesa" ,mesa)
761 ("mtdev" ,mtdev)
762 ("qtbase" ,qtbase)
763 ("wayland" ,wayland)))))
764
765 (define-public qtserialport
766 (package (inherit qtsvg)
767 (name "qtserialport")
768 (version "5.7.0")
769 (source (origin
770 (method url-fetch)
771 (uri (string-append "https://download.qt.io/official_releases/qt/"
772 (version-major+minor version) "/" version
773 "/submodules/" name "-opensource-src-"
774 version ".tar.xz"))
775 (sha256
776 (base32
777 "0rc2l14s59qskp16wqlkizfai32s41qlm7a86r3qahx28gc51qaw"))))
778 (native-inputs `(("perl" ,perl)))
779 (inputs
780 `(("qtbase" ,qtbase)
781 ("eudev" ,eudev)))))
782
783 (define-public qtwebchannel
784 (package (inherit qtsvg)
785 (name "qtwebchannel")
786 (version "5.7.0")
787 (source (origin
788 (method url-fetch)
789 (uri (string-append "https://download.qt.io/official_releases/qt/"
790 (version-major+minor version) "/" version
791 "/submodules/" name "-opensource-src-"
792 version ".tar.xz"))
793 (sha256
794 (base32
795 "05lqfidlh1ahdd1j9y20p2037qbcq51zkdzj2m8fwhn7ghbwvd1s"))))
796 (native-inputs
797 `(("perl" ,perl)
798 ("qtdeclarative" ,qtdeclarative)
799 ("qtwebsockets" ,qtwebsockets)))
800 (inputs `(("qtbase" ,qtbase)))))
801
802 (define-public qtlocation
803 (package (inherit qtsvg)
804 (name "qtlocation")
805 (version "5.7.0")
806 (source (origin
807 (method url-fetch)
808 (uri (string-append "https://download.qt.io/official_releases/qt/"
809 (version-major+minor version) "/" version
810 "/submodules/" name "-opensource-src-"
811 version ".tar.xz"))
812 (sha256
813 (base32
814 "0rd898gndn41jrp78203lxd94ybfv693l0qg0myag4r46ikk69vh"))))
815 (native-inputs
816 `(("perl" ,perl)
817 ("qtdeclarative" ,qtdeclarative)
818 ("qtquickcontrols" ,qtquickcontrols)
819 ("qtserialport" ,qtserialport)))
820 (inputs `(("qtbase" ,qtbase)))))
821
822 (define-public qttools
823 (package (inherit qtsvg)
824 (name "qttools")
825 (version "5.7.0")
826 (source (origin
827 (method url-fetch)
828 (uri (string-append "https://download.qt.io/official_releases/qt/"
829 (version-major+minor version) "/" version
830 "/submodules/" name "-opensource-src-"
831 version ".tar.xz"))
832 (sha256
833 (base32
834 "004m9l7bgh7qnncbyl3d5fkggdrqx58ib21xv4hflvvarxrssibg"))))
835 (native-inputs
836 `(("perl" ,perl)
837 ("qtdeclarative" ,qtdeclarative)))
838 (inputs
839 `(("mesa" ,mesa)
840 ("qtbase" ,qtbase)))))
841
842 (define-public qtscript
843 (package (inherit qtsvg)
844 (name "qtscript")
845 (version "5.7.0")
846 (source (origin
847 (method url-fetch)
848 (uri (string-append "https://download.qt.io/official_releases/qt/"
849 (version-major+minor version) "/" version
850 "/submodules/" name "-opensource-src-"
851 version ".tar.xz"))
852 (sha256
853 (base32
854 "0040890p5ilyrmcpndz1hhp08x2ms5gw4lp4n5iax2a957yy2i4w"))))
855 (native-inputs
856 `(("perl" ,perl)
857 ("qttools" ,qttools)))
858 (inputs
859 `(("qtbase" ,qtbase)))))
860
861 (define-public qtquickcontrols
862 (package (inherit qtsvg)
863 (name "qtquickcontrols")
864 (version "5.7.0")
865 (source (origin
866 (method url-fetch)
867 (uri (string-append "https://download.qt.io/official_releases/qt/"
868 (version-major+minor version) "/" version
869 "/submodules/" name "-opensource-src-"
870 version ".tar.xz"))
871 (sha256
872 (base32
873 "0cpcrmz9n5b4bgmshmk093lirl9xwqb23inchnai1zqg21vrmqfq"))))
874 (inputs
875 `(("qtbase" ,qtbase)
876 ("qtdeclarative" ,qtdeclarative)))))
877
878 (define-public qtquickcontrols2
879 (package (inherit qtsvg)
880 (name "qtquickcontrols2")
881 (version "5.7.0")
882 (source (origin
883 (method url-fetch)
884 (uri (string-append "https://download.qt.io/official_releases/qt/"
885 (version-major+minor version) "/" version
886 "/submodules/" name "-opensource-src-"
887 version ".tar.xz"))
888 (sha256
889 (base32
890 "0i8h933vhvx1bmniqdx0idg6vk82w9byd3dq0bb2phwjg5vv1xb3"))))
891 (inputs
892 `(("qtbase" ,qtbase)
893 ("qtdeclarative" ,qtdeclarative)))))
894
895 (define-public qtgraphicaleffects
896 (package (inherit qtsvg)
897 (name "qtgraphicaleffects")
898 (version "5.7.0")
899 (source (origin
900 (method url-fetch)
901 (uri (string-append "https://download.qt.io/official_releases/qt/"
902 (version-major+minor version) "/" version
903 "/submodules/" name "-opensource-src-"
904 version ".tar.xz"))
905 (sha256
906 (base32
907 "1rwdjg5mk6xpadmxfq64xfp573zp5lrj9illb9105ra5wff565n8"))))
908 (inputs
909 `(("qtbase" ,qtbase)
910 ("qtdeclarative" ,qtdeclarative)))))
911
912 (define-public python-sip
913 (package
914 (name "python-sip")
915 (version "4.18")
916 (source
917 (origin
918 (method url-fetch)
919 (uri
920 (string-append "mirror://sourceforge/pyqt/sip/"
921 "sip-" version "/sip-" version ".tar.gz"))
922 (sha256
923 (base32
924 "1dlw4kyiwd9bzmd1djm79c121r219abaz86lvizdk6ksq20mrp7i"))))
925 (build-system gnu-build-system)
926 (native-inputs
927 `(("python" ,python-wrapper)))
928 (arguments
929 `(#:tests? #f ; no check target
930 #:modules ((srfi srfi-1)
931 ,@%gnu-build-system-modules)
932 #:phases
933 (modify-phases %standard-phases
934 (replace 'configure
935 (lambda* (#:key inputs outputs #:allow-other-keys)
936 (let* ((out (assoc-ref outputs "out"))
937 (bin (string-append out "/bin"))
938 (include (string-append out "/include"))
939 (python (assoc-ref inputs "python"))
940 (python-version
941 (last (string-split python #\-)))
942 (python-major+minor
943 (string-join
944 (take (string-split python-version #\.) 2)
945 "."))
946 (lib (string-append out "/lib/python"
947 python-major+minor
948 "/site-packages")))
949 (zero?
950 (system* "python" "configure.py"
951 "--bindir" bin
952 "--destdir" lib
953 "--incdir" include))))))))
954 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
955 (synopsis "Python binding creator for C and C++ libraries")
956 (description
957 "SIP is a tool to create Python bindings for C and C++ libraries. It
958 was originally developed to create PyQt, the Python bindings for the Qt
959 toolkit, but can be used to create bindings for any C or C++ library.
960
961 SIP comprises a code generator and a Python module. The code generator
962 processes a set of specification files and generates C or C++ code, which
963 is then compiled to create the bindings extension module. The SIP Python
964 module provides support functions to the automatically generated code.")
965 ;; There is a choice between a python like license, gpl2 and gpl3.
966 ;; For compatibility with pyqt, we need gpl3.
967 (license license:gpl3)))
968
969 (define-public python2-sip
970 (package (inherit python-sip)
971 (name "python2-sip")
972 (native-inputs
973 `(("python" ,python-2)))))
974
975 (define-public python-pyqt
976 (package
977 (name "python-pyqt")
978 (version "5.6")
979 (source
980 (origin
981 (method url-fetch)
982 (uri
983 (string-append "mirror://sourceforge/pyqt/PyQt5/"
984 "PyQt-" version "/PyQt5_gpl-"
985 version ".tar.gz"))
986 (sha256
987 (base32
988 "1qgh42zsr9jppl9k7fcdbhxcd1wrb7wyaj9lng9nxfa19in1lj1f"))
989 (patches (search-patches "pyqt-configure.patch"))))
990 (build-system gnu-build-system)
991 (native-inputs
992 `(("python-sip" ,python-sip)
993 ("qtbase" ,qtbase))) ; for qmake
994 (inputs
995 `(("python" ,python-wrapper)
996 ("qtbase" ,qtbase)
997 ("qtconnectivity" ,qtconnectivity)
998 ("qtdeclarative" ,qtdeclarative)
999 ("qtlocation" ,qtlocation)
1000 ("qtmultimedia" ,qtmultimedia)
1001 ("qtsensors" ,qtsensors)
1002 ("qtserialport" ,qtserialport)
1003 ("qtsvg" ,qtsvg)
1004 ("qttools" ,qttools)
1005 ("qtwebchannel" ,qtwebchannel)
1006 ("qtwebkit" ,qtwebkit)
1007 ("qtwebsockets" ,qtwebsockets)
1008 ("qtx11extras" ,qtx11extras)
1009 ("qtxmlpatterns" ,qtxmlpatterns)))
1010 (arguments
1011 `(#:modules ((srfi srfi-1)
1012 ,@%gnu-build-system-modules)
1013 #:phases
1014 (modify-phases %standard-phases
1015 (replace 'configure
1016 (lambda* (#:key inputs outputs #:allow-other-keys)
1017 (let* ((out (assoc-ref outputs "out"))
1018 (bin (string-append out "/bin"))
1019 (sip (string-append out "/share/sip"))
1020 (plugins (string-append out "/plugins"))
1021 (designer (string-append plugins "/designer"))
1022 (qml (string-append plugins "/PyQt5"))
1023 (python (assoc-ref inputs "python"))
1024 (python-version
1025 (last (string-split python #\-)))
1026 (python-major+minor
1027 (string-join
1028 (take (string-split python-version #\.) 2)
1029 "."))
1030 (lib (string-append out "/lib/python"
1031 python-major+minor
1032 "/site-packages"))
1033 (stubs (string-append lib "/PyQt5")))
1034 (zero? (system* "python" "configure.py"
1035 "--confirm-license"
1036 "--bindir" bin
1037 "--destdir" lib
1038 "--designer-plugindir" designer
1039 "--qml-plugindir" qml
1040 ; Where to install the PEP 484 Type Hints stub
1041 ; files. Without this the stubs are tried to be
1042 ; installed into the python package's
1043 ; site-package directory, which is read-only.
1044 "--stubsdir" stubs
1045 "--sipdir" sip))))))))
1046 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1047 (synopsis "Python bindings for Qt")
1048 (description
1049 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1050 framework. The bindings are implemented as a set of Python modules and
1051 contain over 620 classes.")
1052 (license license:gpl3)))
1053
1054 (define-public python2-pyqt
1055 (package (inherit python-pyqt)
1056 (name "python2-pyqt")
1057 (native-inputs
1058 `(("python-sip" ,python2-sip)
1059 ("qtbase" ,qtbase)))
1060 (inputs
1061 `(("python" ,python-2)
1062 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1063
1064 (define-public python-pyqt-4
1065 (package (inherit python-pyqt)
1066 (name "python-pyqt")
1067 (version "4.11.4")
1068 (source
1069 (origin
1070 (method url-fetch)
1071 (uri
1072 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1073 "PyQt-" version "/PyQt-x11-gpl-"
1074 version ".tar.gz"))
1075 (sha256
1076 (base32
1077 "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
1078 (native-inputs
1079 `(("python-sip" ,python-sip)
1080 ("qt" ,qt-4)))
1081 (inputs `(("python" ,python-wrapper)))
1082 (arguments
1083 `(#:tests? #f ; no check target
1084 #:modules ((srfi srfi-1)
1085 ,@%gnu-build-system-modules)
1086 #:phases
1087 (modify-phases %standard-phases
1088 (replace 'configure
1089 (lambda* (#:key inputs outputs #:allow-other-keys)
1090 (let* ((out (assoc-ref outputs "out"))
1091 (bin (string-append out "/bin"))
1092 (sip (string-append out "/share/sip"))
1093 (python (assoc-ref inputs "python"))
1094 (python-version
1095 (last (string-split python #\-)))
1096 (python-major+minor
1097 (string-join
1098 (take (string-split python-version #\.) 2)
1099 "."))
1100 (lib (string-append out "/lib/python"
1101 python-major+minor
1102 "/site-packages")))
1103 (zero? (system* "python" "configure.py"
1104 "--confirm-license"
1105 "--bindir" bin
1106 "--destdir" lib
1107 "--sipdir" sip))))))))
1108 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1109
1110 (define-public python2-pyqt-4
1111 (package (inherit python-pyqt-4)
1112 (name "python2-pyqt")
1113 (native-inputs
1114 `(("python-sip" ,python2-sip)
1115 ("qt" ,qt-4)))
1116 (inputs
1117 `(("python" ,python-2)))))
1118
1119 (define-public qtkeychain
1120 (package
1121 (name "qtkeychain")
1122 (version "0.7.0")
1123 (source
1124 (origin
1125 (method url-fetch)
1126 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1127 "archive/v" version ".tar.gz"))
1128 (file-name (string-append name "-" version ".tar.gz"))
1129 (sha256
1130 (base32 "0fka5q5cdzlf79igcjgbnb2smvwbwfasqawkzkbr34whispgm6lz"))))
1131 (build-system cmake-build-system)
1132 (native-inputs
1133 `(("qttools" ,qttools)))
1134 (inputs
1135 `(("qtbase" ,qtbase)))
1136 (arguments
1137 `(#:tests? #f ; No tests included
1138 #:phases
1139 (modify-phases %standard-phases
1140 (add-before
1141 'configure 'set-qt-trans-dir
1142 (lambda _
1143 (substitute* "CMakeLists.txt"
1144 (("\\$\\{qt_translations_dir\\}")
1145 "${CMAKE_INSTALL_PREFIX}/share/qt/translations")))))))
1146 (home-page "https://github.com/frankosterfeld/qtkeychain")
1147 (synopsis "Qt API to store passwords")
1148 (description
1149 "QtKeychain is a Qt library to store passwords and other secret data
1150 securely. It will not store any data unencrypted unless explicitly requested.")
1151 (license license:bsd-3)))
1152
1153 (define-public qwt
1154 (package
1155 (name "qwt")
1156 (version "6.1.3")
1157 (source
1158 (origin
1159 (method url-fetch)
1160 (uri
1161 (string-append "mirror://sourceforge/qwt/qwt/"
1162 version "/qwt-" version ".tar.bz2"))
1163 (sha256
1164 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1165 (build-system gnu-build-system)
1166 (inputs
1167 `(("qtbase" ,qtbase)
1168 ("qtsvg" ,qtsvg)
1169 ("qttools" ,qttools)))
1170 (arguments
1171 `(#:phases
1172 (modify-phases %standard-phases
1173 (replace 'configure
1174 (lambda* (#:key outputs #:allow-other-keys)
1175 (let ((out (assoc-ref outputs "out")))
1176 (substitute* '("qwtconfig.pri")
1177 (("/usr/local/qwt-\\$\\$QWT\\_VERSION") out))
1178 (zero? (system* "qmake")))))
1179 (add-after 'install 'install-documentation
1180 (lambda* (#:key outputs #:allow-other-keys)
1181 (let* ((out (assoc-ref outputs "out"))
1182 (man (string-append out "/share/man")))
1183 ;; Remove some incomplete manual pages.
1184 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1185 (mkdir-p man)
1186 (copy-recursively "doc/man" man)
1187 #t))))))
1188 (home-page "http://qwt.sourceforge.net")
1189 (synopsis "Qt widgets for plots, scales, dials and other technical software
1190 GUI components")
1191 (description
1192 "The Qwt library contains widgets and components which are primarily useful
1193 for technical and scientific purposes. It includes a 2-D plotting widget,
1194 different kinds of sliders, and much more.")
1195 (license
1196 (list
1197 ;; The Qwt license is LGPL2.1 with some exceptions.
1198 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1199 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1200 license:lgpl2.1 license:gpl3))))
1201
1202 (define-public qtwebkit
1203 (package
1204 (name "qtwebkit")
1205 (version "5.7.0")
1206 (source
1207 (origin
1208 (method url-fetch)
1209 (uri (string-append "http://download.qt.io/community_releases/"
1210 (version-major+minor version)
1211 "/" version "/qtwebkit-opensource-src-" version
1212 ".tar.xz"))
1213 ;; Note: since Qt 5.6, Qt no longer officially supports qtwebkit:
1214 ;; <http://lists.qt-project.org/pipermail/development/2016-May/025923.html>.
1215 (sha256
1216 (base32
1217 "1prlpl3zslzpr1iv7m3irvxjxn3v8nlxh21v9k2kaq4fpwy2b8y7"))))
1218 (build-system gnu-build-system)
1219 (native-inputs
1220 `(("perl" ,perl)
1221 ("python" ,python-2.7)
1222 ("ruby" ,ruby)
1223 ("bison" ,bison)
1224 ("flex" ,flex)
1225 ("gperf" ,gperf)
1226 ("pkg-config" ,pkg-config)))
1227 (inputs
1228 `(("icu" ,icu4c)
1229 ("libjpeg" ,libjpeg)
1230 ("libpng" ,libpng)
1231 ("libwebp" ,libwebp)
1232 ("sqlite" ,sqlite)
1233 ("fontconfig" ,fontconfig)
1234 ("libxrender", libxrender)
1235 ("qtbase" ,qtbase)
1236 ("qtdeclarative" ,qtdeclarative)
1237 ("qtmultimedia" ,qtmultimedia)
1238 ("libxml2" ,libxml2)
1239 ("libxslt" ,libxslt)
1240 ("libx11" ,libx11)
1241 ("libxcomposite" ,libxcomposite)))
1242 (arguments
1243 `(#:phases
1244 (modify-phases %standard-phases
1245 (replace 'configure
1246 (lambda* (#:key outputs #:allow-other-keys)
1247 (let ((out (assoc-ref outputs "out")))
1248 (setenv "QMAKEPATH"
1249 (string-append (getcwd) "/Tools/qmake:"
1250 (getenv "QMAKEPATH")))
1251 (system* "qmake"))))
1252 ;; prevent webkit from trying to install into the qtbase store directory,
1253 ;; and replace references to the build directory in linker options:
1254 (add-before 'build 'patch-installpaths
1255 (lambda* (#:key outputs inputs #:allow-other-keys)
1256 (let* ((out (assoc-ref outputs "out"))
1257 (qtbase (assoc-ref inputs "qtbase"))
1258 (builddir (getcwd))
1259 (linkbuild (string-append "-L" builddir))
1260 (linkout (string-append "-L" out))
1261 (makefiles
1262 (map-in-order
1263 (lambda (i)
1264 (let* ((in (car i))
1265 (mf (string-append (dirname in) "/"
1266 (cdr i))))
1267 ;; by default, these Makefiles are
1268 ;; generated during install, but we need
1269 ;; to generate them now
1270 (system* "qmake" in "-o" mf)
1271 mf))
1272 '(("Source/api.pri" . "Makefile.api")
1273 ("Source/widgetsapi.pri"
1274 . "Makefile.widgetsapi")
1275 ("Source/WebKit2/WebProcess.pro"
1276 . "Makefile.WebProcess")
1277 ("Source/WebKit2/PluginProcess.pro"
1278 . "Makefile.PluginProcess")
1279 ("Source/WebKit/qt/declarative/public.pri"
1280 . "Makefile.declarative.public")
1281 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
1282 . "Makefile.declarative.experimental")
1283 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
1284 . "Makefile")))))
1285 ;; Order of qmake calls and substitutions matters here.
1286 (system* "qmake" "-prl" "Source/widgetsapi.pri"
1287 "-o" "Source/Makefile")
1288 (substitute* (find-files "lib" "libQt5.*\\.prl")
1289 ((linkbuild) linkout))
1290 (substitute* (find-files "lib"
1291 "libQt5WebKit.*\\.la")
1292 (("libdir='.*'")
1293 (string-append "libdir='" out "/lib'"))
1294 ((linkbuild) linkout))
1295 (substitute* (find-files "lib/pkgconfig"
1296 "Qt5WebKit.*\\.pc")
1297 (((string-append "prefix=" qtbase))
1298 (string-append "prefix=" out))
1299 ((linkbuild) linkout))
1300 ;; Makefiles must be modified after .prl/.la/.pc
1301 ;; files, lest they get rebuilt:
1302 (substitute* makefiles
1303 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
1304 out )
1305 (((string-append "-Wl,-rpath," builddir))
1306 (string-append "-Wl,-rpath," out)))))))))
1307 (home-page "https://www.webkit.org")
1308 (synopsis "Web browser engine and classes to render and interact with web
1309 content")
1310 (description "QtWebKit provides a Web browser engine that makes it easy to
1311 embed content from the World Wide Web into your Qt application. At the same
1312 time Web content can be enhanced with native controls.")
1313
1314 (license license:lgpl2.1+)))