diff --git a/dev-qt/qt5/patches/qt5-5.10.0~alpha.patchset b/dev-qt/qt5/patches/qt5-5.10.0~alpha.patchset
new file mode 100644
index 000000000..ab92cebd4
--- /dev/null
+++ b/dev-qt/qt5/patches/qt5-5.10.0~alpha.patchset
@@ -0,0 +1,351 @@
+From 562e50af0578028a1c5e537ffafa0a9c49fccb0f Mon Sep 17 00:00:00 2001
+From: Gerasim Troeglazov <3dEyes@gmail.com>
+Date: Fri, 16 Oct 2015 23:07:40 +1000
+Subject: Fix Haiku build
+
+
+diff --git a/qtbase/src/corelib/io/qstandardpaths_haiku.cpp b/qtbase/src/corelib/io/qstandardpaths_haiku.cpp
+index 044d69f..89653c1 100644
+--- a/qtbase/src/corelib/io/qstandardpaths_haiku.cpp
++++ b/qtbase/src/corelib/io/qstandardpaths_haiku.cpp
+@@ -145,15 +145,15 @@ 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 AppLocalDataLocation:
+- return haikuAppStandardPath(B_USER_NONPACKAGED_DATA_DIRECTORY);
+- case GenericDataLocation:
+- return haikuStandardPath(B_USER_NONPACKAGED_DATA_DIRECTORY);
++// case AppDataLocation: // fall through
++// case AppLocalDataLocation:
++// return haikuAppStandardPath(B_USER_NONPACKAGED_DATA_DIRECTORY);
++// case GenericDataLocation:
++// return haikuStandardPath(B_USER_NONPACKAGED_DATA_DIRECTORY);
+ case CacheLocation:
+ return haikuAppStandardPath(B_USER_CACHE_DIRECTORY);
+ case GenericCacheLocation:
+- return haikuStandardPath(B_USER_CACHE_DIRECTORY);
++ return haikuStandardPath(B_SYSTEM_CACHE_DIRECTORY);
+ case ConfigLocation: // fall through
+ case AppConfigLocation:
+ 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);
+diff --git a/qtbase/tests/auto/corelib/io/qfileselector/qfileselector.qrc b/qtbase/tests/auto/corelib/io/qfileselector/qfileselector.qrc
+index ea9b827..928e949 100644
+--- a/qtbase/tests/auto/corelib/io/qfileselector/qfileselector.qrc
++++ b/qtbase/tests/auto/corelib/io/qfileselector/qfileselector.qrc
+@@ -21,6 +21,7 @@
+ platforms/+unix/+darwin/test
+ platforms/+unix/+haiku/test
+ platforms/+unix/+linux/test
++ platforms/+unix/+haiku/test
+ platforms/+unix/test
+ platforms/+windows/+wince/test
+ platforms/+windows/+winnt/test
+diff --git a/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp b/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp
+index e715ed2..b05e71e 100644
+--- a/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp
++++ b/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp
+@@ -47,6 +47,13 @@ inline size_t systemPageSize()
+ return ::sysconf(_SC_PAGESIZE);
+ }
+
++#elif OS(HAIKU)
++
++inline size_t systemPageSize()
++{
++ return 4096;
++}
++
+ #elif OS(WINDOWS)
+
+ inline size_t systemPageSize()
+diff --git a/qtdeclarative/src/3rdparty/masm/wtf/Platform.h b/qtdeclarative/src/3rdparty/masm/wtf/Platform.h
+index 7f2023a..4b3d202 100644
+--- a/qtdeclarative/src/3rdparty/masm/wtf/Platform.h
++++ b/qtdeclarative/src/3rdparty/masm/wtf/Platform.h
+@@ -412,6 +412,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
+@@ -442,6 +447,7 @@
+ || OS(HURD) \
+ || OS(INTEGRITY) \
+ || OS(LINUX) \
++ || OS(HAIKU) \
+ || OS(NETBSD) \
+ || OS(OPENBSD) \
+ || OS(QNX) \
+--
+2.13.1
+
+
+From 826a34a14f72b6b0d25ea76352c3a3ce956ec4b9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fran=C3=A7ois=20Revol?=
+Date: Mon, 11 Apr 2016 01:04:24 +0200
+Subject: Add filteredDeviceFilePaths for Haiku's /dev/ports/*
+
+
+diff --git a/qtserialport/src/serialport/qserialportinfo_unix.cpp b/qtserialport/src/serialport/qserialportinfo_unix.cpp
+index 0f62a9d..afd5c0b 100644
+--- a/qtserialport/src/serialport/qserialportinfo_unix.cpp
++++ b/qtserialport/src/serialport/qserialportinfo_unix.cpp
+@@ -79,13 +79,20 @@ static QStringList filteredDeviceFilePaths()
+ << QStringLiteral("cu*");
+ #elif defined(Q_OS_QNX)
+ << QStringLiteral("ser*");
++#elif defined(Q_OS_HAIKU)
++ << QStringLiteral("*serial*")
++ << QStringLiteral("usb*");
+ #else
+ ;
+ #endif
+
+ QStringList result;
+
++#if defined(Q_OS_HAIKU)
++ QDir deviceDir(QStringLiteral("/dev/ports"));
++#else
+ QDir deviceDir(QStringLiteral("/dev"));
++#endif
+ if (deviceDir.exists()) {
+ deviceDir.setNameFilters(deviceFileNameFilterList);
+ deviceDir.setFilter(QDir::Files | QDir::System | QDir::NoSymLinks);
+--
+2.13.1
+
+
+From fcf3f15774a7a8c7b5ee2594f313d76cfbf7663c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fran=C3=A7ois=20Revol?=
+Date: Sat, 12 Nov 2016 03:19:40 +0100
+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 bb5083c..b286bed 100644
+--- a/qtbase/mkspecs/features/create_cmake.prf
++++ b/qtbase/mkspecs/features/create_cmake.prf
+@@ -84,6 +84,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.13.1
+
+
+From 0adf0e1b28896f368a587b24fb73859e45535ad7 Mon Sep 17 00:00:00 2001
+From: Jerome Duval
+Date: Thu, 23 Mar 2017 21:08:37 +0100
+Subject: enable QV4 JIT.
+
+
+diff --git a/qtdeclarative/src/qml/jit/qv4targetplatform_p.h b/qtdeclarative/src/qml/jit/qv4targetplatform_p.h
+index 6d788f4..c4c47ea 100644
+--- a/qtdeclarative/src/qml/jit/qv4targetplatform_p.h
++++ b/qtdeclarative/src/qml/jit/qv4targetplatform_p.h
+@@ -90,7 +90,7 @@ class TargetPlatform
+ {
+ };
+
+-#if CPU(X86) && (OS(LINUX) || OS(WINDOWS) || OS(QNX) || OS(FREEBSD) || defined(Q_OS_IOS))
++#if CPU(X86) && (OS(LINUX) || OS(WINDOWS) || OS(QNX) || OS(FREEBSD) || defined(Q_OS_IOS) || OS(HAIKU) )
+ template <>
+ class TargetPlatform
+ {
+@@ -150,7 +150,7 @@ public:
+ }
+
+ #if OS(WINDOWS) || OS(QNX) || \
+- ((OS(LINUX) || OS(FREEBSD)) && (defined(__PIC__) || defined(__PIE__)))
++ ((OS(LINUX) || OS(FREEBSD) || OS(HAIKU)) && (defined(__PIC__) || defined(__PIE__)))
+
+ static const int gotRegister = JSC::X86Registers::ebx;
+ static int savedGOTRegisterSlotOnStack() {
+@@ -178,7 +178,7 @@ public:
+ };
+ #endif // x86
+
+-#if CPU(X86_64) && (OS(LINUX) || OS(MAC_OS_X) || OS(FREEBSD) || OS(QNX) || defined(Q_OS_IOS))
++#if CPU(X86_64) && (OS(LINUX) || OS(MAC_OS_X) || OS(FREEBSD) || OS(HAIKU) ||OS(QNX) || defined(Q_OS_IOS))
+ template <>
+ class TargetPlatform
+ {
+diff --git a/qtdeclarative/src/qml/jsruntime/qv4global_p.h b/qtdeclarative/src/qml/jsruntime/qv4global_p.h
+index 8769519..7e637bf 100644
+--- a/qtdeclarative/src/qml/jsruntime/qv4global_p.h
++++ b/qtdeclarative/src/qml/jsruntime/qv4global_p.h
+@@ -92,10 +92,10 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); }
+ // NOTE: This should match the logic in qv4targetplatform_p.h!
+
+ #if defined(Q_PROCESSOR_X86) && (QT_POINTER_SIZE == 4) \
+- && (defined(Q_OS_WIN) || defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD))
++ && (defined(Q_OS_WIN) || defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD) || defined(Q_OS_HAIKU))
+ # define V4_ENABLE_JIT
+ #elif defined(Q_PROCESSOR_X86_64) && (QT_POINTER_SIZE == 8) \
+- && (defined(Q_OS_WIN) || defined(Q_OS_LINUX) || defined(Q_OS_MAC) || defined(Q_OS_FREEBSD))
++ && (defined(Q_OS_WIN) || defined(Q_OS_LINUX) || defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_HAIKU))
+ # define V4_ENABLE_JIT
+ #elif defined(Q_PROCESSOR_ARM_32) && (QT_POINTER_SIZE == 4)
+ # if defined(thumb2) || defined(__thumb2__) || ((defined(__thumb) || defined(__thumb__)) && __TARGET_ARCH_THUMB-0 == 4)
+--
+2.13.1
+
+
+From 0f7551408b6d401f2b206fd4ed740f7bf998cc12 Mon Sep 17 00:00:00 2001
+From: Jerome Duval
+Date: Wed, 31 May 2017 21:59:22 +0200
+Subject: fix qt3d build on x86.
+
+
+diff --git a/qt3d/src/3rdparty/assimp/contrib/rapidjson/include/rapidjson/document.h b/qt3d/src/3rdparty/assimp/contrib/rapidjson/include/rapidjson/document.h
+index 98053cb..57ca638 100644
+--- a/qt3d/src/3rdparty/assimp/contrib/rapidjson/include/rapidjson/document.h
++++ b/qt3d/src/3rdparty/assimp/contrib/rapidjson/include/rapidjson/document.h
+@@ -545,7 +545,8 @@ public:
+ flags_ |= kIntFlag;
+ }
+
+-#if defined(__APPLE__)
++#if defined(__APPLE__) || defined(__HAIKU__)
++#if !defined(__HAIKU__)
+ //! Constructor for unsigned long value.
+ explicit GenericValue(unsigned long u64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUint64Flag) {
+ data_.n.u64 = u64;
+@@ -556,6 +557,7 @@ public:
+ if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))
+ flags_ |= kIntFlag;
+ }
++#endif
+
+ #if !defined(__x86_64__) && !defined(__arm64__)
+ //! Constructor for size_t value.
+--
+2.13.1
+
+
+From 6bb5e7068c117275e59164a14d64e54989d82cb5 Mon Sep 17 00:00:00 2001
+From: Jerome Duval
+Date: Fri, 9 Jun 2017 19:47:02 +0200
+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 5c9ebac..04ac990 100644
+--- a/qtbase/src/network/ssl/qsslsocket.cpp
++++ b/qtbase/src/network/ssl/qsslsocket.cpp
+@@ -2681,6 +2681,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.13.1
+
+
+From e7dace583933cb5cd13aaf3ea5e89b598ffa1dd3 Mon Sep 17 00:00:00 2001
+From: Gerasim Troeglazov <3dEyes@gmail.com>
+Date: Sun, 16 Jul 2017 21:55:25 +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 9ccc2b5..9e404e2 100644
+--- a/qtbase/src/plugins/platforms/platforms.pro
++++ b/qtbase/src/plugins/platforms/platforms.pro
+@@ -42,10 +42,6 @@ freebsd {
+ SUBDIRS += bsdfb
+ }
+
+-haiku {
+- SUBDIRS += haiku
+-}
+-
+ qtConfig(mirclient): SUBDIRS += mirclient
+
+ qtConfig(integrityfb): SUBDIRS += integrity
+--
+2.13.1
+
+
+From c192afa8c086eeef69c823a3f43a558ebd77fb35 Mon Sep 17 00:00:00 2001
+From: Jerome Duval
+Date: Sun, 17 Sep 2017 14:29:22 +0200
+Subject: skip QMAKE_DEFAULT_LIBDIRS check
+
+for some reason QMAKE_DEFAULT_LIBDIRS is empty on Haiku.
+
+diff --git a/qtbase/mkspecs/features/toolchain.prf b/qtbase/mkspecs/features/toolchain.prf
+index 21c18c7..60fab6f 100644
+--- a/qtbase/mkspecs/features/toolchain.prf
++++ b/qtbase/mkspecs/features/toolchain.prf
+@@ -140,7 +140,7 @@ isEmpty($${target_prefix}.INCDIRS) {
+ }
+ }
+ isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \
+- !integrity: \
++ !integrity:!haiku: \
+ error("failed to parse default search paths from compiler output")
+ QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS)
+ } else: msvc {
+--
+2.13.1
+
+
+From a78d9751e4d5a951bc2150c3d1b767adaeaa2db7 Mon Sep 17 00:00:00 2001
+From: Jerome Duval
+Date: Sun, 17 Sep 2017 15:19:26 +0200
+Subject: disable mapbox-gl-native on Haiku.
+
+
+diff --git a/qtlocation/src/location/configure.json b/qtlocation/src/location/configure.json
+index 4de6e86..4d79881 100644
+--- a/qtlocation/src/location/configure.json
++++ b/qtlocation/src/location/configure.json
+@@ -37,7 +37,7 @@
+ "condition": [
+ "features.opengl",
+ "features.c++14",
+- "!config.qnx && (!config.win32 || config.mingw)"
++ "!config.qnx && (!config.win32 || config.mingw) && !config.haiku"
+ ],
+ "output": [ "privateFeature" ]
+ },
+--
+2.13.1
+
diff --git a/dev-qt/qt5/qt5-5.10.0~alpha.recipe b/dev-qt/qt5/qt5-5.10.0~alpha.recipe
new file mode 100644
index 000000000..bf144c540
--- /dev/null
+++ b/dev-qt/qt5/qt5-5.10.0~alpha.recipe
@@ -0,0 +1,500 @@
+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-2017 The Qt Company Ltd."
+LICENSE="GNU LGPL v2.1
+ GNU LGPL v3"
+REVISION="1"
+SOURCE_URI="http://download.qt.io/development_releases/qt/5.10/${portVersion/\~/-}/single/qt-everywhere-src-${portVersion/\~/-}.tar.xz"
+CHECKSUM_SHA256="10d49510bb693eac88861f239d6b9ebfb69e1b73493a60953ef85e5d709a5036"
+SOURCE_DIR="qt-everywhere-src-${portVersion/\~/-}"
+PATCHES="qt5-$portVersion.patchset"
+
+ADDITIONAL_FILES="
+ assistant.rdef.in
+ designer.rdef.in
+ linguist.rdef.in
+ qdbusviewer.rdef.in
+ qhelpconverter.rdef.in
+ "
+
+ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
+SECONDARY_ARCHITECTURES="?x86"
+
+PROVIDES="
+ qt5$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libqt5$secondaryArchSuffix = $portVersion compat >= 5
+ # qtbase
+ lib:libQt5Concurrent$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5Core$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5DBus$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5EglFSDeviceIntegration$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5Gui$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5Network$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5OpenGL$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5PrintSupport$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5Sql$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5Test$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5Widgets$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5Xml$secondaryArchSuffix = $portVersion compat >= 5
+ # qt3d
+ lib:libQt53DAnimation$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt53DCore$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt53DExtras$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt53DInput$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt53DLogic$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt53DQuick$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt53DQuickAnimation$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt53DQuickExtras$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt53DQuickInput$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt53DQuickRender$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt53DQuickScene2D$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt53DRender$secondaryArchSuffix = $portVersion compat >= 5
+ # qtcharts
+ lib:libQt5Charts$secondaryArchSuffix = $portVersion compat >= 5
+ # qtconnectivity
+ lib:libQt5Bluetooth$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5Nfc$secondaryArchSuffix = $portVersion compat >= 5
+ # qtdatavis3d
+ lib:libQt5DataVisualization$secondaryArchSuffix = $portVersion compat >= 5
+ # qtdeclarative
+ lib:libQt5Qml$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5Quick$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5QuickControls2$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5QuickParticles$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5QuickTemplates2$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5QuickTest$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5QuickWidgets$secondaryArchSuffix = $portVersion compat >= 5
+ # qtgamepad
+ lib:libQt5Gamepad$secondaryArchSuffix = $portVersion compat >= 5
+ # qtlocation
+ lib:libQt5Location$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5Positioning$secondaryArchSuffix = $portVersion compat >= 5
+ # qtmultimedia
+ lib:libQt5Multimedia$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5MultimediaGstTools$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5MultimediaQuick$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5MultimediaWidgets$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libqgsttools_p$secondaryArchSuffix = 1.0.0 compat >= 1
+ # qtnetworkauth
+ lib:libQt5NetworkAuth$secondaryArchSuffix = $portVersion compat >= 5
+ # qtpurchasing
+ lib:libQt5Purchasing$secondaryArchSuffix = $portVersion compat >= 5
+ # qtremoteobjects
+ lib:libQt5RemoteObjects$secondaryArchSuffix = $portVersion compat >= 5
+ # qtscript
+ lib:libQt5Script$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5ScriptTools$secondaryArchSuffix = $portVersion compat >= 5
+ # qtscxml
+ lib:libQt5Scxml$secondaryArchSuffix = $portVersion compat >= 5
+ # qtsensors
+ lib:libQt5Sensors$secondaryArchSuffix = $portVersion compat >= 5
+ # qtserialport
+ lib:libQt5SerialBus$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5SerialPort$secondaryArchSuffix = $portVersion compat >= 5
+ # qtspeech
+ lib:libQt5TextToSpeech$secondaryArchSuffix = $portVersion compat >= 5
+ # qtsvg
+ lib:libQt5Svg$secondaryArchSuffix = $portVersion compat >= 5
+ # qttools
+ lib:libQt5Help$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5Designer$secondaryArchSuffix = $portVersion compat >= 5
+ lib:libQt5DesignerComponents$secondaryArchSuffix = $portVersion compat >= 5
+ # qtwebchannel
+ lib:libQt5WebChannel$secondaryArchSuffix = $portVersion compat >= 5
+ # qtwebsockets
+ lib:libQt5WebSockets$secondaryArchSuffix = $portVersion compat >= 5
+ # qtxmlpatterns
+ lib:libQt5XmlPatterns$secondaryArchSuffix = $portVersion compat >= 5
+ "
+
+REQUIRES="
+ haiku$secondaryArchSuffix
+ lib:libcrypto$secondaryArchSuffix
+ lib:libdouble_conversion$secondaryArchSuffix
+ lib:libegl$secondaryArchSuffix
+ lib:libflite$secondaryArchSuffix
+ lib:libfreetype$secondaryArchSuffix
+ lib:libfontconfig$secondaryArchSuffix
+ lib:libgl$secondaryArchSuffix
+ lib:libglu$secondaryArchSuffix
+ lib:libglib_2.0$secondaryArchSuffix
+ lib:libgstapp_1.0$secondaryArchSuffix
+ lib:libgstaudio_1.0$secondaryArchSuffix
+ lib:libgstbadaudio_1.0$secondaryArchSuffix
+ lib:libgstbadbase_1.0$secondaryArchSuffix
+ lib:libgstbadvideo_1.0$secondaryArchSuffix
+ lib:libgstreamer_1.0$secondaryArchSuffix
+ lib:libgstvideo_1.0$secondaryArchSuffix
+ lib:libicudata$secondaryArchSuffix
+ lib:libicui18n$secondaryArchSuffix
+ lib:libicuuc$secondaryArchSuffix
+ lib:libintl$secondaryArchSuffix
+ lib:libjpeg$secondaryArchSuffix
+ lib:libpcre2_16$secondaryArchSuffix
+ lib:libpng16$secondaryArchSuffix
+ lib:libssl$secondaryArchSuffix
+ lib:libsqlite3$secondaryArchSuffix
+ lib:libtiff$secondaryArchSuffix
+ lib:libxml2$secondaryArchSuffix
+ lib:libz$secondaryArchSuffix
+ cmd:qsystray
+ "
+
+PROVIDES_devel="
+ qt5${secondaryArchSuffix}_devel = $portVersion compat >= 5
+ devel:libqt5$secondaryArchSuffix = $portVersion compat >= 5
+ # qtbase
+ devel:libQt5Bootstrap$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Concurrent$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Core$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5DBus$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Gui$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Network$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5OpenGL$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5OpenGLExtensions$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5PrintSupport$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Sql$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Test$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Widgets$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Xml$secondaryArchSuffix = $portVersion compat >= 5
+ # qt3d
+ devel:libQt53DAnimation$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt53DCore$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt53DExtras$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt53DInput$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt53DLogic$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt53DQuick$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt53DQuickAnimation$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt53DQuickExtras$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt53DQuickInput$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt53DQuickRender$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt53DQuickScene2D$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt53DRender$secondaryArchSuffix = $portVersion compat >= 5
+ # qtcharts
+ devel:libQt5Charts$secondaryArchSuffix = $portVersion compat >= 5
+ # qtconnectivity
+ devel:libQt5Bluetooth$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Nfc$secondaryArchSuffix = $portVersion compat >= 5
+ # qtdatavis3d
+ devel:libQt5DataVisualization$secondaryArchSuffix = $portVersion compat >= 5
+ # qtdeclarative
+ devel:libQt5PacketProtocol$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Qml$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5QmlDebug$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Quick$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5QuickControls2$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5QuickParticles$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5QuickTemplates2$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5QuickTest$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5QuickWidgets$secondaryArchSuffix = $portVersion compat >= 5
+ # qtgamepad
+ devel:libQt5Gamepad$secondaryArchSuffix = $portVersion compat >= 5
+ # qtlocation
+ devel:libQt5Location$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Positioning$secondaryArchSuffix = $portVersion compat >= 5
+ # qtmultimedia
+ devel:libQt5Multimedia$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5MultimediaGstTools$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5MultimediaQuick$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5MultimediaWidgets$secondaryArchSuffix = $portVersion compat >= 5
+ # qtnetworkauth
+ devel:libQt5NetworkAuth$secondaryArchSuffix = $portVersion compat >= 5
+ # qtpurchasing
+ devel:libQt5Purchasing$secondaryArchSuffix = $portVersion compat >= 5
+ # qtquick1
+ devel:libQt5QmlDevTools$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5UiTools$secondaryArchSuffix = $portVersion compat >= 5
+ # qtremoteobjects
+ devel:libQt5RemoteObjects$secondaryArchSuffix = $portVersion compat >= 5
+ # qtscript
+ devel:libQt5Script$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5ScriptTools$secondaryArchSuffix = $portVersion compat >= 5
+ # qtscxml
+ devel:libQt5Scxml$secondaryArchSuffix = $portVersion compat >= 5
+ # qtsensors
+ devel:libQt5Sensors$secondaryArchSuffix = $portVersion compat >= 5
+ # qtserialport
+ devel:libQt5SerialBus$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5SerialPort$secondaryArchSuffix = $portVersion compat >= 5
+ # qtspeech
+ devel:libQt5TextToSpeech$secondaryArchSuffix = $portVersion compat >= 5
+ # qtsvg
+ devel:libQt5Svg$secondaryArchSuffix = $portVersion compat >= 5
+ # qttools
+ devel:libQt5Designer$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5DesignerComponents$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5Help$secondaryArchSuffix = $portVersion compat >= 5
+ # qtwebchannel
+ devel:libQt5WebChannel$secondaryArchSuffix = $portVersion compat >= 5
+ # qtwebsockets
+ devel:libQt5WebSockets$secondaryArchSuffix = $portVersion compat >= 5
+ # qtxmlpatterns
+ devel:libQt5XmlPatterns$secondaryArchSuffix = $portVersion compat >= 5
+
+ devel:libQt5AccessibilitySupport$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5DeviceDiscoverySupport$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5EdidSupport$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5EventDispatcherSupport$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5FbSupport$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5FontDatabaseSupport$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5PlatformCompositorSupport$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5ServiceSupport$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5ThemeSupport$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5EGLSupport$secondaryArchSuffix = $portVersion compat >= 5
+ devel:libQt5EglFSDeviceIntegration$secondaryArchSuffix = $portVersion compat >= 5
+
+ cmd:assistant$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:canbusutil$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:designer$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:fixqt4headers.pl$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:lconvert$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:linguist$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:lrelease$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:lupdate$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:moc$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:pixeltool$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qcollectiongenerator$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qdbus$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qdbuscpp2xml$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qdbusviewer$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qdbusxml2cpp$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qdoc$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qgltf$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qhelpconverter$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qhelpgenerator$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qlalr$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qmake$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qml$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qmlcachegen$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qmleasing$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qmlimportscanner$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qmllint$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qmlmin$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qmlplugindump$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qmlprofiler$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qmlscene$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qmltestrunner$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qscxmlc$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qtattributionsscanner$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qtdiag$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qtpaths$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qtplugininfo$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:qvkgen$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:rcc$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:repc$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:syncqt.pl$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:uic$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:xmlpatterns$secondaryArchSuffix = $portVersion compat >= 5
+ cmd:xmlpatternsvalidator$secondaryArchSuffix = $portVersion compat >= 5
+ "
+
+# 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="
+ qt5$secondaryArchSuffix == $portVersion base
+ haiku$secondaryArchSuffix
+ lib:libz$secondaryArchSuffix
+ lib:libssl$secondaryArchSuffix
+ lib:libcrypto$secondaryArchSuffix
+ lib:libgl$secondaryArchSuffix
+ lib:libglu$secondaryArchSuffix
+ devel:libgl$secondaryArchSuffix
+ "
+
+PROVIDES_docs="
+ qt5${secondaryArchSuffix}_docs = $portVersion
+ "
+
+REQUIRES_docs="
+ qt5${secondaryArchSuffix}_devel == $portVersion base
+ "
+
+BUILD_REQUIRES="
+ haiku${secondaryArchSuffix}_devel
+ devel:libcrypto$secondaryArchSuffix >= 1.0.0
+ devel:libdouble_conversion$secondaryArchSuffix
+ 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:libgstbadbase_1.0$secondaryArchSuffix
+ devel:libgstbadvideo_1.0$secondaryArchSuffix
+ devel:libgstreamer_1.0$secondaryArchSuffix
+ devel:libgstvideo_1.0$secondaryArchSuffix
+ devel:libicuuc$secondaryArchSuffix
+ devel:libjpeg$secondaryArchSuffix
+ devel:libpcre2_16$secondaryArchSuffix
+ devel:libpng$secondaryArchSuffix
+ devel:libsqlite3$secondaryArchSuffix
+ devel:libssl$secondaryArchSuffix >= 1.0.0
+ devel:libtiff$secondaryArchSuffix
+ devel:libxml2$secondaryArchSuffix
+ devel:libz$secondaryArchSuffix
+ "
+
+BUILD_PREREQUIRES="
+ cmd:awk
+ cmd:bison
+ cmd:cmp
+ cmd:find
+ cmd:flex
+ cmd:g++$secondaryArchSuffix
+ cmd:gperf
+ cmd:grep
+ cmd:ld$secondaryArchSuffix
+ cmd:ninja
+ cmd:make
+ cmd:perl
+ cmd:pkg_config$secondaryArchSuffix
+ cmd:python
+ cmd:ruby
+ cmd:sed
+ cmd:xargs
+ cmd:which
+ "
+
+BUILD()
+{
+ CPPFLAGS=-D_BSD_SOURCE ./configure \
+ -prefix $prefix \
+ -bindir $binDir \
+ -libdir $libDir \
+ -libexecdir $libExecDir \
+ -headerdir $includeDir \
+ -docdir $docDir/Qt5 \
+ -datadir $dataDir/Qt5 \
+ -archdatadir $dataDir/Qt5 \
+ -hostdatadir $dataDir/Qt5 \
+ -translationdir $dataDir/Qt5/translations \
+ -sysconfdir $settingsDir \
+ -testsdir $dataDir/Qt5/tests \
+ -examplesdir $dataDir/Qt5/examples \
+ -importdir $dataDir/Qt5/imports \
+ -qmldir $dataDir/Qt5/qml \
+ -plugindir $addOnsDir/Qt5 \
+ -platform haiku-g++ -no-pch \
+ -nomake examples -release -opensource \
+ -confirm-license -no-iconv \
+ -no-rpath -system-sqlite \
+ -gstreamer 1.0 \
+ -strip
+ #CPPFLAGS=-D_BSD_SOURCE ./configure -platform haiku-g++ -no-pch -nomake examples -release -opensource -confirm-license -no-iconv -no-rpath -system-sqlite -gstreamer 1.0 -strip
+ make $jobArgs
+}
+
+INSTALL()
+{
+ make install
+
+ # build and install docs
+ #PATH=$PATH:$binDir
+ #LIBRARY_PATH=$LIBRARY_PATH:$libDir
+ #make $jobArgs docs
+ #make install_docs
+
+ rm $libDir/*.la
+
+ fixPkgconfig
+
+ prepareInstalledDevelLibs \
+ libQt5Concurrent libQt5Core libQt5DBus libQt5Gui \
+ libQt5Network libQt5NetworkAuth libQt5PrintSupport libQt5OpenGL \
+ libQt5Sql libQt5Test libQt5Widgets libQt5Xml \
+ libQt5XmlPatterns libQt5WebSockets \
+ libQt5WebChannel libQt5Svg libQt5SerialBus \
+ libQt5SerialPort libQt5Sensors libQt5ScriptTools libQt5Script \
+ libQt5QuickWidgets libQt5QuickTest libQt5QuickParticles \
+ libQt5Quick libQt5QuickControls2 libQt5QuickTemplates2 \
+ libQt5Qml libQt5Positioning libQt5Nfc libQt5Gamepad \
+ libQt5MultimediaWidgets libQt5MultimediaQuick libQt5Multimedia \
+ libQt5MultimediaGstTools \
+ libQt5Location libQt5Help libQt5Designer libQt5DesignerComponents \
+ libQt5Bluetooth libQt5TextToSpeech \
+ libQt5Charts libQt5DataVisualization libQt53DQuickInput \
+ libQt53DQuickExtras libQt53DExtras \
+ libQt53DQuick libQt53DLogic libQt53DInput libQt53DCore \
+ libQt53DQuickRender libQt53DRender libQt53DQuickScene2D libQt5PacketProtocol \
+ libQt5QmlDebug libQt5Scxml libQt5Purchasing libQt5AccessibilitySupport \
+ libQt5DeviceDiscoverySupport libQt5EventDispatcherSupport \
+ libQt5FbSupport libQt5FontDatabaseSupport \
+ libQt5PlatformCompositorSupport libQt5ServiceSupport\
+ libQt5ThemeSupport libQt53DAnimation libQt53DQuickAnimation \
+ libQt5RemoteObjects libQt5EglFSDeviceIntegration libQt5EglSupport \
+ libQt5EdidSupport
+
+ cd $libDir
+ for i in lib*.so.5.*;do
+ ln -fs $i $(echo $i | cut -f1,2 -d.)
+ done
+
+ rm -rf $libDir/fonts/ $prefix/tests
+ rm -rf $dataDir/Qt5/demos $dataDir/Qt5/examples
+
+ mv -f $libDir/libQt5UiTools* $developLibDir/
+ mv -f $libDir/libQt5QmlDevTools* $developLibDir/
+ mv -f $libDir/libQt5Bootstrap* $developLibDir/
+ mv -f $libDir/libQt5OpenGLExtensions* $developLibDir/
+
+ # fix mkspec for static libs
+ grep -rl $dataDir/Qt5/mkspecs/modules/*.pri -e "staticlib" | xargs sed -i 's%$$QT_MODULE_LIB_BASE%'${developLibDir}'%g'
+
+ devCommands="assistant canbusutil designer fixqt4headers.pl linguist
+ lconvert lrelease lupdate pixeltool qcollectiongenerator qdbusviewer
+ qdbus qgltf qhelpconverter qhelpgenerator qml qmlcachegen qmleasing
+ qmlimportscanner qmllint qmlmin qmlplugindump qmlprofiler qmlscene
+ qmltestrunner qtattributionsscanner qtdiag qtpaths qtplugininfo
+ xmlpatterns xmlpatternsvalidator
+ moc qdbuscpp2xml qdbusxml2cpp qdoc qlalr qmake qscxmlc rcc syncqt.pl
+ uic repc qvkgen"
+
+ for i in $devCommands; do
+ devPackageCommands="$devPackageCommands $binDir/$i"
+ done
+
+ local MAJOR="`echo "$portVersion" | cut -d. -f1`"
+ local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
+ local MINOR="0"
+ local VARIETY="B_APPV_DEVELOPMENT"
+
+ iconFiles="assistant designer linguist qdbusviewer qhelpconverter"
+ 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 "$binDir/$j"
+ mimeset -f "$binDir/$j"
+ done
+
+ DIR_QT_DEVELOP_DESKBAR="${dataDir}/deskbar/menu/Applications/Qt"
+ mkdir -p ${DIR_QT_DEVELOP_DESKBAR}
+ addAppDeskbarSymlink $binDir/assistant "Qt/Assistant"
+ addAppDeskbarSymlink $binDir/designer "Qt/Designer"
+ addAppDeskbarSymlink $binDir/linguist "Qt/Linguist"
+ addAppDeskbarSymlink $binDir/qdbusviewer "Qt/Qt D-Bus Viewer"
+ addAppDeskbarSymlink $binDir/qhelpconverter "Qt/Qt Help Converter"
+
+ packageEntries docs \
+ $docDir/Qt5
+
+ packageEntries devel \
+ $developDir \
+ $devPackageCommands \
+ ${DIR_QT_DEVELOP_DESKBAR} \
+ $libDir/cmake \
+ $dataDir/Qt5/mkspecs
+}