gnu: qtbase: Use a more standard directory layout.
* gnu/packages/qt.scm (qtbase)[arguments]: Pass docdir, headerdir, archdatadir, datadir and examplesdir to 'configure'. Ajdust the patch-qt_config.prf phase accordingly. [native-search-paths]: Adjust accordingly. (qtwayland)[arguments]: New field. Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
This commit is contained in:
parent
dad66da493
commit
6fc0e157ee
1 changed files with 27 additions and 16 deletions
|
|
@ -473,6 +473,12 @@ developers using C++ or QML, a CSS & JavaScript like language.")
|
||||||
"./configure"
|
"./configure"
|
||||||
"-verbose"
|
"-verbose"
|
||||||
"-prefix" out
|
"-prefix" out
|
||||||
|
"-docdir" (string-append out "/share/doc/qt5")
|
||||||
|
"-headerdir" (string-append out "/include/qt5")
|
||||||
|
"-archdatadir" (string-append out "/lib/qt5")
|
||||||
|
"-datadir" (string-append out "/share/qt5")
|
||||||
|
"-examplesdir" (string-append
|
||||||
|
out "/share/doc/qt5/examples")
|
||||||
"-opensource"
|
"-opensource"
|
||||||
"-confirm-license"
|
"-confirm-license"
|
||||||
;; Do not build examples; if desired, these could go
|
;; Do not build examples; if desired, these could go
|
||||||
|
|
@ -502,38 +508,31 @@ developers using C++ or QML, a CSS & JavaScript like language.")
|
||||||
(add-after 'install 'patch-qt_config.prf
|
(add-after 'install 'patch-qt_config.prf
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
(mkspecs (string-append out "/lib/qt5/mkspecs"))
|
||||||
(qt_config.prf (string-append
|
(qt_config.prf (string-append
|
||||||
out "/mkspecs/features/qt_config.prf")))
|
mkspecs "/features/qt_config.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
|
||||||
(("\\$\\$\\[QT_INSTALL_HEADERS\\]")
|
(("\\$\\$\\[QT_INSTALL_HEADERS\\]")
|
||||||
"$$replace(dir, mkspecs/modules, include)")
|
"$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
|
||||||
(("\\$\\$\\[QT_INSTALL_LIBS\\]")
|
(("\\$\\$\\[QT_INSTALL_LIBS\\]")
|
||||||
"$$replace(dir, mkspecs/modules, lib)")
|
"$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
|
||||||
(("\\$\\$\\[QT_HOST_LIBS\\]")
|
(("\\$\\$\\[QT_HOST_LIBS\\]")
|
||||||
"$$replace(dir, mkspecs/modules, lib)")
|
"$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
|
||||||
(("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
|
|
||||||
"$$replace(dir, mkspecs/modules, plugins)")
|
|
||||||
(("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
|
|
||||||
"$$replace(dir, mkspecs/modules, libexec)")
|
|
||||||
(("\\$\\$\\[QT_INSTALL_BINS\\]")
|
(("\\$\\$\\[QT_INSTALL_BINS\\]")
|
||||||
"$$replace(dir, mkspecs/modules, bin)")
|
"$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
|
||||||
(("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
|
|
||||||
"$$replace(dir, mkspecs/modules, imports)")
|
|
||||||
(("\\$\\$\\[QT_INSTALL_QML\\]")
|
|
||||||
"$$replace(dir, mkspecs/modules, qml)"))
|
|
||||||
#t))))))
|
#t))))))
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
(list (search-path-specification
|
(list (search-path-specification
|
||||||
(variable "QMAKEPATH")
|
(variable "QMAKEPATH")
|
||||||
(files '("")))
|
(files '("lib/qt5")))
|
||||||
(search-path-specification
|
(search-path-specification
|
||||||
(variable "QML2_IMPORT_PATH")
|
(variable "QML2_IMPORT_PATH")
|
||||||
(files '("qml")))
|
(files '("lib/qt5/qml")))
|
||||||
(search-path-specification
|
(search-path-specification
|
||||||
(variable "QT_PLUGIN_PATH")
|
(variable "QT_PLUGIN_PATH")
|
||||||
(files '("plugins")))
|
(files '("lib/qt5/plugins")))
|
||||||
(search-path-specification
|
(search-path-specification
|
||||||
(variable "XDG_DATA_DIRS")
|
(variable "XDG_DATA_DIRS")
|
||||||
(files '("share")))
|
(files '("share")))
|
||||||
|
|
@ -866,6 +865,18 @@ set of plugins for interacting with pulseaudio and GStreamer.")))
|
||||||
(snippet
|
(snippet
|
||||||
;; The examples try to build and cause the build to fail
|
;; The examples try to build and cause the build to fail
|
||||||
'(delete-file-recursively "examples"))))
|
'(delete-file-recursively "examples"))))
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments qtsvg)
|
||||||
|
((#:phases phases)
|
||||||
|
`(modify-phases ,phases
|
||||||
|
(add-before 'check 'set-ld-library-path
|
||||||
|
;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
|
||||||
|
;;
|
||||||
|
;; Make the uninstalled libQt5WaylandClient.so.5 available to the
|
||||||
|
;; wayland platform plugin.
|
||||||
|
(lambda _
|
||||||
|
(setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
|
||||||
|
#t))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("glib" ,glib)
|
`(("glib" ,glib)
|
||||||
("perl" ,perl)
|
("perl" ,perl)
|
||||||
|
|
|
||||||
Reference in a new issue