From fb3f038e3e50f76946a2700a3bd021dc59d7bb10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 26 Aug 2022 17:00:37 +0700 Subject: [PATCH] libbitcoin-system: rebuild for boost-1.80 --- .../patches/boost-1.80.patch | 79 +++++++++++++++++++ srcpkgs/libbitcoin-system/template | 2 +- 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/libbitcoin-system/patches/boost-1.80.patch diff --git a/srcpkgs/libbitcoin-system/patches/boost-1.80.patch b/srcpkgs/libbitcoin-system/patches/boost-1.80.patch new file mode 100644 index 00000000000..2d44e24ea5a --- /dev/null +++ b/srcpkgs/libbitcoin-system/patches/boost-1.80.patch @@ -0,0 +1,79 @@ +--- a/include/bitcoin/bitcoin/log/file_collector.hpp ++++ b/include/bitcoin/bitcoin/log/file_collector.hpp +@@ -68,14 +68,18 @@ public: + void store_file(boost::filesystem::path const& src_path) override; + + //! Scans the target directory for the files that have already been stored ++ boost::log::sinks::file::scan_result scan_for_files( ++ boost::log::sinks::file::scan_method method, ++ boost::filesystem::path const& pattern) override; + uintmax_t scan_for_files(boost::log::sinks::file::scan_method method, +- boost::filesystem::path const& pattern, unsigned int* counter) override; ++ boost::filesystem::path const& pattern, unsigned int* counter); + + //! The function updates storage restrictions + void update(size_t max_size, size_t min_free_space, size_t max_files); + + //! The function checks if the directory is governed by this collector + bool is_governed(boost::filesystem::path const& dir) const; ++ bool is_in_storage(boost::filesystem::path const & src_path) const override; + + private: + //! Information about a single stored file +--- a/src/log/file_collector.cpp ++++ b/src/log/file_collector.cpp +@@ -357,6 +357,17 @@ void file_collector::store_file(filesyst + + + //! Scans the target directory for the files that have already been stored ++boost::log::sinks::file::scan_result file_collector::scan_for_files( ++ boost::log::sinks::file::scan_method method, ++ filesystem::path const& pattern) ++{ ++ boost::log::sinks::file::scan_result result; ++ unsigned int counter = 0; ++ result.found_count = scan_for_files(method, pattern, &counter); ++ result.last_file_counter = counter; ++ return result; ++} ++ + uintmax_t file_collector::scan_for_files( + boost::log::sinks::file::scan_method method, + filesystem::path const& pattern, unsigned int* counter) +@@ -450,6 +461,15 @@ bool file_collector::is_governed(filesys + return filesystem::equivalent(storage_dir_, dir); + } + ++/* I don't care if this is correct or not */ ++/* upstream removed */ ++bool file_collector::is_in_storage(filesystem::path const& src_path) const ++{ ++ if (!is_governed(src_path.parent_path())) ++ return false; ++ return filesystem::exists(src_path); ++} ++ + filesystem::path file_collector::make_absolute( + filesystem::path const& path) + { +--- a/include/bitcoin/bitcoin/unicode/file_lock.hpp ++++ b/include/bitcoin/bitcoin/unicode/file_lock.hpp +@@ -14,14 +14,11 @@ + #define LIBBITCOIN_INTERPROCESS_FILE_LOCK_HPP + + #include +-#include +-#include ++#include + #include +-#include +-#include +-#include +-#include +-#include ++#include ++#include ++#include + #include + + // Includes from bitcoin/unicode.hpp under _MSC_VER. diff --git a/srcpkgs/libbitcoin-system/template b/srcpkgs/libbitcoin-system/template index 8b03fb248c4..8e6790c3ba6 100644 --- a/srcpkgs/libbitcoin-system/template +++ b/srcpkgs/libbitcoin-system/template @@ -1,7 +1,7 @@ # Template file for 'libbitcoin-system' pkgname=libbitcoin-system version=3.6.0 -revision=6 +revision=7 build_style=gnu-configure configure_args="--with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib --with-boost=${XBPS_CROSS_BASE}/usr --with-gnu-ld --with-icu --with-png