Skip to content

Commit a273488

Browse files
committed
qt4-mac: allow building on Tahoe
Also remove old workarounds and consolidate deployment target capping. Closes: https://trac.macports.org/ticket/73278
1 parent 80f89fe commit a273488

File tree

3 files changed

+63
-28
lines changed

3 files changed

+63
-28
lines changed

aqua/qt4-mac/Portfile

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ PortSystem 1.0
66
# does not include certain parts
77
set building_qt4 1
88
PortGroup qt4 1.0
9-
PortGroup xcodeversion 1.0
109

1110
name qt4-mac
1211
version 4.8.7
@@ -32,10 +31,7 @@ checksums rmd160 afb5e5a99388e6429faca59cb5000054feffd166 \
3231
sha256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 \
3332
size 241075567
3433

35-
if {[info exists use_xcode]} {
36-
use_xcode yes
37-
}
38-
minimum_xcodeversions {8 2.5}
34+
use_xcode yes
3935

4036
depends_lib-append port:zlib \
4137
path:bin/dbus-daemon:dbus \
@@ -55,15 +51,10 @@ platform darwin 10 {
5551

5652
# easy solution for deprecated font API; see also
5753
# https://trac.macports.org/ticket/66114
58-
59-
platform darwin 22 {
60-
macosx_deployment_target 12.0
61-
}
62-
platform darwin 23 {
63-
macosx_deployment_target 12.0
64-
}
65-
platform darwin 24 {
66-
macosx_deployment_target 12.0
54+
platform darwin {
55+
if {[vercmp $macosx_deployment_target > 12.0]} {
56+
macosx_deployment_target 12.0
57+
}
6758
}
6859

6960
# find a way to specify the OS MINOR version. For OSX 10.X, this
@@ -93,20 +84,6 @@ if {${macosx_deployment_target} ne ""} {
9384
}
9485
# ui_debug "Deduced OS MAJOR.MINOR = ${MAJOR}.${MINOR}"
9586

96-
# Error out if trying to build on a new macOS version. We do this
97-
# because this port is so old and thus we want to make sure this
98-
# port works on these newer macOS versions first.
99-
platform darwin {
100-
if { ${os.major} > 24 } {
101-
depends_lib
102-
depends_run
103-
pre-fetch {
104-
ui_error "$name does not currently build on macOS versions later than 15 Sequoia."
105-
error "unsupported platform"
106-
}
107-
}
108-
}
109-
11087
###############################################
11188
# Patches are used to both fix compiling on various OS versions, and
11289
# to enhance the functionality of QMake and its build files. Some of
@@ -426,6 +403,9 @@ patchfiles-append patch-test_compiler_version.diff
426403
# we'll add an "if" to narrow the scope of application
427404
patchfiles-append patch-src_3rdparty_javascriptcore_JavaScriptCore_jit_JITStubs.cpp_remove_volatile.diff
428405

406+
# fix "error: expression is not an integral constant expression"
407+
patchfiles-append qcoloroutput_p.h-shift.patch
408+
429409
# the wtf_ceil workaround in wtf/MathExtras.h is causing a build error with Xcode 15
430410
# this workaround was deleted long ago here in the upstream source:
431411
# (wtf_ceil): Deleted. This was a workaround for a bug that was introduced in Leopard and
@@ -438,6 +418,9 @@ platform darwin {
438418
if { ${os.major} > 22 } {
439419
patchfiles-append patch-webkit-remove-wtf_ceil-workaround.diff
440420
}
421+
if {${os.major} >= 25} {
422+
patchfiles-append no-AGL.patch
423+
}
441424
}
442425

443426
# Support aarch64

aqua/qt4-mac/files/no-AGL.patch

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- mkspecs/common/mac.conf.orig 2025-11-30 09:40:09
2+
+++ mkspecs/common/mac.conf 2025-11-30 09:47:01
3+
@@ -10,15 +10,14 @@
4+
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
5+
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
6+
QMAKE_FRAMEWORKDIR_QT = $$[QT_INSTALL_FRAMEWORKS]
7+
-QMAKE_INCDIR_OPENGL = /System/Library/Frameworks/OpenGL.framework/Headers \
8+
- /System/Library/Frameworks/AGL.framework/Headers/
9+
+QMAKE_INCDIR_OPENGL = /System/Library/Frameworks/OpenGL.framework/Headers
10+
11+
QMAKE_FIX_RPATH = install_name_tool -id
12+
13+
QMAKE_LFLAGS_RPATH =
14+
15+
QMAKE_LIBS_DYNLOAD =
16+
-QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
17+
+QMAKE_LIBS_OPENGL = -framework OpenGL
18+
QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL
19+
QMAKE_LIBS_THREAD =
20+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From 7b1f8df5fa8ea5346315f999097b19836d7eac19 Mon Sep 17 00:00:00 2001
2+
From: Thiago Macieira <[email protected]>
3+
Date: Fri, 21 Dec 2012 23:47:50 -0800
4+
Subject: [PATCH] Fix annoying warning in qtxmlpatterns about a value too big
5+
for the enum
6+
7+
api/qcoloroutput_p.h:74:60: error: signed shift result (0xFFFFF00000) requires 41 bits to represent, but 'int' only has 32 bits [-Werror,-Wshift-overflow]
8+
9+
The masks don't look right anyway. Let's just hardcode them according
10+
to how many colours are used.
11+
12+
Change-Id: Idd3438ecab3fb666bd84929fb731011224b9c68e
13+
Reviewed-by: Lars Knoll <[email protected]>
14+
---
15+
src/xmlpatterns/api/qcoloroutput_p.h | 4 ++--
16+
1 file changed, 2 insertions(+), 2 deletions(-)
17+
18+
diff --git a/src/xmlpatterns/api/qcoloroutput_p.h b/src/xmlpatterns/api/qcoloroutput_p.h
19+
index 864b90d9..f02a4506 100644
20+
--- src/xmlpatterns/api/qcoloroutput_p.h.orig
21+
+++ src/xmlpatterns/api/qcoloroutput_p.h
22+
@@ -70,8 +70,8 @@ namespace QPatternist
23+
ForegroundShift = 10,
24+
BackgroundShift = 20,
25+
SpecialShift = 20,
26+
- ForegroundMask = ((1 << ForegroundShift) - 1) << ForegroundShift,
27+
- BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift
28+
+ ForegroundMask = 0x1f << ForegroundShift,
29+
+ BackgroundMask = 0x7 << BackgroundShift
30+
};
31+
32+
public:

0 commit comments

Comments
 (0)