Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt59, qt511, qt513, qt5, qt6: various build fixes #15454

Merged
merged 5 commits into from Jul 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 11 additions & 6 deletions aqua/qt5/Portfile
Expand Up @@ -1064,16 +1064,15 @@ foreach {module module_info} [array get modules] {
# see https://trac.macports.org/ticket/63805#comment:13
patchfiles-append patch-sdk-no-stderr.diff

# find the Rez program
patchfiles-append patch-find_rez.diff

# Backported upstream patch to build with the macOS 12 SDK.
# https://github.com/qt/qtbase/commit/dece6f5840463ae2ddf927d65eb1b3680e34a547
patchfiles-append patch-qiosurfacegraphicsbuffer.h.diff

# Backport from 5.15.6
patchfiles-append patch-cve-2021-38593.diff

# find the Rez program
patchfiles-append patch-find_rez.diff
post-patch {
reinplace \
"s|__MACPORTS_Rez__|[exec -ignorestderr xcrun --find Rez]|g" \
Expand Down Expand Up @@ -1558,15 +1557,21 @@ foreach {module module_info} [array get modules] {

# special case
if { ${module} eq "qtdeclarative" } {
patchfiles-append \
patch-src-3rdparty-masm-stubs-wtf-unicode-Unicode.h.diff \
patch-src-3rdparty-masm-yarr-YarrInterpreter.cpp.diff
# https://trac.macports.org/ticket/62806
# error: typedef redefinition with different types ('char16_t' vs 'unsigned short')
patchfiles-append patch-qtdeclarative-masm.diff

# attempts to link against installed version, which causes an error when upgrading 5.9.3->5.10.0
qt5.frameworkpaths-append ${worksrcpath}/lib
}

# special case
if { ${module} eq "qtlocation" } {
PortGroup conflicts_build 1.0

# do not allow ${prefix}/include/boost to conflict with bundled boost (in bundled mapbox-gl-native)
conflicts_build boost

# qtlocation uses
# Gypsy (https://gypsy.freedesktop.org/wiki/)
# if they can be found
Expand Down
Expand Up @@ -32,3 +32,18 @@

#define U16_IS_LEAD(ch) QChar::isHighSurrogate((ch))
#define U16_IS_TRAIL(ch) QChar::isLowSurrogate((ch))
--- src/3rdparty/masm/yarr/YarrInterpreter.cpp.b 2020-10-27 01:02:12.000000000 -0700
+++ src/3rdparty/masm/yarr/YarrInterpreter.cpp 2021-05-21 16:24:19.000000000 -0700
@@ -1719,8 +1719,10 @@
void atomPatternCharacter(UChar32 ch, unsigned inputPosition, unsigned frameLocation, Checked<unsigned> quantityMaxCount, QuantifierType quantityType)
{
if (m_pattern.ignoreCase()) {
- UChar32 lo = u_tolower(ch);
- UChar32 hi = u_toupper(ch);
+ // this is a terribly fughly way to go about working around
+ // problems with icu's macros that alter the u_tolower() name.
+ UChar32 lo = qt5_u_tolower(ch);
+ UChar32 hi = qt5_u_toupper(ch);

if (lo != hi) {
m_bodyDisjunction->terms.append(ByteTerm(lo, hi, inputPosition, frameLocation, quantityMaxCount, quantityType));

This file was deleted.

27 changes: 15 additions & 12 deletions aqua/qt511/Portfile
Expand Up @@ -23,7 +23,7 @@ if { ${subport} eq "${name}-qtwebkit" ||
}

# https://trac.macports.org/ticket/63154
if { ${xcodeversion} ne "none" } {
if { ${xcodeversion} ne "none" || ${os.major} >= 20 } {
use_xcode yes
}

Expand Down Expand Up @@ -843,17 +843,6 @@ foreach {module module_info} [array get modules] {
}
}

if {${os.platform} eq "darwin" && ${os.major} >= 20 && (${module} eq "qtbase" || "qtbase" in [lindex ${module_info} 3])} {
# Fails to find a working compiler and SDK
known_fail yes
depends_lib
depends_build
pre-fetch {
ui_error "${subport} currently does not build on macOS 11 or later"
return -code error "incompatible OS version"
}
}

description Tools and Module(s) for Qt Tool Kit ${qt_major}

set modules_provided_list [lindex ${module_info} 4]
Expand Down Expand Up @@ -1375,6 +1364,11 @@ foreach {module module_info} [array get modules] {

# special case
if { ${module} eq "qtlocation" } {
PortGroup conflicts_build 1.0

# do not allow ${prefix}/include/boost to conflict with bundled boost (in bundled mapbox-gl-native)
conflicts_build boost

# qtlocation uses
# Gypsy (https://gypsy.freedesktop.org/wiki/)
# if they can be found
Expand All @@ -1385,6 +1379,15 @@ foreach {module module_info} [array get modules] {
}
}

# see https://trac.macports.org/ticket/61031
patchfiles-append patch-qtlocation-mbgl-optional.diff
post-patch {
set experimental_dir \
${worksrcpath}/src/3rdparty/mapbox-gl-native/deps/optional/f5b56b71/include/experimental/
file mkdir ${experimental_dir}
copy ${filespath}/optional.hpp ${experimental_dir}/optional
}

# std::auto_ptr was removed in C++17
# see https://bugreports.qt.io/browse/QTBUG-64441
configure.args-append DEFINES+=BOOST_NO_AUTO_PTR
Expand Down