libfilezilla: update to 0.50.0

This commit is contained in:
Biswapriyo Nath 2025-05-06 03:56:26 +00:00
parent fd8c4a8734
commit d05dc0cd0b
2 changed files with 4 additions and 48 deletions

View File

@ -3,11 +3,11 @@
_realname=libfilezilla
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=0.49.0
pkgver=0.50.0
pkgrel=1
pkgdesc="Small and modern C++ library, offering some basic functionality to build high-performing, platform-independent programs (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
'archlinux: libfilezilla'
)
@ -25,19 +25,14 @@ license=('spdx:GPL-2.0-or-later')
# Upstream download link became (purposely) unstable
# See https://trac.filezilla-project.org/ticket/13186
#source=("https://download.filezilla-project.org/${_realname}/${_realname}-${pkgver}.tar.xz")
source=("https://sources.archlinux.org/other/${_realname}/${_realname}-${pkgver}.tar.xz"
"add-specialization-for-char_traits-uint8_t.patch")
sha256sums=('79ff30e5124068c116c8dc8fc4581922afa2d3720f7b6bee9c8f8fe419617488'
'70c778307d1e9cc14c688766cdfe6d6c49b7e0f6a1c33bf8122d1228deb9329b')
source=("https://sources.archlinux.org/other/${_realname}/${_realname}-${pkgver}.tar.xz")
sha256sums=('6d99be1b5a47fbc68aaab83bcc483d84ad170a672eb648a226bf792356455177')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
# autoreconf to get updated libtool files with clang support
autoreconf -fiv
# https://svn.filezilla-project.org/filezilla/libfilezilla/trunk/lib/libfilezilla/string.hpp?r1=11189&r2=11207
patch -p1 -i "${srcdir}"/add-specialization-for-char_traits-uint8_t.patch
}
build() {

View File

@ -1,39 +0,0 @@
--- a/lib/libfilezilla/string.hpp
+++ b/lib/libfilezilla/string.hpp
@@ -11,6 +11,36 @@
#include <string_view>
#include <vector>
+template<class CharT, class BaseT>
+class traits_cloner
+{
+public:
+ using char_type = CharT;
+
+ using base_type = BaseT;
+ using base_traits = std::char_traits<base_type>;
+
+ static std::size_t length(char_type const* s) {
+ return base_traits::length(reinterpret_cast<base_type const*>(s));
+ }
+ static int compare(char_type const* s1, char_type const* s2, std::size_t count) {
+ return base_traits::compare(reinterpret_cast<base_type const*>(s1), reinterpret_cast<base_type const*>(s2), count);
+ }
+ static char_type* copy(char_type* dest, char_type const* src, std::size_t count) {
+ return reinterpret_cast<char_type*>(base_traits::copy(reinterpret_cast<base_type*>(dest), reinterpret_cast<base_type const*>(src), count));
+ }
+ static void assign( char_type& c1, char_type const& c2 ) noexcept {
+ c1 = c2;
+ }
+ static char_type const* find(char_type const* ptr, std::size_t count, char_type const& ch) {
+ return reinterpret_cast<char_type const*>(base_traits::find(reinterpret_cast<base_type const*>(ptr), count, reinterpret_cast<base_type const&>(ch)));
+ }
+};
+
+template<>
+class std::char_traits<uint8_t> : public traits_cloner<uint8_t, char>
+{};
+
/** \file
* \brief String types and assorted functions.
*