From 758f65923c2aea2ddafa0f219545556a7f148efd Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 4 May 2019 01:24:38 +0200 Subject: [PATCH] qbs: add recipe for version 1.13.0. --- dev-util/qbs/patches/qbs-1.13.0.patchset | 109 +++++++++++++++++++++++ dev-util/qbs/qbs-1.13.0.recipe | 73 +++++++++++++++ 2 files changed, 182 insertions(+) create mode 100644 dev-util/qbs/patches/qbs-1.13.0.patchset create mode 100644 dev-util/qbs/qbs-1.13.0.recipe diff --git a/dev-util/qbs/patches/qbs-1.13.0.patchset b/dev-util/qbs/patches/qbs-1.13.0.patchset new file mode 100644 index 000000000..2ca0fb0a6 --- /dev/null +++ b/dev-util/qbs/patches/qbs-1.13.0.patchset @@ -0,0 +1,109 @@ +From 55aabcadc9ec96985a69b0422e66673eaa34d174 Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Tue, 3 Nov 2015 14:31:04 +0300 +Subject: Haiku: implement processNameByPid + + +diff --git a/src/lib/corelib/tools/processutils.cpp b/src/lib/corelib/tools/processutils.cpp +index 060a057..22fcbe2 100644 +--- a/src/lib/corelib/tools/processutils.cpp ++++ b/src/lib/corelib/tools/processutils.cpp +@@ -49,6 +49,8 @@ + # include "fileinfo.h" + # include + # include ++#elif defined(Q_OS_HAIKU) ++# include + #elif defined(Q_OS_BSD4) + # include + # include +@@ -94,6 +96,13 @@ QString processNameByPid(qint64 pid) + sprintf(exePath, "/proc/%lld/exe", pid); + readlink(exePath, buf, sizeof(buf)); + return FileInfo::fileName(QString::fromUtf8(buf)); ++#elif defined(Q_OS_HAIKU) ++ team_info info; ++ if(get_team_info((team_id)pid, &info)==B_OK) { ++ if(info.argc >= 1) ++ return QString::fromUtf8(info.args); ++ } ++ return QString(); + #elif defined(Q_OS_BSD4) + # if defined(Q_OS_NETBSD) + struct kinfo_proc2 kp; +-- +2.21.0 + + +From aa68eea2f2803bb9678c9096e0863dc10fa714d7 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sat, 4 May 2019 01:19:32 +0200 +Subject: haiku changes for 1.13.0 + + +diff --git a/src/lib/corelib/buildgraph/processcommandexecutor.cpp b/src/lib/corelib/buildgraph/processcommandexecutor.cpp +index 0818e12..fbcf74c 100644 +--- a/src/lib/corelib/buildgraph/processcommandexecutor.cpp ++++ b/src/lib/corelib/buildgraph/processcommandexecutor.cpp +@@ -88,6 +88,7 @@ static QProcessEnvironment mergeEnvironments(const QProcessEnvironment &baseEnv, + QStringLiteral("LD_LIBRARY_PATH"), + QStringLiteral("DYLD_LIBRARY_PATH"), + QStringLiteral("DYLD_FRAMEWORK_PATH"), ++ QStringLiteral("LIBRARY_PATH"), + }; + for (const QString &key : additionalEnv.keys()) { + QString newValue = additionalEnv.value(key); +diff --git a/src/lib/corelib/tools/hostosinfo.h b/src/lib/corelib/tools/hostosinfo.h +index cae4516..d1310ed 100644 +--- a/src/lib/corelib/tools/hostosinfo.h ++++ b/src/lib/corelib/tools/hostosinfo.h +@@ -71,7 +71,7 @@ class QBS_EXPORT HostOsInfo // Exported for use by command-line tools. + { + public: + // Add more as needed. +- enum HostOs { HostOsWindows, HostOsLinux, HostOsMacos, HostOsOtherUnix, HostOsOther }; ++ enum HostOs { HostOsWindows, HostOsLinux, HostOsMacos, HostOsHaiku, HostOsOtherUnix, HostOsOther }; + + static inline std::string hostOSIdentifier(); + static inline std::vector hostOSIdentifiers(); +@@ -100,6 +100,7 @@ public: + static bool isWindowsHost() { return hostOs() == HostOsWindows; } + static bool isLinuxHost() { return hostOs() == HostOsLinux; } + static bool isMacosHost() { return hostOs() == HostOsMacos; } ++ static bool isHaikuHost() { return hostOs() == HostOsHaiku; } + static inline bool isAnyUnixHost(); + static inline QString rfc1034Identifier(const QString &str); + +@@ -128,6 +129,8 @@ public: + return QStringLiteral("PATH"); + if (isMacosHost()) + return QStringLiteral("DYLD_LIBRARY_PATH"); ++ if (isHaikuHost()) ++ return QStringLiteral("LIBRARY_PATH"); + return QStringLiteral("LD_LIBRARY_PATH"); + } + +@@ -214,6 +217,8 @@ HostOsInfo::HostOs HostOsInfo::hostOs() + return HostOsLinux; + #elif defined(Q_OS_DARWIN) + return HostOsMacos; ++#elif defined(Q_OS_HAIKU) ++ return HostOsHaiku; + #elif defined(Q_OS_UNIX) + return HostOsOtherUnix; + #else +diff --git a/static-res.pro b/static-res.pro +index 86816bb..3c4d823 100644 +--- a/static-res.pro ++++ b/static-res.pro +@@ -8,6 +8,7 @@ unix:qbs_disable_rpath { + !isEmpty(QBS_DESTDIR): qbslibdir = $$QBS_DESTDIR + else: qbslibdir = $$OUT_PWD/lib + macos: envVar = DYLD_LIBRARY_PATH ++ else: haiku: envVar = LIBRARY_PATH + else: envVar = LD_LIBRARY_PATH + oldVal = $$getenv($$envVar) + newVal = $$qbslibdir +-- +2.21.0 + diff --git a/dev-util/qbs/qbs-1.13.0.recipe b/dev-util/qbs/qbs-1.13.0.recipe new file mode 100644 index 000000000..5b994742e --- /dev/null +++ b/dev-util/qbs/qbs-1.13.0.recipe @@ -0,0 +1,73 @@ +SUMMARY="Qt Build Suite" +DESCRIPTION="Qbs is a cross-platform build tool." +HOMEPAGE="https://wiki.qt.io/Qbs" +COPYRIGHT="2016-2017, Digia Plc and/or its subsidiary(-ies)" +LICENSE="GNU LGPL v2" +REVISION="1" +SOURCE_URI="https://download.qt.io/official_releases/qbs/$portVersion/qbs-src-$portVersion.tar.gz" +CHECKSUM_SHA256="4daa764a944bdb33a4a0dd792864dd9acc24036ad84ef34cfb3215538c6cef89" +SOURCE_DIR="qbs-src-$portVersion" +PATCHES="qbs-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="?x86" + +PROVIDES=" + qbs$secondaryArchSuffix = $portVersion + cmd:qbs = $portVersion + cmd:qbs_config = $portVersion + cmd:qbs_config_ui = $portVersion + cmd:qbs_create_project = $portVersion + cmd:qbs_qmltypes = $portVersion + cmd:qbs_setup_android = $portVersion + cmd:qbs_setup_qt = $portVersion + cmd:qbs_setup_toolchains = $portVersion + lib:libqbscore$secondaryArchSuffix = $portVersion + lib:libqbsqtprofilesetup$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5Network$secondaryArchSuffix + lib:libQt5Script$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + lib:libQt5Xml$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libQt5Core$secondaryArchSuffix + devel:libQt5Gui$secondaryArchSuffix + devel:libQt5Network$secondaryArchSuffix + devel:libQt5Script$secondaryArchSuffix + devel:libQt5Widgets$secondaryArchSuffix + devel:libQt5Xml$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + " + +BUILD() +{ + qmake -r qbs.pro QBS_INSTALL_PREFIX=$prefix + ln -s ../lib/ bin/lib + make $jobArgs +} + +INSTALL() +{ + make install + + mv $prefix/lib $prefix/lib2 + mkdir -p $(dirname $libDir) $(dirname $includeDir) $(diname $dataDir) + + mv $prefix/include $includeDir + mv $prefix/lib2 $libDir + mv $prefix/share $dataDir + mv $prefix/libexec/qbs/* $libDir/qbs/ + rm -rf $prefix/libexec +}