Skip to content

qt5.qtwebengine: point build at proper pkg-config for cross#220319

Closed
ghost wants to merge 4 commits intomasterfrom
unknown repository
Closed

qt5.qtwebengine: point build at proper pkg-config for cross#220319
ghost wants to merge 4 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Mar 9, 2023

When cross-compiling, qmake insists on being able to find a pkgsHostForTarget-style pkg-config with the name pkg-config (no target prefix allowed).

To keep qmake happy, this commit creates a one-symlink derivation containing a link pkg-config which points to ${targetPrefix}pkg-config.

This commit also sets the PKG_CONFIG_EXECUTABLE environment variable.

@ghost ghost requested a review from ttuegel as a code owner March 9, 2023 10:04
@github-actions github-actions bot added the 6.topic: qt/kde Object-oriented framework for GUI creation label Mar 9, 2023
@ghost ghost mentioned this pull request Mar 9, 2023
@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Mar 9, 2023
When cross-compiling, qmake insists on being able to find a
`pkgsHostForTarget`-style `pkg-config` with the name `pkg-config`
(no target prefix allowed).

To keep `qmake` happy, this commit creates a one-symlink derivation
containing a link `pkg-config` which points to
`${targetPrefix}pkg-config`.

This commit also sets the `PKG_CONFIG` environment variable.
@ofborg ofborg bot requested a review from matthewbauer March 9, 2023 21:52
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Mar 9, 2023
# qtwebengine expects to find an executable in $PATH which runs on
# the build platform yet knows about the host `.pc` files. Most
# configury allows setting $PKG_CONFIG to point to an
# arbitrarily-named script which serves this purpose; however QT
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not patch that out instead?

# arbitrarily-named script which serves this purpose; however QT
# insists that it is named `pkg-config` with no target prefix. So
# we re-wrap the host platform's pkg-config.
pkg-config-wrapped-without-prefix = stdenv.mkDerivation {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are only running commands in installPhase you probably want to use runCommand instead

Adam Joseph and others added 3 commits March 21, 2023 02:52
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
@ghost ghost marked this pull request as draft April 24, 2023 02:18
@ghost ghost marked this pull request as ready for review June 21, 2023 05:14
@ghost ghost closed this Oct 22, 2023
@ghost ghost deleted the pr/qt5/cross/qtwebengine-fix-pkg-config branch October 22, 2023 05:38
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: qt/kde Object-oriented framework for GUI creation 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant