diff --git a/dev-qt/qt6/patches/qt6-6.0.0~beta5.patchset b/dev-qt/qt6/patches/qt6-6.0.0~beta5.patchset new file mode 100644 index 000000000..740893dd3 --- /dev/null +++ b/dev-qt/qt6/patches/qt6-6.0.0~beta5.patchset @@ -0,0 +1,1034 @@ +From f87e0c53d3baf20959e8dcbdbe8130e4f6b4c4b2 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 11 Feb 2019 15:51:31 +1000 +Subject: Fix Haiku build + + +diff --git a/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp b/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp +index e715ed2..1362a13 100644 +--- a/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp ++++ b/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp +@@ -40,7 +40,14 @@ namespace WTF { + static size_t s_pageSize; + static size_t s_pageMask; + +-#if OS(UNIX) ++#if OS(HAIKU) ++ ++inline size_t systemPageSize() ++{ ++ return 4096; ++} ++ ++#elif OS(UNIX) + + inline size_t systemPageSize() + { +diff --git a/qtdeclarative/src/3rdparty/masm/wtf/Platform.h b/qtdeclarative/src/3rdparty/masm/wtf/Platform.h +index 29decfa..1dbd001 100644 +--- a/qtdeclarative/src/3rdparty/masm/wtf/Platform.h ++++ b/qtdeclarative/src/3rdparty/masm/wtf/Platform.h +@@ -418,6 +418,11 @@ + #define WTF_OS_QNX 1 + #endif + ++/* OS(HAIKU) - Haiku */ ++#if defined(__HAIKU__) ++#define WTF_OS_HAIKU 1 ++#endif ++ + /* OS(SOLARIS) - Solaris */ + #if defined(sun) || defined(__sun) + #define WTF_OS_SOLARIS 1 +@@ -452,6 +457,7 @@ + || OS(HURD) \ + || OS(INTEGRITY) \ + || OS(LINUX) \ ++ || OS(HAIKU) \ + || OS(NETBSD) \ + || OS(OPENBSD) \ + || OS(QNX) \ +-- +2.28.0 + + +From 4d7c00a8d5e38eb06fe7e6aebf748b37592eb095 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Mon, 11 Feb 2019 15:53:49 +1000 +Subject: Make sure libs are searched in the develop/ dir by CMake + +Static libs at least are not in the lib[/x86] dirs... + +diff --git a/qtbase/mkspecs/features/create_cmake.prf b/qtbase/mkspecs/features/create_cmake.prf +index 24ed125..52f637e 100644 +--- a/qtbase/mkspecs/features/create_cmake.prf ++++ b/qtbase/mkspecs/features/create_cmake.prf +@@ -112,6 +112,9 @@ win32:!static:!staticlib { + CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/ + CMAKE_DLL_DIR_IS_ABSOLUTE = True + } ++} else:haiku { ++ CMAKE_DLL_DIR = develop/$$CMAKE_LIB_DIR ++ CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE + } else { + CMAKE_DLL_DIR = $$CMAKE_LIB_DIR + CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE +-- +2.28.0 + + +From c2d78b9fc6c17877c26d45ee4e1ceb0ef155745f Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 11 Feb 2019 15:55:08 +1000 +Subject: Disable built-in haiku QPA plugin + + +diff --git a/qtbase/src/plugins/platforms/platforms.pro b/qtbase/src/plugins/platforms/platforms.pro +index 2ce9790..542ae7e 100644 +--- a/qtbase/src/plugins/platforms/platforms.pro ++++ b/qtbase/src/plugins/platforms/platforms.pro +@@ -41,10 +41,6 @@ freebsd { + SUBDIRS += bsdfb + } + +-haiku { +- SUBDIRS += haiku +-} +- + wasm: SUBDIRS += wasm + + qtConfig(integrityfb): SUBDIRS += integrity +-- +2.28.0 + + +From fa73132e47c88c602159c25172523dffeace64bc Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 11 Feb 2019 15:56:12 +1000 +Subject: Fix QStandartPaths for Haiku + + +diff --git a/qtbase/src/corelib/io/qstandardpaths_haiku.cpp b/qtbase/src/corelib/io/qstandardpaths_haiku.cpp +index 044d69f..1f255a9 100644 +--- a/qtbase/src/corelib/io/qstandardpaths_haiku.cpp ++++ b/qtbase/src/corelib/io/qstandardpaths_haiku.cpp +@@ -145,22 +145,22 @@ QString QStandardPaths::writableLocation(StandardLocation type) + return haikuStandardPath(B_USER_NONPACKAGED_BIN_DIRECTORY); + case TempLocation: + return haikuStandardPath(B_SYSTEM_TEMP_DIRECTORY); +- case AppDataLocation: // fall through ++ case AppDataLocation: ++ return haikuAppStandardPath(B_SYSTEM_CACHE_DIRECTORY); + case AppLocalDataLocation: +- return haikuAppStandardPath(B_USER_NONPACKAGED_DATA_DIRECTORY); ++ return haikuAppStandardPath(B_USER_CACHE_DIRECTORY); + case GenericDataLocation: +- return haikuStandardPath(B_USER_NONPACKAGED_DATA_DIRECTORY); ++ return haikuAppStandardPath(B_SYSTEM_CACHE_DIRECTORY); + case CacheLocation: + return haikuAppStandardPath(B_USER_CACHE_DIRECTORY); + case GenericCacheLocation: +- return haikuStandardPath(B_USER_CACHE_DIRECTORY); +- case ConfigLocation: // fall through ++ return haikuStandardPath(B_SYSTEM_CACHE_DIRECTORY); ++ case ConfigLocation: + case AppConfigLocation: +- return haikuAppStandardPath(B_USER_SETTINGS_DIRECTORY); + case GenericConfigLocation: +- return haikuStandardPath(B_USER_SETTINGS_DIRECTORY); ++ return haikuAppStandardPath(B_USER_SETTINGS_DIRECTORY); + default: +- return QString(); ++ return haikuAppStandardPath(B_USER_SETTINGS_DIRECTORY); + } + } + +@@ -179,7 +179,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) + case MoviesLocation: + case DownloadLocation: + case HomeLocation: +- paths += haikuStandardPath(B_USER_NONPACKAGED_DIRECTORY); ++ paths += haikuStandardPath(B_USER_DIRECTORY); + break; + case FontsLocation: + paths += haikuStandardPaths(B_FIND_PATH_FONTS_DIRECTORY); +@@ -203,7 +203,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) + break; + case ConfigLocation: // fall through + case AppConfigLocation: +- paths += haikuAppStandardPath(B_SYSTEM_SETTINGS_DIRECTORY); ++ paths += haikuAppStandardPath(B_USER_SETTINGS_DIRECTORY); + break; + case GenericConfigLocation: + paths += haikuStandardPath(B_SYSTEM_SETTINGS_DIRECTORY); +-- +2.28.0 + + +From b825743e1aff097b1c50e4c928341aa1e0be4641 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 11 Feb 2019 15:56:39 +1000 +Subject: QSslSocketPrivate::unixRootCertDirectories(): add ssl path for Haiku. + + +diff --git a/qtbase/src/network/ssl/qsslsocket.cpp b/qtbase/src/network/ssl/qsslsocket.cpp +index c5444b1..40eaef1 100644 +--- a/qtbase/src/network/ssl/qsslsocket.cpp ++++ b/qtbase/src/network/ssl/qsslsocket.cpp +@@ -2577,6 +2577,7 @@ QList QSslSocketPrivate::unixRootCertDirectories() + << "/usr/local/ssl/certs/" // Solaris + << "/etc/openssl/certs/" // BlackBerry + << "/opt/openssl/certs/" // HP-UX ++ << "/system/data/ssl/" // Haiku + << "/etc/ssl/"; // OpenBSD + } + +-- +2.28.0 + + +From 2fe78cb5761d261df0c4a80675f3091e53d6c75c Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 11 Feb 2019 15:56:59 +1000 +Subject: Fix build for Haiku platform + + +diff --git a/qtbase/mkspecs/features/toolchain.prf b/qtbase/mkspecs/features/toolchain.prf +index 2a1f7cb..d223566 100644 +--- a/qtbase/mkspecs/features/toolchain.prf ++++ b/qtbase/mkspecs/features/toolchain.prf +@@ -258,7 +258,7 @@ isEmpty($${target_prefix}.INCDIRS) { + } + } + } +- if(!darwin:clang)|intel_icc { ++ if(!darwin:clang)|haiku|intel_icc { + # Clang on a non-Apple system (that is, a system without ld64 -- say, with GNU ld + # or gold under Linux) will not print any library search path. Need to use another + # invocation with different options (which in turn doesn't print include search +-- +2.28.0 + + +From be2dce6311928311923a1beac3f31e7320ca8ebc Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 11 Feb 2019 15:57:54 +1000 +Subject: Fix endian detection + + +diff --git a/qtbase/src/3rdparty/sha3/brg_endian.h b/qtbase/src/3rdparty/sha3/brg_endian.h +index 9bb306e..9f0ea58 100644 +--- a/qtbase/src/3rdparty/sha3/brg_endian.h ++++ b/qtbase/src/3rdparty/sha3/brg_endian.h +@@ -39,10 +39,10 @@ Changes for ARM 9/9/2010 [Downstream relative to Gladman's GitHub, upstream to Q + #elif defined( BSD ) && ( BSD >= 199103 ) || defined( __APPLE__ ) || \ + defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ ) + # include +-#elif defined( __linux__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ ) ++#elif defined( __linux__ ) || defined( __HAIKU__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ ) + # if !defined( __MINGW32__ ) && !defined( _AIX ) && !defined(Q_OS_QNX) + # include +-# if !defined( __BEOS__ ) && !defined(Q_OS_RTEMS) ++# if !defined( __BEOS__ ) && !defined( __HAIKU__ ) && !defined(Q_OS_RTEMS) + # include + # endif + # endif +-- +2.28.0 + + +From 60bd6a1e3eca7b5c145d3a3cb1328e0613a3cc56 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sat, 27 Apr 2019 17:47:23 +1000 +Subject: Add dnslookup query function for Haiku + + +diff --git a/qtbase/src/network/kernel/kernel.pri b/qtbase/src/network/kernel/kernel.pri +index aa3e9df..e5b067d 100644 +--- a/qtbase/src/network/kernel/kernel.pri ++++ b/qtbase/src/network/kernel/kernel.pri +@@ -56,6 +56,11 @@ android:qtConfig(dnslookup) { + SOURCES += kernel/qdnslookup_android.cpp + } + ++haiku:qtConfig(dnslookup) { ++ SOURCES -= kernel/qdnslookup_unix.cpp ++ SOURCES += kernel/qdnslookup_haiku.cpp ++} ++ + win32: { + SOURCES += kernel/qhostinfo_win.cpp \ + kernel/qnetworkinterface_win.cpp +-- +2.28.0 + + +From d5610bf4f2b5052f02621e471966f739d0d0c6a1 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Wed, 27 May 2020 19:54:30 +1000 +Subject: Disable LibResolv for Haiku + + +diff --git a/qtbase/src/network/kernel/qhostinfo_unix.cpp b/qtbase/src/network/kernel/qhostinfo_unix.cpp +index 9b0a2ee..480671b 100644 +--- a/qtbase/src/network/kernel/qhostinfo_unix.cpp ++++ b/qtbase/src/network/kernel/qhostinfo_unix.cpp +@@ -87,7 +87,7 @@ typedef void (*res_nclose_proto)(res_state_ptr); + static res_nclose_proto local_res_nclose = nullptr; + static res_state_ptr local_res = nullptr; + +-#if QT_CONFIG(library) && !defined(Q_OS_QNX) ++#if QT_CONFIG(library) && !defined(Q_OS_QNX) && !defined(Q_OS_HAIKU) + namespace { + struct LibResolv + { +-- +2.28.0 + + +From c81eb823fa249e78446a1ab5677cb73261dde002 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 8 Sep 2019 00:17:19 +1000 +Subject: Don't use ifaddrs for Haiku + + +diff --git a/qtbase/src/network/kernel/qnetworkinterface_unix.cpp b/qtbase/src/network/kernel/qnetworkinterface_unix.cpp +index 5b34b99..64b0f2e 100644 +--- a/qtbase/src/network/kernel/qnetworkinterface_unix.cpp ++++ b/qtbase/src/network/kernel/qnetworkinterface_unix.cpp +@@ -53,7 +53,7 @@ + # include "qdatetime.h" + #endif + +-#if defined(QT_LINUXBASE) ++#if defined(QT_LINUXBASE) || defined(Q_OS_HAIKU) + # define QT_NO_GETIFADDRS + #endif + +-- +2.28.0 + + +From 7592a4d86b1885dd733f32027b09e787c89b6882 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 8 Sep 2019 18:32:05 +1000 +Subject: Add platform plugins installer + + +diff --git a/qtbase/src/gui/gui.pro b/qtbase/src/gui/gui.pro +index 13631ab..b207eeb 100644 +--- a/qtbase/src/gui/gui.pro ++++ b/qtbase/src/gui/gui.pro +@@ -29,6 +29,7 @@ testcocoon { + + osx: LIBS_PRIVATE += -framework AppKit + darwin: LIBS_PRIVATE += -framework CoreGraphics ++haiku: LIBS_PRIVATE += -lbe + + CONFIG += simd optimize_full + +diff --git a/qtbase/src/gui/kernel/qguiapplication.cpp b/qtbase/src/gui/kernel/qguiapplication.cpp +index 3dcd065..92d32d5 100644 +--- a/qtbase/src/gui/kernel/qguiapplication.cpp ++++ b/qtbase/src/gui/kernel/qguiapplication.cpp +@@ -117,6 +117,11 @@ + # include + #endif // Q_OS_WIN + ++#if defined(Q_OS_HAIKU) ++#include ++#include ++#endif ++ + #ifdef Q_OS_WASM + #include + #endif +@@ -1235,6 +1240,27 @@ static void init_platform(const QString &pluginNamesWithArguments, const QString + if (!availablePlugins.isEmpty()) + fatalMessage += QStringLiteral("\nAvailable platform plugins are: %1.\n").arg(availablePlugins.join(QLatin1String(", "))); + ++#if defined(Q_OS_HAIKU) ++ BApplication bApp("application/x-vnd.qt5-qtbase"); ++ QString errorMessage = QStringLiteral("Qt platform plugins package is required but not installed.\n\n" ++ "Do you want to install it now?"); ++ int32 index = (new BAlert("Error", errorMessage.toUtf8().constData(), ++ "Install", "Cancel", NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); ++ if (index == 0) { ++#if defined(__INTEL__) && defined(__i386__) && !defined(__x86_64__) ++ int ret = system ("pkgman install qthaikuplugins_x86 -y"); ++#else ++ int ret = system ("pkgman install qthaikuplugins -y"); ++#endif ++ if (ret == 0) ++ (new BAlert("Information", "Platform plugins has been succesfully installed.\nTry running this application again.", ++ "Ok", NULL, NULL, B_WIDTH_AS_USUAL, B_INFO_ALERT))->Go(); ++ else ++ (new BAlert("Error", "Platform plugins is not installed.", "Close", NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT))->Go(); ++ } ++ exit(-1); ++#endif // Q_OS_HAIKU ++ + #if defined(Q_OS_WIN) + // Windows: Display message box unless it is a console application + // or debug build showing an assert box. +-- +2.28.0 + + +From ad6ff5a803240e032068324d58b9db1b53300beb Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 15 Dec 2019 11:27:19 +1000 +Subject: Enable assembler for JIT + + +diff --git a/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h b/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h +index ead1e75..58d9635 100644 +--- a/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h ++++ b/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h +@@ -66,7 +66,7 @@ namespace QV4 { + namespace JIT { + + #if defined(Q_PROCESSOR_X86_64) || defined(ENABLE_ALL_ASSEMBLERS_FOR_REFACTORING_PURPOSES) +-#if defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD) || defined(Q_OS_DARWIN) ++#if defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD) || defined(Q_OS_DARWIN) || defined(Q_OS_HAIKU) + + class PlatformAssembler_X86_64_SysV : public JSC::MacroAssembler + { +-- +2.28.0 + + +From 1152c53795b88115895420f91abd5af62d72f92f Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Wed, 27 May 2020 19:54:58 +1000 +Subject: Disable sharedmemory feature for bootstrap + + +diff --git a/qtbase/src/tools/bootstrap/bootstrap.pro b/qtbase/src/tools/bootstrap/bootstrap.pro +index d2a7805..14c4e12 100644 +--- a/qtbase/src/tools/bootstrap/bootstrap.pro ++++ b/qtbase/src/tools/bootstrap/bootstrap.pro +@@ -11,7 +11,8 @@ MODULE_DEFINES = \ + QT_VERSION_MINOR=$$QT_MINOR_VERSION \ + QT_VERSION_PATCH=$$QT_PATCH_VERSION \ + QT_BOOTSTRAPPED \ +- QT_NO_CAST_TO_ASCII ++ QT_NO_CAST_TO_ASCII \ ++ QT_NO_SHAREDMEMORY + MODULE_CONFIG = gc_binaries + + DEFINES += PCRE2_DISABLE_JIT +-- +2.28.0 + + +From b69efe082781860e6f4bf5e803005cf979d5384b Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sun, 29 Dec 2019 18:13:19 +1000 +Subject: Fix build for x86_gcc2 + + +diff --git a/qtbase/src/3rdparty/forkfd/forkfd.c b/qtbase/src/3rdparty/forkfd/forkfd.c +index c29ebc2..c6309a2 100644 +--- a/qtbase/src/3rdparty/forkfd/forkfd.c ++++ b/qtbase/src/3rdparty/forkfd/forkfd.c +@@ -722,7 +722,7 @@ int forkfd(int flags, pid_t *ppid) + /* parent process */ + info->deathPipe = death_pipe[1]; + fd = death_pipe[0]; +- ffd_atomic_store(&info->pid, pid, FFD_ATOMIC_RELEASE); ++ ffd_atomic_store(&info->pid, (int32_t)pid, FFD_ATOMIC_RELEASE); + + /* release the child */ + #ifdef HAVE_EVENTFD +-- +2.28.0 + + +From 9fec06ddd3f09638942ea142529ae69bffae846f Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Thu, 4 Jun 2020 23:11:17 +1000 +Subject: Implement QFilesystemWatcher for Haiku + + +diff --git a/qtbase/src/corelib/io/io.pri b/qtbase/src/corelib/io/io.pri +index 0808114..eb7b22b 100644 +--- a/qtbase/src/corelib/io/io.pri ++++ b/qtbase/src/corelib/io/io.pri +@@ -94,6 +94,9 @@ qtConfig(filesystemwatcher) { + } else:macos { + OBJECTIVE_SOURCES += io/qfilesystemwatcher_fsevents.mm + HEADERS += io/qfilesystemwatcher_fsevents_p.h ++ } else:haiku { ++ SOURCES += io/qfilesystemwatcher_haiku.cpp ++ HEADERS += io/qfilesystemwatcher_haiku_p.h + } else:qtConfig(inotify) { + SOURCES += io/qfilesystemwatcher_inotify.cpp + HEADERS += io/qfilesystemwatcher_inotify_p.h +diff --git a/qtbase/src/corelib/io/qfilesystemwatcher.cpp b/qtbase/src/corelib/io/qfilesystemwatcher.cpp +index 1712fec..c66aa3c 100644 +--- a/qtbase/src/corelib/io/qfilesystemwatcher.cpp ++++ b/qtbase/src/corelib/io/qfilesystemwatcher.cpp +@@ -54,6 +54,8 @@ + #include "qfilesystemwatcher_polling_p.h" + #if defined(Q_OS_WIN) + # include "qfilesystemwatcher_win_p.h" ++#elif defined(Q_OS_HAIKU) ++# include "qfilesystemwatcher_haiku_p.h" + #elif defined(USE_INOTIFY) + # include "qfilesystemwatcher_inotify_p.h" + #elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(QT_PLATFORM_UIKIT) +@@ -73,6 +75,8 @@ QFileSystemWatcherEngine *QFileSystemWatcherPrivate::createNativeEngine(QObject + { + #if defined(Q_OS_WIN) + return new QWindowsFileSystemWatcherEngine(parent); ++#elif defined(Q_OS_HAIKU) ++ return new QHaikuFileSystemWatcherEngine(parent); + #elif defined(USE_INOTIFY) + // there is a chance that inotify may fail on Linux pre-2.6.13 (August + // 2005), so we can't just new inotify directly. +diff --git a/qtbase/src/corelib/io/qfilesystemwatcher_haiku.cpp b/qtbase/src/corelib/io/qfilesystemwatcher_haiku.cpp +new file mode 100644 +index 0000000..8355ca8 +--- /dev/null ++++ b/qtbase/src/corelib/io/qfilesystemwatcher_haiku.cpp +@@ -0,0 +1,254 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2020 The Qt Company Ltd. ++** Copyright (C) 2015-2020 Gerasim Troeglazov, ++** Contact: 3dEyes@gmail.com ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++****************************************************************************/ ++ ++#include "qfilesystemwatcher_haiku_p.h" ++#include ++#include ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++QHaikuFileWatcher::QHaikuFileWatcher() : QObject(), BLooper() {}; ++QHaikuDirWatcher::QHaikuDirWatcher() : QObject(), BLooper() {}; ++ ++QHaikuFileSystemWatcherEngine::QHaikuFileSystemWatcherEngine(QObject *parent) ++ : QFileSystemWatcherEngine(parent) ++{ ++ fileLooper = new QHaikuFileWatcher(); ++ connect(fileLooper, SIGNAL(fileChanged(const QString &, bool)), SLOT(bfsFileChanged(const QString &, bool))); ++ fileLooper->Run(); ++ ++ dirLooper = new QHaikuDirWatcher(); ++ connect(dirLooper, SIGNAL(directoryChanged(const QString &, bool)), SLOT(bfsDirectoryChanged(const QString &, bool))); ++ dirLooper->Run(); ++} ++ ++QHaikuFileSystemWatcherEngine::~QHaikuFileSystemWatcherEngine() ++{ ++ stop_watching(fileLooper); ++ if (fileLooper->Lock()) ++ fileLooper->Quit(); ++ ++ stop_watching(dirLooper); ++ if (dirLooper->Lock()) ++ dirLooper->Quit(); ++} ++ ++QStringList QHaikuFileSystemWatcherEngine::addPaths(const QStringList &paths, ++ QStringList *files, ++ QStringList *directories) ++{ ++ QStringList unhandled; ++ for (const QString &path : paths) { ++ QFileInfo fi(path); ++ bool isDir = fi.isDir(); ++ auto sg = qScopeGuard([&]{ unhandled.push_back(path); }); ++ if (isDir) { ++ if (directories->contains(path)) ++ continue; ++ } else { ++ if (files->contains(path)) ++ continue; ++ } ++ ++ BEntry entry(path.toUtf8().constData()); ++ if (!entry.Exists()) ++ continue; ++ ++ node_ref nref; ++ entry.GetNodeRef(&nref); ++ status_t status = isDir ? ++ watch_node(&nref, (B_WATCH_NAME | B_WATCH_ATTR | B_WATCH_STAT | B_WATCH_DIRECTORY), dirLooper): ++ watch_node(&nref, (B_WATCH_NAME | B_WATCH_ATTR | B_WATCH_STAT), fileLooper); ++ ++ if (status != B_OK) { ++ qWarning("watch_node(%ls) failed:", path.constData()); ++ continue; ++ } ++ ++ sg.dismiss(); ++ ++ if (isDir) ++ directories->append(path); ++ else ++ files->append(path); ++ } ++ return unhandled; ++} ++ ++QStringList QHaikuFileSystemWatcherEngine::removePaths(const QStringList &paths, ++ QStringList *files, ++ QStringList *directories) ++{ ++ QStringList unhandled; ++ for (const QString &path : paths) { ++ auto sg = qScopeGuard([&]{ unhandled.push_back(path); }); ++ ++ BEntry entry(path.toUtf8().constData()); ++ node_ref nref; ++ entry.GetNodeRef(&nref); ++ ++ if (directories->contains(path)) { ++ directories->removeAll(path); ++ status_t status = watch_node(&nref, B_STOP_WATCHING, dirLooper); ++ } else if (files->contains(path)) { ++ files->removeAll(path); ++ status_t status = watch_node(&nref, B_STOP_WATCHING, fileLooper); ++ } else { ++ continue; ++ } ++ ++ sg.dismiss(); ++ } ++ ++ return unhandled; ++} ++ ++void ++QHaikuDirWatcher::MessageReceived(BMessage* message) ++{ ++ if (message->what == B_NODE_MONITOR) { ++ int32 opcode; ++ ++ if (message->FindInt32("opcode", &opcode) != B_OK) ++ return; ++ ++ switch (opcode) { ++ case B_ENTRY_MOVED: ++ { ++ int32 device = 0; ++ int64 srcFolder = 0; ++ int64 dstFolder = 0; ++ const char* name = NULL; ++ if (message->FindInt32("device", &device) != B_OK ++ || message->FindInt64("to directory", &dstFolder) != B_OK ++ || message->FindInt64("from directory", &srcFolder) != B_OK ++ || message->FindString("name", &name) != B_OK) ++ break; ++ ++ entry_ref ref(device, srcFolder, name); ++ BEntry entry(&ref); ++ ++ BEntry dirEntry; ++ entry.GetParent(&dirEntry); ++ ++ BPath path; ++ dirEntry.GetPath(&path); ++ ++ QString qpath = QString::fromUtf8(path.Path()); ++ ++ emit directoryChanged(qpath, false); ++ } ++ break; ++ case B_ENTRY_CREATED: ++ case B_ENTRY_REMOVED: ++ { ++ int64 directory; ++ int32 device; ++ int64 node; ++ const char *name; ++ if (message->FindInt64("directory", &directory) != B_OK ++ || message->FindInt32("device", &device) != B_OK ++ || message->FindInt64("node", &node) != B_OK ++ || message->FindString("name", &name) != B_OK) ++ break; ++ ++ entry_ref ref(device, directory, name); ++ BEntry entry(&ref); ++ BEntry dirEntry; ++ entry.GetParent(&dirEntry); ++ ++ BPath path; ++ dirEntry.GetPath(&path); ++ ++ QString qpath = QString::fromUtf8(path.Path()); ++ emit directoryChanged(qpath, opcode == B_ENTRY_REMOVED); ++ } ++ break; ++ } ++ } ++} ++ ++void ++QHaikuFileWatcher::MessageReceived(BMessage* message) ++{ ++ if (message->what == B_NODE_MONITOR) { ++ int32 opcode; ++ node_ref nref; ++ const char *name; ++ ++ if (message->FindInt32("opcode", &opcode) != B_OK) ++ return; ++ ++ switch (opcode) { ++ case B_ENTRY_MOVED: ++ { ++ int32 device = 0; ++ int64 srcFolder = 0; ++ int64 dstFolder = 0; ++ const char* name = NULL; ++ if (message->FindInt32("device", &device) != B_OK ++ || message->FindInt64("to directory", &dstFolder) != B_OK ++ || message->FindInt64("from directory", &srcFolder) != B_OK ++ || message->FindString("name", &name) != B_OK) ++ break; ++ ++ entry_ref ref(device, srcFolder, name); ++ BEntry entry(&ref); ++ ++ BPath path; ++ entry.GetPath(&path); ++ ++ QString qpath = QString::fromUtf8(path.Path()); ++ ++ emit fileChanged(qpath, false); ++ } ++ break; ++ case B_STAT_CHANGED: ++ case B_ATTR_CHANGED: ++ BString path; ++ if (message->FindString("path", &path) == B_OK) { ++ QString qpath = QString::fromUtf8(path.String()); ++ ++ QFileInfo fi(qpath); ++ if (!fi.exists()) ++ emit fileChanged(qpath, true); ++ else ++ emit fileChanged(qpath, false); ++ } ++ break; ++ } ++ } ++} ++ ++void ++QHaikuFileSystemWatcherEngine::bfsDirectoryChanged(const QString &path, bool removed) ++{ ++ emit directoryChanged(path, removed); ++} ++ ++void ++QHaikuFileSystemWatcherEngine::bfsFileChanged(const QString &path, bool removed) ++{ ++ emit fileChanged(path, removed); ++} ++ ++QT_END_NAMESPACE ++ ++#include "moc_qfilesystemwatcher_haiku_p.cpp" +diff --git a/qtbase/src/corelib/io/qfilesystemwatcher_haiku_p.h b/qtbase/src/corelib/io/qfilesystemwatcher_haiku_p.h +new file mode 100644 +index 0000000..8a8d75a +--- /dev/null ++++ b/qtbase/src/corelib/io/qfilesystemwatcher_haiku_p.h +@@ -0,0 +1,84 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2020 The Qt Company Ltd. ++** Copyright (C) 2015-2020 Gerasim Troeglazov, ++** Contact: 3dEyes@gmail.com ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++****************************************************************************/ ++ ++#ifndef QFILESYSTEMWATCHER_HAIKU_P_H ++#define QFILESYSTEMWATCHER_HAIKU_P_H ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "qfilesystemwatcher_p.h" ++ ++QT_REQUIRE_CONFIG(filesystemwatcher); ++QT_BEGIN_NAMESPACE ++ ++class QHaikuDirWatcher : public QObject, public BLooper { ++ Q_OBJECT ++public: ++ QHaikuDirWatcher(); ++ virtual void MessageReceived(BMessage* msg); ++Q_SIGNALS: ++ void directoryChanged(const QString &path, bool removed); ++}; ++ ++class QHaikuFileWatcher : public QObject, public BLooper { ++ Q_OBJECT ++public: ++ QHaikuFileWatcher(); ++ virtual void MessageReceived(BMessage* msg); ++Q_SIGNALS: ++ void fileChanged(const QString &path, bool removed); ++}; ++ ++class QHaikuFileSystemWatcherEngine : public QFileSystemWatcherEngine ++{ ++ Q_OBJECT ++ ++public: ++ QHaikuFileSystemWatcherEngine(QObject *parent); ++ ~QHaikuFileSystemWatcherEngine(); ++ ++ QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories) override; ++ QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories) override; ++ ++private: ++ QHaikuDirWatcher *dirLooper; ++ QHaikuFileWatcher *fileLooper; ++ ++private Q_SLOTS: ++ void bfsDirectoryChanged(const QString &path, bool removed); ++ void bfsFileChanged(const QString &path, bool removed); ++}; ++ ++QT_END_NAMESPACE ++#endif // QFILESYSTEMWATCHER_HAIKU_P_H ++ +-- +2.28.0 + + +From 1c47d31e7754abf3309e0c3807f4fd23f92ee217 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Tue, 16 Jun 2020 18:06:57 +1000 +Subject: Don't use AF_INET6 for new sockets + + +diff --git a/qtbase/src/network/socket/qnativesocketengine_unix.cpp b/qtbase/src/network/socket/qnativesocketengine_unix.cpp +index a39b345..64b3bb6 100644 +--- a/qtbase/src/network/socket/qnativesocketengine_unix.cpp ++++ b/qtbase/src/network/socket/qnativesocketengine_unix.cpp +@@ -265,8 +265,12 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc + } + int protocol = 0; + #endif // QT_NO_SCTP ++#ifdef Q_OS_HAIKU ++ int domain = AF_INET; ++#else + int domain = (socketProtocol == QAbstractSocket::IPv6Protocol + || socketProtocol == QAbstractSocket::AnyIPProtocol) ? AF_INET6 : AF_INET; ++#endif + int type = (socketType == QAbstractSocket::UdpSocket) ? SOCK_DGRAM : SOCK_STREAM; + + int socket = qt_safe_socket(domain, type, protocol, O_NONBLOCK); +-- +2.28.0 + + +From 12633d2d3809f705f9389d5c1e7aeacb4d39fe58 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 5 Oct 2020 19:40:40 +1000 +Subject: Disable Haswell CPU feature for plugins + + +diff --git a/qtbase/src/corelib/plugin/qlibrary_unix.cpp b/qtbase/src/corelib/plugin/qlibrary_unix.cpp +index 95aeee8..3b9bd2d 100644 +--- a/qtbase/src/corelib/plugin/qlibrary_unix.cpp ++++ b/qtbase/src/corelib/plugin/qlibrary_unix.cpp +@@ -191,7 +191,7 @@ bool QLibraryPrivate::load_sys() + prefixes.append(QString()); + } + +-#if defined(Q_PROCESSOR_X86) && !defined(Q_OS_DARWIN) ++#if defined(Q_PROCESSOR_X86) && !defined(Q_OS_DARWIN) && !defined(Q_OS_HAIKU) + if (qCpuHasFeature(ArchHaswell)) { + auto transform = [](QStringList &list, void (*f)(QString *)) { + QStringList tmp; +-- +2.28.0 + + +From ad170c0800e34b29467ee62ae78a80b70dfbb783 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 12 Nov 2020 17:50:04 +0100 +Subject: Haiku build setup + + +diff --git a/qtbase/cmake/QtRpathHelpers.cmake b/qtbase/cmake/QtRpathHelpers.cmake +index 126ed2c..a7de54a 100644 +--- a/qtbase/cmake/QtRpathHelpers.cmake ++++ b/qtbase/cmake/QtRpathHelpers.cmake +@@ -22,6 +22,8 @@ function(qt_compute_relative_rpath_base rpath install_location out_var) + set(rpath_rel_base "@loader_path") + elseif(LINUX) + set(rpath_rel_base "$ORIGIN") ++ elseif(HAIKU) ++ set(rpath_rel_base "$ORIGIN") + else() + message(WARNING "No known RPATH_REL_BASE for target platform.") + set(rpath_rel_base "NO_KNOWN_RPATH_REL_BASE") +diff --git a/qtbase/cmake/QtSetup.cmake b/qtbase/cmake/QtSetup.cmake +index 7a86b29..e394b85 100644 +--- a/qtbase/cmake/QtSetup.cmake ++++ b/qtbase/cmake/QtSetup.cmake +@@ -49,7 +49,7 @@ elseif(APPLE) + endif() + + ## Position independent code: +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++set(CMAKE_POSITION_INDEPENDENT_CODE OFF) + + # Do not relink dependent libraries when no header has changed: + set(CMAKE_LINK_DEPENDS_NO_SHARED ON) +-- +2.28.0 + + +From cf13a0a0cb8aa26d0934b4412a4dfe691338002c Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 12 Nov 2020 18:28:51 +0100 +Subject: Haiku: disable shared memory for bootstrap + + +diff --git a/qtbase/src/tools/bootstrap/CMakeLists.txt b/qtbase/src/tools/bootstrap/CMakeLists.txt +index 7669207..7baf0c8 100644 +--- a/qtbase/src/tools/bootstrap/CMakeLists.txt ++++ b/qtbase/src/tools/bootstrap/CMakeLists.txt +@@ -141,6 +141,7 @@ qt_internal_extend_target(Bootstrap + QT_NO_CAST_FROM_ASCII + QT_NO_CAST_TO_ASCII + QT_NO_FOREACH ++ QT_NO_SHAREDMEMORY + INCLUDE_DIRECTORIES + .. + ../../3rdparty/pcre2/src +-- +2.28.0 + + +From 53a009355d44c4f0097bdc1e31f249bb7ac6abf3 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 12 Nov 2020 18:40:44 +0100 +Subject: Add QFilesystemWatcher for Haiku in cmake build + + +diff --git a/qtbase/src/corelib/CMakeLists.txt b/qtbase/src/corelib/CMakeLists.txt +index 3516bf5..73c440e 100644 +--- a/qtbase/src/corelib/CMakeLists.txt ++++ b/qtbase/src/corelib/CMakeLists.txt +@@ -891,6 +891,11 @@ qt_internal_extend_target(Core CONDITION MACOS AND QT_FEATURE_filesystemwatcher + io/qfilesystemwatcher_fsevents.mm io/qfilesystemwatcher_fsevents_p.h + ) + ++qt_internal_extend_target(Core CONDITION HAIKU AND QT_FEATURE_filesystemwatcher ++ SOURCES ++ io/qfilesystemwatcher_haiku.cpp io/qfilesystemwatcher_haiku_p.h ++) ++ + qt_internal_extend_target(Core CONDITION QT_FEATURE_filesystemwatcher AND QT_FEATURE_inotify AND UNIX AND NOT MACOS + SOURCES + io/qfilesystemwatcher_inotify.cpp io/qfilesystemwatcher_inotify_p.h +-- +2.28.0 + + +From 433777ab12c778f2fc7bcaeb0d93690ec870ad8e Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 12 Nov 2020 22:33:56 +0100 +Subject: Haiku: link against libnetwork + + +diff --git a/qtbase/src/network/CMakeLists.txt b/qtbase/src/network/CMakeLists.txt +index a678d3f..2e4b963 100644 +--- a/qtbase/src/network/CMakeLists.txt ++++ b/qtbase/src/network/CMakeLists.txt +@@ -200,6 +200,11 @@ qt_internal_extend_target(Network CONDITION QT_FEATURE_dnslookup AND WIN32 + kernel/qdnslookup_win.cpp + ) + ++qt_internal_extend_target(Network CONDITION HAIKU ++ LIBRARIES ++ network ++) ++ + qt_internal_extend_target(Network CONDITION APPLE AND NOT UIKIT + LIBRARIES + ${FWCoreServices} +-- +2.28.0 + + +From f8c25e13b5b88a31cf6e55bfa76accf528627335 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 12 Nov 2020 22:34:31 +0100 +Subject: ifr_index + + +diff --git a/qtbase/src/network/kernel/qnetworkinterface_unix.cpp b/qtbase/src/network/kernel/qnetworkinterface_unix.cpp +index 64b0f2e..1966fbc 100644 +--- a/qtbase/src/network/kernel/qnetworkinterface_unix.cpp ++++ b/qtbase/src/network/kernel/qnetworkinterface_unix.cpp +@@ -111,7 +111,7 @@ uint QNetworkInterfaceManager::interfaceIndexFromName(const QString &name) + + uint id = 0; + if (qt_safe_ioctl(socket, SIOCGIFINDEX, &req) >= 0) +- id = req.ifr_ifindex; ++ id = req.ifr_index; + qt_safe_close(socket); + return id; + #else +@@ -130,7 +130,7 @@ QString QNetworkInterfaceManager::interfaceNameFromIndex(uint index) + int socket = qt_safe_socket(AF_INET, SOCK_STREAM, 0); + if (socket >= 0) { + memset(&req, 0, sizeof(ifreq)); +- req.ifr_ifindex = index; ++ req.ifr_index = index; + + if (qt_safe_ioctl(socket, SIOCGIFNAME, &req) >= 0) { + qt_safe_close(socket); +-- +2.28.0 + diff --git a/dev-qt/qt6/qt6-6.0.0~beta5.recipe b/dev-qt/qt6/qt6-6.0.0~beta5.recipe new file mode 100644 index 000000000..30409cae4 --- /dev/null +++ b/dev-qt/qt6/qt6-6.0.0~beta5.recipe @@ -0,0 +1,565 @@ +SUMMARY="A comprehensive C++ application development framework" +DESCRIPTION="Qt is a cross-platform application framework that is widely \ +used for developing software with a graphical user interface, and also used \ +for developing non-GUI programs such as command-line tools and consoles for \ +servers." +HOMEPAGE="https://qt.io/" +COPYRIGHT="2015-2020 The Qt Company Ltd." +LICENSE="GNU LGPL v2.1 + GNU LGPL v3 + FDL" +REVISION="1" +SOURCE_URI="https://download.qt.io/development_releases/qt/${portVersion%.*}/${portVersion/\~/-}/single/qt-everywhere-src-${portVersion/\~/-}.tar.xz" +CHECKSUM_SHA256="0955320341731051d682e155d4f1252453f933725fb140a7606c3482cafea3b4" +SOURCE_DIR="qt-everywhere-src-${portVersion/\~/-}" +PATCHES="qt6-$portVersion.patchset" +ADDITIONAL_FILES=" + Assistant.rdef.in + Designer.rdef.in + Linguist.rdef.in + QDBusViewer.rdef.in + " + +ARCHITECTURES="!x86_gcc2 x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86" + +PROVIDES=" + qt6$secondaryArchSuffix = $portVersion compat >= 6 + lib:libqt6$secondaryArchSuffix = $portVersion compat >= 6 + # qtbase + lib:libQt6Concurrent$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Core$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Core5Compat$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6DBus$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6EglFSDeviceIntegration$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Gui$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Network$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6OpenGL$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6OpenGLWidgets$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6PrintSupport$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Sql$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Test$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6UiTools$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Widgets$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Xml$secondaryArchSuffix = $portVersion compat >= 6 + # qt3d + lib:libQt63DAnimation$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt63DCore$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt63DExtras$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt63DInput$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt63DLogic$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt63DQuick$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt63DQuickAnimation$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt63DQuickExtras$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt63DQuickInput$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt63DQuickRender$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt63DQuickScene2D$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt63DRender$secondaryArchSuffix = $portVersion compat >= 6 + # qtcharts + lib:libQt6Charts$secondaryArchSuffix = $portVersion compat >= 6 + # qtconnectivity + lib:libQt6Bluetooth$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Nfc$secondaryArchSuffix = $portVersion compat >= 6 + # qtdatavis3d + lib:libQt6DataVisualization$secondaryArchSuffix = $portVersion compat >= 6 + # qtdeclarative + lib:libQt6Qml$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6QmlModels$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6QmlWorkerScript$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Quick$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Quick3D$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Quick3DAssetImport$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Quick3DRender$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Quick3DRuntimeRender$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Quick3DUtils$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6QuickControls2$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6QuickControls2Impl$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6QuickParticles$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6QuickShapes$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6QuickTemplates2$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6QuickTest$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6QuickWidgets$secondaryArchSuffix = $portVersion compat >= 6 + # qtgamepad + lib:libQt6Gamepad$secondaryArchSuffix = $portVersion compat >= 6 + # qtlocation + lib:libQt6Location$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Positioning$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6PositioningQuick$secondaryArchSuffix = $portVersion compat >= 6 + # qtlottie + lib:libQt6Bodymovin$secondaryArchSuffix = $portVersion compat >= 6 + # qtmultimedia + lib:libQt6Multimedia$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6MultimediaGstTools$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6MultimediaQuick$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6MultimediaWidgets$secondaryArchSuffix = $portVersion compat >= 6 + # qtnetworkauth + lib:libQt6NetworkAuth$secondaryArchSuffix = $portVersion compat >= 6 + # qtpurchasing + lib:libQt6Purchasing$secondaryArchSuffix = $portVersion compat >= 6 + # qtremoteobjects + lib:libQt6RemoteObjects$secondaryArchSuffix = $portVersion compat >= 6 + # qtscript + lib:libQt6Script$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6ScriptTools$secondaryArchSuffix = $portVersion compat >= 6 + # qtscxml + lib:libQt6Scxml$secondaryArchSuffix = $portVersion compat >= 6 + # qtsensors + lib:libQt6Sensors$secondaryArchSuffix = $portVersion compat >= 6 + # qtserialbus + lib:libQt6SerialBus$secondaryArchSuffix = $portVersion compat >= 6 + # qtserialport + lib:libQt6SerialPort$secondaryArchSuffix = $portVersion compat >= 6 + # qtspeech + lib:libQt6TextToSpeech$secondaryArchSuffix = $portVersion compat >= 6 + # qtsvg + lib:libQt6Svg$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6SvgWidgets$secondaryArchSuffix = $portVersion compat >= 6 + # qttools + lib:libQt6Help$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6Designer$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6DesignerComponents$secondaryArchSuffix = $portVersion compat >= 6 + lib:libQt6ShaderTools$secondaryArchSuffix = $portVersion compat >= 6 + # qtvirtualkeyboard + lib:libQt6VirtualKeyboard$secondaryArchSuffix = $portVersion compat >= 6 + # qtwebchannel + lib:libQt6WebChannel$secondaryArchSuffix = $portVersion compat >= 6 + # qtwebsockets + lib:libQt6WebSockets$secondaryArchSuffix = $portVersion compat >= 6 + # qtxmlpatterns + lib:libQt6XmlPatterns$secondaryArchSuffix = $portVersion compat >= 6 + # qtwebview + lib:libQt6WebView$secondaryArchSuffix = $portVersion compat >= 6 + " + +REQUIRES=" + haiku$secondaryArchSuffix + cmd:qsystray + lib:libdouble_conversion$secondaryArchSuffix + lib:libegl$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libfontconfig$secondaryArchSuffix + lib:libgl$secondaryArchSuffix + lib:libglib_2.0$secondaryArchSuffix + lib:libgthread_2.0$secondaryArchSuffix + lib:libharfbuzz$secondaryArchSuffix + lib:libicudata$secondaryArchSuffix >= 66 + lib:libicui18n$secondaryArchSuffix >= 66 + lib:libicuuc$secondaryArchSuffix >= 66 + lib:libintl$secondaryArchSuffix + lib:libpcre2_16$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libzstd$secondaryArchSuffix + " + +PROVIDES_devel=" + qt6${secondaryArchSuffix}_devel = $portVersion compat >= 6 + devel:libqt6$secondaryArchSuffix = $portVersion compat >= 6 + # qtbase + devel:libQt6Bootstrap$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Concurrent$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Core$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Core5Compat$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Core_qobject$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6DBus$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6EdidSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Gui$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Network$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6OpenGL$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6OpenGLExtensions$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6OpenGLWidgets$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6PrintSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Sql$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Test$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Widgets$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Xml$secondaryArchSuffix = $portVersion compat >= 6 + # qt3d + devel:libQt63DAnimation$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt63DCore$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt63DExtras$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt63DInput$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt63DLogic$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt63DQuick$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt63DQuickAnimation$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt63DQuickExtras$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt63DQuickInput$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt63DQuickRender$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt63DQuickScene2D$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt63DRender$secondaryArchSuffix = $portVersion compat >= 6 + # qtcharts + devel:libQt6Charts$secondaryArchSuffix = $portVersion compat >= 6 + # qtconnectivity + devel:libQt6Bluetooth$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Nfc$secondaryArchSuffix = $portVersion compat >= 6 + # qtdatavis3d + devel:libQt6DataVisualization$secondaryArchSuffix = $portVersion compat >= 6 + # qtdeclarative + devel:libQt6PacketProtocol$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Qml$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QmlDebug$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QmlModels$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QmlWorkerScript$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Quick$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Quick3D$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Quick3DAssetImport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Quick3DRender$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Quick3DRuntimeRender$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Quick3DUtils$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QuickControls2$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QuickControls2Impl$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QuickParticles$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QuickShapes$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QuickTemplates2$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QuickTest$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QuickWidgets$secondaryArchSuffix = $portVersion compat >= 6 + # qtgamepad + devel:libQt6Gamepad$secondaryArchSuffix = $portVersion compat >= 6 + # qtlocation + devel:libQt6Location$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Positioning$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6PositioningQuick$secondaryArchSuffix = $portVersion compat >= 6 + # qtlottie + devel:libQt6Bodymovin$secondaryArchSuffix = $portVersion compat >= 6 + # qtmultimedia + devel:libQt6Multimedia$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6MultimediaGstTools$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6MultimediaQuick$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6MultimediaWidgets$secondaryArchSuffix = $portVersion compat >= 6 + # qtnetworkauth + devel:libQt6NetworkAuth$secondaryArchSuffix = $portVersion compat >= 6 + # qtpurchasing + devel:libQt6Purchasing$secondaryArchSuffix = $portVersion compat >= 6 + # qtquick1 + devel:libQt6QmlDevTools$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6UiTools$secondaryArchSuffix = $portVersion compat >= 6 + # qtremoteobjects + devel:libQt6RemoteObjects$secondaryArchSuffix = $portVersion compat >= 6 + # qtscript + devel:libQt6Script$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6ScriptTools$secondaryArchSuffix = $portVersion compat >= 6 + # qtscxml + devel:libQt6Scxml$secondaryArchSuffix = $portVersion compat >= 6 + # qtsensors + devel:libQt6Sensors$secondaryArchSuffix = $portVersion compat >= 6 + # qtserialbus + devel:libQt6SerialBus$secondaryArchSuffix = $portVersion compat >= 6 + # qtserialport + devel:libQt6SerialPort$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6ShaderTools$secondaryArchSuffix = $portVersion compat >= 6 + # qtspeech + devel:libQt6TextToSpeech$secondaryArchSuffix = $portVersion compat >= 6 + # qtsvg + devel:libQt6Svg$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6SvgWidgets$secondaryArchSuffix = $portVersion compat >= 6 + # qttools + devel:libQt6Designer$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6DesignerComponents$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6Help$secondaryArchSuffix = $portVersion compat >= 6 + # qtvirtualkeyboard + devel:libQt6VirtualKeyboard$secondaryArchSuffix = $portVersion compat >= 6 + # qtwebchannel + devel:libQt6WebChannel$secondaryArchSuffix = $portVersion compat >= 6 + # qtwebsockets + devel:libQt6WebSockets$secondaryArchSuffix = $portVersion compat >= 6 + # qtxmlpatterns + devel:libQt6XmlPatterns$secondaryArchSuffix = $portVersion compat >= 6 + # qtwebview + devel:libQt6WebView$secondaryArchSuffix = $portVersion compat >= 6 + + devel:libQt6AccessibilitySupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6DeviceDiscoverySupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6EdidSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6EglSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6EglFSDeviceIntegration$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6EventDispatcherSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6FbSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6FontDatabaseSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6OpenGLExtensions$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6PacketProtocol$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6PlatformCompositorSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QmlCompiler$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QmlDebug$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6QmlDevTools$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6ServiceSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6ThemeSupport$secondaryArchSuffix = $portVersion compat >= 6 + devel:libQt6UiTools$secondaryArchSuffix = $portVersion compat >= 6 + + cmd:balsam = $portVersion compat >= 6 + cmd:meshdebug = $portVersion compat >= 6 + cmd:moc = $portVersion compat >= 6 + cmd:qgltf = $portVersion compat >= 6 + cmd:qlalr = $portVersion compat >= 6 + cmd:qmake = $portVersion compat >= 6 + cmd:qml = $portVersion compat >= 6 + cmd:qmlcachegen = $portVersion compat >= 6 + cmd:qmleasing = $portVersion compat >= 6 + cmd:qmlformat = $portVersion compat >= 6 + cmd:qmlimportscanner = $portVersion compat >= 6 + cmd:qmllint = $portVersion compat >= 6 + cmd:qmlmin = $portVersion compat >= 6 + cmd:qmlplugindump = $portVersion compat >= 6 + cmd:qmlprofiler = $portVersion compat >= 6 + cmd:qmlpreview = $portVersion compat >= 6 + cmd:qmlscene = $portVersion compat >= 6 + cmd:qmltestrunner = $portVersion compat >= 6 + cmd:qmltyperegistrar = $portVersion compat >= 6 + cmd:qscxmlc = $portVersion compat >= 6 + cmd:qvkgen = $portVersion compat >= 6 + cmd:rcc = $portVersion compat >= 6 + cmd:repc = $portVersion compat >= 6 + cmd:shadergen = $portVersion compat >= 6 + cmd:syncqt.pl = $portVersion compat >= 6 + cmd:tracegen = $portVersion compat >= 6 + cmd:uic = $portVersion compat >= 6 + cmd:xmlpatterns = $portVersion compat >= 6 + cmd:xmlpatternsvalidator = $portVersion compat >= 6 + # new in Qt6 + cmd:androiddeployqt = portVersion compat >= 6 + cmd:androidtestrunner = portVersion compat >= 6 + cmd:cmake_automoc_parser = portVersion compat >= 6 + cmd:qmltime = portVersion compat >= 6 + cmd:qsb = portVersion compat >= 6 + cmd:qt_cmake = portVersion compat >= 6 + cmd:qt_cmake_private = portVersion compat >= 6 + cmd:qt_cmake_private_install.cmake = portVersion compat >= 6 + cmd:qt_cmake_standalone_test = portVersion compat >= 6 + cmd:qt_configure_module = portVersion compat >= 6 + cmd:qt_internal_configure_tests = portVersion compat >= 6 + cmd:shadergen = portVersion compat >= 6 + " + +# if libssl and libcrypto are not in REQUIRES_devel, +# qmake will decide that there is no system OpenSSL support +# and thus build Qt apps without any SSL support. +REQUIRES_devel=" + qt6$secondaryArchSuffix == $portVersion base + haiku$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libgl$secondaryArchSuffix + lib:libglu$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libzstd$secondaryArchSuffix + devel:libgl$secondaryArchSuffix + " + +PROVIDES_tools=" + qt6${secondaryArchSuffix}_tools = $portVersion compat >= 6 + app:Assistant$secondaryArchSuffix = $portVersion compat >= 6 + app:Designer$secondaryArchSuffix = $portVersion compat >= 6 + app:Linguist$secondaryArchSuffix = $portVersion compat >= 6 + app:QDBusViewer$secondaryArchSuffix = $portVersion compat >= 6 + cmd:assistant = $portVersion compat >= 6 + cmd:designer = $portVersion compat >= 6 + cmd:lconvert = $portVersion compat >= 6 + cmd:linguist = $portVersion compat >= 6 + cmd:lprodump = $portVersion compat >= 6 + cmd:lrelease = $portVersion compat >= 6 + cmd:lrelease_pro = $portVersion compat >= 6 + cmd:lupdate = $portVersion compat >= 6 + cmd:lupdate_pro = $portVersion compat >= 6 + cmd:pixeltool = $portVersion compat >= 6 + cmd:qcollectiongenerator = $portVersion compat >= 6 + cmd:qdbus = $portVersion compat >= 6 + cmd:qdbuscpp2xml = $portVersion compat >= 6 + cmd:qdbusviewer = $portVersion compat >= 6 + cmd:qdbusxml2cpp = $portVersion compat >= 6 + cmd:qdistancefieldgenerator = $portVersion compat >= 6 + cmd:qdoc = $portVersion compat >= 6 + cmd:qhelpgenerator = $portVersion compat >= 6 + cmd:qtattributionsscanner = $portVersion compat >= 6 + cmd:qtdiag = $portVersion compat >= 6 + cmd:qtpaths = $portVersion compat >= 6 + cmd:qtplugininfo = $portVersion compat >= 6 + " +REQUIRES_tools=" + qt6$secondaryArchSuffix == $portVersion base + haiku$secondaryArchSuffix + lib:libgl$secondaryArchSuffix + lib:libLLVM_9$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel +# devel:libclang$secondaryArchSuffix >= 9 +# devel:libclanganalysis$secondaryArchSuffix >= 9 +# devel:libLLVM_9$secondaryArchSuffix + devel:libcrypto$secondaryArchSuffix + devel:libdouble_conversion$secondaryArchSuffix >= 3 + devel:libegl$secondaryArchSuffix +# devel:libflite$secondaryArchSuffix + devel:libfontconfig$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + devel:libgl$secondaryArchSuffix +# devel:libglu$secondaryArchSuffix + devel:libglib_2.0$secondaryArchSuffix +# devel:libgstapp_1.0$secondaryArchSuffix +# devel:libgstaudio_1.0$secondaryArchSuffix +# devel:libgstbadaudio_1.0$secondaryArchSuffix +# devel:libgstbase_1.0$secondaryArchSuffix +# devel:libgstpbutils_1.0$secondaryArchSuffix +# devel:libgstreamer_1.0$secondaryArchSuffix +# devel:libgstvideo_1.0$secondaryArchSuffix + devel:libharfbuzz$secondaryArchSuffix + devel:libicuuc$secondaryArchSuffix >= 66 + devel:libjpeg$secondaryArchSuffix +# devel:libopenal$secondaryArchSuffix +# devel:liborc_0.4$secondaryArchSuffix + devel:libpcre2_16$secondaryArchSuffix + devel:libpng16$secondaryArchSuffix + devel:libsqlite3$secondaryArchSuffix + devel:libssl$secondaryArchSuffix +# devel:libtiff$secondaryArchSuffix >= 6 +# devel:libxml2$secondaryArchSuffix + devel:libz$secondaryArchSuffix + devel:libzstd$secondaryArchSuffix + " + +BUILD_PREREQUIRES=" + cmd:awk +# cmd:bison + cmd:cmake >= 3.18 +# cmd:cmp + cmd:find +# cmd:flex + cmd:g++$secondaryArchSuffix +# cmd:gperf +# cmd:grep + cmd:ld$secondaryArchSuffix + cmd:make + cmd:ninja +# cmd:orcc$secondaryArchSuffix + cmd:perl + cmd:pkg_config$secondaryArchSuffix + cmd:python3 +# cmd:ruby + cmd:sed + cmd:xargs +# cmd:which + " + +BUILD() +{ +# export LLVM_INSTALL_DIR="$(llvm-config --prefix)" + + export CMAKE_C_FLAGS=-fPIC + export CMAKE_CXX_FLAGS=-fPIC + CPPFLAGS=-D_BSD_SOURCE ./configure \ + -prefix $prefix \ + -bindir $prefix/bin \ + -libdir $libDir \ + -libexecdir $libExecDir \ + -headerdir $includeDir \ + -docdir $docDir/Qt6 \ + -datadir $dataDir/Qt6 \ + -archdatadir $dataDir/Qt6 \ + -translationdir $dataDir/Qt6/translations \ + -sysconfdir $settingsDir \ + -testsdir $dataDir/Qt6/tests \ + -examplesdir $dataDir/Qt6/examples \ + -qmldir $dataDir/Qt6/qml \ + -plugindir $addOnsDir/Qt6 \ + -platform haiku-g++ -no-pch \ + -nomake examples -nomake tests \ + -release -opensource \ + -confirm-license \ + -no-rpath -system-sqlite \ + -feature-ipc_posix \ + -strip + ninja $jobArgs +} + +INSTALL() +{ + export QT_INSTALL_HEADERS=$includeDir + export LLVM_INSTALL_DIR="$(llvm-config --prefix)" + + ninja install + + fixPkgconfig + + prepareInstalledDevelLibs \ + libQt6Concurrent libQt6Core libQt6Core5Compat libQt6DBus \ + libQt6Designer libQt6DesignerComponents libQt6EglFSDeviceIntegration \ + libQt6Gui libQt6Help libQt6Network libQt6OpenGL libQt6OpenGLWidgets \ + libQt6PrintSupport \ + libQt6Qml libQt6QmlModels libQt6QmlWorkerScript libQt6Quick \ + libQt6Quick3D libQt6Quick3DAssetImport \ + libQt6Quick3DRuntimeRender libQt6Quick3DUtils libQt6QuickControls2 libQt6QuickControls2Impl \ + libQt6QuickParticles libQt6QuickShapes libQt6QuickTemplates2 libQt6QuickTest libQt6QuickWidgets \ + libQt6ShaderTools libQt6Sql libQt6Svg libQt6SvgWidgets \ + libQt6Test libQt6UiTools libQt6Widgets libQt6Xml + + cd $libDir + for i in lib*.so.6.*;do + ln -fs $i $(echo $i | cut -f1,2 -d.) + done + + mv -f $libDir/*.a $developLibDir/ + mv -f $libDir/*.prl $developLibDir/ + + mkdir -p $dataDir/Qt6 + mv $prefix/mkspecs $dataDir/Qt6/ + devCommands="balsam + meshdebug moc qlalr qmake qml qmlcachegen qmleasing qmlformat qmlimportscanner + qmllint qmlplugindump qmlpreview qmlprofiler qmlscene qmltestrunner qmltyperegistrar + qvkgen rcc syncqt.pl tracegen uic + androiddeployqt androidtestrunner cmake_automoc_parser qmltime qsb qt-cmake + qt-cmake-private qt-cmake-private-install.cmake qt-cmake-standalone-test + qt-configure-module qt-internal-configure-tests shadergen" + for i in $devCommands; do + devPackageCommands="$devPackageCommands $prefix/bin/$i" + done + + # move tools to apps folder + mkdir -p $appsDir/Qt6/lib + mv $prefix/bin/qdbusviewer $appsDir/Qt6/QDBusViewer + ln -s $appsDir/Qt6/QDBusViewer $prefix/bin/qdbusviewer + mv $prefix/bin/designer $appsDir/Qt6/Designer + ln -s $appsDir/Qt6/Designer $prefix/bin/designer + mv $prefix/bin/linguist $appsDir/Qt6/Linguist + ln -s $appsDir/Qt6/Linguist $prefix/bin/linguist + + toolsCommands="designer lconvert linguist lprodump lrelease lrelease-pro + lupdate lupdate-pro pixeltool qdistancefieldgenerator qdbus + qdbuscpp2xml qdbusviewer qdbusxml2cpp qhelpgenerator qtattributionsscanner + qtdiag qtpaths qtplugininfo" + + for i in $toolsCommands; do + toolsPackageCommands="$toolsPackageCommands $prefix/bin/$i" + done + + DIR_QT_DEVELOP_DESKBAR="${dataDir}/deskbar/menu/Applications/Qt" + mkdir -p ${DIR_QT_DEVELOP_DESKBAR} + + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + #local MINOR="`echo "$portVersion" | cut -d. -f3`" + local MINOR="0" + local VARIETY="B_APPV_DEVELOPMENT" + + iconFiles="Assistant Designer Linguist QDBusViewer" + for j in $iconFiles; do + sed \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@VARIETY@|$VARIETY|" \ + $portDir/additional-files/$j.rdef.in > $sourceDir/$j.rdef + + addResourcesToBinaries $sourceDir/$j.rdef "$appsDir/Qt6/$j" + addAppDeskbarSymlink "$appsDir/Qt6/$j" "Qt/$j" + mimeset -f "$appsDir/Qt6/$j" + done + + packageEntries devel \ + $developDir \ + $devPackageCommands \ + $libDir/cmake \ + $dataDir/Qt6/mkspecs + + packageEntries tools \ + $appsDir \ + $toolsPackageCommands \ + ${DIR_QT_DEVELOP_DESKBAR} +}