MINGW-packages/mingw-w64-cmake-bootstrap/0003-fix-find-python-on-mingw-aarch64.patch
Christoph Reiter 0e04830886 Add cmake-bootstrap
A cmake variant that doesn't depend on any external dependencies and
can be used for bootstrapping an env, and building a full cmake.

The problem with cmake is that it depends on various libraries such
as curl, libarchive, libuv etc for which we want to use cmake instead
of autotools (native, faster, better supported on Windows).

These cycles prevent automated builds in case one of the dependencies
has an ABI break, or when bootstrapping a new environment.

Other distros avoid this by partly vendoring some dependencies, using
autotools for certain dependencies to avoid cycles, and not including the
cmake GUI tools. We'd prefer to use cmake over autotools everywhere if
supported though, and provide a full cmake installation to users.
2024-09-20 16:05:20 +02:00

14 lines
786 B
Diff

--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -970,8 +970,8 @@
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(TOUPPER "${platform}" platform)
- if (result OR ((target_arm AND NOT platform MATCHES "ARM") OR
- (NOT target_arm AND platform MATCHES "ARM")))
+ if (result OR ((target_arm AND NOT (platform MATCHES "ARM" OR platform MATCHES "AARCH64")) OR
+ (NOT target_arm AND (platform MATCHES "ARM" OR platform MATCHES "AARCH64"))))
# interpreter not usable or has wrong architecture
if (result)
set_property (CACHE _${_PYTHON_PREFIX}_Interpreter_REASON_FAILURE PROPERTY VALUE "Cannot use the interpreter \"${_${_PYTHON_PREFIX}_EXECUTABLE}\"")