Commit Graph

19 Commits

Author SHA1 Message Date
Zheng Junjie 3e5192e6bb
build: qt-utils: Wrap QML2_IMPORT_PATH with 'prefix' location.
Some qml files have optional or circular dependencies, use 'prefix' instead of
'=' to get those dependencies from environment/profile.

* guix/build/qt-utils.scm (variables-for-wrapping): Use 'prefix' for
QML2_IMPORT_PATH.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-08-02 22:27:43 +08:00
Maxim Cournoyer 3bacd3c76a
Merge branch 'master' into core-updates.
Conflicts:
	gnu/local.mk
	gnu/packages/build-tools.scm
	gnu/packages/certs.scm
	gnu/packages/check.scm
	gnu/packages/compression.scm
	gnu/packages/cups.scm
	gnu/packages/fontutils.scm
	gnu/packages/gnuzilla.scm
	gnu/packages/guile.scm
	gnu/packages/ibus.scm
	gnu/packages/image-processing.scm
	gnu/packages/linux.scm
	gnu/packages/music.scm
	gnu/packages/nss.scm
	gnu/packages/pdf.scm
	gnu/packages/python-xyz.scm
	gnu/packages/qt.scm
	gnu/packages/ruby.scm
	gnu/packages/shells.scm
	gnu/packages/tex.scm
	gnu/packages/video.scm
	gnu/packages/vulkan.scm
	gnu/packages/web.scm
	gnu/packages/webkit.scm
	gnu/packages/wm.scm
2023-04-14 17:15:08 -04:00
Maxim Cournoyer e4ef2db8fd
build: qt-utils: Revert setting QT_PLUGIN_PATH exactly.
Fixes <https://issues.guix.gnu.org/57742>.

The documentation of Qt states that it is a supported use case to mix Qt 5 and
Qt 6 plugins in QT_PLUGIN_PATH [0].  This reverts the change to QT_PLUGIN_PATH
introduced in 1f466ed6be ("build: qt: Add qtbase argument and wrap Qt
environment variables exactly.").

[0]  https://doc.qt.io/qt-6.2/deployment-plugins.html#loading-and-verifying-plugins-dynamically

* guix/build/qt-utils.scm (variables-for-wrapping): Wrap QT_PLUGIN_PATH using
the prefix method.
2023-03-28 20:17:08 -04:00
Marius Bakke 77eb3008e3
Merge branch 'staging' into core-updates 2022-08-11 23:36:10 +02:00
Maxim Cournoyer a956c7df87
build: qt-utils: Fix another regression.
This fixes another regression introduced with
1f466ed6be, which affected the packages bitmask,
hime, hime, nimf and vorta.

The fix is to provide a default qt-major-version when #:qtbase is missing,
such as when borrowing the qt-wrap phase in a package not using the Qt build
system.

* guix/build/qt-utils.scm (wrap-all-qt-programs)[qt-major-version]: Fall-back
to %default-qt-major-version when #:qtbase is #f.

Reported-by: John Kehayias <john.kehayias@protonmail.com> and others.
2022-08-04 12:06:17 -04:00
Maxim Cournoyer 1f466ed6be
build: qt: Add qtbase argument and wrap Qt environment variables exactly.
* guix/build-system/qt.scm (default-qtbase): New variable.
(lower) <#:qtbase>: Add argument...
[build-inputs]: ... and propagate it here.
(qt-build): Add qtbase argument.
(qt-cross-build): Likewise.
* guix/build/qt-utils.scm (%default-qt-major-version): New variable.
(variables-for-wrapping): Add qt-major-version argument, and use it to format
the various path prefixes.  Wrap QT environment variables exactly.
(wrap-qt-program*): Add qt-major-version argument, and pass it to
variables-for-wrapping.
(wrap-qt-program): Add qt-major-version argument, and pass it to
wrap-qt-program*.
(wrap-all-qt-programs): Add qtbase argument, and extract the major version
from it, passing it to wrap-qt-program*.
2022-07-31 21:55:49 -04:00
Efraim Flashner 6ccf8ea81f
Merge branch 'master' into core-updates 2021-12-19 15:15:11 +02:00
Ludovic Courtès 3a317f7476
Merge branch 'master' into core-updates-frozen 2021-11-17 23:43:14 +01:00
Vagrant Cascadian 75cae188ad
build: wrap-qt-program: Fix typo.
* gnu/build/qt-utils.scm (wrap-qt-program): Fix spelling of "program".
2021-11-14 18:02:22 -08:00
Brendan Tildesley 3dfe45c3f1
build: qt-utils: Don't wrap .X-real files.
* guix/build/qt-utils.scm (find-files-to-wrap): Exclude already wrapped
programs.  This is forbidden in wrap-program now due to a738a663a9.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2021-11-11 10:31:31 -05:00
Maxime Devos 77b98bf187
build/qt-utils: Allow overriding the shell interpreter used.
* guix/build/qt-utils.scm
  (wrap-qt-program*): Add #:sh argument and pass it to 'wrap-program'.
  (wrap-qt-program): Likewise, but pass it to 'wrap-qt-program*' instead.
  (wrap-all-qt-programs): Likewise, but pass it to 'wrap-qt-program' instead.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2021-10-02 11:00:06 +00:00
Maxim Cournoyer d5c9cc6d9d
build: qt-utils: Wrappers set 'QTWEBENGINEPROCESS_PATH' if needed.
This reinstate commit the reverted fed28a9632,
now rebased on top of conflicting changes.

* guix/build/qt-utils.scm:  Remove extraneous newlines.
(variables-for-wrapping): Add comments.  Define a file type entry for each
variable definition, and use it to determine if we should look for directories
versus plain files.
<QTWEBENGINEPROCESS_PATH>: New environment variable.
(wrap-all-qt-programs): Remove trailing #t.
2021-07-02 16:50:10 -04:00
Ludovic Courtès 20cf23e4f8
build: qt-utils: Refactor the code to filter XDG_DATA_DIRS.
This partially reinstate the reverted
c5fd1b0bd3.

* guix/build/qt-utils.scm (variables-for-wrapping)[collect-sub-dirs]:
Add 'selectors' parameter and honor it.  Change caller to handle selectors.

Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2021-07-02 16:50:10 -04:00
Jakub Kądziołka 86c9f5a5fa
guix: qt-utils: Don't include useless inputs in wrapped variables.
Include only those inputs into XDG_DATA_DIRS having
some subdirectory of /share which is typically used by Qt.

* guix/build/qt-utils.scm (variables-for-wrapping): Take the
  output directory as an argument for special handling. Check for
  subdirectories of /share used by Qt before including inputs in
  XDG_DATA_DIRS.
  (wrap-qt-program*): Pass the output directory to variables-for-wrapping.

Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
2021-07-02 16:50:09 -04:00
Jakub Kądziołka 76174aa991
build-system: qt: Exclude useless inputs from wrapped variables.
* guix/build-system/qt.scm (qt-build)[qt-wrap-excluded-inputs]: New argument.
* guix/build/qt-utils.scm (%qt-wrap-excluded-inputs): New variable.
  (wrap-qt-program*)[qt-wrap-excluded-inputs]: New argument. Filter excluded
  inputs.
  (wrap-qt-program)[qt-wrap-excluded-inputs]: New argument.
  (wrap-all-qt-programs)[qt-wrap-excluded-inputs]: New argument.

Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
2021-07-02 16:50:09 -04:00
Hartmut Goebel 30759c4aad
guix: qt-utils: Wrapped executables honor user's envvars.
Prior to this change, wrappers did set the specified environment variables to
a fixed value, overwriting any user settings. This inhibited propagating
e.g. XDG_DATA_DIRS from a profile to the application.

Now user environment variables are prefixed (if the variable defines some
"binary" search path, e.g. QT_PLUGIN_PATH) or suffixed (if the variable
defines some config or data search path, e.g. XDG_DATA_DIRS). The code could
also allow to overwrite, anyhow currently no variable is defined like this.

* guix/build/qt-utils.scm (variables-for-wrapping): For each env-var to
  be wrapped, specify whether it should prefix, suffix or overwrite the
  user's variable.
2021-07-02 16:50:09 -04:00
Hartmut Goebel 7e24e1e58d
guix: qt-build-system, qt-utils: Unify wrapping of qt-programs.
Unify (guix qt-build-system wrap-all-programs) and
(guix qt-utils wrap-qt-program), so both behave the same.
The functions now reside in qt-utils to make them easily available for
packages not using the qt-build-system.

* guix/build/qt-build-system.scm (variables-for-wrapping, wrap-all-programs):
  Move from here ...
* guix/build/qt-utils.scm (variables-for-wrapping, wrap-all-qt-programs):
  ... to here. Base the later on
  (wrap-qt-program*): New function, carved out from old wrap-all-programs.
  (wrap-qt-program): Base on wrap-qt-program*, change arguments in an
  incompatible way.
* gnu/packages/bittorrent.scm (qbittorrent)[arguments]<phases>{wrap-qt}:
  Adjust to new interface of wrap-qt-program.
* gnu/packages/finance.scm (electron-cash): Likewise.
* gnu/packages/geo.scm (qgis): Likewise.
* gnu/packages/password-utils.scm (qtpass): Likewise.
* gnu/packages/video.scm (openshot): Likewise.
* gnu/packages/web-browsers.scm (kristall): Likewise.
2021-07-02 16:50:09 -04:00
Hartmut Goebel d1e4e64cd7
guix: Fix wrap-qt-program.
Directory names added here need to match qtbase's native-search-path
specifications.

* guix/build/qt-utils.scm (wrap-qt-program): Change paths used for
  QML2_IMPORT_PATH and QT_PLUGIN_PATH.
2019-11-26 12:31:39 +01:00
David Craven 2098d0240e
build: Add wrap-qt-program.
* guix/build/qt-utils.scm (wrap-qt-program): New file.
* Makefile.am (MODULES): Add it.
2016-08-30 22:38:28 +02:00