diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2019-10-16 15:29:20 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2019-10-16 15:29:20 +0000 |
commit | a12065703469e10f4f34b1e43555af92cfceaa6c (patch) | |
tree | 1e2c74dbf9059d4d4276b68607c6873dee7e4ce7 | |
parent | security/pecl-crypto: unbreak on arm, mips (diff) |
net-p2p/monero-cli: fix build on non-x86
Checking battery status uses x86-only headers and functions. Remove this functionality to get it to build on other architectures.
PR: 241230
Approved by: linimon (mentor), vd (maintainer)
Pull Request: https://github.com/monero-project/monero/pull/5984
Differential Revision: https://reviews.freebsd.org/D22027
Notes
Notes:
svn path=/head/; revision=514600
-rw-r--r-- | net-p2p/monero-cli/Makefile | 4 | ||||
-rw-r--r-- | net-p2p/monero-cli/files/patch-src_cryptonote__basic_miner.cpp | 28 |
2 files changed, 28 insertions, 4 deletions
diff --git a/net-p2p/monero-cli/Makefile b/net-p2p/monero-cli/Makefile index 892d4ad24c36..403ed9a40088 100644 --- a/net-p2p/monero-cli/Makefile +++ b/net-p2p/monero-cli/Makefile @@ -16,11 +16,7 @@ COMMENT= Private, secure, untraceable, decentralised digital currency (CLI) LICENSE= BSD3CLAUSE -BROKEN_aarch64= fails to compile: the clang compiler does not support -march=native -BROKEN_armv6= fails to compile: the clang compiler does not support -march=native -BROKEN_armv7= fails to compile: the clang compiler does not support -march=native BROKEN_i386= fails to compile: register r15d is only available in 64-bit mode -BROKEN_powerpc64= fails to compile: the clang compiler does not support -march=native LIB_DEPENDS= \ libboost_chrono.so:devel/boost-libs \ diff --git a/net-p2p/monero-cli/files/patch-src_cryptonote__basic_miner.cpp b/net-p2p/monero-cli/files/patch-src_cryptonote__basic_miner.cpp new file mode 100644 index 000000000000..a89f3403be27 --- /dev/null +++ b/net-p2p/monero-cli/files/patch-src_cryptonote__basic_miner.cpp @@ -0,0 +1,28 @@ +--- src/cryptonote_basic/miner.cpp.orig 2019-10-13 11:25:19 UTC ++++ src/cryptonote_basic/miner.cpp +@@ -61,7 +61,9 @@ + #include <devstat.h> + #include <errno.h> + #include <fcntl.h> ++#if defined(__amd64__ ) || defined(__i386__) || defined(__x86_64__) + #include <machine/apm_bios.h> ++#endif + #include <stdio.h> + #include <sys/resource.h> + #include <sys/sysctl.h> +@@ -1082,6 +1084,7 @@ namespace cryptonote + return boost::logic::tribool(boost::logic::indeterminate); + } + ++#if defined(__amd64__ ) || defined(__i386__) || defined(__x86_64__) + apm_info info; + if( ioctl(fd, APMIO_GETINFO, &info) == -1 ) { + close(fd); +@@ -1116,6 +1119,7 @@ namespace cryptonote + << "unexpected ac-line status (" << info.ai_acline << ") and " + << "battery status (" << info.ai_batt_stat << ")."); + return boost::logic::tribool(boost::logic::indeterminate); ++#endif + } + if( n != sizeof(ac) ) + { |