-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
depends: fix qt compilation for arm64-darwin
- Loading branch information
Showing
5 changed files
with
165 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
fix Qt macOS build with Clang 18 | ||
|
||
See: | ||
https://github.com/pnggroup/libpng/commit/893b8113f04d408cc6177c6de19c9889a48faa24. | ||
|
||
In a similar manner as zlib (madler/zlib#895), | ||
libpng contains a header configuration that's no longer valid and | ||
hasn't been exercised for the macOS target. | ||
|
||
- The target OS conditional macros are misused. Specifically | ||
`TARGET_OS_MAC` covers all Apple targets, including iOS, and it | ||
should not be checked with `#if defined` as they would always be | ||
defined (to either 1 or 0) on Apple platforms. | ||
- `#include <fp.h>` no longer works for the macOS target and results | ||
in a compilation failure. macOS ships all required functions in | ||
`math.h`, and clients should use `math.h` instead. | ||
|
||
--- a/qtbase/src/3rdparty/libpng/pngpriv.h | ||
+++ b/qtbase/src/3rdparty/libpng/pngpriv.h | ||
@@ -514,18 +514,8 @@ | ||
*/ | ||
# include <float.h> | ||
|
||
-# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ | ||
- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) | ||
- /* We need to check that <math.h> hasn't already been included earlier | ||
- * as it seems it doesn't agree with <fp.h>, yet we should really use | ||
- * <fp.h> if possible. | ||
- */ | ||
-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) | ||
-# include <fp.h> | ||
-# endif | ||
-# else | ||
-# include <math.h> | ||
-# endif | ||
+# include <math.h> | ||
+ | ||
# if defined(_AMIGA) && defined(__SASC) && defined(_M68881) | ||
/* Amiga SAS/C: We must include builtin FPU functions when compiling using | ||
* MATH=68881 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
QtGui: Fix duplication of logging category lcQpaFonts | ||
|
||
Move it to qplatformfontdatabase.h. | ||
|
||
Upstream commit: | ||
- Qt 6.0: ab01885e48873fb2ad71841a3f1627fe4d9cd835 | ||
|
||
--- a/qtbase/src/gui/text/qplatformfontdatabase.cpp | ||
+++ b/qtbase/src/gui/text/qplatformfontdatabase.cpp | ||
@@ -52,6 +52,8 @@ | ||
|
||
QT_BEGIN_NAMESPACE | ||
|
||
+Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") | ||
+ | ||
void qt_registerFont(const QString &familyname, const QString &stylename, | ||
const QString &foundryname, int weight, | ||
QFont::Style style, int stretch, bool antialiased, | ||
|
||
--- a/qtbase/src/gui/text/qplatformfontdatabase.h | ||
+++ b/qtbase/src/gui/text/qplatformfontdatabase.h | ||
@@ -50,6 +50,7 @@ | ||
// | ||
|
||
#include <QtGui/qtguiglobal.h> | ||
+#include <QtCore/qloggingcategory.h> | ||
#include <QtCore/QString> | ||
#include <QtCore/QStringList> | ||
#include <QtCore/QList> | ||
@@ -62,6 +63,7 @@ | ||
|
||
QT_BEGIN_NAMESPACE | ||
|
||
+Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) | ||
|
||
class QWritingSystemsPrivate; | ||
|
||
|
||
--- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | ||
+++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | ||
@@ -86,8 +86,6 @@ | ||
|
||
QT_BEGIN_NAMESPACE | ||
|
||
-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") | ||
- | ||
static float SYNTHETIC_ITALIC_SKEW = std::tan(14.f * std::acos(0.f) / 90.f); | ||
|
||
bool QCoreTextFontEngine::ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length) | ||
|
||
--- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h | ||
+++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h | ||
@@ -64,8 +64,6 @@ | ||
|
||
QT_BEGIN_NAMESPACE | ||
|
||
-Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) | ||
- | ||
class QCoreTextFontEngine : public QFontEngine | ||
{ | ||
Q_GADGET | ||
|
||
--- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp | ||
+++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp | ||
@@ -68,8 +68,6 @@ | ||
|
||
QT_BEGIN_NAMESPACE | ||
|
||
-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") | ||
- | ||
#ifndef QT_NO_DIRECTWRITE | ||
// ### fixme: Consider direct linking of dwrite.dll once Windows Vista pre SP2 is dropped (QTBUG-49711) | ||
|
||
|
||
--- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h | ||
+++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h | ||
@@ -63,8 +63,6 @@ | ||
|
||
QT_BEGIN_NAMESPACE | ||
|
||
-Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) | ||
- | ||
class QWindowsFontEngineData | ||
{ | ||
Q_DISABLE_COPY_MOVE(QWindowsFontEngineData) | ||
|
||
--- a/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp | ||
+++ b/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp | ||
@@ -40,6 +40,7 @@ | ||
#include "qgenericunixthemes_p.h" | ||
|
||
#include "qpa/qplatformtheme_p.h" | ||
+#include "qpa/qplatformfontdatabase.h" | ||
|
||
#include <QtGui/QPalette> | ||
#include <QtGui/QFont> | ||
@@ -76,7 +77,6 @@ | ||
QT_BEGIN_NAMESPACE | ||
|
||
Q_DECLARE_LOGGING_CATEGORY(qLcTray) | ||
-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") | ||
|
||
ResourceHelper::ResourceHelper() | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/qtbase/mkspecs/features/mac/no_warn_empty_obj_files.prf | ||
+++ b/qtbase/mkspecs/features/mac/no_warn_empty_obj_files.prf | ||
@@ -1,7 +1,7 @@ | ||
# Prevent warnings about object files without any symbols. This is a common | ||
# thing in Qt as we tend to build files unconditionally, and then use ifdefs | ||
# to compile out parts that are not relevant. | ||
-QMAKE_RANLIB += -no_warning_for_no_symbols | ||
+# QMAKE_RANLIB += -no_warning_for_no_symbols | ||
|
||
# We have to tell 'ar' to not run ranlib by itself | ||
QMAKE_AR += -S |