Files
haikuports/dev-qt/qt5/patches/qt5-5.9.2.patchset
Gerasim Troeglazov f48646ce4d Qt5: bump version
2017-10-09 23:05:56 +10:00

427 lines
15 KiB
Plaintext

From 3515207d5ae84131609c34a06953233bc4315ce0 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/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 @@
<file>platforms/+unix/+darwin/test</file>
<file>platforms/+unix/+haiku/test</file>
<file>platforms/+unix/+linux/test</file>
+ <file>platforms/+unix/+haiku/test</file>
<file>platforms/+unix/test</file>
<file>platforms/+windows/+wince/test</file>
<file>platforms/+windows/+winnt/test</file>
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 56d29c87119c0b67f6b44f8741cfda7d5fdeb49b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
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 4406a869ef26839ecd5df0ef61d748a3a4336f24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
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 c28ebe137e4965c64f089951722d9f87112e568a Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 4 Mar 2017 10:41:09 +0100
Subject: Haiku also provides bluetooth/bluetooth.h, so check for Bluez a bit
more.
diff --git a/qtconnectivity/config.tests/bluez/main.cpp b/qtconnectivity/config.tests/bluez/main.cpp
index 0b9235a..bfc2a0c 100644
--- a/qtconnectivity/config.tests/bluez/main.cpp
+++ b/qtconnectivity/config.tests/bluez/main.cpp
@@ -30,5 +30,6 @@
int main()
{
+ bacmp(BDADDR_ANY, BDADDR_NONE);
return 0;
}
--
2.13.1
From fa7ffbd94dff7191ad7b6280a13774dd34251a53 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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<JSC::MacroAssemblerX86, NoOperatingSystemSpecialization>
{
@@ -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<JSC::MacroAssemblerX86_64, NoOperatingSystemSpecialization>
{
diff --git a/qtdeclarative/src/qml/jsruntime/qv4global_p.h b/qtdeclarative/src/qml/jsruntime/qv4global_p.h
index 3abda68..0eef251 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 c8e7181d6bafdac6c1cfcb7afd6593b0efdf27f0 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 31 May 2017 20:58:35 +0200
Subject: fix build in tiff imageformats plugin.
tip from 3deyes!
diff --git a/qtimageformats/src/plugins/imageformats/tiff/qtiffhandler.cpp b/qtimageformats/src/plugins/imageformats/tiff/qtiffhandler.cpp
index 81ad7e9..8f3d3e4 100644
--- a/qtimageformats/src/plugins/imageformats/tiff/qtiffhandler.cpp
+++ b/qtimageformats/src/plugins/imageformats/tiff/qtiffhandler.cpp
@@ -335,8 +335,8 @@ bool QTiffHandler::read(QImage *image)
}
TIFF *const tiff = d->tiff;
- const uint32 width = d->size.width();
- const uint32 height = d->size.height();
+ const quint32 width = d->size.width();
+ const quint32 height = d->size.height();
if (format == QImage::Format_Mono || format == QImage::Format_Indexed8 || format == QImage::Format_Grayscale8) {
if (format == QImage::Format_Mono) {
--
2.13.1
From 4af5ebdbcb027e0622fc119245e0e3298e4004c8 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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 eac8fbf6e07763797a8d08d9160d722b50eb7af1 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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 9d11506..16be997 100644
--- a/qtbase/src/network/ssl/qsslsocket.cpp
+++ b/qtbase/src/network/ssl/qsslsocket.cpp
@@ -2670,6 +2670,7 @@ QList<QByteArray> 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 3d43557d7986828feb01f74967aeb0fbd40daaa7 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 72f5ad38cbfd067145ee063824fb69308c58d5e7 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 9 Oct 2017 22:57:10 +1000
Subject: disable mapbox-gl-native on Haiku.
diff --git a/qtlocation/src/plugins/geoservices/geoservices.pro b/qtlocation/src/plugins/geoservices/geoservices.pro
index b81ad34..7b642c0 100644
--- a/qtlocation/src/plugins/geoservices/geoservices.pro
+++ b/qtlocation/src/plugins/geoservices/geoservices.pro
@@ -8,7 +8,7 @@ qtConfig(geoservices_esri): SUBDIRS += esri
qtConfig(geoservices_itemsoverlay): SUBDIRS += itemsoverlay
qtConfig(geoservices_osm): SUBDIRS += osm
-qtConfig(geoservices_mapboxgl) {
+qtConfig(geoservices_mapboxgl):!haiku {
!exists(../../3rdparty/mapbox-gl-native/mapbox-gl-native.pro) {
warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.")
} else {
--
2.13.1
From bdd776d33994af83530b31ef8a735b9f00bfd0f7 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 9 Oct 2017 22:58:38 +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.13.1
From 35d82fbd54ecedfaea63fc44b42057d7104ffc35 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 9 Oct 2017 22:59:21 +1000
Subject: Fix build for Haiku platform
diff --git a/qtbase/mkspecs/features/toolchain.prf b/qtbase/mkspecs/features/toolchain.prf
index 35175f1..f8cffb5 100644
--- a/qtbase/mkspecs/features/toolchain.prf
+++ b/qtbase/mkspecs/features/toolchain.prf
@@ -120,7 +120,7 @@ isEmpty($${target_prefix}.INCDIRS) {
}
}
}
- !darwin:clang {
+ if(!darwin:clang)|haiku {
# 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
@@ -205,7 +205,7 @@ isEmpty($${target_prefix}.COMPILER_MACROS) {
vars = $$qtVariablesFromGCC($$QMAKE_CXX)
}
for (v, vars) {
- isEmpty(v)|contains(v, $${LITERAL_HASH}.*): next()
+ contains(v, $${LITERAL_HASH}.*)|contains(v, " *"): next()
# Set both <varname> for the outer scope ...
eval($$v)
v ~= s/ .*//
--
2.13.1