gnu: python-pyqt-5.5: Use non-inherited "configure" phase.
[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 (arguments
997 `(#:modules ((srfi srfi-1)
998 ,@%gnu-build-system-modules)
999 #:phases
1000 (modify-phases %standard-phases
1001 (replace 'configure
1002 (lambda* (#:key inputs outputs #:allow-other-keys)
1003 (let* ((out (assoc-ref outputs "out"))
1004 (bin (string-append out "/bin"))
1005 (sip (string-append out "/share/sip"))
1006 (plugins (string-append out "/plugins"))
1007 (designer (string-append plugins "/designer"))
1008 (qml (string-append plugins "/PyQt5"))
1009 (python (assoc-ref inputs "python"))
1010 (python-version
1011 (last (string-split python #\-)))
1012 (python-major+minor
1013 (string-join
1014 (take (string-split python-version #\.) 2)
1015 "."))
1016 (lib (string-append out "/lib/python"
1017 python-major+minor
1018 "/site-packages")))
1019 (zero? (system* "python" "configure.py"
1020 "--confirm-license"
1021 "--bindir" bin
1022 "--destdir" lib
1023 "--designer-plugindir" designer
1024 "--qml-plugindir" qml
1025 "--sipdir" sip))))))))
1026 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1027 (synopsis "Python bindings for Qt")
1028 (description
1029 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1030 framework. The bindings are implemented as a set of Python modules and
1031 contain over 620 classes.")
1032 (license license:gpl3)))
1033
1034 (define-public python2-pyqt
1035 (package (inherit python-pyqt)
1036 (name "python2-pyqt")
1037 (native-inputs
1038 `(("python-sip" ,python2-sip)
1039 ("qtbase" ,qtbase)))
1040 (inputs
1041 `(("python" ,python-2)))))
1042
1043 (define-public python-pyqt-5.5
1044 (package (inherit python-pyqt)
1045 (version "5.5")
1046 (source
1047 (origin
1048 (method url-fetch)
1049 (uri
1050 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1051 "PyQt-" version "/PyQt-gpl-"
1052 version ".tar.gz"))
1053 (sha256
1054 (base32
1055 "056qmkv02wdcfblqdaxiswrgn4wa88sz22i1x58dpb1iniavplfd"))
1056 (patches (search-patches "pyqt-configure.patch"))))
1057 (arguments
1058 `(#:modules ((srfi srfi-1)
1059 ,@%gnu-build-system-modules)
1060 #:phases
1061 (modify-phases %standard-phases
1062 (replace 'configure
1063 (lambda* (#:key inputs outputs #:allow-other-keys)
1064 (let* ((out (assoc-ref outputs "out"))
1065 (bin (string-append out "/bin"))
1066 (sip (string-append out "/share/sip"))
1067 (plugins (string-append out "/plugins"))
1068 (designer (string-append plugins "/designer"))
1069 (qml (string-append plugins "/PyQt5"))
1070 (python (assoc-ref inputs "python"))
1071 (python-version
1072 (last (string-split python #\-)))
1073 (python-major+minor
1074 (string-join
1075 (take (string-split python-version #\.) 2)
1076 "."))
1077 (lib (string-append out "/lib/python"
1078 python-major+minor
1079 "/site-packages")))
1080 (zero? (system* "python" "configure.py"
1081 "--confirm-license"
1082 "--bindir" bin
1083 "--destdir" lib
1084 "--designer-plugindir" designer
1085 "--qml-plugindir" qml
1086 "--sipdir" sip))))))))
1087 (native-inputs
1088 `(("python-sip" ,python-sip)
1089 ("qt" ,qt)))))
1090
1091 (define-public python2-pyqt-5.5
1092 (package (inherit python-pyqt-5.5)
1093 (name "python2-pyqt")
1094 (native-inputs
1095 `(("python-sip" ,python2-sip)
1096 ("qt" ,qt)))
1097 (inputs
1098 `(("python" ,python-2)))))
1099
1100 (define-public python-pyqt-4
1101 (package (inherit python-pyqt)
1102 (name "python-pyqt")
1103 (version "4.11.4")
1104 (source
1105 (origin
1106 (method url-fetch)
1107 (uri
1108 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1109 "PyQt-" version "/PyQt-x11-gpl-"
1110 version ".tar.gz"))
1111 (sha256
1112 (base32
1113 "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
1114 (native-inputs
1115 `(("python-sip" ,python-sip)
1116 ("qt" ,qt-4)))
1117 (arguments
1118 `(#:tests? #f ; no check target
1119 #:modules ((srfi srfi-1)
1120 ,@%gnu-build-system-modules)
1121 #:phases
1122 (alist-replace
1123 'configure
1124 (lambda* (#:key inputs outputs #:allow-other-keys)
1125 (let* ((out (assoc-ref outputs "out"))
1126 (bin (string-append out "/bin"))
1127 (sip (string-append out "/share/sip"))
1128 (python (assoc-ref inputs "python"))
1129 (python-version
1130 (last (string-split python #\-)))
1131 (python-major+minor
1132 (string-join
1133 (take (string-split python-version #\.) 2)
1134 "."))
1135 (lib (string-append out "/lib/python"
1136 python-major+minor
1137 "/site-packages")))
1138 (zero? (system* "python" "configure.py"
1139 "--confirm-license"
1140 "--bindir" bin
1141 "--destdir" lib
1142 "--sipdir" sip))))
1143 %standard-phases)))
1144 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1145
1146 (define-public python2-pyqt-4
1147 (package (inherit python-pyqt-4)
1148 (name "python2-pyqt")
1149 (native-inputs
1150 `(("python-sip" ,python2-sip)
1151 ("qt" ,qt-4)))
1152 (inputs
1153 `(("python" ,python-2)))))
1154
1155 (define-public qtkeychain
1156 (package
1157 (name "qtkeychain")
1158 (version "0.7.0")
1159 (source
1160 (origin
1161 (method url-fetch)
1162 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1163 "archive/v" version ".tar.gz"))
1164 (file-name (string-append name "-" version ".tar.gz"))
1165 (sha256
1166 (base32 "0fka5q5cdzlf79igcjgbnb2smvwbwfasqawkzkbr34whispgm6lz"))))
1167 (build-system cmake-build-system)
1168 (native-inputs
1169 `(("qttools" ,qttools)))
1170 (inputs
1171 `(("qtbase" ,qtbase)))
1172 (arguments
1173 `(#:tests? #f ; No tests included
1174 #:phases
1175 (modify-phases %standard-phases
1176 (add-before
1177 'configure 'set-qt-trans-dir
1178 (lambda _
1179 (substitute* "CMakeLists.txt"
1180 (("\\$\\{qt_translations_dir\\}")
1181 "${CMAKE_INSTALL_PREFIX}/share/qt/translations")))))))
1182 (home-page "https://github.com/frankosterfeld/qtkeychain")
1183 (synopsis "Qt API to store passwords")
1184 (description
1185 "QtKeychain is a Qt library to store passwords and other secret data
1186 securely. It will not store any data unencrypted unless explicitly requested.")
1187 (license license:bsd-3)))
1188
1189 (define-public qwt
1190 (package
1191 (name "qwt")
1192 (version "6.1.3")
1193 (source
1194 (origin
1195 (method url-fetch)
1196 (uri
1197 (string-append "mirror://sourceforge/qwt/qwt/"
1198 version "/qwt-" version ".tar.bz2"))
1199 (sha256
1200 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1201 (build-system gnu-build-system)
1202 (inputs
1203 `(("qtbase" ,qtbase)
1204 ("qtsvg" ,qtsvg)
1205 ("qttools" ,qttools)))
1206 (arguments
1207 `(#:phases
1208 (modify-phases %standard-phases
1209 (replace 'configure
1210 (lambda* (#:key outputs #:allow-other-keys)
1211 (let ((out (assoc-ref outputs "out")))
1212 (substitute* '("qwtconfig.pri")
1213 (("/usr/local/qwt-\\$\\$QWT\\_VERSION") out))
1214 (zero? (system* "qmake")))))
1215 (add-after 'install 'install-documentation
1216 (lambda* (#:key outputs #:allow-other-keys)
1217 (let* ((out (assoc-ref outputs "out"))
1218 (man (string-append out "/share/man")))
1219 ;; Remove some incomplete manual pages.
1220 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1221 (mkdir-p man)
1222 (copy-recursively "doc/man" man)
1223 #t))))))
1224 (home-page "http://qwt.sourceforge.net")
1225 (synopsis "Qt widgets for plots, scales, dials and other technical software
1226 GUI components")
1227 (description
1228 "The Qwt library contains widgets and components which are primarily useful
1229 for technical and scientific purposes. It includes a 2-D plotting widget,
1230 different kinds of sliders, and much more.")
1231 (license
1232 (list
1233 ;; The Qwt license is LGPL2.1 with some exceptions.
1234 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1235 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1236 license:lgpl2.1 license:gpl3))))
1237
1238 (define-public qtwebkit
1239 (package
1240 (name "qtwebkit")
1241 (version "5.7.0")
1242 (source
1243 (origin
1244 (method url-fetch)
1245 (uri (string-append "http://download.qt.io/community_releases/"
1246 (version-major+minor version)
1247 "/" version "/qtwebkit-opensource-src-" version
1248 ".tar.xz"))
1249 ;; Note: since Qt 5.6, Qt no longer officially supports qtwebkit:
1250 ;; <http://lists.qt-project.org/pipermail/development/2016-May/025923.html>.
1251 (sha256
1252 (base32
1253 "1prlpl3zslzpr1iv7m3irvxjxn3v8nlxh21v9k2kaq4fpwy2b8y7"))))
1254 (build-system gnu-build-system)
1255 (native-inputs
1256 `(("perl" ,perl)
1257 ("python" ,python-2.7)
1258 ("ruby" ,ruby)
1259 ("bison" ,bison)
1260 ("flex" ,flex)
1261 ("gperf" ,gperf)
1262 ("pkg-config" ,pkg-config)))
1263 (inputs
1264 `(("icu" ,icu4c)
1265 ("libjpeg" ,libjpeg)
1266 ("libpng" ,libpng)
1267 ("libwebp" ,libwebp)
1268 ("sqlite" ,sqlite)
1269 ("fontconfig" ,fontconfig)
1270 ("libxrender", libxrender)
1271 ("qtbase" ,qtbase)
1272 ("qtdeclarative" ,qtdeclarative)
1273 ("qtmultimedia" ,qtmultimedia)
1274 ("libxml2" ,libxml2)
1275 ("libxslt" ,libxslt)
1276 ("libx11" ,libx11)
1277 ("libxcomposite" ,libxcomposite)))
1278 (arguments
1279 `(#:phases
1280 (modify-phases %standard-phases
1281 (replace 'configure
1282 (lambda* (#:key outputs #:allow-other-keys)
1283 (let ((out (assoc-ref outputs "out")))
1284 (setenv "QMAKEPATH"
1285 (string-append (getcwd) "/Tools/qmake:"
1286 (getenv "QMAKEPATH")))
1287 (system* "qmake"))))
1288 ;; prevent webkit from trying to install into the qtbase store directory,
1289 ;; and replace references to the build directory in linker options:
1290 (add-before 'build 'patch-installpaths
1291 (lambda* (#:key outputs inputs #:allow-other-keys)
1292 (let* ((out (assoc-ref outputs "out"))
1293 (qtbase (assoc-ref inputs "qtbase"))
1294 (builddir (getcwd))
1295 (linkbuild (string-append "-L" builddir))
1296 (linkout (string-append "-L" out))
1297 (makefiles
1298 (map-in-order
1299 (lambda (i)
1300 (let* ((in (car i))
1301 (mf (string-append (dirname in) "/"
1302 (cdr i))))
1303 ;; by default, these Makefiles are
1304 ;; generated during install, but we need
1305 ;; to generate them now
1306 (system* "qmake" in "-o" mf)
1307 mf))
1308 '(("Source/api.pri" . "Makefile.api")
1309 ("Source/widgetsapi.pri"
1310 . "Makefile.widgetsapi")
1311 ("Source/WebKit2/WebProcess.pro"
1312 . "Makefile.WebProcess")
1313 ("Source/WebKit2/PluginProcess.pro"
1314 . "Makefile.PluginProcess")
1315 ("Source/WebKit/qt/declarative/public.pri"
1316 . "Makefile.declarative.public")
1317 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
1318 . "Makefile.declarative.experimental")
1319 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
1320 . "Makefile")))))
1321 ;; Order of qmake calls and substitutions matters here.
1322 (system* "qmake" "-prl" "Source/widgetsapi.pri"
1323 "-o" "Source/Makefile")
1324 (substitute* (find-files "lib" "libQt5.*\\.prl")
1325 ((linkbuild) linkout))
1326 (substitute* (find-files "lib"
1327 "libQt5WebKit.*\\.la")
1328 (("libdir='.*'")
1329 (string-append "libdir='" out "/lib'"))
1330 ((linkbuild) linkout))
1331 (substitute* (find-files "lib/pkgconfig"
1332 "Qt5WebKit.*\\.pc")
1333 (((string-append "prefix=" qtbase))
1334 (string-append "prefix=" out))
1335 ((linkbuild) linkout))
1336 ;; Makefiles must be modified after .prl/.la/.pc
1337 ;; files, lest they get rebuilt:
1338 (substitute* makefiles
1339 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
1340 out )
1341 (((string-append "-Wl,-rpath," builddir))
1342 (string-append "-Wl,-rpath," out)))))))))
1343 (home-page "https://www.webkit.org")
1344 (synopsis "Web browser engine and classes to render and interact with web
1345 content")
1346 (description "QtWebKit provides a Web browser engine that makes it easy to
1347 embed content from the World Wide Web into your Qt application. At the same
1348 time Web content can be enhanced with native controls.")
1349
1350 (license license:lgpl2.1+)))