Skip to content

Commit

Permalink
build: remove libiconv
Browse files Browse the repository at this point in the history
  • Loading branch information
tobtoht committed Sep 29, 2024
1 parent ef8db19 commit 17a7ac2
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 66 deletions.
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,18 @@ if(MINGW)
endif()

set(BOOST_COMPONENTS
system
filesystem
thread
date_time
chrono
date_time
filesystem
program_options
regex
serialization
program_options
locale
system
thread
)
if (WIN32)
list(APPEND BOOST_COMPONENTS locale)
endif()

if(STACK_TRACE AND UNIX AND NOT APPLE)
list(APPEND BOOST_COMPONENTS
Expand Down
6 changes: 3 additions & 3 deletions contrib/depends/packages/boost.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ $(package)_version=1.85.0
$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$($(package)_version)/source/
$(package)_file_name=$(package)_$(subst .,_,$($(package)_version)).tar.gz
$(package)_sha256_hash=be0d91732d5b0cc6fbb275c7939974457e79b54d6f07ce2e3dfdd68bef883b0b
$(package)_dependencies=libiconv
$(package)_patches=disable_addr2line.patch

define $(package)_set_vars
Expand All @@ -21,7 +20,8 @@ $(package)_toolset_$(host_os)=gcc
$(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_toolset_darwin=darwin
$(package)_archiver_darwin=$($(package)_libtool)
$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale,stacktrace
$(package)_config_libraries_$(host_os)="chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,stacktrace"
$(package)_config_libraries_mingw32="chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,stacktrace,locale"
$(package)_cxxflags=-std=c++17
$(package)_cxxflags_linux=-fPIC
$(package)_cxxflags_freebsd=-fPIC
Expand All @@ -33,7 +33,7 @@ define $(package)_preprocess_cmds
endef

define $(package)_config_cmds
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries)
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries_$(host_os))
endef

define $(package)_build_cmds
Expand Down
29 changes: 0 additions & 29 deletions contrib/depends/packages/libiconv.mk

This file was deleted.

2 changes: 1 addition & 1 deletion contrib/depends/packages/packages.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
packages := boost openssl libiconv unbound qrencode libsodium polyseed hidapi abseil protobuf libusb zlib libgpg-error libgcrypt expat libzip zxing-cpp
packages := boost openssl unbound qrencode libsodium polyseed hidapi abseil protobuf libusb zlib libgpg-error libgcrypt expat libzip zxing-cpp
native_packages := native_qt native_abseil native_protobuf

linux_packages := eudev libfuse libsquashfuse zstd appimage_runtime
Expand Down
13 changes: 0 additions & 13 deletions contrib/depends/patches/libiconv/fix-whitespace.patch

This file was deleted.

2 changes: 0 additions & 2 deletions contrib/depends/toolchain.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ endif()

endif()

set(ICONV_LIBRARIES @prefix@/lib/libiconv.a)

SET(ZMQ_INCLUDE_PATH @prefix@/include)
SET(ZMQ_LIB @prefix@/lib/libzmq.a)

Expand Down
2 changes: 1 addition & 1 deletion monero
4 changes: 0 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,6 @@ if(CHECK_UPDATES)
target_link_libraries(feather PRIVATE openpgp)
endif()

if(DEPENDS)
target_link_libraries(feather PRIVATE ${ICONV_LIBRARIES})
endif()

if(DEVICE_TREZOR_READY)
find_package(Protobuf CONFIG)
if (NOT Protobuf_FOUND)
Expand Down
7 changes: 0 additions & 7 deletions src/polyseed/polyseed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@
#include <sodium/core.h>
#include <sodium/utils.h>
#include <sodium/randombytes.h>
#include <boost/locale.hpp>

#include <array>

#include <QString>

namespace polyseed {

static std::locale locale;

static size_t utf8_nfc(const char* str, polyseed_str norm) {
auto Qstr = QString(str);
auto Qs = Qstr.normalized(QString::NormalizationForm_C);
Expand Down Expand Up @@ -63,10 +60,6 @@ namespace polyseed {
throw std::runtime_error("sodium_init failed");
}

boost::locale::generator gen;
gen.locale_cache_enabled(true);
locale = gen("");

sodium_memzero(seed, POLYSEED_RANDBYTES);

polyseed_dependency pd;
Expand Down

0 comments on commit 17a7ac2

Please sign in to comment.