need someone with steely git-fu to resolve a minor conflict in PR #740
Zero King
l2dy at macports.org
Sun Feb 25 05:34:25 UTC 2018
On Sun, Feb 25, 2018 at 05:28:26AM +0000, Zero King wrote:
>On Sat, Feb 24, 2018 at 08:26:41PM -0800, Ken Cunningham wrote:
>>I have tried several times to resolve the minor conflict in this PR and I just keep messing it up. It looks super trivial, but ...
>>
>>https://github.com/macports/macports-ports/pull/740
>>
>>Please, if you do fix it, tell me what you did so I don't have to ask this particular silly question again.
>
>```
>git checkout -b pr-740
>curl -O https://patch-diff.githubusercontent.com/raw/macports/macports-ports/pull/740.patch
>vim 740.patch
># ^ remove the conflicting file (diff --git a/aqua/qt4-mac/Portfile ...
># until the next diff --git ...)
>git am 740.patch
>curl -o aqua/qt4-mac/Portfile https://raw.githubusercontent.com/devernay/macports-ports/8324db7c8b3452e453ce859d2137ae1ae6a76743/aqua/qt4-mac/Portfile
># ^ URL from https://github.com/macports/macports-ports/pull/740/files ("View" button on the right)
>git add aqua/qt4-mac/Portfile
>git commit --amend --no-edit
>git push -f git at github.com:devernay/macports-ports.git pr-740:qt4-mac-tiger
>```
>
>I'm using a shallow clone so I can't push to an outdated branch, but it
>should work for you.
But I can generate a patch... Download the patch attached and,
```
git checkout -b pr-740
git am 0001-qt4-mac-backport-qt5-QSettings-fix-support-building-.patch
git push -f git at github.com:devernay/macports-ports.git pr-740:qt4-mac-tiger
git checkout - # return to previous branch
```
--
Best regards,
Zero King
-------------- next part --------------
From fe341ea9b7b18f216603bca877a4a6745df170f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Devernay?= <frederic.devernay at m4x.org>
Date: Mon, 4 Sep 2017 13:55:20 +0200
Subject: [PATCH] qt4-mac: backport qt5 QSettings fix + support building on
Tiger
also an alternate fix for high Sierra is presented that can be enabled
if the maintainer wishes
All the tiger-specific patches are suffixed with -tiger, and don't break anything when compiling with more recent SDKs.
Only one patch, patch-src_gui_dialogs_qfontdialog_mac.mm-tiger.diff, reintroduces in the Tiger version only a Qt bug (QTBUG-27415) which cannot be fixed with the Tiger SDK (the fix requires Leopard).
Patch (19) seems wrong when building frameworks and breaks the build (older versions of qt4-mac allowed building with libraries only, I guess this patch is remnant from that time). I commented it out, and did not remove the patch file in case someone wants to take a closer look at it.
Also, since qt4-mac only uses the JPEG 8 API, libjpeg-turbo can be used instead (see https://trac.macports.org/ticket/38907)
Patches (31) (backport qt5 QSettings fix) and (30) (support High Sierra) were taken from homebrew. I did not test building on macOS High Sierra, and thus left the restriction.
---
aqua/qt4-mac/Portfile | 26 ++++-
.../patch-qmake_generators_unix_unixmakke.cpp.diff | 108 +++++++++++++++++++++
aqua/qt4-mac/files/patch-qsettings-null.diff | 76 +++++++++++++++
.../patch-qt4-versions-without-underscores.diff | 12 +++
...orelib_io_qfilesystemengine_unix.cpp-tiger.diff | 41 ++++++++
...h-src_gui_dialogs_qfontdialog_mac.mm-tiger.diff | 34 +++++++
...rc_gui_painting_qpaintengine_mac.cpp-tiger.diff | 19 ++++
...src_gui_painting_qprintengine_mac.mm-tiger.diff | 14 +++
...h-src_gui_text_qfontdatabase_mac.cpp-tiger.diff | 21 ++++
...network_kernel_qnetworkproxy_mac.cpp-tiger.diff | 18 ++++
10 files changed, 366 insertions(+), 3 deletions(-)
create mode 100644 aqua/qt4-mac/files/patch-qmake_generators_unix_unixmakke.cpp.diff
create mode 100644 aqua/qt4-mac/files/patch-qsettings-null.diff
create mode 100644 aqua/qt4-mac/files/patch-qt4-versions-without-underscores.diff
create mode 100644 aqua/qt4-mac/files/patch-src_corelib_io_qfilesystemengine_unix.cpp-tiger.diff
create mode 100644 aqua/qt4-mac/files/patch-src_gui_dialogs_qfontdialog_mac.mm-tiger.diff
create mode 100644 aqua/qt4-mac/files/patch-src_gui_painting_qpaintengine_mac.cpp-tiger.diff
create mode 100644 aqua/qt4-mac/files/patch-src_gui_painting_qprintengine_mac.mm-tiger.diff
create mode 100644 aqua/qt4-mac/files/patch-src_gui_text_qfontdatabase_mac.cpp-tiger.diff
create mode 100644 aqua/qt4-mac/files/patch-src_network_kernel_qnetworkproxy_mac.cpp-tiger.diff
diff --git a/aqua/qt4-mac/Portfile b/aqua/qt4-mac/Portfile
index cca1f479..49c03895 100644
--- a/aqua/qt4-mac/Portfile
+++ b/aqua/qt4-mac/Portfile
@@ -11,7 +11,7 @@ PortGroup compiler_blacklist_versions 1.0
name qt4-mac
version 4.8.7
-revision 5
+revision 6
set branch [join [lrange [split ${version} .] 0 1] .]
categories aqua
@@ -40,7 +40,7 @@ depends_lib-append port:zlib \
port:tiff \
port:libpng \
port:libmng \
- port:jpeg
+ path:lib/libjpeg.dylib:jpeg
# find a way to specify the OS MINOR version. For OSX 10.X, this
# value will be X. The type is this variable is integer, so we can
@@ -217,7 +217,8 @@ patchfiles-append \
platform darwin {
if {${MINOR} == 4} {
- patchfiles-append patch-QtHelp_10.4_only.diff
+ # this breaks the framework build
+ #patchfiles-append patch-QtHelp_10.4_only.diff
}
}
@@ -297,6 +298,25 @@ patchfiles-append patch-fix_pointer_comparison_to_0.diff
patchfiles-append patch-src_gui_kernel_qt_cocoa_helpers_mac.mm.diff
+# (30) an alternate Patch to fix build on macOS High Sierra
+# enable assertions without underscores
+# patchfiles-append patch-qt4-versions-without-underscores.diff
+
+# (31) Backport of Qt5 patch to fix an issue with null bytes in QSetting strings (QTBUG-56124).
+patchfiles-append patch-qsettings-null.diff
+
+# (32) Mac OS X 10.4 Tiger patches
+platform darwin {
+ if {${MINOR} == 4} {
+ patchfiles-append patch-src_corelib_io_qfilesystemengine_unix.cpp-tiger.diff
+ patchfiles-append patch-src_network_kernel_qnetworkproxy_mac.cpp-tiger.diff
+ patchfiles-append patch-src_gui_painting_qprintengine_mac.mm-tiger.diff
+ patchfiles-append patch-src_gui_dialogs_qfontdialog_mac.mm-tiger.diff
+ patchfiles-append patch-src_gui_text_qfontdatabase_mac.cpp-tiger.diff
+ patchfiles-append patch-src_gui_painting_qpaintengine_mac.cpp-tiger.diff
+ }
+}
+
# error out if trying to build on a new OSX version (> 10.12).
platform darwin {
diff --git a/aqua/qt4-mac/files/patch-qmake_generators_unix_unixmakke.cpp.diff b/aqua/qt4-mac/files/patch-qmake_generators_unix_unixmakke.cpp.diff
new file mode 100644
index 00000000..1a933100
--- /dev/null
+++ b/aqua/qt4-mac/files/patch-qmake_generators_unix_unixmakke.cpp.diff
@@ -0,0 +1,108 @@
+--- qmake/generators/unix/unixmake.cpp.orig 2013-02-24 21:46:23.000000000 -0500
++++ qmake/generators/unix/unixmake.cpp 2013-02-25 11:40:24.000000000 -0500
+@@ -472,8 +472,9 @@
+ UnixMakefileGenerator::findLibraries()
+ {
+ QList<QMakeLocalFileName> libdirs, frameworkdirs;
++ frameworkdirs.append(QMakeLocalFileName("@PREFIX@/Library/Frameworks"));
+ frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks"));
+- frameworkdirs.append(QMakeLocalFileName("/Library/Frameworks"));
++ libdirs.append(QMakeLocalFileName("@PREFIX@/lib"));
+ const QString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS", "QMAKE_LFLAGS", "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", QString() };
+ for(int i = 0; !lflags[i].isNull(); i++) {
+ QStringList &l = project->values(lflags[i]);
+@@ -583,7 +584,9 @@
+ UnixMakefileGenerator::processPrlFiles()
+ {
+ QList<QMakeLocalFileName> libdirs, frameworkdirs;
++ frameworkdirs.append(QMakeLocalFileName("@PREFIX@/Library/Frameworks"));
+ frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks"));
++ libdirs.append(QMakeLocalFileName("@PREFIX@/lib"));
+ const QString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS", "QMAKE_LFLAGS", "QMAKE_LIBS", QString() };
+ for(int i = 0; !lflags[i].isNull(); i++) {
+ QStringList &l = project->values(lflags[i]);
+@@ -627,13 +630,78 @@
+ else
+ opt = l.at(++lit);
+ opt = opt.trimmed();
+- const QList<QMakeLocalFileName> dirs = frameworkdirs + libdirs;
+- for(int dep_i = 0; dep_i < dirs.size(); ++dep_i) {
++
++ // See if this framework is specified as
++ // "foo,bar", which to Apple's LD means to look
++ // for "foo" with the addition "bar" first in all
++ // paths, then if not found do the same for just
++ // "foo". Tricky looking for "," but not "\,"
++
++#if 0
++ warn_msg(WarnLogic, "out before: '%s'\n", opt.toLatin1().constData());
++#endif
++ int num_cs = 0;
++ int loc_1 = -1;
++ int loc = opt.indexOf(",");
++ bool found = false;
++ while (!found && (loc != -1)) {
++ found = (loc == 0);
++ if (!found) {
++ found = (opt[loc-1] != '\\');
++ }
++ if (found) {
++ if (loc_1 == -1) {
++ loc_1 = loc;
++ }
++ ++num_cs;
++ } else {
++ loc = opt.indexOf(",", loc);
++ }
++ }
++#if 0
++ warn_msg(WarnLogic, "found == %s, loc == %d\n",
++ (found ? "true" : "false"), loc);
++#endif
++ if (found) {
++ // split into name and extension
++ if (num_cs > 1) {
++ warn_msg(WarnLogic, "When parsing -framework '%s', found more than one ',' in the name. Assuming the first ',' is used to delineate between the framework name and the optional extension.\n", opt.toLatin1().constData());
++ }
++ QString ext = opt.mid(loc_1+1);
++ opt = opt.left(loc_1);
++ found = false;
++ const QList<QMakeLocalFileName> dirs = frameworkdirs + libdirs;
++ for(int dep_i = 0; dep_i < dirs.size(); ++dep_i) {
++ QString prl = dirs[dep_i].local() + "/" + opt + ".framework/" + opt + ext + Option::prl_ext;
++#if 0
++ warn_msg(WarnLogic, "Looking for PRL '%s'\n", prl.toLatin1().constData());
++#endif
++ if(processPrlFile(prl)) {
++#if 0
++ warn_msg(WarnLogic, "Found PRL for framework '%s' with optional extension '%s': '%s'\n", opt.toLatin1().constData(), ext.toLatin1().constData(), prl.toLatin1().constData());
++#endif
++ found = true;
++ break;
++ }
++ }
++ }
++ // if not found yet, try the primary name
++ if (!found) {
++ const QList<QMakeLocalFileName> dirs = frameworkdirs + libdirs;
++ for(int dep_i = 0; dep_i < dirs.size(); ++dep_i) {
+ QString prl = dirs[dep_i].local() + "/" + opt + ".framework/" + opt + Option::prl_ext;
+- if(processPrlFile(prl))
+- break;
+- }
+- }
++#if 0
++ warn_msg(WarnLogic, "Looking for PRL '%s'\n", prl.toLatin1().constData());
++#endif
++ if(processPrlFile(prl)) {
++#if 0
++ warn_msg(WarnLogic, "Found PRL for framework '%s': '%s'\n", opt.toLatin1().constData(), prl.toLatin1().constData());
++#endif
++ break;
++ }
++ }
++ }
++ }
+ } else if(!opt.isNull()) {
+ QString lib = opt;
+ processPrlFile(lib);
diff --git a/aqua/qt4-mac/files/patch-qsettings-null.diff b/aqua/qt4-mac/files/patch-qsettings-null.diff
new file mode 100644
index 00000000..344dc46d
--- /dev/null
+++ b/aqua/qt4-mac/files/patch-qsettings-null.diff
@@ -0,0 +1,76 @@
+From 38ca587a64499707cb375738758430f8d105fc7d Mon Sep 17 00:00:00 2001
+From: Mikkel Krautz <mikkel at krautz.dk>
+Date: Fri, 2 Dec 2016 22:55:56 +0100
+Subject: [PATCH] Backport
+ qt5-macos-handle-qsetting-strings-with-embedded-zero-bytes-QTBUG-56124.patch
+ from mumble-releng to Qt 4.
+
+---
+ src/corelib/io/qsettings.cpp | 6 +++++-
+ src/corelib/io/qsettings_mac.cpp | 22 +++++++++++++++++++---
+ 2 files changed, 24 insertions(+), 4 deletions(-)
+
+diff --git src/corelib/io/qsettings.cpp.orig src/corelib/io/qsettings.cpp
+index a4750c5..eb8ab5e 100644
+--- src/corelib/io/qsettings.cpp
++++ src/corelib/io/qsettings.cpp
+@@ -487,7 +487,9 @@ QString QSettingsPrivate::variantToString(const QVariant &v)
+ case QVariant::Double:
+ case QVariant::KeySequence: {
+ result = v.toString();
+- if (result.startsWith(QLatin1Char('@')))
++ if (result.contains(QChar::Null))
++ result = QLatin1String("@String(") + result + QLatin1Char(')');
++ else if (result.startsWith(QLatin1Char('@')))
+ result.prepend(QLatin1Char('@'));
+ break;
+ }
+@@ -554,6 +556,8 @@ QVariant QSettingsPrivate::stringToVariant(const QString &s)
+ if (s.endsWith(QLatin1Char(')'))) {
+ if (s.startsWith(QLatin1String("@ByteArray("))) {
+ return QVariant(s.toLatin1().mid(11, s.size() - 12));
++ } else if (s.startsWith(QLatin1String("@String("))) {
++ return QVariant(s.midRef(8, s.size() - 9).toString());
+ } else if (s.startsWith(QLatin1String("@Variant("))) {
+ #ifndef QT_NO_DATASTREAM
+ QByteArray a(s.toLatin1().mid(9));
+diff --git src/corelib/io/qsettings_mac.cpp.orig src/corelib/io/qsettings_mac.cpp
+index 3504907..edbe103 100644
+--- src/corelib/io/qsettings_mac.cpp
++++ src/corelib/io/qsettings_mac.cpp
+@@ -218,7 +218,14 @@ static QCFType<CFPropertyListRef> macValue(const QVariant &value)
+ case QVariant::String:
+ string_case:
+ default:
+- result = QCFString::toCFStringRef(QSettingsPrivate::variantToString(value));
++ QString string = QSettingsPrivate::variantToString(value);
++ if (string.contains(QChar::Null)) {
++ QByteArray ba = string.toUtf8();
++ result = CFDataCreate(kCFAllocatorDefault, reinterpret_cast<const UInt8 *>(ba.data()),
++ CFIndex(ba.size()));
++ } else {
++ result = QCFString::toCFStringRef(string);
++ }
+ }
+ return result;
+ }
+@@ -269,8 +276,17 @@ static QVariant qtValue(CFPropertyListRef cfvalue)
+ return (bool)CFBooleanGetValue(static_cast<CFBooleanRef>(cfvalue));
+ } else if (typeId == CFDataGetTypeID()) {
+ CFDataRef cfdata = static_cast<CFDataRef>(cfvalue);
+- return QByteArray(reinterpret_cast<const char *>(CFDataGetBytePtr(cfdata)),
+- CFDataGetLength(cfdata));
++ QByteArray byteArray = QByteArray(reinterpret_cast<const char *>(CFDataGetBytePtr(cfdata)),
++ CFDataGetLength(cfdata));
++
++ // Fast-path for QByteArray, so that we don't have to go
++ // though the expensive and lossy conversion via UTF-8.
++ if (!byteArray.startsWith('@'))
++ return byteArray;
++
++ const QString str = QString::fromUtf8(byteArray.constData(), byteArray.size());
++ return QSettingsPrivate::stringToVariant(str);
++
+ } else if (typeId == CFDictionaryGetTypeID()) {
+ CFDictionaryRef cfdict = static_cast<CFDictionaryRef>(cfvalue);
+ CFTypeID arrayTypeId = CFArrayGetTypeID();
diff --git a/aqua/qt4-mac/files/patch-qt4-versions-without-underscores.diff b/aqua/qt4-mac/files/patch-qt4-versions-without-underscores.diff
new file mode 100644
index 00000000..45c9e869
--- /dev/null
+++ b/aqua/qt4-mac/files/patch-qt4-versions-without-underscores.diff
@@ -0,0 +1,12 @@
+--- src/gui/kernel/qt_cocoa_helpers_mac.mm.orig 2017-08-01 09:43:40.000000000 -0400
++++ src/gui/kernel/qt_cocoa_helpers_mac.mm 2017-08-01 09:47:33.000000000 -0400
+@@ -73,6 +73,9 @@
+ **
+ ****************************************************************************/
+
++// Workaround for macOS 10.13 and later
++#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 1
++
+ #include <private/qcore_mac_p.h>
+ #include <qaction.h>
+ #include <qwidget.h>
diff --git a/aqua/qt4-mac/files/patch-src_corelib_io_qfilesystemengine_unix.cpp-tiger.diff b/aqua/qt4-mac/files/patch-src_corelib_io_qfilesystemengine_unix.cpp-tiger.diff
new file mode 100644
index 00000000..c716e321
--- /dev/null
+++ b/aqua/qt4-mac/files/patch-src_corelib_io_qfilesystemengine_unix.cpp-tiger.diff
@@ -0,0 +1,41 @@
+--- src/corelib/io/qfilesystemengine_unix.cpp.orig 2017-08-31 20:54:04.000000000 +0200
++++ src/corelib/io/qfilesystemengine_unix.cpp 2017-08-31 20:58:13.000000000 +0200
+@@ -83,6 +83,7 @@
+ return (fileInfo->finderFlags & kIsInvisible);
+ }
+
++#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ static bool isPackage(const QFileSystemMetaData &data, const QFileSystemEntry &entry)
+ {
+ if (!data.isDirectory())
+@@ -138,6 +139,7 @@
+ FolderInfo *folderInfo = reinterpret_cast<FolderInfo *>(catalogInfo.finderInfo);
+ return folderInfo->finderFlags & kHasBundle;
+ }
++#endif
+
+ #else
+ static inline bool _q_isMacHidden(const char *nativePath)
+@@ -529,8 +531,22 @@
+
+ #if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+ if (what & QFileSystemMetaData::BundleType) {
++#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ if (entryExists && isPackage(data, entry))
+ data.entryFlags |= QFileSystemMetaData::BundleType;
++#else
++ if (entryExists && data.isDirectory()) {
++ QCFType<CFStringRef> path = CFStringCreateWithBytes(0,
++ (const UInt8*)nativeFilePath, nativeFilePathLength,
++ kCFStringEncodingUTF8, false);
++ QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, path,
++ kCFURLPOSIXPathStyle, true);
++
++ UInt32 type, creator;
++ if (CFBundleGetPackageInfoInDirectory(url, &type, &creator))
++ data.entryFlags |= QFileSystemMetaData::BundleType;
++ }
++#endif
+ data.knownFlagsMask |= QFileSystemMetaData::BundleType;
+ }
+ #endif
diff --git a/aqua/qt4-mac/files/patch-src_gui_dialogs_qfontdialog_mac.mm-tiger.diff b/aqua/qt4-mac/files/patch-src_gui_dialogs_qfontdialog_mac.mm-tiger.diff
new file mode 100644
index 00000000..1f896761
--- /dev/null
+++ b/aqua/qt4-mac/files/patch-src_gui_dialogs_qfontdialog_mac.mm-tiger.diff
@@ -0,0 +1,34 @@
+--- src/gui/dialogs/qfontdialog_mac.mm.orig 2017-08-31 21:41:56.000000000 +0200
++++ src/gui/dialogs/qfontdialog_mac.mm 2017-08-31 21:55:51.000000000 +0200
+@@ -141,6 +141,7 @@
+ QFont newFont;
+ if (cocoaFont) {
+ int pSize = qRound([cocoaFont pointSize]);
++#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+ CTFontDescriptorRef font = CTFontCopyFontDescriptor((CTFontRef)cocoaFont);
+ // QCoreTextFontDatabase::populateFontDatabase() is using localized names
+ QString family = QCFString::toQString((CFStringRef) CTFontDescriptorCopyLocalizedAttribute(font, kCTFontFamilyNameAttribute, NULL));
+@@ -151,6 +152,23 @@
+ newFont.setStrikeOut(resolveFont.strikeOut());
+
+ CFRelease(font);
++#else
++ // This pre-Leopard version is buggy and was fixed in 717e36037cf246aa201c0aaf15a5dcbd7883f159
++ // see QTBUG-27415 https://codereview.qt-project.org/#/c/42830/
++ QString family(qt_mac_NSStringToQString([cocoaFont familyName]));
++ QString typeface(qt_mac_NSStringToQString([cocoaFont fontName]));
++
++ int hyphenPos = typeface.indexOf(QLatin1Char('-'));
++ if (hyphenPos != -1) {
++ typeface.remove(0, hyphenPos + 1);
++ } else {
++ typeface = QLatin1String("Normal");
++ }
++
++ newFont = QFontDatabase().font(family, typeface, pSize);
++ newFont.setUnderline(resolveFont.underline());
++ newFont.setStrikeOut(resolveFont.strikeOut());
++#endif
+ }
+ return newFont;
+ }
diff --git a/aqua/qt4-mac/files/patch-src_gui_painting_qpaintengine_mac.cpp-tiger.diff b/aqua/qt4-mac/files/patch-src_gui_painting_qpaintengine_mac.cpp-tiger.diff
new file mode 100644
index 00000000..bcdfa436
--- /dev/null
+++ b/aqua/qt4-mac/files/patch-src_gui_painting_qpaintengine_mac.cpp-tiger.diff
@@ -0,0 +1,19 @@
+--- src/gui/painting/qpaintengine_mac.cpp.orig 2017-08-31 22:56:01.000000000 +0200
++++ src/gui/painting/qpaintengine_mac.cpp 2017-08-31 23:10:20.000000000 +0200
+@@ -334,7 +334,16 @@
+ if ((colorSpace = m_displayColorSpaceHash.value(displayID)))
+ return colorSpace;
+
++#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+ colorSpace = CGDisplayCopyColorSpace(displayID);
++#else
++ CMProfileRef displayProfile = 0;
++ CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile);
++ if (err == noErr) {
++ colorSpace = CGColorSpaceCreateWithPlatformColorSpace(displayProfile);
++ CMCloseProfile(displayProfile);
++ }
++#endif
+ if (colorSpace == 0)
+ colorSpace = CGColorSpaceCreateDeviceRGB();
+
diff --git a/aqua/qt4-mac/files/patch-src_gui_painting_qprintengine_mac.mm-tiger.diff b/aqua/qt4-mac/files/patch-src_gui_painting_qprintengine_mac.mm-tiger.diff
new file mode 100644
index 00000000..c84c14d7
--- /dev/null
+++ b/aqua/qt4-mac/files/patch-src_gui_painting_qprintengine_mac.mm-tiger.diff
@@ -0,0 +1,14 @@
+--- src/gui/painting/qprintengine_mac.mm.orig 2017-08-31 21:35:19.000000000 +0200
++++ src/gui/painting/qprintengine_mac.mm 2017-08-31 21:37:56.000000000 +0200
+@@ -187,7 +187,11 @@
+ paperMargins.top = topMargin;
+ paperMargins.right = rightMargin;
+ paperMargins.bottom = bottomMargin;
++#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+ PMPaperCreateCustom(printer, paperId, QCFString("Custom size"), customSize.width(), customSize.height(), &paperMargins, &customPaper);
++#else
++ PMPaperCreate(printer, paperId, QCFString("Custom size"), customSize.width(), customSize.height(), &paperMargins, &customPaper);
++#endif
+ PMPageFormat tmp;
+ PMCreatePageFormatWithPMPaper(&tmp, customPaper);
+ PMCopyPageFormat(tmp, format);
diff --git a/aqua/qt4-mac/files/patch-src_gui_text_qfontdatabase_mac.cpp-tiger.diff b/aqua/qt4-mac/files/patch-src_gui_text_qfontdatabase_mac.cpp-tiger.diff
new file mode 100644
index 00000000..85f184ed
--- /dev/null
+++ b/aqua/qt4-mac/files/patch-src_gui_text_qfontdatabase_mac.cpp-tiger.diff
@@ -0,0 +1,21 @@
+--- src/gui/text/qfontdatabase_mac.cpp.orig 2017-08-31 22:45:17.000000000 +0200
++++ src/gui/text/qfontdatabase_mac.cpp 2017-08-31 23:10:46.000000000 +0200
+@@ -546,6 +546,7 @@
+
+ QString QFontDatabase::resolveFontFamilyAlias(const QString &family)
+ {
++#if defined(QT_MAC_USE_COCOA) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+ QCFString expectedFamily = QCFString(family);
+
+ QCFType<CFMutableDictionaryRef> attributes = CFDictionaryCreateMutable(NULL, 0,
+@@ -563,6 +564,10 @@
+
+ QCFString familyName = (CFStringRef) CTFontDescriptorCopyLocalizedAttribute(matched, kCTFontFamilyNameAttribute, NULL);
+ return familyName;
++#else
++ // https://bugreports.qt.io/browse/QTBUG-25417?focusedCommentId=185393&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-185393
++ return family;
++#endif
+ }
+
+ QT_END_NAMESPACE
diff --git a/aqua/qt4-mac/files/patch-src_network_kernel_qnetworkproxy_mac.cpp-tiger.diff b/aqua/qt4-mac/files/patch-src_network_kernel_qnetworkproxy_mac.cpp-tiger.diff
new file mode 100644
index 00000000..3ca4d4a2
--- /dev/null
+++ b/aqua/qt4-mac/files/patch-src_network_kernel_qnetworkproxy_mac.cpp-tiger.diff
@@ -0,0 +1,18 @@
+--- src/network/kernel/qnetworkproxy_mac.cpp.orig 2017-08-31 21:05:13.000000000 +0200
++++ src/network/kernel/qnetworkproxy_mac.cpp 2017-08-31 21:05:44.000000000 +0200
+@@ -148,6 +148,7 @@
+ }
+
+
++#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+ static QNetworkProxy proxyFromDictionary(CFDictionaryRef dict)
+ {
+ QNetworkProxy::ProxyType proxyType = QNetworkProxy::DefaultProxy;
+@@ -180,6 +181,7 @@
+
+ return QNetworkProxy(proxyType, hostName, port, user, password);
+ }
++#endif
+
+ const char * cfurlErrorDescription(SInt32 errorCode)
+ {
--
2.16.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3612 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20180225/0d778e50/attachment-0001.bin>
More information about the macports-dev
mailing list