monero/contrib/depends/packages/android_ndk.mk

30 lines
1.1 KiB
Makefile
Raw Normal View History

2019-10-31 23:38:13 -04:00
package=android_ndk
2024-02-12 13:31:15 -05:00
$(package)_version=18b
2019-10-31 23:38:13 -04:00
$(package)_download_path=https://dl.google.com/android/repository/
$(package)_file_name=android-ndk-r$($(package)_version)-linux-x86_64.zip
2024-02-12 13:31:15 -05:00
$(package)_sha256_hash=4f61cbe4bbf6406aa5ef2ae871def78010eed6271af72de83f8bd0b07a9fd3fd
2023-07-02 15:00:24 -04:00
$(package)_patches=api_definition.patch fix_env.patch
2019-10-31 23:38:13 -04:00
define $(package)_set_vars
$(package)_config_opts_arm=--arch arm
$(package)_config_opts_aarch64=--arch arm64
endef
define $(package)_extract_cmds
echo $($(package)_sha256_hash) $($(1)_source_dir)/$($(package)_file_name) | sha256sum -c &&\
unzip -q $($(1)_source_dir)/$($(package)_file_name)
endef
2024-02-12 13:31:15 -05:00
define $(package)_preprocess_cmds
cd android-ndk-r$($(package)_version) && \
2023-07-02 15:00:24 -04:00
patch -p1 < $($(package)_patch_dir)/api_definition.patch && \
patch -p1 < $($(package)_patch_dir)/fix_env.patch
2024-02-12 13:31:15 -05:00
endef
2019-10-31 23:38:13 -04:00
define $(package)_stage_cmds
2023-07-02 15:00:24 -04:00
python3 android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api 21 \
2019-10-31 23:38:13 -04:00
--install-dir $(build_prefix) --stl=libc++ $($(package)_config_opts) &&\
mv $(build_prefix) $($(package)_staging_dir)/$(host_prefix)
endef