diff --git a/srcpkgs/ledger/patches/boost-1.88.patch b/srcpkgs/ledger/patches/boost-1.88.patch deleted file mode 100644 index 1bc27d74564bd8..00000000000000 --- a/srcpkgs/ledger/patches/boost-1.88.patch +++ /dev/null @@ -1,99 +0,0 @@ ---- a/src/system.hh.in -+++ b/src/system.hh.in -@@ -144,7 +144,7 @@ - #include - #include - --#include -+#include - #include - #include - #include ---- a/src/filters.cc -+++ b/src/filters.cc -@@ -237,8 +237,8 @@ void anonymize_posts::render_commodity(a - - void anonymize_posts::operator()(post_t& post) - { -- boost::uuids::detail::sha1 sha; -- unsigned int message_digest[5]; -+ boost::uuids::detail::sha1 sha; -+ boost::uuids::detail::sha1::digest_type message_digest; - bool copy_xact_details = false; - - if (last_xact != post.xact) { -@@ -260,7 +260,7 @@ void anonymize_posts::operator()(post_t& - sha.process_bytes(buf.str().c_str(), buf.str().length()); - sha.get_digest(message_digest); - -- xact.payee = to_hex(message_digest); -+ xact.payee = digest_to_hex(message_digest); - xact.note = none; - } else { - xact.journal = post.xact->journal; -@@ -278,7 +278,7 @@ void anonymize_posts::operator()(post_t& - sha.process_bytes(buf.str().c_str(), buf.str().length()); - sha.get_digest(message_digest); - -- account_names.push_front(to_hex(message_digest)); -+ account_names.push_front(digest_to_hex(message_digest)); - } - - account_t * new_account = ---- a/src/utils.h -+++ b/src/utils.h -@@ -607,29 +607,39 @@ inline int peek_next_nonws(std::istream& - *_p = '\0'; \ - } - --inline string to_hex(unsigned int * message_digest, const int len = 1) --{ -+inline string digest_to_hex( -+ const boost::uuids::detail::sha1::digest_type& message_digest, -+ size_t len = sizeof(boost::uuids::detail::sha1::digest_type) * 2 -+) { - std::ostringstream buf; -+ buf.setf(std::ios_base::hex, std::ios_base::basefield); -+ buf.fill('0'); - -- for(int i = 0; i < 5 ; i++) { -- buf.width(8); -- buf.fill('0'); -- buf << std::hex << message_digest[i]; -- if (i + 1 >= len) -- break; // only output the first LEN dwords -+ // sha1::digest_type is an array type and may change between Boost versions -+ const size_t count = std::min( -+ sizeof(message_digest) / sizeof(message_digest[0]), -+ (len - 1) / (sizeof(message_digest[0]) * 2) + 1 -+ ); -+ for(size_t i = 0; i < count; i++) { -+ buf.width(sizeof(message_digest[i]) * 2); -+ buf << (unsigned int)message_digest[i]; - } -- return buf.str(); -+ string hex = buf.str(); -+ hex.resize(len, '0'); // in case a partial element is requested -+ return hex; - } - --inline string sha1sum(const string& str) --{ -- boost::uuids::detail::sha1 sha; -+inline string sha1sum( -+ const string& str, -+ size_t len = sizeof(boost::uuids::detail::sha1::digest_type) * 2 -+) { -+ static boost::uuids::detail::sha1 sha; -+ boost::uuids::detail::sha1::digest_type message_digest; - -+ sha.reset(); - sha.process_bytes(str.c_str(), str.length()); -- -- unsigned int message_digest[5]; - sha.get_digest(message_digest); -- return to_hex(message_digest, 5); -+ return digest_to_hex(message_digest, len); - } - - extern const string version; diff --git a/srcpkgs/ledger/patches/boost-1.89.patch b/srcpkgs/ledger/patches/boost-1.89.patch deleted file mode 100644 index e8392bb4707081..00000000000000 --- a/srcpkgs/ledger/patches/boost-1.89.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -90,14 +90,11 @@ endif() - - # Set BOOST_ROOT to help CMake to find the right Boost version - find_package(Boost 1.49.0 -- REQUIRED date_time filesystem system iostreams regex unit_test_framework -+ REQUIRED filesystem iostreams unit_test_framework - ${BOOST_PYTHON} OPTIONAL_COMPONENTS nowide) - - # enable Boost::nowide library (for UTF8 command line args on Windows) --set(HAVE_BOOST_NOWIDE 0) --if (Boost_NOWIDE_FOUND) -- set(HAVE_BOOST_NOWIDE 1) --endif() -+set(HAVE_BOOST_NOWIDE 1) - - include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) - link_directories(${Boost_LIBRARY_DIRS}) diff --git a/srcpkgs/ledger/patches/cmake_wtf.patch b/srcpkgs/ledger/patches/cmake_wtf.patch deleted file mode 100644 index f74d51478be991..00000000000000 --- a/srcpkgs/ledger/patches/cmake_wtf.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- - cmake/FindUtfcpp.cmake | 15 +++------------ - 1 file changed, 3 insertions(+), 12 deletions(-) - -diff --git a/cmake/FindUtfcpp.cmake b/cmake/FindUtfcpp.cmake -index c9d3e06..762cf58 100644 ---- a/cmake/FindUtfcpp.cmake -+++ b/cmake/FindUtfcpp.cmake -@@ -6,18 +6,9 @@ - - include(CheckCXXSourceCompiles) - --set(UTFCPP_FOUND FALSE) -- --find_path(UTFCPP_INCLUDE_DIR -- NAMES utf8.h -- HINTS "${UTFCPP_PATH}" -- PATHS "${PROJECT_SOURCE_DIR}/lib/utfcpp/v3/source" --) -- --if (UTFCPP_INCLUDE_DIR) -- set(CMAKE_REQUIRED_INCLUDES "${UTFCPP_INCLUDE_DIR}") -- set(UTFCPP_FOUND TRUE) --endif() -+set(UTFCPP_FOUND TRUE) -+set(UTFCPP_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/utfcpp/v3/source") -+set(CMAKE_REQUIRED_INCLUDES "${UTFCPP_INCLUDE_DIR}") - - check_cxx_source_compiles(" - #include --- -2.42.0 diff --git a/srcpkgs/ledger/patches/utfcpp-cross-find-root-path.patch b/srcpkgs/ledger/patches/utfcpp-cross-find-root-path.patch new file mode 100644 index 00000000000000..9b01a4fad5f16f --- /dev/null +++ b/srcpkgs/ledger/patches/utfcpp-cross-find-root-path.patch @@ -0,0 +1,10 @@ +--- a/cmake/FindUtfcpp.cmake 2026-09-08 21:16:13.836090808 -0400 ++++ b/cmake/FindUtfcpp.cmake 2026-09-08 21:16:13.836994276 -0400 +@@ -12,6 +12,7 @@ + NAMES utf8.h + HINTS "${UTFCPP_PATH}" + PATHS "${PROJECT_SOURCE_DIR}/lib/utfcpp/v4/source" ++ NO_CMAKE_FIND_ROOT_PATH + ) + + if (UTFCPP_INCLUDE_DIR) diff --git a/srcpkgs/ledger/template b/srcpkgs/ledger/template index 77291d6fc7426d..6540900f619568 100644 --- a/srcpkgs/ledger/template +++ b/srcpkgs/ledger/template @@ -1,7 +1,7 @@ # Template file for 'ledger' pkgname=ledger -version=3.3.2 -revision=5 +version=3.4.1 +revision=1 build_style=cmake makedepends="boost-devel-minimal libboost_filesystem libboost_iostreams libboost_nowide libboost_unit_test_framework @@ -11,15 +11,7 @@ maintainer="Orphaned " license="BSD-3-Clause" homepage="https://www.ledger-cli.org/" distfiles="https://github.com/ledger/${pkgname}/archive/v${version}.tar.gz" -checksum=555296ee1e870ff04e2356676977dcf55ebab5ad79126667bc56464cb1142035 - -post_extract() { - # see upstream: https://github.com/ledger/ledger/issues/1783 - # > It seems to fail in a non-deterministic manner. If you run it long - # > enough, it might fail. - rm -f test/baseline/cmd-pricedb.test - rm -f test/baseline/cmd-prices.test -} +checksum=1cf012cdc8445cab0efc445064ef9b2d3f46ed0165dae803c40fe3d2b23fdaad post_install() { rm -Rf ${DESTDIR}/usr/local