<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/73229d35c227d412616d65b2a95c066255c97977">https://github.com/macports/macports-ports/commit/73229d35c227d412616d65b2a95c066255c97977</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 73229d35c22 godot: remove clang variants, always use ${configure.compiler} to find the correct compiler
</span>73229d35c22 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 73229d35c227d412616d65b2a95c066255c97977
</span>Author: Jason Liu <jasonliu--@users.noreply.github.com>
AuthorDate: Sun Jun 12 13:06:51 2022 -0400
<span style='display:block; white-space:pre;color:#404040;'> godot: remove clang variants, always use ${configure.compiler} to find the correct compiler
</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/65194
</span>---
games/godot/Portfile | 90 ++++------------------
games/godot/files/configure-macports-compiler.diff | 22 ++++++
2 files changed, 37 insertions(+), 75 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 d265f62623f..2acaf7afc4d 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;'>@@ -26,7 +26,7 @@ if {$subport eq ${name}} {
</span> PortGroup legacysupport 1.1
github.setup ${name}engine ${name} 3.4.4 "" -stable
<span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 1
</span>
github.tarball_from archive
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -104,7 +104,8 @@ depends_lib-append port:freetype \
</span> # port:minizip \
# port:embree
<span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles-append add-external_libs-support.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append add-external_libs-support.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure-macports-compiler.diff
</span>
if {$subport eq "${name}-3.2" && \
${os.platform} eq "darwin" && ${os.major} <= 15} \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -246,6 +247,18 @@ build.args-append builtin_freetype=no \
</span> # builtin_mbedtls=no \
# builtin_embree=no
<span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.cxx_standard 2014
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Configure the compiler
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[string match macports-clang-* ${configure.compiler}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set clang_v [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ string range ${configure.compiler} [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ string length macports-clang-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ] end
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.args-append macports_clang=${clang_v}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.env-append MACPORTS_PREFIX=${prefix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> destroot {
if {$subport eq "${name}-3.2"} {
set app_name "Godot 3.2"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -268,76 +281,3 @@ if {$subport eq ${name}} {
</span> } else {
livecheck.type none
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-### The following code was adapted from the portfiles
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-### of ports such as openvdb and openimageio
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Get major version from version string
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc get_major {version} { return [lindex [split ${version} .] 0] }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set clang_versions {5.0 6.0 7.0 8.0 9.0 10 11 12 13}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set clang_variants {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-foreach v $clang_versions {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend clang_variants clang[get_major $v]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# this default version should stay synchronized with
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# the default macports_clang option in the SConstruct
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# file that is part of the Godot source code
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-set sconstruct_default_mp_clang 5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# On older macOS versions, use clang variant by default
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-if {[string match macports-clang-* ${configure.compiler}] || \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${os.platform} eq "darwin" && ${os.major} <= 14} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-{
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set has_clang_variant no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach v $clang_versions {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[variant_isset clang[get_major $v]]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set has_clang_variant yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {!$has_clang_variant} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[regexp {macports-clang-([0-9]+(?:\.[0-9]+)*)} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${configure.compiler} result clang_version]} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default_variants-append +clang[get_major $clang_version]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Unable to determine $clang_version,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # so use most recent clang
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default_variants-append +clang[get_major [
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lindex $clang_versions end
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# Configure the variants
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-foreach clang_ver $clang_versions {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set clang_ver_major [get_major $clang_ver]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set i [lsearch -exact $clang_variants clang$clang_ver_major]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set c [lreplace $clang_variants $i $i]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- variant clang$clang_ver_major conflicts {*}${c} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- description "Build using MacPorts Clang $clang_ver" {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[variant_isset clang$clang_ver_major]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set selected_clang_v $clang_ver
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append port:clang-$selected_clang_v
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiler.whitelist macports-clang-$selected_clang_v
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- build.args-append macports_clang=$selected_clang_v
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- post-configure {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[get_major $selected_clang_v] != \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $sconstruct_default_mp_clang} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$subport eq "${name}-3.2"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set f ${worksrcpath}/SConstruct
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set f ${worksrcpath}/platform/osx/detect.py
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- s|$sconstruct_default_mp_clang\.0|$selected_clang_v|g \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- $f
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/games/godot/files/configure-macports-compiler.diff b/games/godot/files/configure-macports-compiler.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..4172e1df053
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/games/godot/files/configure-macports-compiler.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,22 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- platform/osx/detect.py.orig 2022-03-22 20:47:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ platform/osx/detect.py 2022-05-20 19:57:39.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -24,7 +24,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ("osxcross_sdk", "OSXCross SDK version", "darwin14"),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ("MACOS_SDK_PATH", "Path to the macOS SDK", ""),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- EnumVariable("macports_clang", "Build using Clang from MacPorts", "no", ("no", "5.0", "devel")),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ("macports_clang", "Build using Clang from MacPorts", "no"),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BoolVariable("use_ubsan", "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)", False),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -97,8 +97,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ env["AS"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-as"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ env.Append(CPPDEFINES=["__MACPORTS__"]) # hack to fix libvpx MM256_BROADCASTSI128_SI256 define
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- env["CC"] = "clang"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- env["CXX"] = "clang++"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ env["CC"] = "/usr/bin/clang"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ env["CXX"] = "/usr/bin/clang++"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ detect_darwin_sdk_path("osx", env)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ env.Append(CCFLAGS=["-isysroot", "$MACOS_SDK_PATH"])
</span></pre><pre style='margin:0'>
</pre>