For example, the Tok project (https://invent.kde.org/network/tok) says that the command 'qbs' should be used to build it. But qbs fails: > Detecting Qt installations... > ERROR: /disk-samsung/freebsd-ports/net-im/tok/work/tok-2fbfe1eb86ab76b2abebd45555da61404f5da6b6/src/Shared.qbs:7:1 Error while handling product 'tokInternal': > /usr/ports/net-im/tok/work/tok-2fbfe1eb86ab76b2abebd45555da61404f5da6b6/src/Shared.qbs:66:5 Dependency 'Qt.widgets' not found for product 'tokInternal'. - even though Qt5 widgets are installed. Something is wrong with paths in qbs. As a reference, Arch Linux also just calls qbs: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=tok-git
Moin moin > qbs [...] 3 warnings and 1 error generated. ERROR: Process failed with exit code 1. The following products could not be built for configuration default: org.kde.Tok, tokInternal works on my machine and fails at compile errors. mfg Tobias
One related inconsistency in qbs is that it expects the 'qmake' executable while the FreeBSD port installs 'qmake-qt5'. The workaround is to always run: > qbs moduleProviders.Qt.qmakeFilePaths:/usr/local/bin/qmake-qt5
Simple way to check (doesn't need an entire tok checkout): === main.cpp int main() {} === === hello.qbs Application { name: "hello" files: "main.cpp" Depends { name: "cpp" } Depends { name: "Qt.core" } } === Output is === Build graph does not yet exist for configuration 'default'. Starting from scratch. Resolving project for configuration default Detecting Qt installations... Found Qt at '/usr/local/lib/qt5/bin/qmake'. Setting up Qt at '/usr/local/lib/qt5/bin/qmake'... ... === As tcberner points out, Tok has other build problems once qbs auto-finds our qmakes.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9f62e710c45f743a1254569450683f12f7a0f46f commit 9f62e710c45f743a1254569450683f12f7a0f46f Author: Adriaan de Groot <adridg@FreeBSD.org> AuthorDate: 2021-11-28 22:11:13 +0000 Commit: Adriaan de Groot <adridg@FreeBSD.org> CommitDate: 2021-11-30 00:29:19 +0000 devel/qbs: update to 1.20, latest upstream, and changed ports norms - Bump version and fix build. - See CHANGES, 20200115: ${PREFIX}/share/man is for manpages, so remove the patch that put the manpages elsewhere, and update plist. - When looking for qmake, look for suffixed names as well; we stopped using qtchooser some time ago, and adopted a qmake-qt5. Linux hosts do this with a check, we'll just `true` it in. - Pull in an upstream patch to warn when there is no qmake; massage it to look for suffixed qmakes as well. PR: 258444 Reported by: yuri devel/qbs/Makefile | 6 ++- devel/qbs/distinfo | 6 +-- devel/qbs/files/patch-27bd9ac.diff (new) | 60 ++++++++++++++++++++++ devel/qbs/files/patch-doc_man_man.pri (gone) | 9 ---- .../patch-src_app_qbs-setup-qt_setupqt.cpp (new) | 11 ++++ devel/qbs/pkg-plist | 10 +++- 6 files changed, 87 insertions(+), 15 deletions(-)
Not sure about the very latest version, but the combination of BINARY_ALIAS= qmake=${_QMAKE} and --no-install qbs.installPrefix:${PREFIX} helps the problem in the OP.