summaryrefslogtreecommitdiff
path: root/patches/monero/0013-fix-iOS-depends-build.patch
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2025-01-05 13:17:22 +0100
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2025-01-05 13:17:22 +0100
commit085d74b37b478be77bc873d66876247a751aa957 (patch)
treed8434dd9c8c57df9b64ae93059d9ebb5a16b90f2 /patches/monero/0013-fix-iOS-depends-build.patch
parent8e7bc59509c40f00702ba568a0adcb3cf82e6e05 (diff)
parentc3dd64bdee37d361a2c1252d127fb575936e43e6 (diff)
Merge remote-tracking branch 'origin/develop' into rust-develop
Diffstat (limited to 'patches/monero/0013-fix-iOS-depends-build.patch')
-rw-r--r--patches/monero/0013-fix-iOS-depends-build.patch104
1 files changed, 104 insertions, 0 deletions
diff --git a/patches/monero/0013-fix-iOS-depends-build.patch b/patches/monero/0013-fix-iOS-depends-build.patch
new file mode 100644
index 0000000..97c23c6
--- /dev/null
+++ b/patches/monero/0013-fix-iOS-depends-build.patch
@@ -0,0 +1,104 @@
+From dcb483e5cb97c4e3c500355d8225bd49d3e0ae7f Mon Sep 17 00:00:00 2001
+From: Czarek Nakamoto <cyjan@mrcyjanek.net>
+Date: Thu, 21 Nov 2024 06:05:03 -0500
+Subject: [PATCH 13/14] 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 b995a68..4e86328 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)
+