Archived
1
0
Fork 0

gnu: qtbase: Update to 6.3.1.

* gnu/packages/qt.scm (qtbase): Update to 6.3.1.
[cmake]: Delete commented out argument.
[configure-flags]: Add -DFEATURE_system_xcb_xinput=ON.
[phases]: Use gexps.
{patch-more-paths}: Use search-input-file.  Patch /bin/ls.
{patch-mkspecs}: Use search-input-directory and search-input-file.
[native-inputs]: Rewrite with modify-inputs.  Replace gtk+ with gtk.  Remove
xorg-server-for-tests.
[inputs]: Override field to extend with bash-minimal, libxcb and md4c.
replace gtk+ with gtk.  Use latest postgresql.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
Maxim Cournoyer 2022-07-17 00:35:59 -04:00
parent f6904c0b19
commit 8d7fdbe261
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -19,7 +19,7 @@
;;; Copyright © 2020 TomZ <tomz@freedommail.ch> ;;; Copyright © 2020 TomZ <tomz@freedommail.ch>
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de> ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot> ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz> ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
@ -55,6 +55,7 @@
#:use-module (guix deprecation) #:use-module (guix deprecation)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages bash)
#:use-module (gnu packages base) #:use-module (gnu packages base)
#:use-module (gnu packages bison) #:use-module (gnu packages bison)
#:use-module (gnu packages cmake) #:use-module (gnu packages cmake)
@ -84,6 +85,7 @@
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#:use-module (gnu packages llvm) #:use-module (gnu packages llvm)
#:use-module (gnu packages maths) #:use-module (gnu packages maths)
#:use-module (gnu packages markup)
#:use-module (gnu packages networking) #:use-module (gnu packages networking)
#:use-module (gnu packages ninja) #:use-module (gnu packages ninja)
#:use-module (gnu packages nss) #:use-module (gnu packages nss)
@ -548,13 +550,13 @@ developers using C++ or QML, a CSS & JavaScript like language.")
(define-public qtbase (define-public qtbase
(package/inherit qtbase-5 (package/inherit qtbase-5
(name "qtbase") (name "qtbase")
(version "6.1.1") (version "6.3.1")
(source (origin (source (origin
(inherit (package-source qtbase-5)) (inherit (package-source qtbase-5))
(uri (qt5-urls name version)) (uri (qt5-urls name version))
(sha256 (sha256
(base32 (base32
"1wizrfiw6h8bk99brbdpdli40vsk6yqchs66f1r083hp0ygsma11")) "00sfya41ihqb0zwg6wf1kiy02iymj6mk584hhk2c4s94khfl4r0a"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
;; corelib uses bundled harfbuzz, md4, md5, sha3 ;; corelib uses bundled harfbuzz, md4, md5, sha3
@ -573,8 +575,6 @@ developers using C++ or QML, a CSS & JavaScript like language.")
;; enough) or a functional network. It's also quite expensive to ;; enough) or a functional network. It's also quite expensive to
;; build and run. ;; build and run.
((#:tests? _ #f) #f) ((#:tests? _ #f) #f)
;; ((#:cmake _)
;; cmake) ;requires a CMake >= 3.18.4
((#:configure-flags _ ''()) ((#:configure-flags _ ''())
`(let ((out (assoc-ref %outputs "out"))) `(let ((out (assoc-ref %outputs "out")))
(list "-GNinja" ;the build fails otherwise (list "-GNinja" ;the build fails otherwise
@ -600,6 +600,7 @@ developers using C++ or QML, a CSS & JavaScript like language.")
;; cases such as for those below. ;; cases such as for those below.
"-DFEATURE_system_pcre2=ON" "-DFEATURE_system_pcre2=ON"
"-DFEATURE_system_sqlite=ON" "-DFEATURE_system_sqlite=ON"
"-DFEATURE_system_xcb_xinput=ON"
;; Don't use the precompiled headers. ;; Don't use the precompiled headers.
"-DBUILD_WITH_PCH=OFF" "-DBUILD_WITH_PCH=OFF"
;; Drop special machine instructions that do not have runtime ;; Drop special machine instructions that do not have runtime
@ -616,18 +617,21 @@ developers using C++ or QML, a CSS & JavaScript like language.")
"-DFEATURE_mips_dsp=OFF" "-DFEATURE_mips_dsp=OFF"
"-DFEATURE_mips_dspr2=OFF"))) "-DFEATURE_mips_dspr2=OFF")))
((#:phases phases) ((#:phases phases)
`(modify-phases ,phases #~(modify-phases #$phases
(delete 'patch-bin-sh) (delete 'patch-bin-sh)
(delete 'patch-xdg-open) (delete 'patch-xdg-open)
(add-after 'patch-paths 'patch-more-paths (add-after 'patch-paths 'patch-more-paths
(lambda _ (lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/gui/platform/unix/qgenericunixservices.cpp" (substitute* "src/gui/platform/unix/qgenericunixservices.cpp"
(("\"xdg-open\"") (("\"xdg-open\"")
(format #f "~s" (which "xdg-open")))) (format #f "~s" (search-input-file inputs "bin/xdg-open"))))
(substitute* '("mkspecs/features/qt_functions.prf" (substitute* '("mkspecs/features/qt_functions.prf"
"qmake/library/qmakebuiltins.cpp") "qmake/library/qmakebuiltins.cpp")
(("/bin/sh") (("/bin/sh")
(which "sh"))))) (search-input-file inputs "bin/bash")))
(substitute* "src/corelib/CMakeLists.txt"
(("/bin/ls")
(search-input-file inputs "bin/ls")))))
(replace 'configure (replace 'configure
(assoc-ref %standard-phases 'configure)) (assoc-ref %standard-phases 'configure))
(replace 'build (replace 'build
@ -641,11 +645,15 @@ developers using C++ or QML, a CSS & JavaScript like language.")
(invoke "cmake" "--install" "."))) (invoke "cmake" "--install" ".")))
(replace 'patch-mkspecs (replace 'patch-mkspecs
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((archdata (search-input-directory outputs "lib/qt6"))
(archdata (string-append out "/lib/qt6")) (mkspecs (search-input-directory outputs
(mkspecs (string-append archdata "/mkspecs")) "lib/qt6/mkspecs"))
(qt_config.prf (string-append (qt_config.prf
mkspecs "/features/qt_config.prf"))) (search-input-file
outputs "lib/qt6/mkspecs/features/qt_config.prf"))
(qt_functions.prf
(search-input-file
outputs "lib/qt6/mkspecs/features/qt_functions.prf")))
;; For each Qt module, let `qmake' uses search paths in the ;; For each Qt module, let `qmake' uses search paths in the
;; module directory instead of all in QT_INSTALL_PREFIX. ;; module directory instead of all in QT_INSTALL_PREFIX.
(substitute* qt_config.prf (substitute* qt_config.prf
@ -659,24 +667,29 @@ developers using C++ or QML, a CSS & JavaScript like language.")
"$$clean_path($$replace(dir, mkspecs/modules, ../../bin))")) "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
;; Searches Qt tools in the current PATH instead of QT_HOST_BINS. ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
(substitute* (string-append mkspecs "/features/qt_functions.prf") (substitute* qt_functions.prf
(("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2") (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
"cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})")) "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
;; Resolve qmake spec files within qtbase by absolute paths. ;; Resolve qmake spec files within qtbase by absolute paths.
(substitute* (substitute*
(map (lambda (file) (map (lambda (file)
(string-append mkspecs "/features/" file)) (search-input-file
outputs
(string-append "lib/qt6/mkspecs/features/" file)))
'("device_config.prf" "moc.prf" "qt_build_config.prf" '("device_config.prf" "moc.prf" "qt_build_config.prf"
"qt_config.prf")) "qt_config.prf"))
(("\\$\\$\\[QT_HOST_DATA/get\\]") archdata) (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
(("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))))))))) (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))))))
(native-inputs (native-inputs
`(("gtk+" ,gtk+) ;for GTK theme support (modify-inputs (package-native-inputs qtbase-5)
("ninja" ,ninja) (prepend gtk ;for GTK theme support
("wayland-protocols" ,wayland-protocols) ninja wayland-protocols)))
("xorg-server" ,xorg-server-for-tests) (inputs
,@(package-native-inputs qtbase-5))) (modify-inputs (package-inputs qtbase-5)
(prepend bash-minimal libxcb md4c)
(replace "gtk+" gtk) ;use latest gtk
(replace "postgresql" postgresql))) ;use latest postgresql
(native-search-paths (native-search-paths
(list (search-path-specification (list (search-path-specification
(variable "QMAKEPATH") (variable "QMAKEPATH")