gnu: qt: Update to 5.9.2.

* gnu/packages/qt.scm (qt): Update to 5.9.2.
[outputs]: Add 'examples'.
[source]: Update 3rd party code to unbundle.
[inputs]: Add bluez, double-conversion, gstreamer, gst-plugins-base,
jasper, libinput-minimal, libtiff, libwebp, libxext, wayland. Replace
pcre with pcre2.
[arguments]: Re-enable parallel building. Update build flags.
This commit is contained in:
Efraim Flashner 2017-10-12 19:53:31 +03:00
parent aad8a14300
commit 5acd59ee12
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -100,7 +100,8 @@ (define-public grantlee
(define-public qt (define-public qt
(package (package
(name "qt") (name "qt")
(version "5.6.2") (version "5.9.2")
(outputs '("out" "examples"))
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (uri
@ -112,7 +113,7 @@ (define-public qt
version ".tar.xz")) version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"1cw93mrlkqbwndfqyjpsvjzkpzi39px2is040xvk18mvg3y1prl3")) "1zr0hvhryn2ada53ln7cycymh602cncli86n291bsgzas6j72qbc"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin '(begin
@ -124,32 +125,52 @@ (define-public qt
;; Alternatively, we could use the "-skip qtwebengine" ;; Alternatively, we could use the "-skip qtwebengine"
;; configuration option. ;; configuration option.
(delete-file-recursively "qtwebengine") (delete-file-recursively "qtwebengine")
;; Remove one of the two bundled harfbuzz copies in addition ;; The following snippets are copied from their mondular-qt counterparts.
;; to passing "-system-harfbuzz". (for-each
(delete-file-recursively "qtbase/src/3rdparty/harfbuzz-ng") (lambda (dir)
;; Remove the bundled sqlite copy in addition to (delete-file-recursively (string-append "qtbase/src/3rdparty/" dir)))
;; passing "-system-sqlite". (list "double-conversion" "freetype" "harfbuzz-ng"
(delete-file-recursively "qtbase/src/3rdparty/sqlite"))))) "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
"xkbcommon" "zlib"))
(for-each
(lambda (dir)
(delete-file-recursively dir))
(list "qtimageformats/src/3rdparty"
"qtmultimedia/examples/multimedia/spectrum/3rdparty"
"qtwayland/examples"
"qtcanvas3d/examples/canvas3d/3rdparty"))
;; Tests depend on this example, which depends on the 3rd party code.
(substitute* "qtmultimedia/examples/multimedia/multimedia.pro"
(("spectrum") "#"))))))
(build-system gnu-build-system) (build-system gnu-build-system)
(propagated-inputs (propagated-inputs
`(("mesa" ,mesa))) `(("mesa" ,mesa)))
(inputs (inputs
`(("alsa-lib" ,alsa-lib) `(("alsa-lib" ,alsa-lib)
("dbus" ,dbus) ("bluez" ,bluez)
("cups" ,cups) ("cups" ,cups)
("dbus" ,dbus)
("double-conversion" ,double-conversion)
("expat" ,expat) ("expat" ,expat)
("fontconfig" ,fontconfig) ("fontconfig" ,fontconfig)
("freetype" ,freetype) ("freetype" ,freetype)
("glib" ,glib) ("glib" ,glib)
("gstreamer" ,gstreamer)
("gst-plugins-base" ,gst-plugins-base)
("harfbuzz" ,harfbuzz) ("harfbuzz" ,harfbuzz)
("icu4c" ,icu4c) ("icu4c" ,icu4c)
("jasper" ,jasper)
("libinput" ,libinput-minimal)
("libjpeg" ,libjpeg) ("libjpeg" ,libjpeg)
("libmng" ,libmng) ("libmng" ,libmng)
("libpci" ,pciutils) ("libpci" ,pciutils)
("libpng" ,libpng) ("libpng" ,libpng)
("libtiff" ,libtiff)
("libwebp" ,libwebp)
("libx11" ,libx11) ("libx11" ,libx11)
("libxcomposite" ,libxcomposite) ("libxcomposite" ,libxcomposite)
("libxcursor" ,libxcursor) ("libxcursor" ,libxcursor)
("libxext" ,libxext)
("libxfixes" ,libxfixes) ("libxfixes" ,libxfixes)
("libxi" ,libxi) ("libxi" ,libxi)
("libxinerama" ,libxinerama) ("libxinerama" ,libxinerama)
@ -165,10 +186,11 @@ (define-public qt
("openssl" ,openssl) ("openssl" ,openssl)
("postgresql" ,postgresql) ("postgresql" ,postgresql)
("pulseaudio" ,pulseaudio) ("pulseaudio" ,pulseaudio)
("pcre" ,pcre) ("pcre2" ,pcre2)
("sqlite" ,sqlite) ("sqlite" ,sqlite)
("udev" ,eudev) ("udev" ,eudev)
("unixodbc" ,unixodbc) ("unixodbc" ,unixodbc)
("wayland" ,wayland)
("xcb-util" ,xcb-util) ("xcb-util" ,xcb-util)
("xcb-util-image" ,xcb-util-image) ("xcb-util-image" ,xcb-util-image)
("xcb-util-keysyms" ,xcb-util-keysyms) ("xcb-util-keysyms" ,xcb-util-keysyms)
@ -185,24 +207,19 @@ (define-public qt
("ruby" ,ruby) ("ruby" ,ruby)
("which" ,(@ (gnu packages base) which)))) ("which" ,(@ (gnu packages base) which))))
(arguments (arguments
`(;; FIXME: Disabling parallel building is a quick hack to avoid the `(#:phases
;; failure described in
;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
;; A more structural fix is needed.
#:parallel-build? #f
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'configure 'patch-bin-sh (add-after 'configure 'patch-bin-sh
(lambda _ (lambda _
(substitute* '("qtbase/config.status" (substitute* '("qtbase/configure"
"qtbase/configure"
"qtbase/mkspecs/features/qt_functions.prf" "qtbase/mkspecs/features/qt_functions.prf"
"qtbase/qmake/library/qmakebuiltins.cpp") "qtbase/qmake/library/qmakebuiltins.cpp")
(("/bin/sh") (which "sh"))) (("/bin/sh") (which "sh")))
#t)) #t))
(replace 'configure (replace 'configure
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out"))
(examples (assoc-ref outputs "examples")))
(substitute* '("configure" "qtbase/configure") (substitute* '("configure" "qtbase/configure")
(("/bin/pwd") (which "pwd"))) (("/bin/pwd") (which "pwd")))
(substitute* "qtbase/src/corelib/global/global.pri" (substitute* "qtbase/src/corelib/global/global.pri"
@ -213,12 +230,12 @@ (define-public qt
"./configure" "./configure"
"-verbose" "-verbose"
"-prefix" out "-prefix" out
"-examplesdir" examples ; 89MiB
"-opensource" "-opensource"
"-confirm-license" "-confirm-license"
;; Do not build examples; if desired, these could go ;; Do not build examples; for the time being, we
;; into a separate output, but for the time being, we
;; prefer to save the space and build time. ;; prefer to save the space and build time.
"-nomake" "examples" "-no-compile-examples"
;; Most "-system-..." are automatic, but some use ;; Most "-system-..." are automatic, but some use
;; the bundled copy by default. ;; the bundled copy by default.
"-system-sqlite" "-system-sqlite"
@ -227,6 +244,8 @@ (define-public qt
"-openssl-linked" "-openssl-linked"
;; explicitly link with dbus instead of dlopening it ;; explicitly link with dbus instead of dlopening it
"-dbus-linked" "-dbus-linked"
;; don't use the precompiled headers
"-no-pch"
;; drop special machine instructions not supported ;; drop special machine instructions not supported
;; on all instances of the target ;; on all instances of the target
,@(if (string-prefix? "x86_64" ,@(if (string-prefix? "x86_64"
@ -234,12 +253,6 @@ (define-public qt
(%current-system))) (%current-system)))
'() '()
'("-no-sse2")) '("-no-sse2"))
"-no-sse3"
"-no-ssse3"
"-no-sse4.1"
"-no-sse4.2"
"-no-avx"
"-no-avx2"
"-no-mips_dsp" "-no-mips_dsp"
"-no-mips_dspr2")))))))) "-no-mips_dspr2"))))))))
(home-page "https://www.qt.io/") (home-page "https://www.qt.io/")