gnu: qtbase: Specify configure flags via the #:configure-flags argument.
* gnu/packages/qt.scm (qtbase): Delete trailing #t. [phases]{configure}: Print build directory and configure flags. Move configure flags to... [#:configure-flags]: ... this new argument.
This commit is contained in:
parent
206193fec9
commit
3245d72bcd
1 changed files with 82 additions and 85 deletions
|
@ -320,8 +320,7 @@ system, and the core design of Django is reused in Grantlee.")
|
||||||
(for-each delete-file-recursively
|
(for-each delete-file-recursively
|
||||||
(list "double-conversion" "freetype" "harfbuzz-ng"
|
(list "double-conversion" "freetype" "harfbuzz-ng"
|
||||||
"libpng" "libjpeg" "pcre2" "sqlite" "xcb"
|
"libpng" "libjpeg" "pcre2" "sqlite" "xcb"
|
||||||
"zlib"))
|
"zlib")))))))
|
||||||
#t)))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(outputs '("out" "debug"))
|
(outputs '("out" "debug"))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
|
@ -383,43 +382,9 @@ system, and the core design of Django is reused in Grantlee.")
|
||||||
("vulkan-headers" ,vulkan-headers)
|
("vulkan-headers" ,vulkan-headers)
|
||||||
("ruby" ,ruby)))
|
("ruby" ,ruby)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:configure-flags
|
||||||
(modify-phases %standard-phases
|
(let ((out (assoc-ref %outputs "out")))
|
||||||
(add-after 'configure 'patch-bin-sh
|
(list "-verbose"
|
||||||
(lambda _
|
|
||||||
(substitute* '("config.status"
|
|
||||||
"configure"
|
|
||||||
"mkspecs/features/qt_functions.prf"
|
|
||||||
"qmake/library/qmakebuiltins.cpp")
|
|
||||||
(("/bin/sh") (which "sh")))
|
|
||||||
#t))
|
|
||||||
(add-after 'configure 'patch-xdg-open
|
|
||||||
(lambda _
|
|
||||||
(substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
|
|
||||||
(("^.*const char \\*browsers.*$" all)
|
|
||||||
(string-append "*browser = QStringLiteral(\""
|
|
||||||
(which "xdg-open")
|
|
||||||
"\"); return true; \n" all)))
|
|
||||||
#t))
|
|
||||||
(replace 'configure
|
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
|
||||||
(let ((out (assoc-ref outputs "out")))
|
|
||||||
(substitute* "configure"
|
|
||||||
(("/bin/pwd") (which "pwd")))
|
|
||||||
(substitute* "src/corelib/global/global.pri"
|
|
||||||
(("/bin/ls") (which "ls")))
|
|
||||||
;; The configuration files for other Qt5 packages are searched
|
|
||||||
;; through a call to "find_package" in Qt5Config.cmake, which
|
|
||||||
;; disables the use of CMAKE_PREFIX_PATH via the parameter
|
|
||||||
;; "NO_DEFAULT_PATH". Re-enable it so that the different
|
|
||||||
;; components can be installed in different places.
|
|
||||||
(substitute* (find-files "." ".*\\.cmake")
|
|
||||||
(("NO_DEFAULT_PATH") ""))
|
|
||||||
;; do not pass "--enable-fast-install", which makes the
|
|
||||||
;; configure process fail
|
|
||||||
(invoke
|
|
||||||
"./configure"
|
|
||||||
"-verbose"
|
|
||||||
"-prefix" out
|
"-prefix" out
|
||||||
"-docdir" (string-append out "/share/doc/qt5")
|
"-docdir" (string-append out "/share/doc/qt5")
|
||||||
"-headerdir" (string-append out "/include/qt5")
|
"-headerdir" (string-append out "/include/qt5")
|
||||||
|
@ -465,7 +430,42 @@ system, and the core design of Django is reused in Grantlee.")
|
||||||
'()
|
'()
|
||||||
'("-no-sse2"))
|
'("-no-sse2"))
|
||||||
"-no-mips_dsp"
|
"-no-mips_dsp"
|
||||||
"-no-mips_dspr2"))))
|
"-no-mips_dspr2"))
|
||||||
|
#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(add-after 'configure 'patch-bin-sh
|
||||||
|
(lambda _
|
||||||
|
(substitute* '("config.status"
|
||||||
|
"configure"
|
||||||
|
"mkspecs/features/qt_functions.prf"
|
||||||
|
"qmake/library/qmakebuiltins.cpp")
|
||||||
|
(("/bin/sh") (which "sh")))))
|
||||||
|
(add-after 'configure 'patch-xdg-open
|
||||||
|
(lambda _
|
||||||
|
(substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
|
||||||
|
(("^.*const char \\*browsers.*$" all)
|
||||||
|
(string-append "*browser = QStringLiteral(\""
|
||||||
|
(which "xdg-open")
|
||||||
|
"\"); return true; \n" all)))))
|
||||||
|
(replace 'configure
|
||||||
|
;; Overridden to not pass "--enable-fast-install", which makes the
|
||||||
|
;; configure process fail.
|
||||||
|
(lambda* (#:key outputs configure-flags #:allow-other-keys)
|
||||||
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
(substitute* "configure"
|
||||||
|
(("/bin/pwd") (which "pwd")))
|
||||||
|
(substitute* "src/corelib/global/global.pri"
|
||||||
|
(("/bin/ls") (which "ls")))
|
||||||
|
;; The configuration files for other Qt5 packages are searched
|
||||||
|
;; through a call to "find_package" in Qt5Config.cmake, which
|
||||||
|
;; disables the use of CMAKE_PREFIX_PATH via the parameter
|
||||||
|
;; "NO_DEFAULT_PATH". Re-enable it so that the different
|
||||||
|
;; components can be installed in different places.
|
||||||
|
(substitute* (find-files "." ".*\\.cmake")
|
||||||
|
(("NO_DEFAULT_PATH") ""))
|
||||||
|
(format #t "build directory: ~s~%" (getcwd))
|
||||||
|
(format #t "configure flags: ~s~%" configure-flags)
|
||||||
|
(apply invoke "./configure" configure-flags))))
|
||||||
(add-after 'install 'patch-mkspecs
|
(add-after 'install 'patch-mkspecs
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
@ -497,8 +497,7 @@ system, and the core design of Django is reused in Grantlee.")
|
||||||
'("device_config.prf" "moc.prf" "qt_build_config.prf"
|
'("device_config.prf" "moc.prf" "qt_build_config.prf"
|
||||||
"qt_config.prf" "winrt/package_manifest.prf"))
|
"qt_config.prf" "winrt/package_manifest.prf"))
|
||||||
(("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
|
(("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
|
||||||
(("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
|
(("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))
|
||||||
#t)))
|
|
||||||
(add-after 'patch-mkspecs 'patch-prl-files
|
(add-after 'patch-mkspecs 'patch-prl-files
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
@ -507,8 +506,7 @@ system, and the core design of Django is reused in Grantlee.")
|
||||||
;; on context. See <https://bugs.gnu.org/38405>
|
;; on context. See <https://bugs.gnu.org/38405>
|
||||||
(substitute* (find-files (string-append out "/lib") "\\.prl$")
|
(substitute* (find-files (string-append out "/lib") "\\.prl$")
|
||||||
(("\\$\\$\\[QT_INSTALL_LIBS\\]")
|
(("\\$\\$\\[QT_INSTALL_LIBS\\]")
|
||||||
(string-append out "/lib")))
|
(string-append out "/lib"))))))
|
||||||
#t)))
|
|
||||||
(add-after 'unpack 'patch-paths
|
(add-after 'unpack 'patch-paths
|
||||||
;; Use the absolute paths for dynamically loaded libs, otherwise
|
;; Use the absolute paths for dynamically loaded libs, otherwise
|
||||||
;; the lib will be searched in LD_LIBRARY_PATH which typically is
|
;; the lib will be searched in LD_LIBRARY_PATH which typically is
|
||||||
|
@ -530,8 +528,7 @@ system, and the core design of Django is reused in Grantlee.")
|
||||||
(("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
|
(("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
|
||||||
(string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
|
(string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
|
||||||
(("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
|
(("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
|
||||||
(string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
|
(string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))))))))
|
||||||
#t)))))
|
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
(list (search-path-specification
|
(list (search-path-specification
|
||||||
(variable "QMAKEPATH")
|
(variable "QMAKEPATH")
|
||||||
|
|
Reference in a new issue