From 3ce43f880dd1ea59151e857ceb304cded08c0822 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Thu, 6 Apr 2023 09:44:22 -0400 Subject: [PATCH] cpp-utilities: update to 5.22.0. --- .../patches/fix-32bit-sendfile.patch | 26 +++++++++++++++++++ srcpkgs/cpp-utilities/template | 4 +-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/cpp-utilities/patches/fix-32bit-sendfile.patch diff --git a/srcpkgs/cpp-utilities/patches/fix-32bit-sendfile.patch b/srcpkgs/cpp-utilities/patches/fix-32bit-sendfile.patch new file mode 100644 index 00000000000..0c8cc562f86 --- /dev/null +++ b/srcpkgs/cpp-utilities/patches/fix-32bit-sendfile.patch @@ -0,0 +1,26 @@ +From 92757f253113515e96bb4ddbb4627b314ada6b58 Mon Sep 17 00:00:00 2001 +From: "Andrew J. Hesford" +Date: Thu, 6 Apr 2023 11:33:41 -0400 +Subject: [PATCH] Fix use of `sendfile()` on 32-bit systems + +--- + io/copy.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/io/copy.h b/io/copy.h +index 4abbe8d..0635a8e 100644 +--- a/io/copy.h ++++ b/io/copy.h +@@ -155,7 +155,8 @@ void CopyHelper::callbackCopy(NativeFileStream &input, NativeFileStr + output.flush(); + const auto totalBytes = static_cast(count); + while (count) { +- const auto bytesCopied = ::sendfile64(output.fileDescriptor(), input.fileDescriptor(), nullptr, std::min(count, bufferSize)); ++ const auto bytesToCopy = static_cast(std::min(count, static_cast(bufferSize))); ++ const auto bytesCopied = ::sendfile64(output.fileDescriptor(), input.fileDescriptor(), nullptr, bytesToCopy); + if (bytesCopied < 0) { + throw std::ios_base::failure(argsToString("sendfile64() failed: ", std::strerror(errno))); + } +-- +2.40.0 + diff --git a/srcpkgs/cpp-utilities/template b/srcpkgs/cpp-utilities/template index 1003f5d1752..d4d2d10eb9a 100644 --- a/srcpkgs/cpp-utilities/template +++ b/srcpkgs/cpp-utilities/template @@ -1,6 +1,6 @@ # Template file for 'cpp-utilities' pkgname=cpp-utilities -version=5.21.0 +version=5.22.0 revision=1 build_style=cmake configure_args="-DBUILD_SHARED_LIBS:BOOL=ON" @@ -10,7 +10,7 @@ maintainer="Andrew J. Hesford " license="GPL-2.0-only" homepage="https://github.com/Martchus/cpp-utilities" distfiles="https://github.com/Martchus/cpp-utilities/archive/v${version}.tar.gz" -checksum=8c94bead63eaa17346438f1ed7df13d58006ae753a39fe21185d48303df1aa27 +checksum=ea68a894f9d5879dc247c1a08172319ca34d2a0022bbc0412e9428c011ffaba2 cpp-utilities-devel_package() { short_desc+=" - development files"