summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2024-11-21 06:07:54 -0500
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2024-11-21 06:07:54 -0500
commitc90fa7019e8d6ce064e5736223ec055aafb37fd1 (patch)
treed3f5b265db078332a430f205bde2b28fe700c0e6
parent733e2ef4aba51e153ebee902e57045b438bb12d4 (diff)
ios fix, update depends, ci
-rw-r--r--.github/workflows/full_check.yaml82
-rwxr-xr-xbuild_single.sh2
-rw-r--r--contrib/depends/Makefile4
-rw-r--r--contrib/depends/funcs.mk30
-rw-r--r--contrib/depends/packages/libiconv.mk2
-rw-r--r--contrib/depends/packages/native_ccache.mk16
-rw-r--r--contrib/depends/packages/sodium.mk4
-rw-r--r--contrib/depends/packages/wownero_seed.mk16
-rw-r--r--contrib/depends/packages/zeromq.mk12
-rw-r--r--contrib/depends/toolchain.cmake.in7
-rw-r--r--monero_libwallet2_api_c/CMakeLists.txt13
-rw-r--r--patches/monero/0014-fix-iOS-depends-build.patch104
12 files changed, 175 insertions, 117 deletions
diff --git a/.github/workflows/full_check.yaml b/.github/workflows/full_check.yaml
index 6f880e2..ac3091d 100644
--- a/.github/workflows/full_check.yaml
+++ b/.github/workflows/full_check.yaml
@@ -6,6 +6,7 @@ permissions:
jobs:
lib_mingw:
strategy:
+ fail-fast: false
matrix:
coin: [monero, wownero]
runs-on: ubuntu-latest
@@ -61,6 +62,7 @@ jobs:
path: release/${{ matrix.coin }}
lib_android:
strategy:
+ fail-fast: false
matrix:
coin: [monero, wownero]
runs-on: ubuntu-22.04
@@ -133,6 +135,7 @@ jobs:
rm -rf contrib/depends/sources/android-ndk-r26d-linux.zip
lib_linux:
strategy:
+ fail-fast: false
matrix:
coin: [monero, wownero]
runs-on: ubuntu-latest
@@ -190,6 +193,7 @@ jobs:
path: release/${{ matrix.coin }}
lib_sailfishos_aarch64:
strategy:
+ fail-fast: false
matrix:
coin: [monero, wownero]
runs-on: buildjet-2vcpu-ubuntu-2204-arm
@@ -245,6 +249,7 @@ jobs:
path: release/${{ matrix.coin }}
lib_sailfishos_i486:
strategy:
+ fail-fast: false
matrix:
coin: [monero, wownero]
runs-on: ubuntu-latest
@@ -291,70 +296,9 @@ jobs:
with:
name: sfos_i486 ${{ matrix.coin }}
path: release/${{ matrix.coin }}
- lib_darwin:
- strategy:
- matrix:
- coin: [monero, wownero]
- runs-on: ubuntu-latest
- container:
- image: debian:bookworm
- steps:
- - name: Install dependencies
- run: |
- apt update
- apt install -y build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo5 gperf python-is-python3
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- submodules: recursive
- - name: Patch sources
- run: |
- git config --global --add safe.directory '*'
- git config --global user.email "ci@mrcyjanek.net"
- git config --global user.name "CI mrcyjanek.net"
- ./apply_patches.sh monero
- ./apply_patches.sh wownero
- - name: ccache
- uses: hendrikmuhs/ccache-action@v1.2
- with:
- key: ${{ github.job }}-${{ matrix.coin }}
- - name: Cache built
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
- uses: actions/cache@v4
- with:
- path: |
- contrib/depends/built/*
- key: depends-${{ github.job }}-${{ hashFiles('contrib/depends/packages/*.mk') }}
- - name: ${{ matrix.coin }}/x86_64-apple-darwin11
- run: ./build_single.sh ${{ matrix.coin }} x86_64-apple-darwin11 -j$(nproc)
- - name: ${{ matrix.coin }}/aarch64-apple-darwin11
- run: ./build_single.sh ${{ matrix.coin }} aarch64-apple-darwin11 -j$(nproc)
- - name: rename artifacts
- run: |
- mkdir release/gh/
- for i in release/${{ matrix.coin }}/*
- do
- cp "$i" "release/gh/${{ matrix.coin }}_$(basename $i)"
- done
- - name: Release
- uses: softprops/action-gh-release@v2
- if: startsWith(github.ref, 'refs/tags/')
- with:
- files: release/gh/*
- token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- - name: Upload lib
- uses: actions/upload-artifact@v4
- with:
- name: darwin ${{ matrix.coin }}
- path: release/${{ matrix.coin }}
- - name: remove darwin sdk
- run: |
- rm -rf ${{ matrix.coin }}/contrib/depends/built/*/darwin_sdk
- rm -rf ${{ matrix.coin }}/contrib/depends/built/*/native_clang
- rm -rf ${{ matrix.coin }}/contrib/depends/sources/clang-llvm*.tar.xz
- rm -rf ${{ matrix.coin }}/contrib/depends/sources/MacOSX*sdk.tar.xz
lib_macos:
strategy:
+ fail-fast: false
matrix:
coin: [monero, wownero]
name: macos build
@@ -412,6 +356,7 @@ jobs:
path: release/${{ matrix.coin }}
lib_ios:
strategy:
+ fail-fast: false
matrix:
coin: [monero, wownero]
name: ios build
@@ -448,7 +393,7 @@ jobs:
key: depends-${{ github.job }}-${{ hashFiles('contrib/depends/packages/*.mk') }}
- name: build
run: |
- ./build_single.sh ${{ matrix.coin }} arm64-apple-ios -j$(sysctl -n hw.logicalcpu)
+ ./build_single.sh ${{ matrix.coin }} aarch64-apple-ios -j$(sysctl -n hw.logicalcpu)
- name: rename artifacts
run: |
mkdir release/gh/
@@ -471,7 +416,7 @@ jobs:
name: create single release file
runs-on: ubuntu-latest
needs: [
- lib_mingw, lib_android, lib_linux, lib_sailfishos_aarch64, lib_sailfishos_i486, lib_darwin, lib_macos, lib_ios
+ lib_mingw, lib_android, lib_linux, lib_sailfishos_aarch64, lib_sailfishos_i486, lib_macos, lib_ios
]
steps:
- uses: actions/download-artifact@v4
@@ -484,14 +429,6 @@ jobs:
path: release/wownero
- uses: actions/download-artifact@v4
with:
- name: darwin monero
- path: release/monero
- - uses: actions/download-artifact@v4
- with:
- name: darwin wownero
- path: release/wownero
- - uses: actions/download-artifact@v4
- with:
name: ios monero
path: release/monero
- uses: actions/download-artifact@v4
@@ -587,6 +524,7 @@ jobs:
regression_check:
strategy:
+ fail-fast: false
matrix:
coin: [monero, wownero]
needs: [
diff --git a/build_single.sh b/build_single.sh
index 9caa3ee..ef58bc6 100755
--- a/build_single.sh
+++ b/build_single.sh
@@ -79,7 +79,7 @@ pushd release/$repo
# cp ../../$repo/build/${HOST_ABI}/external/polyseed/libpolyseed.${APPENDIX} ${HOST_ABI}_libpolyseed.${APPENDIX}
# rm ${HOST_ABI}_libpolyseed.${APPENDIX}.xz || true
# xz -e ${HOST_ABI}_libpolyseed.${APPENDIX}
- elif [[ "${HOST_ABI}" == "x86_64-apple-darwin11" || "${HOST_ABI}" == "aarch64-apple-darwin11" || "${HOST_ABI}" == "host-apple-darwin" || "${HOST_ABI}" == "x86_64-host-apple-darwin" || "${HOST_ABI}" == "aarch64-host-apple-darwin" || "${HOST_ABI}" == "host-apple-ios" ]];
+ elif [[ "${HOST_ABI}" == "x86_64-apple-darwin11" || "${HOST_ABI}" == "aarch64-apple-darwin11" || "${HOST_ABI}" == "host-apple-darwin" || "${HOST_ABI}" == "x86_64-host-apple-darwin" || "${HOST_ABI}" == "aarch64-host-apple-darwin" || "${HOST_ABI}" == "host-apple-ios" || "${HOST_ABI}" == "aarch64-apple-ios" ]];
then
APPENDIX="${APPENDIX}dylib"
else
diff --git a/contrib/depends/Makefile b/contrib/depends/Makefile
index 734d607..0cf6086 100644
--- a/contrib/depends/Makefile
+++ b/contrib/depends/Makefile
@@ -214,8 +214,8 @@ $(host_prefix)/share/toolchain.cmake: check-packages
check-packages: check-sources
-install: check-packages $(host_prefix)/share/config.site
-install: check-packages $(host_prefix)/share/toolchain.cmake
+install: $(host_prefix)/share/config.site check-packages
+install: $(host_prefix)/share/toolchain.cmake check-packages
download-one: check-sources $(all_sources)
diff --git a/contrib/depends/funcs.mk b/contrib/depends/funcs.mk
index 0f3266c..7312e92 100644
--- a/contrib/depends/funcs.mk
+++ b/contrib/depends/funcs.mk
@@ -138,48 +138,58 @@ $(1)_build_env+=$($(1)_build_env_$(host_arch)) $($(1)_build_env_$(host_arch)_$(r
$(1)_build_env+=$($(1)_build_env_$(host_os)) $($(1)_build_env_$(host_os)_$(release_type))
$(1)_build_env+=$($(1)_build_env_$(host_arch)_$(host_os)) $($(1)_build_env_$(host_arch)_$(host_os)_$(release_type))
+ifneq ($$($(1)_ar_$(host_arch)),)
+$(1)_ar=$$($(1)_ar_$(host_arch))
+endif
+ifneq ($$($(1)_ar_$(host_os)),)
+$(1)_ar=$$($(1)_ar_$(host_os))
+endif
+ifneq ($$($(1)_ar_$(host_arch)_$(host_os)),)
+$(1)_ar=$$($(1)_ar_$(host_arch)_$(host_os))
+endif
+
$(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
-$(1)_autoconf_nohost=--prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" AR="$$($(1)_ar)"
+$(1)_autoconf_args=--prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" AR="$$($(1)_ar)"
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" AR="$$($(1)_ar)"
ifeq ($(filter $(1),libusb unbound),)
-$(1)_autoconf_nohost += --disable-dependency-tracking
+$(1)_autoconf_args += --disable-dependency-tracking
$(1)_autoconf += --disable-dependency-tracking
endif
ifneq ($($(1)_nm),)
-$(1)_autoconf_nohost += NM="$$($(1)_nm)"
+$(1)_autoconf_args += NM="$$($(1)_nm)"
$(1)_autoconf += NM="$$($(1)_nm)"
endif
ifneq ($($(1)_ranlib),)
-$(1)_autoconf_nohost += RANLIB="$$($(1)_ranlib)"
+$(1)_autoconf_args += RANLIB="$$($(1)_ranlib)"
$(1)_autoconf += RANLIB="$$($(1)_ranlib)"
endif
ifneq ($($(1)_ar),)
-$(1)_autoconf_nohost += AR="$$($(1)_ar)"
+$(1)_autoconf_args += AR="$$($(1)_ar)"
$(1)_autoconf += AR="$$($(1)_ar)"
endif
ifneq ($($(1)_arflags),)
-$(1)_autoconf_nohost += ARFLAGS="$$($(1)_arflags)"
+$(1)_autoconf_args += ARFLAGS="$$($(1)_arflags)"
$(1)_autoconf += ARFLAGS="$$($(1)_arflags)"
endif
ifneq ($($(1)_cflags),)
-$(1)_autoconf_nohost += CFLAGS="$$($(1)_cflags)"
+$(1)_autoconf_args += CFLAGS="$$($(1)_cflags)"
$(1)_autoconf += CFLAGS="$$($(1)_cflags)"
endif
ifneq ($($(1)_cxxflags),)
-$(1)_autoconf_nohost += CXXFLAGS="$$($(1)_cxxflags)"
+$(1)_autoconf_args += CXXFLAGS="$$($(1)_cxxflags)"
$(1)_autoconf += CXXFLAGS="$$($(1)_cxxflags)"
endif
ifneq ($($(1)_cppflags),)
-$(1)_autoconf_nohost += CPPFLAGS="$$($(1)_cppflags)"
+$(1)_autoconf_args += CPPFLAGS="$$($(1)_cppflags)"
$(1)_autoconf += CPPFLAGS="$$($(1)_cppflags)"
endif
ifneq ($($(1)_ldflags),)
-$(1)_autoconf_nohost += LDFLAGS="$$($(1)_ldflags)"
+$(1)_autoconf_args += LDFLAGS="$$($(1)_ldflags)"
$(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
endif
endef
diff --git a/contrib/depends/packages/libiconv.mk b/contrib/depends/packages/libiconv.mk
index 6ddfb7d..6bec738 100644
--- a/contrib/depends/packages/libiconv.mk
+++ b/contrib/depends/packages/libiconv.mk
@@ -10,7 +10,7 @@ define $(package)_set_vars
$(package)_config_opts=--disable-shared
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
- $(package)_ar_ios=$($(package)_ar) rcs
+ $(package)_ar_ios=$($(package)_ar)
endef
define $(package)_preprocess_cmds
diff --git a/contrib/depends/packages/native_ccache.mk b/contrib/depends/packages/native_ccache.mk
index 966804c..6821454 100644
--- a/contrib/depends/packages/native_ccache.mk
+++ b/contrib/depends/packages/native_ccache.mk
@@ -1,25 +1,25 @@
package=native_ccache
-$(package)_version=3.3.4
+$(package)_version=4.10.2
$(package)_download_path=https://samba.org/ftp/ccache
-$(package)_file_name=ccache-$($(package)_version).tar.bz2
-$(package)_sha256_hash=fa9d7f38367431bc86b19ad107d709ca7ecf1574fdacca01698bdf0a47cd8567
+$(package)_file_name=ccache-$($(package)_version).tar.gz
+$(package)_sha256_hash=108100960bb7e64573ea925af2ee7611701241abb36ce0aae3354528403a7d87
define $(package)_set_vars
-$(package)_config_opts=
+$(package)_config_opts=-DCMAKE_INSTALL_PREFIX="$(host_prefix)/native"
endef
define $(package)_config_cmds
- $($(package)_autoconf)
+ cmake -S . -B build $($(package)_config_opts)
endef
define $(package)_build_cmds
- $(MAKE)
+ cmake --build build --parallel
endef
define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
+ cd build && $(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
- rm -rf lib include
+ rm -rf $($(package)_staging_dir)/lib $($(package)_staging_dir)/include
endef
diff --git a/contrib/depends/packages/sodium.mk b/contrib/depends/packages/sodium.mk
index f710f61..4af0590 100644
--- a/contrib/depends/packages/sodium.mk
+++ b/contrib/depends/packages/sodium.mk
@@ -8,12 +8,12 @@ $(package)_patches=disable-glibc-getrandom-getentropy.patch fix-whitespace.patch
define $(package)_set_vars
$(package)_config_opts=--enable-static --disable-shared --with-pic
$(package)_config_opts+=--prefix=$(host_prefix)
-$(package)_ar=$($(package)_ar) rcs
+$(package)_ar_ios=$($(package)_ar) rcs
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/disable-glibc-getrandom-getentropy.patch &&\
- autoconf &&\
+ $($(package)_autoconf) &&\
patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch
endef
diff --git a/contrib/depends/packages/wownero_seed.mk b/contrib/depends/packages/wownero_seed.mk
index 5335458..644dc60 100644
--- a/contrib/depends/packages/wownero_seed.mk
+++ b/contrib/depends/packages/wownero_seed.mk
@@ -11,15 +11,9 @@ define $(package)_preprocess_cmds
endef
-ifeq ($(host_os),darwin)
- define $(package)_config_cmds
- CC="$($(package)_cc)" CXX="$($(package)_cxx)" cmake -DCMAKE_INSTALL_PREFIX="$(host_prefix)" -DCMAKE_POSITION_INDEPENDENT_CODE=ON .
- endef
-else
- define $(package)_config_cmds
- CC="$($(package)_cc)" CXX="$($(package)_cxx)" cmake -DCMAKE_INSTALL_PREFIX="$(host_prefix)" -DCMAKE_POSITION_INDEPENDENT_CODE=ON .
- endef
-endif
+define $(package)_config_cmds
+ CC="$($(package)_cc)" CXX="$($(package)_cxx)" cmake -DCMAKE_INSTALL_PREFIX="$(host_prefix)" -DCMAKE_POSITION_INDEPENDENT_CODE=ON .
+endef
define $(package)_set_vars
$(package)_build_opts=CC="$($(package)_cc)" CXX="$($(package)_cxx)"
@@ -27,9 +21,9 @@ endef
define $(package)_build_cmds
- CC="$($(package)_cc)" CXX="$($(package)_cxx)" $(MAKE) VERBOSE=1
+ $(MAKE) VERBOSE=1
endef
define $(package)_stage_cmds
- CC="$($(package)_cc)" CXX="$($(package)_cxx)" $(MAKE) DESTDIR=$($(package)_staging_dir) install
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
diff --git a/contrib/depends/packages/zeromq.mk b/contrib/depends/packages/zeromq.mk
index 1b45bfb..1d63f65 100644
--- a/contrib/depends/packages/zeromq.mk
+++ b/contrib/depends/packages/zeromq.mk
@@ -9,8 +9,10 @@ define $(package)_set_vars
$(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
+ $(package)_config_opts_ios=--host=$(host_arch)-apple-darwin
$(package)_cxxflags=-std=c++11
- $(package)_cxxflags_darwin=-std=c++11 -Wno-deprecated-declarations
+ $(package)_cxxflags_darwin=-std=c++11
+ $(package)_cxxflags_ios=-std=c++11
endef
define $(package)_preprocess_cmds
@@ -18,15 +20,17 @@ define $(package)_preprocess_cmds
endef
define $(package)_config_cmds
- ./configure --host=aarch64-apple-darwin $($(package)_autoconf_args)
+ ./configure $($(package)_autoconf_args)
endef
define $(package)_build_cmds
- $(MAKE) src/libzmq.la
+ $(MAKE) -j src/libzmq.la
endef
define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA VERBOSE=1 &&\
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES VERBOSE=1 &&\
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install-includeHEADERS VERBOSE=1
endef
define $(package)_postprocess_cmds
diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
index b6fc022..8a57e23 100644
--- a/contrib/depends/toolchain.cmake.in
+++ b/contrib/depends/toolchain.cmake.in
@@ -101,6 +101,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(LLVM_ENABLE_PIC OFF)
SET(LLVM_ENABLE_PIE OFF)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
+ add_definitions(-DUSE_DEVICE_TREZOR=OFF)
+ add_definitions(-DHIDAPI_DUMMY=ON)
SET(ANDROID TRUE)
if(ARCHITECTURE STREQUAL "armv7a")
SET(CMAKE_ANDROID_ARCH_ABI "armeabi-v7a")
@@ -117,6 +119,11 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
SET(_ANDROID_STANDALONE_TOOLCHAIN_API 21)
SET(CMAKE_C_COMPILER @CC@)
SET(CMAKE_CXX_COMPILER @CXX@)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
+ set(USE_DEVICE_TREZOR OFF)
+ set(DHIDAPI_DUMMY ON)
+ SET(CMAKE_C_COMPILER @CC@)
+ SET(CMAKE_CXX_COMPILER @CXX@)
else()
SET(CMAKE_C_COMPILER @CC@)
SET(CMAKE_CXX_COMPILER @CXX@)
diff --git a/monero_libwallet2_api_c/CMakeLists.txt b/monero_libwallet2_api_c/CMakeLists.txt
index 1b7ce88..17ac05d 100644
--- a/monero_libwallet2_api_c/CMakeLists.txt
+++ b/monero_libwallet2_api_c/CMakeLists.txt
@@ -16,7 +16,8 @@ elseif(${HOST_ABI} STREQUAL "i686-w64-mingw32")
set(TARGET "i686-w64-mingw32")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lssp")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lssp")
-elseif(${HOST_ABI} STREQUAL "host-apple-ios")
+elseif(${HOST_ABI} STREQUAL "host-apple-ios" OR
+ ${HOST_ABI} STREQUAL "aarch64-apple-ios")
set(CMAKE_SYSTEM_NAME iOS)
elseif(${HOST_ABI} STREQUAL "host-apple-darwin" OR
${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR
@@ -61,7 +62,7 @@ elseif(${HOST_ABI} STREQUAL "host-apple-darwin" OR
${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR
${HOST_ABI} STREQUAL "aarch64-host-apple-darwin")
set(EXTRA_LIBS_APPLE "-framework IOKit" "-framework CoreFoundation" "-framework Cocoa" apple_nghttp2)
-elseif(${HOST_ABI} STREQUAL "host-apple-ios")
+elseif(${HOST_ABI} STREQUAL "host-apple-ios" OR ${HOST_ABI} STREQUAL "aarch64-apple-ios" OR ${HOST_ABI} STREQUAL "arm64-apple-ios")
set(EXTRA_LIBS_APPLE "-framework IOKit" "-framework CoreFoundation" iconv )
endif()
@@ -69,17 +70,17 @@ if(${HOST_ABI} STREQUAL "x86_64-w64-mingw32" OR ${HOST_ABI} STREQUAL "i686-w64-m
target_link_options(wallet2_api_c PRIVATE -static-libgcc -static-libstdc++)
endif()
-if(${HOST_ABI} STREQUAL "x86_64-apple-darwin11" OR ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" OR ${HOST_ABI} STREQUAL "host-apple-darwin" OR ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "host-apple-ios")
+if(${HOST_ABI} STREQUAL "x86_64-apple-darwin11" OR ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" OR ${HOST_ABI} STREQUAL "host-apple-darwin" OR ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "host-apple-ios" OR ${HOST_ABI} STREQUAL "aarch64-apple-ios")
set_target_properties(wallet2_api_c PROPERTIES SUFFIX ".dylib")
set_target_properties(wallet2_api_c PROPERTIES NO_SONAME 1)
endif()
-if(NOT ${HOST_ABI} STREQUAL "x86_64-apple-darwin11" AND NOT ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" AND NOT ${HOST_ABI} STREQUAL "host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "host-apple-ios")
+if(NOT ${HOST_ABI} STREQUAL "x86_64-apple-darwin11" AND NOT ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" AND NOT ${HOST_ABI} STREQUAL "host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" AND NOT ${HOST_ABI} STREQUAL "host-apple-ios" AND NOT ${HOST_ABI} STREQUAL "aarch64-apple-ios")
set_target_properties(wallet2_api_c PROPERTIES LINK_FLAGS "-Wl,--exclude-libs,ALL")
endif()
-add_subdirectory("${CMAKE_SOURCE_DIR}/../${MONERO_FLAVOR}" ${CMAKE_BINARY_DIR}/${MONERO_FLAVOR}_build)
+add_subdirectory("${CMAKE_SOURCE_DIR}/../${MONERO_FLAVOR}" ${CMAKE_BINARY_DIR}/${MONERO_FLAVOR}_build EXCLUDE_FROM_ALL)
#get_cmake_property(_variableNames VARIABLES)
@@ -88,7 +89,7 @@ add_subdirectory("${CMAKE_SOURCE_DIR}/../${MONERO_FLAVOR}" ${CMAKE_BINARY_DIR}/$
# message(STATUS "${_variableName}=${${_variableName}}")
#endforeach()
-if(${HOST_ABI} STREQUAL "x86_64-apple-darwin11" OR ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" OR ${HOST_ABI} STREQUAL "host-apple-darwin" OR ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "host-apple-ios")
+if(${HOST_ABI} STREQUAL "x86_64-apple-darwin11" OR ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" OR ${HOST_ABI} STREQUAL "host-apple-darwin" OR ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "host-apple-ios" OR ${HOST_ABI} STREQUAL "aarch64-apple-ios")
if (${MONERO_FLAVOR} STREQUAL "monero")
set(EXPORTED_SYMBOLS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/monero_libwallet2_api_c.exp)
elseif(${MONERO_FLAVOR} STREQUAL "wownero")
diff --git a/patches/monero/0014-fix-iOS-depends-build.patch b/patches/monero/0014-fix-iOS-depends-build.patch
new file mode 100644
index 0000000..fd01f9e
--- /dev/null
+++ b/patches/monero/0014-fix-iOS-depends-build.patch
@@ -0,0 +1,104 @@
+From 40d2ef7f253aafc16796c9465cd0d0a68ffeaa16 Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Thu, 21 Nov 2024 06:05:03 -0500
+Subject: [PATCH] fix iOS depends build
+
+---
+ CMakeLists.txt | 4 ----
+ src/checkpoints/CMakeLists.txt | 6 +++++-
+ src/cryptonote_basic/CMakeLists.txt | 6 +++++-
+ src/cryptonote_basic/miner.cpp | 8 ++++----
+ 4 files changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0d0a0e3..809bce6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -39,10 +39,6 @@ include(CheckLibraryExists)
+ include(CheckFunctionExists)
+ include(FindPythonInterp)
+
+-if (IOS)
+- INCLUDE(CmakeLists_IOS.txt)
+-endif()
+-
+ cmake_minimum_required(VERSION 3.5)
+ message(STATUS "CMake version ${CMAKE_VERSION}")
+
+diff --git a/src/checkpoints/CMakeLists.txt b/src/checkpoints/CMakeLists.txt
+index 665441f..841df32 100644
+--- a/src/checkpoints/CMakeLists.txt
++++ b/src/checkpoints/CMakeLists.txt
+@@ -28,7 +28,11 @@
+
+ if(APPLE)
+ if(DEPENDS)
+- list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework ApplicationServices -framework AppKit -framework IOKit")
++ if(${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
++ list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
++ else()
++ list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework ApplicationServices -framework AppKit -framework IOKit")
++ endif()
+ else()
+ find_library(IOKIT_LIBRARY IOKit)
+ mark_as_advanced(IOKIT_LIBRARY)
+diff --git a/src/cryptonote_basic/CMakeLists.txt b/src/cryptonote_basic/CMakeLists.txt
+index 414936a..81c8176 100644
+--- a/src/cryptonote_basic/CMakeLists.txt
++++ b/src/cryptonote_basic/CMakeLists.txt
+@@ -28,7 +28,11 @@
+
+ if(APPLE)
+ if(DEPENDS)
+- list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework ApplicationServices -framework AppKit -framework IOKit")
++ if(${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
++ list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
++ else()
++ list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework ApplicationServices -framework AppKit -framework IOKit")
++ endif()
+ else()
+ find_library(IOKIT_LIBRARY IOKit)
+ mark_as_advanced(IOKIT_LIBRARY)
+diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp
+index 71b8f78..0f53f02 100644
+--- a/src/cryptonote_basic/miner.cpp
++++ b/src/cryptonote_basic/miner.cpp
+@@ -45,7 +45,7 @@
+ #include "boost/logic/tribool.hpp"
+ #include <boost/filesystem.hpp>
+
+-#ifdef __APPLE__
++#if defined(__APPLE__) && !defined(TARGET_OS_IPHONE)
+ #include <sys/times.h>
+ #include <IOKit/IOKitLib.h>
+ #include <IOKit/ps/IOPSKeys.h>
+@@ -883,7 +883,7 @@ namespace cryptonote
+
+ return true;
+
+- #elif defined(__APPLE__)
++ #elif defined(__APPLE__) && !defined(TARGET_OS_IPHONE)
+
+ mach_msg_type_number_t count;
+ kern_return_t status;
+@@ -949,7 +949,7 @@ namespace cryptonote
+ return true;
+ }
+
+- #elif (defined(__linux__) && defined(_SC_CLK_TCK)) || defined(__APPLE__) || defined(__FreeBSD__)
++ #elif (defined(__linux__) && defined(_SC_CLK_TCK)) || (defined(__APPLE__) && !defined(TARGET_OS_IPHONE)) || defined(__FreeBSD__)
+
+ struct tms tms;
+ if ( times(&tms) != (clock_t)-1 )
+@@ -978,7 +978,7 @@ namespace cryptonote
+ return boost::logic::tribool(power_status.ACLineStatus != 1);
+ }
+
+- #elif defined(__APPLE__)
++ #elif defined(__APPLE__) && !defined(TARGET_OS_IPHONE)
+
+ #if TARGET_OS_MAC && (!defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
+ return boost::logic::tribool(IOPSGetTimeRemainingEstimate() != kIOPSTimeRemainingUnlimited);
+--
+2.39.5 (Apple Git-154)
+