diff --git a/dev-libs/qtkeychain-qt6/patches/258.patch b/dev-libs/qtkeychain-qt6/patches/258.patch new file mode 100644 index 000000000..7c3169ba1 --- /dev/null +++ b/dev-libs/qtkeychain-qt6/patches/258.patch @@ -0,0 +1,25 @@ +From 2de524ebbb2fb41a0650e9fd574ab7f6f10f30be Mon Sep 17 00:00:00 2001 +From: Joshua Goins +Date: Fri, 15 Nov 2024 17:17:14 -0500 +Subject: [PATCH] Fix read password job on Haiku + +There seems to be a breaking change in how QString::fromUtf8 works in Qt6, and this affects QtKeychain handling on Haiku. If we use QByteArray with an explicit size, it messes with the null termination handling and the application is given a QString with a null terminator, which fails. + +But this actually isn't needed at all, letting QByteArray figure out where the password data ends is good enough and lets Qt6 applications work again on Haiku. +--- + qtkeychain/keychain_haiku.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/qtkeychain/keychain_haiku.cpp b/qtkeychain/keychain_haiku.cpp +index 16abe1c..153ebe7 100644 +--- a/keychain_haiku.cpp ++++ b/keychain_haiku.cpp +@@ -86,7 +86,7 @@ void ReadPasswordJobPrivate::scheduledStart() + q->key().toUtf8().constData(), + false, password); + +- data = QByteArray(reinterpret_cast(password.Data()), password.DataLength()); ++ data = QByteArray(reinterpret_cast(password.Data())); + + switch ( result ) { + case B_OK: diff --git a/dev-libs/qtkeychain-qt6/qtkeychain_qt6-0.14.3.recipe b/dev-libs/qtkeychain-qt6/qtkeychain_qt6-0.14.3.recipe index 9b7b46848..1fd162183 100644 --- a/dev-libs/qtkeychain-qt6/qtkeychain_qt6-0.14.3.recipe +++ b/dev-libs/qtkeychain-qt6/qtkeychain_qt6-0.14.3.recipe @@ -5,11 +5,12 @@ How the data is stored depends on the platform." HOMEPAGE="https://github.com/frankosterfeld/qtkeychain" COPYRIGHT="2011-2016 Frank Osterfeld, Mathias Hasselmann" LICENSE="BSD (2-clause)" #XXX: modified -REVISION="2" +REVISION="3" SOURCE_URI="https://github.com/frankosterfeld/qtkeychain/archive/refs/tags/$portVersion.tar.gz" CHECKSUM_SHA256="a22c708f351431d8736a0ac5c562414f2b7bb919a6292cbca1ff7ac0849cb0a7" SOURCE_FILENAME="qtkeychain-$portVersion.tar.gz" SOURCE_DIR="qtkeychain-$portVersion" +PATCHES="258.patch" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86"