qt5: more fixes for 5.6

* correctly probe serial port (although SleepyHead wants to know
the underlying USB vendor/product ID),
* fix libdl test,
* make sure the CMake helpers correctly locate libs.

Should probably be applied to 5.5 as well but I'm too lazy to try.
This commit is contained in:
François Revol
2016-11-13 20:37:47 +01:00
parent f287b26f16
commit 2d6d4281ab

View File

@@ -6044,3 +6044,82 @@ index eb73a2f..637fe49 100644
--
2.2.2
From 65f19ad377143544d7110e691b99187f447e1e52 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 8f39045..5a7c0e5 100644
--- a/qtserialport/src/serialport/qserialportinfo_unix.cpp
+++ b/qtserialport/src/serialport/qserialportinfo_unix.cpp
@@ -73,13 +73,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.7.0
From 29fa3d74a1e1c45492ce51c0b7292274b3e5f4ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Sun, 6 Nov 2016 16:46:49 +0100
Subject: Haiku: fix libdl test (no need for -ldl)
diff --git a/qtbase/config.tests/unix/libdl/libdl.pro b/qtbase/config.tests/unix/libdl/libdl.pro
index 8ed5231..903d274 100644
--- a/qtbase/config.tests/unix/libdl/libdl.pro
+++ b/qtbase/config.tests/unix/libdl/libdl.pro
@@ -1,3 +1,3 @@
SOURCES = libdl.cpp
CONFIG -= qt dylib
-!qnx: LIBS += -ldl
+!haiku:!qnx: LIBS += -ldl
--
2.7.0
From 1b440d369ce2ea247d40efe90f4e90d9f66e63c2 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 11fb52a..bd08522 100644
--- a/qtbase/mkspecs/features/create_cmake.prf
+++ b/qtbase/mkspecs/features/create_cmake.prf
@@ -84,6 +84,9 @@ win32:!wince:!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.7.0