Commit 9f62e710 authored by Adriaan de Groot's avatar Adriaan de Groot
Browse files

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
parent 0a201a63
PORTNAME= qbs
DISTVERSIONPREFIX= src-
DISTVERSION= 1.19.2
DISTVERSION= 1.20.0
CATEGORIES= devel
MASTER_SITES= QT/official_releases/${PORTNAME}/${PORTVERSION}
DIST_SUBDIR= KDE/Qt/qbs
......@@ -48,6 +48,10 @@ pre-configure:
${MKDIR} ${CONFIGURE_WRKSRC}
${ECHO_CMD} 'QMAKE_LIBDIR_FLAGS = -L${CONFIGURE_WRKSRC}/lib' >> ${CONFIGURE_WRKSRC}/.qmake.cache
# Workaround strip(1) problems
post-stage:
-${RM} ${STAGEDIR}${LOCALBASE}/libexec/qbs/ecp.*
# The file in question is not used on FreeBSD. To silence stage-qa, remove it from stage-dir.
post-install:
${RM} ${STAGEDIR}${DATADIR}/modules/bundle/update-specs.sh
......
TIMESTAMP = 1627317013
SHA256 (KDE/Qt/qbs/qbs-src-1.19.2.tar.gz) = 91fd5ca08f170e8178dd5183579f03e56965648770b7e7a09258550aee53950f
SIZE (KDE/Qt/qbs/qbs-src-1.19.2.tar.gz) = 4961194
TIMESTAMP = 1638137269
SHA256 (KDE/Qt/qbs/qbs-src-1.20.0.tar.gz) = 44961a4bb61580ae821aaf25ebb5a5737bd8fb79ec0474aa2592cdd45cc5171f
SIZE (KDE/Qt/qbs/qbs-src-1.20.0.tar.gz) = 5033322
This comes from the upstream issue
https://bugreports.qt.io/browse/QBS-1672
and is the diff available at
https://codereview.qt-project.org/c/qbs/qbs/+/371943
adridg@: I have added the `versions` part of the code, that
additionally looks for -qt5 (which we have) and unsuffixed
and -qt (neither of which we have) executables. This matches
the code in the setupqt.cpp files, elsewhere.
diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js
index b1239a7..422863b 100644
--- share/qbs/module-providers/Qt/setup-qt.js
+++ share/qbs/module-providers/Qt/setup-qt.js
@@ -53,24 +53,30 @@
if (qmakeFilePaths && qmakeFilePaths.length > 0)
return qmakeFilePaths;
console.info("Detecting Qt installations...");
- var pathValue = Environment.getEnv("PATH");
- if (!pathValue)
- return [];
- var dirs = splitNonEmpty(pathValue, qbs.pathListSeparator);
- var suffix = exeSuffix(qbs);
var filePaths = [];
- for (var i = 0; i < dirs.length; ++i) {
- var candidate = FileInfo.joinPaths(dirs[i], "qmake" + suffix);
- var canonicalCandidate = FileInfo.canonicalPath(candidate);
- if (!canonicalCandidate || !File.exists(canonicalCandidate))
- continue;
- if (FileInfo.completeBaseName(canonicalCandidate) !== "qtchooser")
- candidate = canonicalCandidate;
- if (!filePaths.contains(candidate)) {
- console.info("Found Qt at '" + toNative(candidate) + "'.");
- filePaths.push(candidate);
+ var pathValue = Environment.getEnv("PATH");
+ if (pathValue) {
+ var dirs = splitNonEmpty(pathValue, qbs.pathListSeparator);
+ var versions = ["", "-qt5", "-qt4"];
+ var suffix = exeSuffix(qbs);
+ for (var i = 0; i < dirs.length; ++i) { for (var iver = 0; iver < versions.length; ++iver) {
+ var candidate = FileInfo.joinPaths(dirs[i], "qmake" + versions[iver] + suffix);
+ var canonicalCandidate = FileInfo.canonicalPath(candidate);
+ if (!canonicalCandidate || !File.exists(canonicalCandidate))
+ continue;
+ if (FileInfo.completeBaseName(canonicalCandidate) !== "qtchooser")
+ candidate = canonicalCandidate;
+ if (!filePaths.contains(candidate)) {
+ console.info("Found Qt at '" + toNative(candidate) + "'.");
+ filePaths.push(candidate);
+ } }
}
}
+ if (filePaths.length === 0) {
+ console.warn("Could not find any qmake executables in PATH. Either make sure a qmake "
+ + "executable is present in PATH or set the moduleProviders.Qt.qmakeFilePaths property "
+ + "to point a qmake executable.");
+ }
return filePaths;
}
--- doc/man/man.pri.orig 2017-12-26 13:19:41 UTC
+++ doc/man/man.pri
@@ -1,5 +1,5 @@
qbs_no_man_install: return()
man.files = $$PWD/qbs.1
-man.path = $${QBS_INSTALL_PREFIX}/share/man/man1
+man.path = $${QBS_INSTALL_PREFIX}/man/man1
INSTALLS += man
--- src/app/qbs-setup-qt/setupqt.cpp.orig 2021-11-28 22:25:29 UTC
+++ src/app/qbs-setup-qt/setupqt.cpp
@@ -70,7 +70,7 @@ static QStringList qmakeExecutableNames()
{
const QString baseName = HostOsInfo::appendExecutableSuffix(QStringLiteral("qmake"));
QStringList lst(baseName);
- if (HostOsInfo::isLinuxHost()) {
+ if (true || HostOsInfo::isLinuxHost()) {
// Some distributions ship binaries called qmake-qt5 or qmake-qt4.
lst << baseName + QLatin1String("-qt5") << baseName + QLatin1String("-qt4");
}
......@@ -43,7 +43,7 @@ include/qbs/use_installed_corelib.pri
lib/libqbscore.prl
lib/libqbscore.so
lib/libqbscore.so.1
lib/libqbscore.so.1.19
lib/libqbscore.so.1.20
lib/libqbscore.so.%%SHLIB_VERSION%%
lib/qbs/plugins/libclangcompilationdbgenerator.so
lib/qbs/plugins/libiarewgenerator.so
......@@ -54,7 +54,7 @@ lib/qbs/plugins/libqbs_qt_scanner.so
lib/qbs/plugins/libvisualstudiogenerator.so
libexec/qbs/dmgbuild
libexec/qbs/qbs_processlauncher
man/man1/qbs.1.gz
share/man/man1/qbs.1.gz
%%PORTDOCS%%%%DOCSDIR%%/html/attributions.html
%%PORTDOCS%%%%DOCSDIR%%/html/building-applications.html
%%PORTDOCS%%%%DOCSDIR%%/html/building-qbs.html
......@@ -584,6 +584,8 @@ man/man1/qbs.1.gz
%%DATADIR%%/imports/qbs/Probes/ClangClBinaryProbe.qbs
%%DATADIR%%/imports/qbs/Probes/ClangClProbe.qbs
%%DATADIR%%/imports/qbs/Probes/ConanfileProbe.qbs
%%DATADIR%%/imports/qbs/Probes/CosmicProbe.qbs
%%DATADIR%%/imports/qbs/Probes/DmcProbe.qbs
%%DATADIR%%/imports/qbs/Probes/FrameworkProbe.qbs
%%DATADIR%%/imports/qbs/Probes/GccBinaryProbe.qbs
%%DATADIR%%/imports/qbs/Probes/GccProbe.qbs
......@@ -691,8 +693,12 @@ man/man1/qbs.1.gz
%%DATADIR%%/modules/cpp/MingwBaseModule.qbs
%%DATADIR%%/modules/cpp/UnixGCC.qbs
%%DATADIR%%/modules/cpp/android-gcc.qbs
%%DATADIR%%/modules/cpp/cosmic.js
%%DATADIR%%/modules/cpp/cosmic.qbs
%%DATADIR%%/modules/cpp/cpp.js
%%DATADIR%%/modules/cpp/darwin.js
%%DATADIR%%/modules/cpp/dmc.js
%%DATADIR%%/modules/cpp/dmc.qbs
%%DATADIR%%/modules/cpp/freebsd-gcc.qbs
%%DATADIR%%/modules/cpp/freebsd.js
%%DATADIR%%/modules/cpp/gcc.js
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment