aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/depends/packages/eudev.mk2
-rw-r--r--contrib/depends/packages/hidapi-darwin.mk23
-rw-r--r--contrib/depends/packages/hidapi-linux.mk28
-rw-r--r--contrib/depends/packages/hidapi.mk9
-rw-r--r--contrib/depends/packages/packages.mk7
-rw-r--r--contrib/depends/packages/sodium-darwin.mk2
-rw-r--r--contrib/depends/packages/sodium.mk2
-rw-r--r--contrib/depends/toolchain.cmake.in9
-rw-r--r--contrib/epee/include/net/abstract_tcp_server2.inl10
-rw-r--r--contrib/epee/include/net/http_protocol_handler.inl1
10 files changed, 28 insertions, 65 deletions
diff --git a/contrib/depends/packages/eudev.mk b/contrib/depends/packages/eudev.mk
index 08752909f..e754c0f20 100644
--- a/contrib/depends/packages/eudev.mk
+++ b/contrib/depends/packages/eudev.mk
@@ -5,7 +5,7 @@ $(package)_file_name=$($(package)_version).tar.gz
$(package)_sha256_hash=a96ecb8637667897b8bd4dee4c22c7c5f08b327be45186e912ce6bc768385852
define $(package)_set_vars
- $(package)_config_opts=--disable-gudev --disable-introspection --disable-hwdb --disable-manpages
+ $(package)_config_opts=--disable-gudev --disable-introspection --disable-hwdb --disable-manpages --disable-shared
endef
define $(package)_config_cmds
diff --git a/contrib/depends/packages/hidapi-darwin.mk b/contrib/depends/packages/hidapi-darwin.mk
deleted file mode 100644
index 014aba578..000000000
--- a/contrib/depends/packages/hidapi-darwin.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-package=hidapi-darwin
-$(package)_version=0.8.0-rc1
-$(package)_download_path=https://github.com/signal11/hidapi/archive
-$(package)_file_name=hidapi-$($(package)_version).tar.gz
-$(package)_sha256_hash=3c147200bf48a04c1e927cd81589c5ddceff61e6dac137a605f6ac9793f4af61
-
-define $(package)_set_vars
-$(package)_config_opts=--enable-static
-$(package)_config_opts+=--prefix=$(host_prefix)
-endef
-
-define $(package)_config_cmds
- ./bootstrap &&\
- $($(package)_autoconf) $($(package)_config_opts) RANLIB="$(host_prefix)/native/bin/x86_64-apple-darwin11-ranlib" AR="$(host_prefix)/native/bin/x86_64-apple-darwin11-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)"
-endef
-
-define $(package)_build_cmds
- $(MAKE)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/contrib/depends/packages/hidapi-linux.mk b/contrib/depends/packages/hidapi-linux.mk
deleted file mode 100644
index b2a499915..000000000
--- a/contrib/depends/packages/hidapi-linux.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-package=hidapi-linux
-$(package)_version=0.8.0-rc1
-$(package)_download_path=https://github.com/signal11/hidapi/archive
-$(package)_file_name=hidapi-$($(package)_version).tar.gz
-$(package)_sha256_hash=3c147200bf48a04c1e927cd81589c5ddceff61e6dac137a605f6ac9793f4af61
-$(package)_dependencies=libusb eudev
-
-define $(package)_set_vars
-$(package)_config_opts=--enable-static
-$(package)_config_opts+=--prefix=$(host_prefix)
-$(package)_config_opts+=libudev_LIBS="-L$(host_prefix)/lib -ludev"
-$(package)_config_opts+=libudev_CFLAGS=-I$(host_prefix)/include
-$(package)_config_opts+=libusb_LIBS="-L$(host_prefix)/lib -lusb-1.0"
-$(package)_config_opts+=libusb_CFLAGS=-I$(host_prefix)/include/libusb-1.0
-endef
-
-define $(package)_config_cmds
- ./bootstrap &&\
- $($(package)_autoconf) $($(package)_config_opts)
-endef
-
-define $(package)_build_cmds
- $(MAKE)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/contrib/depends/packages/hidapi.mk b/contrib/depends/packages/hidapi.mk
index b6b228643..1c43e525a 100644
--- a/contrib/depends/packages/hidapi.mk
+++ b/contrib/depends/packages/hidapi.mk
@@ -3,10 +3,17 @@ $(package)_version=0.8.0-rc1
$(package)_download_path=https://github.com/signal11/hidapi/archive
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=3c147200bf48a04c1e927cd81589c5ddceff61e6dac137a605f6ac9793f4af61
+$(package)_linux_dependencies=libusb eudev
define $(package)_set_vars
-$(package)_config_opts=--enable-static
+$(package)_config_opts=--enable-static --disable-shared
$(package)_config_opts+=--prefix=$(host_prefix)
+$(package)_config_opts_darwin+=RANLIB="$(host_prefix)/native/bin/x86_64-apple-darwin11-ranlib" AR="$(host_prefix)/native/bin/x86_64-apple-darwin11-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)"
+$(package)_config_opts_linux+=libudev_LIBS="-L$(host_prefix)/lib -ludev"
+$(package)_config_opts_linux+=libudev_CFLAGS=-I$(host_prefix)/include
+$(package)_config_opts_linux+=libusb_LIBS="-L$(host_prefix)/lib -lusb-1.0"
+$(package)_config_opts_linux+=libusb_CFLAGS=-I$(host_prefix)/include/libusb-1.0
+$(package)_config_opts_linux+=--with-pic
endef
define $(package)_config_cmds
diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk
index 9bfbff7d9..f814c14d6 100644
--- a/contrib/depends/packages/packages.mk
+++ b/contrib/depends/packages/packages.mk
@@ -1,12 +1,12 @@
-packages:=boost openssl libevent zeromq cppzmq zlib expat ldns cppzmq readline libiconv qt
+packages:=boost openssl libevent zeromq cppzmq zlib expat ldns cppzmq readline libiconv qt hidapi
native_packages := native_ccache
wallet_packages=bdb
darwin_native_packages = native_biplist native_ds_store native_mac_alias
-darwin_packages = sodium-darwin hidapi-darwin
+darwin_packages = sodium-darwin
-linux_packages = eudev libusb hidapi-linux
+linux_packages = eudev libusb
ifeq ($(host_os),linux)
packages += unwind
@@ -15,7 +15,6 @@ endif
ifeq ($(host_os),mingw32)
packages += icu4c
packages += sodium
-packages += hidapi
endif
ifneq ($(build_os),darwin)
diff --git a/contrib/depends/packages/sodium-darwin.mk b/contrib/depends/packages/sodium-darwin.mk
index 59c6d1ec6..d8e3de352 100644
--- a/contrib/depends/packages/sodium-darwin.mk
+++ b/contrib/depends/packages/sodium-darwin.mk
@@ -6,7 +6,7 @@ $(package)_sha256_hash=fb6a9e879a2f674592e4328c5d9f79f082405ee4bb05cb6e679b90afe
define $(package)_set_vars
$(package)_build_opts_darwin=OS=Darwin LIBTOOL="$($(package)_libtool)"
-$(package)_config_opts=--enable-static
+$(package)_config_opts=--enable-static --disable-shared
$(package)_config_opts+=--prefix=$(host_prefix)
endef
diff --git a/contrib/depends/packages/sodium.mk b/contrib/depends/packages/sodium.mk
index 0e6668062..c38121bf7 100644
--- a/contrib/depends/packages/sodium.mk
+++ b/contrib/depends/packages/sodium.mk
@@ -5,7 +5,7 @@ $(package)_file_name=libsodium-$($(package)_version).tar.gz
$(package)_sha256_hash=fb6a9e879a2f674592e4328c5d9f79f082405ee4bb05cb6e679b90afe9e178f4
define $(package)_set_vars
-$(package)_config_opts=--enable-static
+$(package)_config_opts=--enable-static --disable-shared
$(package)_config_opts+=--prefix=$(host_prefix)
endef
diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
index 375533557..66168facb 100644
--- a/contrib/depends/toolchain.cmake.in
+++ b/contrib/depends/toolchain.cmake.in
@@ -18,6 +18,9 @@ SET(LIBUNWIND_INCLUDE_DIR @prefix@/include)
SET(LIBUNWIND_LIBRARIES @prefix@/lib/libunwind.a)
SET(LIBUNWIND_LIBRARY_DIRS @prefix@/lib)
+SET(LIBUSB-1.0_LIBRARY @prefix@/lib/libusb-1.0.a)
+SET(LIBUDEV_LIBRARY @prefix@/lib/libudev.a)
+
SET(ZMQ_INCLUDE_PATH @prefix@/include)
SET(ZMQ_LIB @prefix@/lib/libzmq.a)
@@ -48,7 +51,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(APPLE True)
SET(BUILD_TAG "mac-x64")
SET(BUILD_64 ON)
+ if(NOT TRAVIS)
SET(ARCH "x86_64")
+ endif()
SET(BREW OFF)
SET(PORT OFF)
SET(CMAKE_OSX_SYSROOT "@sdk@/MacOSX10.11.sdk/")
@@ -78,5 +83,9 @@ elseif(ARCHITECTURE STREQUAL "aarch64")
set(BUILD_64 ON)
endif()
+if(ARCHITECTURE STREQUAL "i686" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ SET(LINUX_32 ON)
+endif()
+
#Create a new global cmake flag that indicates building with depends
set (DEPENDS true)
diff --git a/contrib/epee/include/net/abstract_tcp_server2.inl b/contrib/epee/include/net/abstract_tcp_server2.inl
index 3a5c83017..5dbb7a478 100644
--- a/contrib/epee/include/net/abstract_tcp_server2.inl
+++ b/contrib/epee/include/net/abstract_tcp_server2.inl
@@ -43,6 +43,8 @@
#include <boost/date_time/posix_time/posix_time.hpp> // TODO
#include <boost/thread/thread.hpp> // TODO
#include <boost/thread/condition_variable.hpp> // TODO
+#include "warnings.h"
+#include "string_tools.h"
#include "misc_language.h"
#include "net/local_ip.h"
#include "pragma_comp_defs.h"
@@ -51,8 +53,6 @@
#include <iomanip>
#include <algorithm>
-#include "../../../../src/cryptonote_core/cryptonote_core.h" // e.g. for the send_stop_signal()
-
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net"
@@ -149,10 +149,8 @@ PRAGMA_WARNING_DISABLE_VS(4355)
const unsigned long ip_{boost::asio::detail::socket_ops::host_to_network_long(remote_ep.address().to_v4().to_ulong())};
m_local = epee::net_utils::is_ip_loopback(ip_) || epee::net_utils::is_ip_local(ip_);
- // create a random uuid
- boost::uuids::uuid random_uuid;
- // that stuff turns out to be included, even though it's from src... Taking advantage
- random_uuid = crypto::rand<boost::uuids::uuid>();
+ // create a random uuid, we don't need crypto strength here
+ const boost::uuids::uuid random_uuid = boost::uuids::random_generator()();
context.set_details(random_uuid, epee::net_utils::ipv4_network_address(ip_, remote_ep.port()), is_income);
_dbg3("[sock " << socket_.native_handle() << "] new connection from " << print_connection_context_short(context) <<
diff --git a/contrib/epee/include/net/http_protocol_handler.inl b/contrib/epee/include/net/http_protocol_handler.inl
index 76db5346f..b53bdc200 100644
--- a/contrib/epee/include/net/http_protocol_handler.inl
+++ b/contrib/epee/include/net/http_protocol_handler.inl
@@ -32,6 +32,7 @@
#include "string_tools.h"
#include "file_io_utils.h"
#include "net_parse_helpers.h"
+#include "time_helper.h"
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net.http"