<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/820748c6ca89a5869df317d4305ba292f79bdd92">https://github.com/macports/macports-ports/commit/820748c6ca89a5869df317d4305ba292f79bdd92</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 820748c6ca8 godot: Fix builds for macOS <= 10.10
</span>820748c6ca8 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 820748c6ca89a5869df317d4305ba292f79bdd92
</span>Author: Jason Liu <jasonliu--@users.noreply.github.com>
AuthorDate: Mon Dec 6 12:28:39 2021 -0500
<span style='display:block; white-space:pre;color:#404040;'> godot: Fix builds for macOS <= 10.10
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/63033
</span>---
games/godot/Portfile | 76 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 69 insertions(+), 7 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/games/godot/Portfile b/games/godot/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index bb4de087e8d..c7111d47c27 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/games/godot/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/games/godot/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -23,8 +23,10 @@ long_description Godot Engine is a cross-platform game engine for \
</span> (Android, iOS) and web-based (HTML5) platforms.
if {$subport eq ${name}} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} <= 15} { PortGroup legacysupport 1.1 }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> github.setup godotengine ${name} 3.3.2 "" -stable
<span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 2
</span>
checksums rmd160 6a0d77597ed84308d030c243118e01b79a87f88c \
sha256 dde0c91b2aaa7db21bd1e1ca82f6c20491e8548c20511bdcf506160f4b852bd8 \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -59,15 +61,18 @@ if {${os.platform} eq "darwin" && ${os.major} <= 11} {
</span> depends_build port:scons \
port:yasm
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {${os.platform} eq "darwin" && ${os.major} <= 15} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {$subport eq "${name}-3.2" && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${os.platform} eq "darwin" && ${os.major} <= 15} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</span> patchfiles legacy-osx-defines.diff
}
if {$subport eq ${name} && \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ${os.platform} eq "darwin" && ${os.major} < 15} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # On old versions of macOS, the build seems to think that the value
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # of the preprocessor macro MAC_OS_X_VERSION_MAX_ALLOWED is
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # >= 101200, which is supposed to correspond to macOS 10.12 Sierra.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${os.platform} eq "darwin" && ${os.major} < 15} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # On old versions of macOS <= 10.10, the build seems to think that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # the value of the preprocessor macro MAC_OS_X_VERSION_MAX_ALLOWED
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # is >= 101200, which is supposed to correspond to macOS 10.12.
</span> # As discussed in GitHub PR #12269
# (https://github.com/macports/macports-ports/pull/12269),
# something is causing the preprocessor to think that values such as
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -90,12 +95,69 @@ post-patch {
</span> ${worksrcpath}/modules/webm/libvpx/SCsub
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+if {$subport eq ${name} && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${os.platform} eq "darwin" && ${os.major} <= 15} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Using macports-libcxx is needed in order to lower the minimum
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # macOS version specified in -mmacosx-version-min. Otherwise the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # compile will fail, complaining that 'shared_time_mutex' was
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # introduced in macOS 10.12.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ legacysupport.use_mp_libcxx yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Tell the build to use macports-libcxx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "/LINKFLAGS.*isysroot.*MACOS_SDK_PATH/a\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+\\ env.Append(CXXFLAGS=\[\"-nostdinc++\", \"-I${prefix}/include/libcxx/v1\"\])\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+\\ env.Append(LINKFLAGS=\[\"-L${prefix}/lib/libcxx\"\])\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/platform/osx/detect.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Lower the minimum macOS version allowed to launch the app
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "/mmacosx-version-min=10\.12/s/10\.12/${macosx_deployment_target}/" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/platform/osx/detect.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f [list "osx_tools" "osx_template"] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s/10\.12/${macosx_deployment_target}/" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/misc/dist/${f}.app/Contents/Info.plist
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # The following tests for the case where the macOS 10.12 SDK is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # installed on a macOS 10.11 machine. If so, then we don't add
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # the AppKit wrapper header.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sdks_dir ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set add_appkit_wrapper yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![catch {file lstat $sdks_dir/MacOSX10.12.sdk finfo}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set add_appkit_wrapper no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$add_appkit_wrapper} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Remove the existing AppKit redefines from Godot's source
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # code, so that we can use our AppKit wrapper file instead.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "/define NSEventMaskAny/i\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#define APPKIT_REDEFINES_HAVE_BEEN_REMOVED_BY_MACPORTS\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/platform/osx/os_osx.mm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace {/define NSEventMaskAny/,/define NSWindowStyleMaskBorderless/d} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/platform/osx/os_osx.mm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Add AppKit wrapper header to compiler library paths
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "/CCFLAGS.*error=return-type/a\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+\\ env.Prepend(CCFLAGS=\[\"-isystem\", \"${filespath}/old_appkit_compat\"\])\\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/SConstruct
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> use_configure no
use_xcode yes
build.cmd ${prefix}/bin/scons
build.env-append BUILD_NAME=macports_build
<span style='display:block; white-space:pre;background:#ffe0e0;'>-build.target platform=osx arch=${build_arch} target=release_debug
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.target platform=osx arch=${build_arch} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ target=release_debug verbose=yes warnings=extra
</span>
destroot {
if {$subport eq "${name}-3.2"} {
</pre><pre style='margin:0'>
</pre>