From 2268c9b5bed6686631618ef6d3c3d462f70e7f59 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 10 Jun 2026 18:15:43 +0200 Subject: [PATCH 1/2] increase min deployment for macOS 27 SDK --- build/osx/wxcocoa.xcconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/build/osx/wxcocoa.xcconfig b/build/osx/wxcocoa.xcconfig index 0aabf84400..9ac64ebd9e 100644 --- a/build/osx/wxcocoa.xcconfig +++ b/build/osx/wxcocoa.xcconfig @@ -5,6 +5,7 @@ WXTOOLKITUPPER = COCOA MACOSX_DEPLOYMENT_TARGET = 10.10 MACOSX_DEPLOYMENT_TARGET[arch=arm64] = 11.0 +MACOSX_DEPLOYMENT_TARGET[sdk=macosx27*] = 12.0 GCC_VERSION = From 8a5360b3d05837246cae694aaf77093f834da5a2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 27 Jun 2026 20:09:11 +0200 Subject: [PATCH 2/2] Use earliest supported macOS version in configure by default Use the first value of DEPLOYMENT_TARGET_SUGGESTED_VALUES plist key instead of MACOSX_DEPLOYMENT_TARGET. Also drop support for using "buildSettings" key, this is something very old and certainly not used by any of the still supported Xcode versions. And simplify the commands used in a configure, in particular use a single sed command with "p" modifier instead of using grep and then sed. --- configure | 8 ++++---- configure.ac | 21 +++++++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 97023a5261..af2e47fae8 100755 --- a/configure +++ b/configure @@ -23083,13 +23083,13 @@ elif test "x$wxUSE_MACOSX_VERSION_MIN" = "xyes"; then if test "x$wxUSE_MACOSX_SDK" != "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking SDK deployment version" >&5 $as_echo_n "checking SDK deployment version... " >&6; } + defaultProperties=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" DefaultProperties` - MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" buildSettings | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'` + MACOSX_SDK_PLIST_VERSION_MIN=`echo "$defaultProperties" | sed -n -e '1,/DEPLOYMENT_TARGET_SUGGESTED_VALUES/d; s/^ *//; s/"//g; s/,//p; q'` - # If that failed, try again with the new key - if test "x$MACOSX_SDK_PLIST_VERSION_MIN" = "x"; then + if test "x$MACOSX_SDK_PLIST_VERSION_MIN" = "x"; then - MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" DefaultProperties | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'` + MACOSX_SDK_PLIST_VERSION_MIN=`echo "$defaultProperties" | sed -n -e 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/p'` fi diff --git a/configure.ac b/configure.ac index bc104b0a5e..8b182a61ea 100644 --- a/configure.ac +++ b/configure.ac @@ -1314,15 +1314,20 @@ if test "x$wxUSE_MACOSX_VERSION_MIN" = "xno"; then elif test "x$wxUSE_MACOSX_VERSION_MIN" = "xyes"; then if test "x$wxUSE_MACOSX_SDK" != "x"; then AC_MSG_CHECKING([SDK deployment version]) -dnl We need to quote the next line where we don't need macros and do need [] in the regex -[ - MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" buildSettings | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'` -] - # If that failed, try again with the new key + defaultProperties=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" DefaultProperties` + + dnl Take the first (earliest, because they are sorted) supported + dnl deployment target from the SDKSettings.plist file and remove + dnl leading spaces, quotes and trailing comma from it. + MACOSX_SDK_PLIST_VERSION_MIN=`echo "$defaultProperties" | sed -n -e '1,/DEPLOYMENT_TARGET_SUGGESTED_VALUES/d; s/^ *//; s/"//g; s/,//p; q'` + + dnl If DEPLOYMENT_TARGET_SUGGESTED_VALUES doesn't exist, as it was in + dnl 10.11..10.13 SDKs, try MACOSX_DEPLOYMENT_TARGET instead. if test "x$MACOSX_SDK_PLIST_VERSION_MIN" = "x"; then -[ - MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" DefaultProperties | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'` -] + dnl We need to quote the next line where we don't need macros and do need [] in the regex + [ + MACOSX_SDK_PLIST_VERSION_MIN=`echo "$defaultProperties" | sed -n -e 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/p'` + ] fi if test "x$MACOSX_SDK_PLIST_VERSION_MIN" != "x"; then