kiwix-build/kiwixbuild/patches/android-ndk-r21e-linux-x86_...

34 lines
1.3 KiB
Diff

diff -ur android-ndk-r21e/build/tools/make_standalone_toolchain.py android-ndk-r21e.patched/build/tools/make_standalone_toolchain.py
--- android-ndk-r21e/build/tools/make_standalone_toolchain.py 2025-03-04 20:48:14.681288830 +0400
+++ android-ndk-r21e.patched/build/tools/make_standalone_toolchain.py 2025-03-05 12:10:47.252578915 +0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2016 The Android Open Source Project
#
@@ -21,7 +21,6 @@
"""
import argparse
import atexit
-from distutils.dir_util import copy_tree
import inspect
import logging
import os
@@ -221,13 +220,13 @@
def create_toolchain(install_path, arch, api, toolchain_path, host_tag):
"""Create a standalone toolchain."""
- copy_tree(toolchain_path, install_path)
+ shutil.copytree(toolchain_path, install_path)
triple = get_triple(arch)
make_clang_scripts(install_path, arch, api, host_tag == 'windows-x86_64')
replace_gcc_wrappers(install_path, triple, host_tag == 'windows-x86_64')
prebuilt_path = os.path.join(NDK_DIR, 'prebuilt', host_tag)
- copy_tree(prebuilt_path, install_path)
+ shutil.copytree(prebuilt_path, install_path, dirs_exist_ok=True)
gdbserver_path = os.path.join(
NDK_DIR, 'prebuilt', 'android-' + arch, 'gdbserver')