summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorcyan <cyjan@mrcyjanek.net>2024-11-26 03:22:30 +0000
committercyan <cyjan@mrcyjanek.net>2024-11-26 03:22:30 +0000
commit3cf463e1250babee8be449ca28925f701e7fa29a (patch)
tree8c198b862f0c80fb3ce7b97c13e3e22226b30475 /patches
parentc90fa7019e8d6ce064e5736223ec055aafb37fd1 (diff)
- multithread build system
- fix android, mingw and linux build issues - remove dependency check - update Dockerfile to include pigz - show a message when pigz is missing - fix devcontainer mingw setup (missing ENV)
Diffstat (limited to 'patches')
-rw-r--r--patches/monero/0015-ledger-dummy-fix.patch157
1 files changed, 157 insertions, 0 deletions
diff --git a/patches/monero/0015-ledger-dummy-fix.patch b/patches/monero/0015-ledger-dummy-fix.patch
new file mode 100644
index 0000000..e8654b9
--- /dev/null
+++ b/patches/monero/0015-ledger-dummy-fix.patch
@@ -0,0 +1,157 @@
+From ebb4f7509127d1d442732da92aa96a1718b57698 Mon Sep 17 00:00:00 2001
+From: cyan <cyjan@mrcyjanek.net>
+Date: Tue, 26 Nov 2024 00:31:15 +0000
+Subject: [PATCH] ledger dummy fix
+
+---
+ src/device/device_io_dummy.cpp | 2 +-
+ src/device/device_io_dummy.hpp | 2 +-
+ src/device/device_ledger.hpp | 2 +-
+ src/wallet/api/wallet.cpp | 36 +++++++++++++++++-----------------
+ 4 files changed, 21 insertions(+), 21 deletions(-)
+
+diff --git a/src/device/device_io_dummy.cpp b/src/device/device_io_dummy.cpp
+index 9fe4040a7..edb4beea3 100644
+--- a/src/device/device_io_dummy.cpp
++++ b/src/device/device_io_dummy.cpp
+@@ -38,7 +38,7 @@
+ // Data transport is made available in wallet2_api.h, so wallet developers can easily plug their
+ // own USB/BLE/other transport layer.
+
+-#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+ #include <boost/scope_exit.hpp>
+ #include "log.hpp"
+ #include "device_io_dummy.hpp"
+diff --git a/src/device/device_io_dummy.hpp b/src/device/device_io_dummy.hpp
+index a1733616d..4a4807121 100644
+--- a/src/device/device_io_dummy.hpp
++++ b/src/device/device_io_dummy.hpp
+@@ -26,7 +26,7 @@
+ // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ //
+-#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+
+ #pragma once
+
+diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp
+index 506f27c4a..39454ca6d 100644
+--- a/src/device/device_ledger.hpp
++++ b/src/device/device_ledger.hpp
+@@ -149,7 +149,7 @@ namespace hw {
+ mutable boost::mutex command_locker;
+
+ //IO
+-#ifdef HIDAPI_DUMMY
++#if defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI)
+ hw::io::device_io_dummy hw_device;
+ #else
+ hw::io::device_io_hid hw_device;
+diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
+index 995c45c1d..1cfeea619 100644
+--- a/src/wallet/api/wallet.cpp
++++ b/src/wallet/api/wallet.cpp
+@@ -3339,8 +3339,8 @@ uint64_t WalletImpl::getBytesSent()
+
+ // HIDAPI_DUMMY
+ bool WalletImpl::getStateIsConnected() {
+- #ifndef HIDAPI_DUMMY
+- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::stateIsConnected;
+@@ -3348,8 +3348,8 @@ bool WalletImpl::getStateIsConnected() {
+ }
+
+ unsigned char* WalletImpl::getSendToDevice() {
+- #ifndef HIDAPI_DUMMY
+- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return {};
+ #else
+ return hw::io::device_io_dummy::sendToDevice;
+@@ -3357,8 +3357,8 @@ unsigned char* WalletImpl::getSendToDevice() {
+ }
+
+ size_t WalletImpl::getSendToDeviceLength() {
+- #ifndef HIDAPI_DUMMY
+- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return -1;
+ #else
+ return hw::io::device_io_dummy::sendToDeviceLength;
+@@ -3366,8 +3366,8 @@ size_t WalletImpl::getSendToDeviceLength() {
+ }
+
+ unsigned char* WalletImpl::getReceivedFromDevice() {
+- #ifndef HIDAPI_DUMMY
+- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return {};
+ #else
+ return hw::io::device_io_dummy::receivedFromDevice;
+@@ -3375,8 +3375,8 @@ unsigned char* WalletImpl::getReceivedFromDevice() {
+ }
+
+ size_t WalletImpl::getReceivedFromDeviceLength() {
+- #ifndef HIDAPI_DUMMY
+- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return -1;
+ #else
+ return hw::io::device_io_dummy::receivedFromDeviceLength;
+@@ -3384,8 +3384,8 @@ size_t WalletImpl::getReceivedFromDeviceLength() {
+ }
+
+ bool WalletImpl::getWaitsForDeviceSend() {
+- #ifndef HIDAPI_DUMMY
+- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::receivedFromDeviceLength;
+@@ -3393,8 +3393,8 @@ bool WalletImpl::getWaitsForDeviceSend() {
+ }
+
+ bool WalletImpl::getWaitsForDeviceReceive() {
+- #ifndef HIDAPI_DUMMY
+- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return false;
+ #else
+ return hw::io::device_io_dummy::waitsForDeviceReceive;
+@@ -3402,8 +3402,8 @@ bool WalletImpl::getWaitsForDeviceReceive() {
+ }
+
+ void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) {
+- #ifndef HIDAPI_DUMMY
+- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return;
+ #else
+ hw::io::device_io_dummy::receivedFromDevice = static_cast<unsigned char *>(malloc(len));
+@@ -3415,8 +3415,8 @@ void WalletImpl::setDeviceReceivedData(unsigned char* data, size_t len) {
+ }
+
+ void WalletImpl::setDeviceSendData(unsigned char* data, size_t len) {
+- #ifndef HIDAPI_DUMMY
+- setStatusError("MONERO compiled with -DHIDAPI_DUMMY");
++ #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))
++ setStatusError("MONERO compiled with #if !(defined(HIDAPI_DUMMY) && !defined(HAVE_HIDAPI))");
+ return;
+ #else
+ hw::io::device_io_dummy::sendToDevice = static_cast<unsigned char *>(malloc(len));
+--
+2.43.0
+