public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-01-31 23:14 Quentin Retornaz
  0 siblings, 0 replies; 14+ messages in thread
From: Quentin Retornaz @ 2023-01-31 23:14 UTC (permalink / raw
  To: gentoo-commits

commit:     ddd7427f0a2703ab44da44a15d47b336ea58987e
Author:     Anna “CyberTailor” <cyber <AT> sysrq <DOT> in>
AuthorDate: Fri Jan 27 00:07:54 2023 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Tue Jan 31 23:13:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=ddd7427f

dev-qt/qtbase: new package, add 6.4.2

Signed-off-by: Anna “CyberTailor” <cyber <AT> sysrq.in>
Closes: https://github.com/gentoo/libressl/pull/491
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 dev-qt/qtbase/Manifest                          |   1 +
 dev-qt/qtbase/files/qtbase-6.4.2-libressl.patch | 445 ++++++++++++++++++++++++
 dev-qt/qtbase/metadata.xml                      |  38 ++
 dev-qt/qtbase/qtbase-6.4.2.ebuild               | 190 ++++++++++
 4 files changed, 674 insertions(+)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
new file mode 100644
index 0000000..e77cc5d
--- /dev/null
+++ b/dev-qt/qtbase/Manifest
@@ -0,0 +1 @@
+DIST qtbase-everywhere-src-6.4.2.tar.xz 47987188 BLAKE2B 5d25d8b912ba775faa5855ad4326cbd19580cc7f98b997a9bbdb4a2216550a60b2c8a7a2ef1741a5dfd66ebde0d1cf5d0394215474c39c7779648b03c3892812 SHA512 b00cce7bfc29d3a34c9a2f08db147c4bfd962e178916d60033e1845b25eaeaa4fbd42f5c1d7e39453ddb412a4e91c22c8eae52745eda8a47e35a691054d5496e

diff --git a/dev-qt/qtbase/files/qtbase-6.4.2-libressl.patch b/dev-qt/qtbase/files/qtbase-6.4.2-libressl.patch
new file mode 100644
index 0000000..f75f651
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.4.2-libressl.patch
@@ -0,0 +1,445 @@
+Fixes Qt6 build on LibreSSL.
+
+https://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_network_ssl_qsslsocket_openssl_symbols_cpp?rev=1.7
+https://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_plugins_tls_openssl_qopenssl_p_h?rev=1.2
+https://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_plugins_tls_openssl_qsslcontext_openssl_cpp?rev=1.2
+https://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_plugins_tls_openssl_qsslsocket_openssl_symbols_p_h?rev=1.2
+https://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_plugins_tls_openssl_qtls_openssl_cpp?rev=1.2
+https://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_plugins_tls_openssl_qx509_openssl_cpp?rev=1.2
+
+--- a/src/plugins/tls/openssl/qopenssl_p.h
++++ b/src/plugins/tls/openssl/qopenssl_p.h
+@@ -70,6 +70,13 @@
+ 
+ QT_BEGIN_NAMESPACE
+ 
++#ifndef DTLS_ANY_VERSION
++#define DTLS_ANY_VERSION 0x1FFFF
++#endif
++#ifndef TLS_ANY_VERSION
++#define TLS_ANY_VERSION 0x10000
++#endif
++
+ struct QSslErrorEntry {
+     int code = 0;
+     int depth = 0;
+--- a/src/plugins/tls/openssl/qsslcontext_openssl.cpp
++++ b/src/plugins/tls/openssl/qsslcontext_openssl.cpp
+@@ -49,9 +49,9 @@ extern "C" int q_verify_cookie_callback(SSL *ssl, cons
+ }
+ #endif // dtls
+ 
+-#ifdef TLS1_3_VERSION
++#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
+ extern "C" int q_ssl_sess_set_new_cb(SSL *context, SSL_SESSION *session);
+-#endif // TLS1_3_VERSION
++#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBE
+ 
+ static inline QString msgErrorSettingBackendConfig(const QString &why)
+ {
+@@ -370,9 +370,11 @@ QT_WARNING_POP
+         return;
+     }
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+     // A nasty hacked OpenSSL using a level that will make our auto-tests fail:
+     if (q_SSL_CTX_get_security_level(sslContext->ctx) > 1 && *forceSecurityLevel())
+         q_SSL_CTX_set_security_level(sslContext->ctx, 1);
++#endif // LIBRESSL_VERSION_NUMBER
+ 
+     const long anyVersion =
+ #if QT_CONFIG(dtls)
+@@ -663,14 +665,14 @@ QT_WARNING_POP
+         q_SSL_CTX_set_verify(sslContext->ctx, verificationMode, verificationCallback);
+     }
+ 
+-#ifdef TLS1_3_VERSION
++#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
+     // NewSessionTicket callback:
+     if (mode == QSslSocket::SslClientMode && !isDtls) {
+         q_SSL_CTX_sess_set_new_cb(sslContext->ctx, q_ssl_sess_set_new_cb);
+         q_SSL_CTX_set_session_cache_mode(sslContext->ctx, SSL_SESS_CACHE_CLIENT);
+     }
+ 
+-#endif // TLS1_3_VERSION
++#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBER
+ 
+ #if QT_CONFIG(dtls)
+     // DTLS cookies:
+@@ -758,6 +760,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslC
+     }
+ #endif // ocsp
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+     QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
+     if (cctx) {
+         q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
+@@ -804,7 +807,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslC
+             sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
+             sslContext->errorCode = QSslError::UnspecifiedError;
+         }
+-    } else {
++    } else
++#endif // LIBRESSL_VERSION_NUMBER
++    {
+         sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_CTX_new() failed"));
+         sslContext->errorCode = QSslError::UnspecifiedError;
+     }
+--- a/src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
++++ b/src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
+@@ -46,6 +46,13 @@ QT_BEGIN_NAMESPACE
+ 
+ #define DUMMYARG
+ 
++#ifdef LIBRESSL_VERSION_NUMBER
++typedef _STACK STACK;
++typedef STACK OPENSSL_STACK;
++typedef void OPENSSL_INIT_SETTINGS;
++typedef int (*X509_STORE_CTX_verify_cb)(int ok,X509_STORE_CTX *ctx);
++#endif
++
+ #if !defined QT_LINKED_OPENSSL
+ // **************** Shared declarations ******************
+ // ret func(arg)
+@@ -203,15 +210,32 @@ const BIO_METHOD *q_BIO_s_mem();
+ void q_AUTHORITY_INFO_ACCESS_free(AUTHORITY_INFO_ACCESS *a);
+ int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
+ int q_EVP_PKEY_up_ref(EVP_PKEY *a);
++#ifdef OPENSSL_NO_DEPRECATED_3_0
+ EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
+ void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
++#endif // OPENSSL_NO_DEPRECATED_3_0
+ int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
++#ifndef LIBRESSL_VERSION_NUMBER
+ int q_OPENSSL_sk_num(OPENSSL_STACK *a);
+ void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
+ OPENSSL_STACK *q_OPENSSL_sk_new_null();
+ void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
+ void q_OPENSSL_sk_free(OPENSSL_STACK *a);
+ void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
++#else // LIBRESSL_VERSION_NUMBER
++int q_sk_num(STACK *a);
++#define q_OPENSSL_sk_num(a) q_sk_num(a)
++void q_sk_pop_free(STACK *a, void (*b)(void *));
++#define q_OPENSSL_sk_pop_free(a, b) q_sk_pop_free(a, b)
++STACK *q_sk_new_null();
++#define q_OPENSSL_sk_new_null() q_sk_new_null()
++void q_sk_push(STACK *st, void *data);
++#define q_OPENSSL_sk_push(st, data) q_sk_push(st, data)
++void q_sk_free(STACK *a);
++#define q_OPENSSL_sk_free q_sk_free
++void * q_sk_value(STACK *a, int b);
++#define q_OPENSSL_sk_value(a, b) q_sk_value(a, b)
++#endif // LIBRESSL_VERSION_NUMBER
+ int q_SSL_session_reused(SSL *a);
+ qssloptions q_SSL_CTX_set_options(SSL_CTX *ctx, qssloptions op);
+ int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+@@ -238,9 +262,15 @@ void q_DH_get0_pqg(const DH *dh, const BIGNUM **p, con
+ # define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
+                                                        | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define q_SKM_sk_num(st) q_OPENSSL_sk_num((OPENSSL_STACK *)st)
+ #define q_SKM_sk_value(type, st,i) (type *)q_OPENSSL_sk_value((OPENSSL_STACK *)st, i)
++#else // LIBRESSL_VERSION_NUMBER
++#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
++#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
++#endif // LIBRESSL_VERSION_NUMBER
+ 
++
+ #define q_OPENSSL_add_all_algorithms_conf()  q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
+                                                                    | OPENSSL_INIT_ADD_ALL_DIGESTS \
+                                                                    | OPENSSL_INIT_LOAD_CONFIG, NULL)
+@@ -425,12 +455,14 @@ int q_SSL_CTX_use_certificate_file(SSL_CTX *a, const c
+ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
+ int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c);
+ X509_STORE *q_SSL_CTX_get_cert_store(const SSL_CTX *a);
++#ifndef LIBRESSL_VERSION_NUMBER
+ SSL_CONF_CTX *q_SSL_CONF_CTX_new();
+ void q_SSL_CONF_CTX_free(SSL_CONF_CTX *a);
+ void q_SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *a, SSL_CTX *b);
+ unsigned int q_SSL_CONF_CTX_set_flags(SSL_CONF_CTX *a, unsigned int b);
+ int q_SSL_CONF_CTX_finish(SSL_CONF_CTX *a);
+ int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c);
++#endif // LIBRESSL_VERSION_NUMBER
+ void q_SSL_free(SSL *a);
+ STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
+ const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
+@@ -532,14 +564,26 @@ void q_PKCS12_free(PKCS12 *pkcs12);
+ #define q_BIO_get_mem_data(b, pp) (int)q_BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp)
+ #define q_BIO_pending(b) (int)q_BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
+ #define q_SSL_CTX_set_mode(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num((st))
++#else
++#define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num(GENERAL_NAME, (st))
++#endif
+ #define q_sk_GENERAL_NAME_value(st, i) q_SKM_sk_value(GENERAL_NAME, (st), (i))
+ 
+ void q_GENERAL_NAME_free(GENERAL_NAME *a);
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define q_sk_X509_num(st) q_SKM_sk_num((st))
++#else
++#define q_sk_X509_num(st) q_SKM_sk_num(X509, (st))
++#endif
+ #define q_sk_X509_value(st, i) q_SKM_sk_value(X509, (st), (i))
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define q_sk_SSL_CIPHER_num(st) q_SKM_sk_num((st))
++#else
++#define q_sk_SSL_CIPHER_num(st)   q_SKM_sk_num(SSL_CIPHER, (st))
++#endif
+ #define q_sk_SSL_CIPHER_value(st, i) q_SKM_sk_value(SSL_CIPHER, (st), (i))
+ #define q_SSL_CTX_add_extra_chain_cert(ctx,x509) \
+         q_SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
+@@ -641,7 +685,11 @@ int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisup
+ int q_OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash,
+                         ASN1_INTEGER **pserial, OCSP_CERTID *cid);
+ 
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3050000fL
++#define q_OCSP_resp_get0_certs(bs) ((bs)->certs)
++#else
+ const STACK_OF(X509) *q_OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
++#endif
+ OCSP_CERTID *q_OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);
+ void q_OCSP_CERTID_free(OCSP_CERTID *cid);
+ int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
+@@ -660,8 +708,14 @@ int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
+ 
+ void *q_CRYPTO_malloc(size_t num, const char *file, int line);
+ #define q_OPENSSL_malloc(num) q_CRYPTO_malloc(num, "", 0)
++
++#ifndef LIBRESSL_VERSION_NUMBER
+ void q_CRYPTO_free(void *str, const char *file, int line);
+ # define q_OPENSSL_free(addr) q_CRYPTO_free(addr, "", 0)
++#else
++void q_CRYPTO_free(void *a);
++# define q_OPENSSL_free(addr) q_CRYPTO_free(addr)
++#endif
+ 
+ void q_SSL_set_info_callback(SSL *ssl, void (*cb) (const SSL *ssl, int type, int val));
+ const char *q_SSL_alert_type_string(int value);
+@@ -724,7 +778,11 @@ int q_EVP_PKEY_set1_DH(EVP_PKEY *a, DH *b);
+ 
+ int q_DH_bits(DH *dh);
+ int q_RSA_bits(RSA *a);
++#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x3050000fL)
++#define q_DSA_bits(dsa) q_BN_num_bits((dsa)->p)
++#else
+ int q_DSA_bits(DSA *a);
++#endif
+ 
+ int q_EVP_PKEY_assign(EVP_PKEY *a, int b, void *r);
+ int q_EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
+--- a/src/plugins/tls/openssl/qtls_openssl.cpp
++++ b/src/plugins/tls/openssl/qtls_openssl.cpp
+@@ -1438,13 +1438,13 @@ bool TlsCryptographOpenSSL::initSslContext()
+     else if (mode == QSslSocket::SslServerMode)
+         q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x10101006L
++#if OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
+     // Set the client callback for TLSv1.3 PSK
+     if (mode == QSslSocket::SslClientMode
+         && QSslSocket::sslLibraryBuildVersionNumber() >= 0x10101006L) {
+         q_SSL_set_psk_use_session_callback(ssl, &q_ssl_psk_use_session_callback);
+     }
+-#endif // openssl version >= 0x10101006L
++#endif // OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #endif // OPENSSL_NO_PSK
+ 
+--- a/src/plugins/tls/openssl/qx509_openssl.cpp
++++ b/src/plugins/tls/openssl/qx509_openssl.cpp
+@@ -63,7 +63,11 @@ QMultiMap<QByteArray, QString> mapFromX509Name(X509_NA
+         unsigned char *data = nullptr;
+         int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
+         info.insert(name, QString::fromUtf8((char*)data, size));
+-        q_CRYPTO_free(data, nullptr, 0);
++#if QT_CONFIG(opensslv11) && !defined(LIBRESSL_VERSION_NUMBER)
++         q_CRYPTO_free(data, nullptr, 0);
++#else
++         q_CRYPTO_free(data);
++#endif
+     }
+ 
+     return info;
+@@ -73,12 +77,27 @@ QDateTime dateTimeFromASN1(const ASN1_TIME *aTime)
+ {
+     QDateTime result;
+     tm lTime;
++#ifdef LIBRESSL_VERSION_NUMBER
++    const char *data;
++    size_t len;
++    int type;
+ 
++    data = (const char*)ASN1_STRING_get0_data((const ASN1_STRING *)aTime);
++    len = ASN1_STRING_length(aTime);
++    type = ASN1_STRING_type(aTime);
++
++    if (ASN1_time_parse(data, len, &lTime, type) == type) {
++        QDate resDate(lTime.tm_year + 1900, lTime.tm_mon + 1, lTime.tm_mday);
++        QTime resTime(lTime.tm_hour, lTime.tm_min, lTime.tm_sec);
++        result = QDateTime(resDate, resTime, Qt::UTC);
++    }
++#else
+     if (q_ASN1_TIME_to_tm(aTime, &lTime)) {
+         QDate resDate(lTime.tm_year + 1900, lTime.tm_mon + 1, lTime.tm_mday);
+         QTime resTime(lTime.tm_hour, lTime.tm_min, lTime.tm_sec);
+         result = QDateTime(resDate, resTime, Qt::UTC);
+     }
++#endif
+ 
+     return result;
+ }
+@@ -189,7 +208,7 @@ QVariant x509UnknownExtensionToValue(X509_EXTENSION *e
+         QVariantList list;
+         bool isMap = false;
+ 
+-        for (int j = 0; j < q_SKM_sk_num(val); j++) {
++        for (int j = 0; j < q_SKM_sk_num(CONF_VALUE, val); j++) {
+             CONF_VALUE *nval = q_SKM_sk_value(CONF_VALUE, val, j);
+             if (nval->name && nval->value) {
+                 isMap = true;
+@@ -285,7 +304,7 @@ QVariant x509ExtensionToValue(X509_EXTENSION *ext)
+             if (!info)
+                 return {};
+             QVariantMap result;
+-            for (int i=0; i < q_SKM_sk_num(info); i++) {
++            for (int i=0; i < q_SKM_sk_num(ACCESS_DESCRIPTION, info); i++) {
+                 ACCESS_DESCRIPTION *ad = q_SKM_sk_value(ACCESS_DESCRIPTION, info, i);
+ 
+                 GENERAL_NAME *name = ad->location;
+--- a/src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp
++++ b/src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp
+@@ -113,23 +113,36 @@ DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYA
+ DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return)
+ DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
+ DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return)
++#ifdef OPENSSL_NO_DEPRECATED_3_0
+ DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return)
+ DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return)
+ DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return)
++#endif // OPENSSL_NO_DEPRECATED_3_0
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
+ DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
+ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
+ DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
+ DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
+ DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
++#else
++DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
++DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
++DEFINEFUNC(_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
++DEFINEFUNC2(void, sk_push, _STACK *a, a, void *b, b, return, DUMMYARG)
++DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
++DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return nullptr, return)
++#endif // LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
+ DEFINEFUNC2(qssloptions, SSL_CTX_set_options, SSL_CTX *ctx, ctx, qssloptions op, op, return 0, return)
+ using info_callback = void (*) (const SSL *ssl, int type, int val);
+ DEFINEFUNC2(void, SSL_set_info_callback, SSL *ssl, ssl, info_callback cb, cb, return, return)
+ DEFINEFUNC(const char *, SSL_alert_type_string, int value, value, return nullptr, return)
+ DEFINEFUNC(const char *, SSL_alert_desc_string_long, int value, value, return nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return)
+ DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return)
++#endif // LIBRESSL_VERSION_NUMBER
+ #ifdef TLS1_3_VERSION
+ DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
+ DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
+@@ -155,7 +168,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE
+ DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return)
+ DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return)
+ DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC3(void, CRYPTO_free, void *str, str, const char *file, file, int line, line, return, DUMMYARG)
++#else
++DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
++#endif
+ DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
+ DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return)
+ DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSION *session, session, return 0, return)
+@@ -194,7 +211,9 @@ DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING 
+             ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid,
+             return 0, return)
+ DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return)
++#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
+ DEFINEFUNC(const STACK_OF(X509) *, OCSP_resp_get0_certs, const OCSP_BASICRESP *bs, bs, return nullptr, return)
++#endif
+ DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return)
+ DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s,
+             int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return)
+@@ -215,7 +234,9 @@ DEFINEFUNC(long, ASN1_INTEGER_get, ASN1_INTEGER *a, a,
+ DEFINEFUNC2(int, ASN1_INTEGER_cmp, const ASN1_INTEGER *a, a, const ASN1_INTEGER *b, b, return 1, return)
+ DEFINEFUNC(int, ASN1_STRING_length, ASN1_STRING *a, a, return 0, return)
+ DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC2(int, ASN1_TIME_to_tm, const ASN1_TIME *s, s, struct tm *tm, tm, return 0, return)
++#endif
+ DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return)
+ DEFINEFUNC(int, BIO_free, BIO *a, a, return 0, return)
+ DEFINEFUNC2(BIO *, BIO_new_mem_buf, void *a, a, int b, b, return nullptr, return)
+@@ -291,12 +312,14 @@ DEFINEFUNC3(int, SSL_CTX_use_certificate_file, SSL_CTX
+ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -1, return)
+ DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return)
+ DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, return);
+ DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return ,return);
+ DEFINEFUNC2(void, SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX *a, a, SSL_CTX *b, b, return, return);
+ DEFINEFUNC2(unsigned int, SSL_CONF_CTX_set_flags, SSL_CONF_CTX *a, a, unsigned int b, b, return 0, return);
+ DEFINEFUNC(int, SSL_CONF_CTX_finish, SSL_CONF_CTX *a, a, return 0, return);
+ DEFINEFUNC3(int, SSL_CONF_cmd, SSL_CONF_CTX *a, a, const char *b, b, const char *c, c, return 0, return);
++#endif
+ DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
+ DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
+ DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
+@@ -859,9 +882,11 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(EVP_CIPHER_CTX_reset)
+     RESOLVEFUNC(AUTHORITY_INFO_ACCESS_free)
+     RESOLVEFUNC(EVP_PKEY_up_ref)
++#ifdef OPENSSL_NO_DEPRECATED_3_0
+     RESOLVEFUNC(EVP_PKEY_CTX_new)
+     RESOLVEFUNC(EVP_PKEY_param_check)
+     RESOLVEFUNC(EVP_PKEY_CTX_free)
++#endif // OPENSSL_NO_DEPRECATED_3_0
+     RESOLVEFUNC(OPENSSL_sk_new_null)
+     RESOLVEFUNC(OPENSSL_sk_push)
+     RESOLVEFUNC(OPENSSL_sk_free)
+@@ -955,7 +980,9 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(OCSP_check_validity)
+     RESOLVEFUNC(OCSP_cert_to_id)
+     RESOLVEFUNC(OCSP_id_get0_info)
++#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
+     RESOLVEFUNC(OCSP_resp_get0_certs)
++#endif
+     RESOLVEFUNC(OCSP_basic_sign)
+     RESOLVEFUNC(OCSP_response_create)
+     RESOLVEFUNC(i2d_OCSP_RESPONSE)
+@@ -1051,12 +1078,14 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(SSL_CTX_use_PrivateKey)
+     RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
+     RESOLVEFUNC(SSL_CTX_get_cert_store);
++#ifndef LIBRESSL_VERSION_NUMBER
+     RESOLVEFUNC(SSL_CONF_CTX_new);
+     RESOLVEFUNC(SSL_CONF_CTX_free);
+     RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
+     RESOLVEFUNC(SSL_CONF_CTX_set_flags);
+     RESOLVEFUNC(SSL_CONF_CTX_finish);
+     RESOLVEFUNC(SSL_CONF_cmd);
++#endif
+     RESOLVEFUNC(SSL_accept)
+     RESOLVEFUNC(SSL_clear)
+     RESOLVEFUNC(SSL_connect)
+@@ -1106,7 +1135,9 @@ bool q_resolveOpenSslSymbols()
+     RESOLVEFUNC(RSA_free)
+ 
+     RESOLVEFUNC(DH_bits)
++#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
+     RESOLVEFUNC(DSA_bits)
++#endif
+     RESOLVEFUNC(RSA_bits)
+ 
+ #ifndef OPENSSL_NO_EC

diff --git a/dev-qt/qtbase/metadata.xml b/dev-qt/qtbase/metadata.xml
new file mode 100644
index 0000000..d1512cb
--- /dev/null
+++ b/dev-qt/qtbase/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>cyber+gentoo@sysrq.in</email>
+		<name>Anna</name>
+	</maintainer>
+	<use>
+		<flag name="brotli">Enable support for Brotli decompression</flag>
+		<flag name="concurrent">Build Qt6Concurrent module</flag>
+		<flag name="dbus">Build Qt6DBus module</flag>
+		<flag name="egl">Enable EGL integration</flag>
+		<flag name="eglfs">Build the EGL Full Screen/Single Surface platform plugin</flag>
+		<flag name="evdev">Enable support for input devices via evdev</flag>
+		<flag name="gssapi">Enable support for GSSAPI (<pkg>virtual/krb5</pkg>)</flag>
+		<flag name="gtk">Build the GTK platform theme plugin</flag>
+		<flag name="gui">Build Qt6Gui module</flag>
+		<flag name="libinput">Enable support for input devices via <pkg>dev-libs/libinput</pkg></flag>
+		<flag name="libproxy">Use <pkg>net-libs/libproxy</pkg> for automatic HTTP/SOCKS proxy configuration</flag>
+		<flag name="network">Build Qt6Network module</flag>
+		<flag name="sql">Build Qt6Sql module</flag>
+		<flag name="systemd">Enable native journald logging support</flag>
+		<flag name="tslib">Enable support for touchscreen devices via <pkg>x11-libs/tslib</pkg></flag>
+		<flag name="tuio">Build plugin to receive touch events over the TUIO protocol</flag>
+		<flag name="vulkan">Enable support for Vulkan</flag>
+		<flag name="widgets">Build Qt6Widgets module</flag>
+		<flag name="X">Build the XCB platform plugin and enable X11 integration</flag>
+	</use>
+	<upstream>
+		<bugs-to>https://bugreports.qt.io/</bugs-to>
+		<doc>https://doc.qt.io/</doc>
+	</upstream>
+	<slots>
+		<subslots>
+			Must only be used by packages that are known to use private parts of the Qt API.
+		</subslots>
+	</slots>
+</pkgmetadata>

diff --git a/dev-qt/qtbase/qtbase-6.4.2.ebuild b/dev-qt/qtbase/qtbase-6.4.2.ebuild
new file mode 100644
index 0000000..50f6845
--- /dev/null
+++ b/dev-qt/qtbase/qtbase-6.4.2.ebuild
@@ -0,0 +1,190 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qt6-build
+
+DESCRIPTION="Cross-platform application development framework"
+
+if [[ ${QT6_BUILD_TYPE} == release ]]; then
+	KEYWORDS="~amd64"
+fi
+
+# Qt Modules
+IUSE="+concurrent +dbus +gui +network +sql opengl +widgets +xml zstd"
+REQUIRED_USE="
+	opengl? ( gui )
+	widgets? ( gui )
+	X? ( || ( evdev libinput ) )
+"
+
+QTGUI_IUSE="accessibility egl eglfs evdev gles2-only +jpeg +libinput tslib tuio vulkan +X"
+QTNETWORK_IUSE="brotli gssapi libproxy sctp +ssl vnc"
+QTSQL_IUSE="freetds mysql oci8 odbc postgres +sqlite"
+IUSE+=" ${QTGUI_IUSE} ${QTNETWORK_IUSE} ${QTSQL_IUSE} cups gtk icu systemd +udev"
+# QtPrintSupport = QtGui + QtWidgets enabled.
+# ibus = xkbcommon + dbus, and xkbcommon needs either libinput or X
+REQUIRED_USE+="
+	$(printf '%s? ( gui ) ' ${QTGUI_IUSE//+/})
+	$(printf '%s? ( network ) ' ${QTNETWORK_IUSE//+/})
+	$(printf '%s? ( sql ) ' ${QTSQL_IUSE//+/})
+	accessibility? ( dbus X )
+	cups? ( gui widgets )
+	eglfs? ( egl )
+	gtk? ( widgets )
+	gui? ( || ( eglfs X ) || ( libinput X ) )
+	libinput? ( udev )
+	sql? ( || ( freetds mysql oci8 odbc postgres sqlite ) )
+	vnc? ( gui )
+	X? ( gles2-only? ( egl ) )
+"
+
+# TODO:
+# qtimageformats: mng not done yet, qtimageformats.git upstream commit 9443239c
+# qtnetwork: connman, networkmanager
+DEPEND="
+	app-crypt/libb2
+	dev-libs/double-conversion:=
+	dev-libs/glib:2
+	dev-libs/libpcre2:=[pcre16,unicode]
+	dev-util/gtk-update-icon-cache
+	media-libs/fontconfig
+	>=media-libs/freetype-2.6.1:2
+	>=media-libs/harfbuzz-1.6.0:=
+	media-libs/tiff:=
+	>=sys-apps/dbus-1.4.20
+	sys-libs/zlib:=
+	brotli? ( app-arch/brotli:= )
+	evdev? ( sys-libs/mtdev )
+	freetds? ( dev-db/freetds )
+	gles2-only? ( media-libs/libglvnd )
+	!gles2-only? ( media-libs/libglvnd[X] )
+	gssapi? ( virtual/krb5 )
+	gtk? (
+		x11-libs/gtk+:3
+		x11-libs/libX11
+		x11-libs/pango
+	)
+	gui? ( media-libs/libpng:= )
+	icu? ( dev-libs/icu:= )
+	!icu? ( virtual/libiconv )
+	jpeg? ( media-libs/libjpeg-turbo:= )
+	libinput? (
+		dev-libs/libinput:=
+		>=x11-libs/libxkbcommon-0.5.0
+	)
+	libproxy? ( net-libs/libproxy )
+	mysql? ( dev-db/mysql-connector-c:= )
+	oci8? ( dev-db/oracle-instantclient:=[sdk] )
+	odbc? ( dev-db/unixODBC )
+	postgres? ( dev-db/postgresql:* )
+	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+	sqlite? ( dev-db/sqlite:3 )
+	ssl? ( dev-libs/openssl:= )
+	systemd? ( sys-apps/systemd:= )
+	tslib? ( >=x11-libs/tslib-1.21 )
+	udev? ( virtual/libudev:= )
+	vulkan? ( dev-util/vulkan-headers )
+	X? (
+		x11-libs/libdrm
+		x11-libs/libICE
+		x11-libs/libSM
+		x11-libs/libX11
+		>=x11-libs/libxcb-1.12:=
+		>=x11-libs/libxkbcommon-0.5.0[X]
+		x11-libs/xcb-util-image
+		x11-libs/xcb-util-keysyms
+		x11-libs/xcb-util-renderutil
+		x11-libs/xcb-util-wm
+	)
+	zstd? ( app-arch/zstd:= )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.4.2-libressl.patch # from OpenBSD ports, not upstreamable
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DINSTALL_ARCHDATADIR=${QT6_ARCHDATADIR}
+		-DINSTALL_BINDIR=${QT6_BINDIR}
+		-DINSTALL_DATADIR=${QT6_DATADIR}
+		-DINSTALL_DOCDIR=${QT6_DOCDIR}
+		-DINSTALL_EXAMPLESDIR=${QT6_EXAMPLESDIR}
+		-DINSTALL_INCLUDEDIR=${QT6_HEADERDIR}
+		-DINSTALL_LIBDIR=${QT6_LIBDIR}
+		-DINSTALL_LIBEXECDIR=${QT6_LIBEXECDIR}
+		-DINSTALL_MKSPECSDIR=${QT6_ARCHDATADIR}/mkspecs
+		-DINSTALL_PLUGINSDIR=${QT6_PLUGINDIR}
+		-DINSTALL_QMLDIR=${QT6_QMLDIR}
+		-DINSTALL_SYSCONFDIR=${QT6_SYSCONFDIR}
+		-DINSTALL_TRANSLATIONSDIR=${QT6_TRANSLATIONDIR}
+		-DQT_FEATURE_androiddeployqt=OFF
+		$(qt_feature concurrent)
+		$(qt_feature dbus)
+		$(qt_feature gui)
+		$(qt_feature gui testlib)
+		$(qt_feature icu)
+		$(qt_feature network)
+		$(qt_feature sql)
+		$(qt_feature systemd journald)
+		$(qt_feature udev libudev)
+		$(qt_feature xml)
+		$(qt_feature zstd)
+	)
+	use gui && mycmakeargs+=(
+		$(qt_feature accessibility accessibility_atspi_bridge)
+		$(qt_feature egl)
+		$(qt_feature eglfs eglfs_egldevice)
+		$(qt_feature eglfs eglfs_gbm)
+		$(qt_feature evdev)
+		$(qt_feature evdev mtdev)
+		-DQT_FEATURE_gif=ON
+		$(qt_feature jpeg)
+		$(qt_feature opengl)
+		$(qt_feature gles2-only opengles2)
+		$(qt_feature libinput)
+		$(qt_feature tslib)
+		$(qt_feature tuio tuiotouch)
+		$(qt_feature vulkan)
+		$(qt_feature widgets)
+		$(qt_feature X xcb)
+		$(qt_feature X xcb_xlib)
+	)
+	use widgets && mycmakeargs+=(
+		$(qt_feature cups)
+		$(qt_feature gtk gtk3)
+	)
+	if use libinput || use X; then
+		mycmakeargs+=( -DQT_FEATURE_xkbcommon=ON )
+	fi
+	use network && mycmakeargs+=(
+		$(qt_feature brotli)
+		-DQT_FEATURE_dtls=OFF
+		$(qt_feature gssapi)
+		$(qt_feature libproxy)
+		$(qt_feature sctp)
+		$(qt_feature ssl openssl_linked)
+		$(qt_feature vnc)
+	)
+	use sql && mycmakeargs+=(
+		$(qt_feature freetds sql_tds)
+		$(qt_feature mysql sql_mysql)
+		$(qt_feature oci8 sql_oci)
+		$(qt_feature odbc sql_odbc)
+		$(qt_feature postgres sql_psql)
+		$(qt_feature sqlite sql_sqlite)
+		$(qt_feature sqlite system_sqlite)
+	)
+
+	qt6-build_src_configure
+}
+
+src_install() {
+	qt6-build_src_install
+
+	# https://bugs.gentoo.org/863395
+	dosym ../$(get_libdir)/qt6/bin/qmake /usr/bin/qmake6
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-06-08 18:29 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2023-06-08 18:29 UTC (permalink / raw
  To: gentoo-commits

commit:     7ec6da79c2bf3f753580a6b311fc1d22fae8fa9e
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu Jun  8 18:21:07 2023 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Thu Jun  8 18:28:46 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=7ec6da79

dev-qt/qtbase: add 6.5.0-r3

Signed-off-by: orbea <orbea <AT> riseup.net>

 .../qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch | 101 +++++++++++++++++++++
 ...base-6.5.0-r2.ebuild => qtbase-6.5.0-r3.ebuild} |   1 +
 2 files changed, 102 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch b/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch
new file mode 100644
index 0000000..c982cce
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch
@@ -0,0 +1,101 @@
+From a2dc11b37fd71f785c342c40549f54edfdd1a6f8 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Thu, 11 May 2023 21:40:15 -0700
+Subject: [PATCH] QDnsLookup/Unix: make sure we don't overflow the buffer
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+The DNS Records are variable length and encode their size in 16 bits
+before the Record Data (RDATA). Ensure that both the RDATA and the
+Record header fields before it fall inside the buffer we have.
+
+Additionally reject any replies containing more than one query records.
+
+[ChangeLog][QtNetwork][QDnsLookup] Fixed a bug that could cause a buffer
+overflow in Unix systems while parsing corrupt, malicious, or truncated
+replies.
+
+Pick-to: 5.15 6.2 6.5.1
+Change-Id: I3e3bfef633af4130a03afffd175e4b9547654b95
+Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
+Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
+(cherry picked from commit 7dba2c87619d558a61a30eb30cc1d9c3fe6df94c)
+Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
+---
+ src/network/kernel/qdnslookup_unix.cpp | 31 +++++++++++++++++++++++++------
+ 1 file changed, 25 insertions(+), 6 deletions(-)
+
+diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
+index 8db79028f775..ad7bb51f67a5 100644
+--- a/src/network/kernel/qdnslookup_unix.cpp
++++ b/src/network/kernel/qdnslookup_unix.cpp
+@@ -193,7 +193,6 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
+     // responseLength in case of error, we still can extract the
+     // exact error code from the response.
+     HEADER *header = (HEADER*)response;
+-    const int answerCount = ntohs(header->ancount);
+     switch (header->rcode) {
+     case NOERROR:
+         break;
+@@ -227,18 +226,31 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
+         return;
+     }
+ 
+-    // Skip the query host, type (2 bytes) and class (2 bytes).
+     char host[PACKETSZ], answer[PACKETSZ];
+     unsigned char *p = response + sizeof(HEADER);
+-    int status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
+-    if (status < 0) {
++    int status;
++
++    if (ntohs(header->qdcount) == 1) {
++        // Skip the query host, type (2 bytes) and class (2 bytes).
++        status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
++        if (status < 0) {
++            reply->error = QDnsLookup::InvalidReplyError;
++            reply->errorString = tr("Could not expand domain name");
++            return;
++        }
++        if ((p - response) + status + 4 >= responseLength)
++            header->qdcount = 0xffff;   // invalid reply below
++        else
++            p += status + 4;
++    }
++    if (ntohs(header->qdcount) > 1) {
+         reply->error = QDnsLookup::InvalidReplyError;
+-        reply->errorString = tr("Could not expand domain name");
++        reply->errorString = tr("Invalid reply received");
+         return;
+     }
+-    p += status + 4;
+ 
+     // Extract results.
++    const int answerCount = ntohs(header->ancount);
+     int answerIndex = 0;
+     while ((p < response + responseLength) && (answerIndex < answerCount)) {
+         status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
+@@ -250,6 +262,11 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
+         const QString name = QUrl::fromAce(host);
+ 
+         p += status;
++
++        if ((p - response) + 10 > responseLength) {
++            // probably just a truncated reply, return what we have
++            return;
++        }
+         const quint16 type = (p[0] << 8) | p[1];
+         p += 2; // RR type
+         p += 2; // RR class
+@@ -257,6 +274,8 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
+         p += 4;
+         const quint16 size = (p[0] << 8) | p[1];
+         p += 2;
++        if ((p - response) + size > responseLength)
++            return;             // truncated
+ 
+         if (type == QDnsLookup::A) {
+             if (size != 4) {
+-- 
+2.16.3
+

diff --git a/dev-qt/qtbase/qtbase-6.5.0-r2.ebuild b/dev-qt/qtbase/qtbase-6.5.0-r3.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.5.0-r2.ebuild
rename to dev-qt/qtbase/qtbase-6.5.0-r3.ebuild
index 08f45a6..8f12328 100644
--- a/dev-qt/qtbase/qtbase-6.5.0-r2.ebuild
+++ b/dev-qt/qtbase/qtbase-6.5.0-r3.ebuild
@@ -107,6 +107,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-6.5.0-libressl.patch"
 	"${FILESDIR}/${PN}-6.5.0-setActiveWindow-deprecated-version.patch"
 	"${FILESDIR}/${PN}-6.5.0-CVE-2023-32762.patch"
+	"${FILESDIR}/${PN}-6.5.0-CVE-2023-33285.patch"
 )
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-06-13  3:27 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2023-06-13  3:27 UTC (permalink / raw
  To: gentoo-commits

commit:     4168c2e8b862c51c9ddb9dd52d48ced57ba9e310
Author:     Anna “CyberTailor” <cyber <AT> sysrq <DOT> in>
AuthorDate: Sun Jun 11 08:40:06 2023 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Jun 13 03:25:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=4168c2e8

dev-qt/qtbase: drop 6.5.0, add 6.5.1

Signed-off-by: Anna “CyberTailor” <cyber <AT> sysrq.in>
Closes: https://github.com/gentoo/libressl/pull/531
Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-qt/qtbase/Manifest                             |  2 +-
 .../qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch | 54 ----------------------
 ...-6.5.0-setActiveWindow-deprecated-version.patch | 35 --------------
 .../qtbase/files/qtbase-6.5.1-CVE-2023-34410.patch | 54 ++++++++++++++++++++++
 ...base-6.5.0-r3.ebuild => qtbase-6.5.1-r1.ebuild} |  7 ++-
 5 files changed, 58 insertions(+), 94 deletions(-)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index 6b955e5..3c5bf4d 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1 +1 @@
-DIST qtbase-everywhere-src-6.5.0.tar.xz 48020636 BLAKE2B 234000eeb6e1b57a1c7561613bf437453fc2db0d23d5ddd61c38961311a7de5263c086864554aff7a0bc1e5a406af78ef8342eed3c8a5f48b9237912614f380b SHA512 29f70b9a9650afdd8e34703a7a8191feab4c3a25d0bc3a41010ea842389335b24e2685721fdb4a03653475ebd9bf8a8e4f4a77bf5d64b1289590b5ca0e4623f3
+DIST qtbase-everywhere-src-6.5.1.tar.xz 48287392 BLAKE2B 47872492f21a936d980891c28df61591380bc236adc66b57a90fbb87dd292cdeb3c632fb1159231ba40142d25e02944e4c5e8568153f1286e0a1abc8c5b26699 SHA512 7f7b20bbc25cda65266d6067cdd68e3e077636988d67dbf5783f79a61186135fb3a36d57ac72cfe4501012035b630ab1f5849148e4817726d4f459fa1937e91a

diff --git a/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch b/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch
deleted file mode 100644
index 3574706..0000000
--- a/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From eae7c36d681acfb82572b56e24bbb2cd42242e57 Mon Sep 17 00:00:00 2001
-From: =?utf8?q?M=C3=A5rten=20Nordheim?= <marten.nordheim@qt.io>
-Date: Fri, 5 May 2023 11:07:26 +0200
-Subject: [PATCH] Hsts: match header names case insensitively
-
-Header field names are always considered to be case-insensitive.
-
-Fixes: QTBUG-113392
-Change-Id: Ifb4def4bb7f2ac070416cdc76581a769f1e52b43
-Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-(cherry picked from commit 1b736a815be0222f4b24289cf17575fc15707305)
-Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
----
- src/network/access/qhsts.cpp                 | 4 ++--
- tests/auto/network/access/hsts/tst_qhsts.cpp | 6 ++++++
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/network/access/qhsts.cpp b/src/network/access/qhsts.cpp
-index 39905f354807..82deede17298 100644
---- a/src/network/access/qhsts.cpp
-+++ b/src/network/access/qhsts.cpp
-@@ -327,8 +327,8 @@ quoted-pair    = "\" CHAR
- bool QHstsHeaderParser::parse(const QList<QPair<QByteArray, QByteArray>> &headers)
- {
-     for (const auto &h : headers) {
--        // We use '==' since header name was already 'trimmed' for us:
--        if (h.first == "Strict-Transport-Security") {
-+        // We compare directly because header name was already 'trimmed' for us:
-+        if (h.first.compare("Strict-Transport-Security", Qt::CaseInsensitive) == 0) {
-             header = h.second;
-             // RFC6797, 8.1:
-             //
-diff --git a/tests/auto/network/access/hsts/tst_qhsts.cpp b/tests/auto/network/access/hsts/tst_qhsts.cpp
-index 252f5e8f5792..97a2d2889e57 100644
---- a/tests/auto/network/access/hsts/tst_qhsts.cpp
-+++ b/tests/auto/network/access/hsts/tst_qhsts.cpp
-@@ -216,6 +216,12 @@ void tst_QHsts::testSTSHeaderParser()
-     QVERIFY(parser.expirationDate() > QDateTime::currentDateTimeUtc());
-     QVERIFY(parser.includeSubDomains());
- 
-+    list.pop_back();
-+    list << Header("strict-transport-security", "includeSubDomains;max-age=1000");
-+    QVERIFY(parser.parse(list));
-+    QVERIFY(parser.expirationDate() > QDateTime::currentDateTimeUtc());
-+    QVERIFY(parser.includeSubDomains());
-+
-     list.pop_back();
-     // Invalid (includeSubDomains twice):
-     list << Header("Strict-Transport-Security", "max-age = 1000 ; includeSubDomains;includeSubDomains");
--- 
-2.16.3
-

diff --git a/dev-qt/qtbase/files/qtbase-6.5.0-setActiveWindow-deprecated-version.patch b/dev-qt/qtbase/files/qtbase-6.5.0-setActiveWindow-deprecated-version.patch
deleted file mode 100644
index 0ba60e0..0000000
--- a/dev-qt/qtbase/files/qtbase-6.5.0-setActiveWindow-deprecated-version.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream commit: https://code.qt.io/cgit/qt/qtbase.git/commit/?h=6.5&id=bbb330c95fd
-
-From bbb330c95fdf6161b23227cb08cec58cca31e465 Mon Sep 17 00:00:00 2001
-From: Nicolas Fella <nicolas.fella@kdab.com>
-Date: Tue, 14 Mar 2023 19:14:41 +0100
-Subject: QApplication: Fix DEPRECATED_VERSION for setActiveWindow
-
-It's not deprecated in 6.4, only 6.5
-
-Change-Id: I86a09b9ce5a7f4d8b1d80a6e67218dfe00f93844
-Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-(cherry picked from commit 99975ec07feb6b1a9f6be9e0d392a35e40f9550a)
-Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
----
- src/widgets/kernel/qapplication.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
-index c4c73d4cf8..fd698fb69f 100644
---- a/src/widgets/kernel/qapplication.h
-+++ b/src/widgets/kernel/qapplication.h
-@@ -79,8 +79,8 @@ public:
- 
-     static QWidget *activeWindow();
- 
--#if QT_DEPRECATED_SINCE(6,4)
--    QT_DEPRECATED_VERSION_X_6_4("Use QWidget::activateWindow() instead.")
-+#if QT_DEPRECATED_SINCE(6, 5)
-+    QT_DEPRECATED_VERSION_X_6_5("Use QWidget::activateWindow() instead.")
-     static void setActiveWindow(QWidget* act);
- #endif
- 
--- 
-cgit v1.2.3
-

diff --git a/dev-qt/qtbase/files/qtbase-6.5.1-CVE-2023-34410.patch b/dev-qt/qtbase/files/qtbase-6.5.1-CVE-2023-34410.patch
new file mode 100644
index 0000000..6f12647
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.5.1-CVE-2023-34410.patch
@@ -0,0 +1,54 @@
+From: https://lists.qt-project.org/pipermail/development/2023-June/044031.html
+
+--- a/src/plugins/tls/schannel/qtls_schannel.cpp
++++ b/src/plugins/tls/schannel/qtls_schannel.cpp
+@@ -2106,6 +2106,27 @@ bool TlsCryptographSchannel::verifyCertContext(CERT_CONTEXT *certContext)
+         verifyDepth = DWORD(q->peerVerifyDepth());
+
+     const auto &caCertificates = q->sslConfiguration().caCertificates();
++
++    if (!rootCertOnDemandLoadingAllowed()
++            && !(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_PARTIAL_CHAIN)
++            && (q->peerVerifyMode() == QSslSocket::VerifyPeer
++                    || (isClient && q->peerVerifyMode() == QSslSocket::AutoVerifyPeer))) {
++        // When verifying a peer Windows "helpfully" builds a chain that
++        // may include roots from the system store. But we don't want that if
++        // the user has set their own CA certificates.
++        // Since Windows claims this is not a partial chain the root is included
++        // and we have to check that it is one of our configured CAs.
++        CERT_CHAIN_ELEMENT *element = chain->rgpElement[chain->cElement - 1];
++        QSslCertificate certificate = getCertificateFromChainElement(element);
++        if (!caCertificates.contains(certificate)) {
++            auto error = QSslError(QSslError::CertificateUntrusted, certificate);
++            sslErrors += error;
++            emit q->peerVerifyError(error);
++            if (q->state() != QAbstractSocket::ConnectedState)
++                return false;
++        }
++    }
++
+     QList<QSslCertificate> peerCertificateChain;
+     for (DWORD i = 0; i < verifyDepth; i++) {
+         CERT_CHAIN_ELEMENT *element = chain->rgpElement[i];
+
+--- a/src/network/ssl/qsslsocket.cpp
++++ b/src/network/ssl/qsslsocket.cpp
+@@ -1973,6 +1973,10 @@ QSslSocketPrivate::QSslSocketPrivate()
+     , flushTriggered(false)
+ {
+     QSslConfigurationPrivate::deepCopyDefaultConfiguration(&configuration);
++    // If the global configuration doesn't allow root certificates to be loaded
++    // on demand then we have to disable it for this socket as well.
++    if (!configuration.allowRootCertOnDemandLoading)
++        allowRootCertOnDemandLoading = false;
+
+     const auto *tlsBackend = tlsBackendInUse();
+     if (!tlsBackend) {
+@@ -2281,6 +2285,7 @@ void QSslConfigurationPrivate::deepCopyDefaultConfiguration(QSslConfigurationPri
+     ptr->sessionProtocol = global->sessionProtocol;
+     ptr->ciphers = global->ciphers;
+     ptr->caCertificates = global->caCertificates;
++    ptr->allowRootCertOnDemandLoading = global->allowRootCertOnDemandLoading;
+     ptr->protocol = global->protocol;
+     ptr->peerVerifyMode = global->peerVerifyMode;
+     ptr->peerVerifyDepth = global->peerVerifyDepth;

diff --git a/dev-qt/qtbase/qtbase-6.5.0-r3.ebuild b/dev-qt/qtbase/qtbase-6.5.1-r1.ebuild
similarity index 96%
rename from dev-qt/qtbase/qtbase-6.5.0-r3.ebuild
rename to dev-qt/qtbase/qtbase-6.5.1-r1.ebuild
index 8f12328..fde9d03 100644
--- a/dev-qt/qtbase/qtbase-6.5.0-r3.ebuild
+++ b/dev-qt/qtbase/qtbase-6.5.1-r1.ebuild
@@ -22,7 +22,7 @@ REQUIRED_USE="
 QTGUI_IUSE="accessibility egl eglfs evdev gles2-only +jpeg +libinput tslib tuio vulkan +X"
 QTNETWORK_IUSE="brotli gssapi libproxy sctp +ssl vnc"
 QTSQL_IUSE="freetds mysql oci8 odbc postgres +sqlite"
-IUSE+=" ${QTGUI_IUSE} ${QTNETWORK_IUSE} ${QTSQL_IUSE} cups gtk icu systemd +udev"
+IUSE+=" ${QTGUI_IUSE} ${QTNETWORK_IUSE} ${QTSQL_IUSE} cups gtk icu systemd +udev wayland"
 # QtPrintSupport = QtGui + QtWidgets enabled.
 # ibus = xkbcommon + dbus, and xkbcommon needs either libinput or X
 REQUIRED_USE+="
@@ -102,12 +102,11 @@ DEPEND="
 	zstd? ( app-arch/zstd:= )
 "
 RDEPEND="${DEPEND}"
+PDEPEND="wayland? ( =dev-qt/qtwayland-${PV}* )"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-6.5.0-libressl.patch"
-	"${FILESDIR}/${PN}-6.5.0-setActiveWindow-deprecated-version.patch"
-	"${FILESDIR}/${PN}-6.5.0-CVE-2023-32762.patch"
-	"${FILESDIR}/${PN}-6.5.0-CVE-2023-33285.patch"
+	"${FILESDIR}/${PN}-6.5.1-CVE-2023-34410.patch"
 )
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-10-22 16:54 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2023-10-22 16:54 UTC (permalink / raw
  To: gentoo-commits

commit:     7b91024b394a00329123d26ae4aebcea16d073eb
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Oct 22 16:51:48 2023 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Oct 22 16:52:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=7b91024b

dev-qt/qtbase: add 6.5.3-r1, 6.6.0-r1

Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-qt/qtbase/Manifest                             |   1 +
 .../qtbase-6.5.3-forkfd-childstack-size.patch      |  27 ++
 .../qtbase/files/qtbase-6.5.3-xkbcommon160.patch   |  18 +
 dev-qt/qtbase/files/qtbase-6.6.0-libressl.patch    | 446 +++++++++++++++++++++
 ...{qtbase-6.5.3.ebuild => qtbase-6.5.3-r1.ebuild} |   9 +-
 ...{qtbase-6.5.3.ebuild => qtbase-6.6.0-r1.ebuild} |  15 +-
 6 files changed, 506 insertions(+), 10 deletions(-)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index 4622d92..b6ec5a5 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1,2 +1,3 @@
 DIST qtbase-everywhere-src-6.5.2.tar.xz 48410716 BLAKE2B 578c69ede6f45a8b21cba0a24674d5d8801722503d13ab9578b06b2446ce15e6a84bcdbd0c5d2c9aa868ec70862f0845406c959ed79b695f82bb398ecf299c63 SHA512 8d97029aae5b73a3e03624c9a8495dbf2fe54a4f5e992071c06f3d93935e64c80f2121b33eeb60a92d96ceb288cb25d74906a5bf47b45bb018d859d4a2d13f20
 DIST qtbase-everywhere-src-6.5.3.tar.xz 47142456 BLAKE2B 5b4c774b7199563dc7f2aebf9b2b531d851ee49bc038212f4970eeb43a17c364710432708f82a518eee6692ab123d78b642c234d9548d5b553f689a43aa05ee6 SHA512 31c6c01d466f1e01f18d6dcee593360c08ee83ad0a6be495a8eba023faad628cf07ce7285426fabfd247db306319e9a64da329682c99a712a282e32f7493cdb9
+DIST qtbase-everywhere-src-6.6.0.tar.xz 48350308 BLAKE2B 719e265dfafb4fd95f972a317acb95e2d83f8d62175c28ab97837c635435bdcd79bdca113362dea2f04dab799d4749e23056ddb9583908ee20ab23cedeca19b7 SHA512 4e85acefeddc0a3cd6ba615b4768f435c4e237a605172153a1777a10285dab83d9cf220c18ce6d723d051b8b432f3e92be94925b54c2eb972c2c1d9ace849e17

diff --git a/dev-qt/qtbase/files/qtbase-6.5.3-forkfd-childstack-size.patch b/dev-qt/qtbase/files/qtbase-6.5.3-forkfd-childstack-size.patch
new file mode 100644
index 0000000..34cbec6
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.5.3-forkfd-childstack-size.patch
@@ -0,0 +1,27 @@
+Avoid crash that happens for some users in qsb, qmake, and
+potentially other Qt tools when ran under sandbox leading
+to build failures for qtdeclarative and other packages.
+
+Note that this is the initial (simple) version of the patch
+to ensure no issues, a more proper fix should land upstream
+eventually.
+
+https://bugs.gentoo.org/908809
+https://bugs.gentoo.org/908816
+https://bugs.gentoo.org/913493
+https://bugs.gentoo.org/915695
+https://codereview.qt-project.org/c/qt/qtbase/+/513140
+From: Huang Rui <vowstar@users.noreply.github.com>
+Date: Fri, 20 Oct 2023 10:16:01 +0800
+Subject: [PATCH] folkfd_linux,c: set stack size to 8192
+--- a/src/3rdparty/forkfd/forkfd_linux.c
++++ b/src/3rdparty/forkfd/forkfd_linux.c
+@@ -157,7 +157,7 @@ static int system_forkfd_pidfd_set_flags(int pidfd, int flags)
+ 
+ int system_vforkfd(int flags, pid_t *ppid, int (*childFn)(void *), void *token, int *system)
+ {
+-    __attribute__((aligned(64))) char childStack[4096];
++    __attribute__((aligned(64))) char childStack[8192];
+     pid_t pid;
+     int pidfd;
+     unsigned long cloneflags = CLONE_PIDFD | CLONE_VFORK | CLONE_VM | SIGCHLD;

diff --git a/dev-qt/qtbase/files/qtbase-6.5.3-xkbcommon160.patch b/dev-qt/qtbase/files/qtbase-6.5.3-xkbcommon160.patch
new file mode 100644
index 0000000..bc0e079
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.5.3-xkbcommon160.patch
@@ -0,0 +1,18 @@
+These were removed in libxkbcommon-1.6.0[1] and were apparently
+unnecesary. Usage results in build failure.
+
+Just a quick fix while waiting for what [2] comes up with.
+
+[1] https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/70
+[2] https://bugreports.qt.io/browse/QTBUG-117950
+--- a/src/gui/platform/unix/qxkbcommon.cpp
++++ b/src/gui/platform/unix/qxkbcommon.cpp
+@@ -242,4 +242,4 @@
+-        Xkb2Qt<XKB_KEY_dead_lowline,            Qt::Key_Dead_Lowline>,
+-        Xkb2Qt<XKB_KEY_dead_aboveverticalline,  Qt::Key_Dead_Aboveverticalline>,
+-        Xkb2Qt<XKB_KEY_dead_belowverticalline,  Qt::Key_Dead_Belowverticalline>,
+-        Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>,
++        Xkb2Qt<0xfe90,                          Qt::Key_Dead_Lowline>,
++        Xkb2Qt<0xfe91,                          Qt::Key_Dead_Aboveverticalline>,
++        Xkb2Qt<0xfe92,                          Qt::Key_Dead_Belowverticalline>,
++        Xkb2Qt<0xfe93,                          Qt::Key_Dead_Longsolidusoverlay>,

diff --git a/dev-qt/qtbase/files/qtbase-6.6.0-libressl.patch b/dev-qt/qtbase/files/qtbase-6.6.0-libressl.patch
new file mode 100644
index 0000000..6c7f2c5
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.6.0-libressl.patch
@@ -0,0 +1,446 @@
+Fixes Qt6 build on LibreSSL.
+
+http://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_network_ssl_qsslsocket_openssl_symbols_cpp?rev=1.8
+http://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_plugins_tls_openssl_qopenssl_p_h?rev=1.2
+http://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_plugins_tls_openssl_qsslcontext_openssl_cpp?rev=1.2
+http://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_plugins_tls_openssl_qsslsocket_openssl_symbols_p_h?rev=1.2
+http://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_plugins_tls_openssl_qtls_openssl_cpp?rev=1.2
+http://cvsweb.openbsd.org/ports/x11/qt6/qtbase/patches/patch-src_plugins_tls_openssl_qx509_openssl_cpp?rev=1.3
+
+--- a/src/plugins/tls/openssl/qopenssl_p.h
++++ b/src/plugins/tls/openssl/qopenssl_p.h
+@@ -70,6 +70,13 @@
+ 
+ QT_BEGIN_NAMESPACE
+ 
++#ifndef DTLS_ANY_VERSION
++#define DTLS_ANY_VERSION 0x1FFFF
++#endif
++#ifndef TLS_ANY_VERSION
++#define TLS_ANY_VERSION 0x10000
++#endif
++
+ struct QSslErrorEntry {
+     int code = 0;
+     int depth = 0;
+--- a/src/plugins/tls/openssl/qsslcontext_openssl.cpp
++++ b/src/plugins/tls/openssl/qsslcontext_openssl.cpp
+@@ -49,9 +49,9 @@ extern "C" int q_verify_cookie_callback(SSL *ssl, const unsigned char *cookie,
+ }
+ #endif // dtls
+ 
+-#ifdef TLS1_3_VERSION
++#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
+ extern "C" int q_ssl_sess_set_new_cb(SSL *context, SSL_SESSION *session);
+-#endif // TLS1_3_VERSION
++#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBE
+ 
+ static inline QString msgErrorSettingBackendConfig(const QString &why)
+ {
+@@ -370,9 +370,11 @@ QT_WARNING_POP
+         return;
+     }
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+     // A nasty hacked OpenSSL using a level that will make our auto-tests fail:
+     if (q_SSL_CTX_get_security_level(sslContext->ctx) > 1 && *forceSecurityLevel())
+         q_SSL_CTX_set_security_level(sslContext->ctx, 1);
++#endif // LIBRESSL_VERSION_NUMBER
+ 
+     const long anyVersion =
+ #if QT_CONFIG(dtls)
+@@ -663,14 +665,14 @@ QT_WARNING_POP
+         q_SSL_CTX_set_verify(sslContext->ctx, verificationMode, verificationCallback);
+     }
+ 
+-#ifdef TLS1_3_VERSION
++#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
+     // NewSessionTicket callback:
+     if (mode == QSslSocket::SslClientMode && !isDtls) {
+         q_SSL_CTX_sess_set_new_cb(sslContext->ctx, q_ssl_sess_set_new_cb);
+         q_SSL_CTX_set_session_cache_mode(sslContext->ctx, SSL_SESS_CACHE_CLIENT);
+     }
+ 
+-#endif // TLS1_3_VERSION
++#endif // TLS1_3_VERSION && LIBRESSL_VERSION_NUMBER
+ 
+ #if QT_CONFIG(dtls)
+     // DTLS cookies:
+@@ -758,6 +760,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
+     }
+ #endif // ocsp
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+     QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
+     if (cctx) {
+         q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
+@@ -804,7 +807,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
+             sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
+             sslContext->errorCode = QSslError::UnspecifiedError;
+         }
+-    } else {
++    } else
++#endif // LIBRESSL_VERSION_NUMBER
++    {
+         sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_CTX_new() failed"));
+         sslContext->errorCode = QSslError::UnspecifiedError;
+     }
+--- a/src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp
++++ b/src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp
+@@ -112,23 +112,37 @@ DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return nullptr, return
+ DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return)
+ DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
+ DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return)
++#ifdef OPENSSL_NO_DEPRECATED_3_0
++DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return)
+ DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return)
+ DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return)
+ DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return)
++#endif // OPENSSL_NO_DEPRECATED_3_0
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
+ DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
+ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
+ DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
+ DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
+ DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
++#else
++DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
++DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
++DEFINEFUNC(_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
++DEFINEFUNC2(void, sk_push, _STACK *a, a, void *b, b, return, DUMMYARG)
++DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
++DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return nullptr, return)
++#endif // LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
+ DEFINEFUNC2(qssloptions, SSL_CTX_set_options, SSL_CTX *ctx, ctx, qssloptions op, op, return 0, return)
+ using info_callback = void (*) (const SSL *ssl, int type, int val);
+ DEFINEFUNC2(void, SSL_set_info_callback, SSL *ssl, ssl, info_callback cb, cb, return, return)
+ DEFINEFUNC(const char *, SSL_alert_type_string, int value, value, return nullptr, return)
+ DEFINEFUNC(const char *, SSL_alert_desc_string_long, int value, value, return nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return)
+ DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return)
++#endif // LIBRESSL_VERSION_NUMBER
+ #ifdef TLS1_3_VERSION
+ DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
+ DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
+@@ -154,7 +168,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_ver
+ DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return)
+ DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return)
+ DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC3(void, CRYPTO_free, void *str, str, const char *file, file, int line, line, return, DUMMYARG)
++#else
++DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
++#endif
+ DEFINEFUNC3(int, CRYPTO_memcmp, const void * in_a, in_a, const void * in_b, in_b, size_t len, len, return 1, return);
+ DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
+ DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return)
+@@ -193,7 +211,9 @@ DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING **piNameHash, piNameHash,
+             ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid,
+             return 0, return)
+ DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return)
++#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
+ DEFINEFUNC(const STACK_OF(X509) *, OCSP_resp_get0_certs, const OCSP_BASICRESP *bs, bs, return nullptr, return)
++#endif
+ DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return)
+ DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s,
+             int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return)
+@@ -214,7 +234,9 @@ DEFINEFUNC(long, ASN1_INTEGER_get, ASN1_INTEGER *a, a, return 0, return)
+ DEFINEFUNC2(int, ASN1_INTEGER_cmp, const ASN1_INTEGER *a, a, const ASN1_INTEGER *b, b, return 1, return)
+ DEFINEFUNC(int, ASN1_STRING_length, ASN1_STRING *a, a, return 0, return)
+ DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC2(int, ASN1_TIME_to_tm, const ASN1_TIME *s, s, struct tm *tm, tm, return 0, return)
++#endif
+ DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return)
+ DEFINEFUNC(int, BIO_free, BIO *a, a, return 0, return)
+ DEFINEFUNC2(BIO *, BIO_new_mem_buf, void *a, a, int b, b, return nullptr, return)
+@@ -289,12 +311,14 @@ DEFINEFUNC3(int, SSL_CTX_use_certificate_file, SSL_CTX *a, a, const char *b, b,
+ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -1, return)
+ DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return)
+ DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return nullptr, return)
++#ifndef LIBRESSL_VERSION_NUMBER
+ DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, return);
+ DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return ,return);
+ DEFINEFUNC2(void, SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX *a, a, SSL_CTX *b, b, return, return);
+ DEFINEFUNC2(unsigned int, SSL_CONF_CTX_set_flags, SSL_CONF_CTX *a, a, unsigned int b, b, return 0, return);
+ DEFINEFUNC(int, SSL_CONF_CTX_finish, SSL_CONF_CTX *a, a, return 0, return);
+ DEFINEFUNC3(int, SSL_CONF_cmd, SSL_CONF_CTX *a, a, const char *b, b, const char *c, c, return 0, return);
++#endif
+ DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
+ DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
+ DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
+@@ -853,9 +877,11 @@ bool q_resolveOpenSslSymbols()
+         RESOLVEFUNC(EVP_CIPHER_CTX_reset)
+         RESOLVEFUNC(AUTHORITY_INFO_ACCESS_free)
+         RESOLVEFUNC(EVP_PKEY_up_ref)
++#ifdef OPENSSL_NO_DEPRECATED_3_0
+         RESOLVEFUNC(EVP_PKEY_CTX_new)
+         RESOLVEFUNC(EVP_PKEY_param_check)
+         RESOLVEFUNC(EVP_PKEY_CTX_free)
++#endif // OPENSSL_NO_DEPRECATED_3_0
+         RESOLVEFUNC(OPENSSL_sk_new_null)
+         RESOLVEFUNC(OPENSSL_sk_push)
+         RESOLVEFUNC(OPENSSL_sk_free)
+@@ -949,7 +975,9 @@ bool q_resolveOpenSslSymbols()
+         RESOLVEFUNC(OCSP_check_validity)
+         RESOLVEFUNC(OCSP_cert_to_id)
+         RESOLVEFUNC(OCSP_id_get0_info)
+-        RESOLVEFUNC(OCSP_resp_get0_certs)
++#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
++     RESOLVEFUNC(OCSP_resp_get0_certs)
++#endif
+         RESOLVEFUNC(OCSP_basic_sign)
+         RESOLVEFUNC(OCSP_response_create)
+         RESOLVEFUNC(i2d_OCSP_RESPONSE)
+@@ -1044,12 +1072,14 @@ bool q_resolveOpenSslSymbols()
+         RESOLVEFUNC(SSL_CTX_use_PrivateKey)
+         RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
+         RESOLVEFUNC(SSL_CTX_get_cert_store);
++#ifndef LIBRESSL_VERSION_NUMBER
+         RESOLVEFUNC(SSL_CONF_CTX_new);
+         RESOLVEFUNC(SSL_CONF_CTX_free);
+         RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
+         RESOLVEFUNC(SSL_CONF_CTX_set_flags);
+         RESOLVEFUNC(SSL_CONF_CTX_finish);
+         RESOLVEFUNC(SSL_CONF_cmd);
++#endif
+         RESOLVEFUNC(SSL_accept)
+         RESOLVEFUNC(SSL_clear)
+         RESOLVEFUNC(SSL_connect)
+@@ -1109,7 +1139,9 @@ bool q_resolveOpenSslSymbols()
+         RESOLVEFUNC(RSA_free)
+ 
+         RESOLVEFUNC(DH_bits)
++#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
+         RESOLVEFUNC(DSA_bits)
++#endif
+         RESOLVEFUNC(RSA_bits)
+ 
+ #ifndef OPENSSL_NO_EC
+--- a/src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
++++ b/src/plugins/tls/openssl/qsslsocket_openssl_symbols_p.h
+@@ -46,6 +46,13 @@ QT_BEGIN_NAMESPACE
+ 
+ #define DUMMYARG
+ 
++#ifdef LIBRESSL_VERSION_NUMBER
++typedef _STACK STACK;
++typedef STACK OPENSSL_STACK;
++typedef void OPENSSL_INIT_SETTINGS;
++typedef int (*X509_STORE_CTX_verify_cb)(int ok,X509_STORE_CTX *ctx);
++#endif
++
+ #if !defined QT_LINKED_OPENSSL
+ // **************** Shared declarations ******************
+ // ret func(arg)
+@@ -203,15 +210,32 @@ const BIO_METHOD *q_BIO_s_mem();
+ void q_AUTHORITY_INFO_ACCESS_free(AUTHORITY_INFO_ACCESS *a);
+ int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
+ int q_EVP_PKEY_up_ref(EVP_PKEY *a);
++#ifdef OPENSSL_NO_DEPRECATED_3_0
+ EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
+ void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
++#endif // OPENSSL_NO_DEPRECATED_3_0
+ int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
++#ifndef LIBRESSL_VERSION_NUMBER
+ int q_OPENSSL_sk_num(OPENSSL_STACK *a);
+ void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
+ OPENSSL_STACK *q_OPENSSL_sk_new_null();
+ void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
+ void q_OPENSSL_sk_free(OPENSSL_STACK *a);
+ void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
++#else // LIBRESSL_VERSION_NUMBER
++int q_sk_num(STACK *a);
++#define q_OPENSSL_sk_num(a) q_sk_num(a)
++void q_sk_pop_free(STACK *a, void (*b)(void *));
++#define q_OPENSSL_sk_pop_free(a, b) q_sk_pop_free(a, b)
++STACK *q_sk_new_null();
++#define q_OPENSSL_sk_new_null() q_sk_new_null()
++void q_sk_push(STACK *st, void *data);
++#define q_OPENSSL_sk_push(st, data) q_sk_push(st, data)
++void q_sk_free(STACK *a);
++#define q_OPENSSL_sk_free q_sk_free
++void * q_sk_value(STACK *a, int b);
++#define q_OPENSSL_sk_value(a, b) q_sk_value(a, b)
++#endif // LIBRESSL_VERSION_NUMBER
+ int q_SSL_session_reused(SSL *a);
+ qssloptions q_SSL_CTX_set_options(SSL_CTX *ctx, qssloptions op);
+ int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+@@ -237,8 +261,14 @@ STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx);
+ # define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
+                                                        | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define q_SKM_sk_num(st) q_OPENSSL_sk_num((OPENSSL_STACK *)st)
+ #define q_SKM_sk_value(type, st,i) (type *)q_OPENSSL_sk_value((OPENSSL_STACK *)st, i)
++#else // LIBRESSL_VERSION_NUMBER
++#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
++#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
++#endif // LIBRESSL_VERSION_NUMBER
++
+ 
+ #define q_OPENSSL_add_all_algorithms_conf()  q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
+                                                                    | OPENSSL_INIT_ADD_ALL_DIGESTS \
+@@ -423,12 +453,14 @@ int q_SSL_CTX_use_certificate_file(SSL_CTX *a, const char *b, int c);
+ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
+ int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c);
+ X509_STORE *q_SSL_CTX_get_cert_store(const SSL_CTX *a);
++#ifndef LIBRESSL_VERSION_NUMBER
+ SSL_CONF_CTX *q_SSL_CONF_CTX_new();
+ void q_SSL_CONF_CTX_free(SSL_CONF_CTX *a);
+ void q_SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *a, SSL_CTX *b);
+ unsigned int q_SSL_CONF_CTX_set_flags(SSL_CONF_CTX *a, unsigned int b);
+ int q_SSL_CONF_CTX_finish(SSL_CONF_CTX *a);
+ int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c);
++#endif // LIBRESSL_VERSION_NUMBER
+ void q_SSL_free(SSL *a);
+ STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
+ const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
+@@ -536,14 +568,26 @@ void q_PKCS12_free(PKCS12 *pkcs12);
+ #define q_BIO_get_mem_data(b, pp) (int)q_BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp)
+ #define q_BIO_pending(b) (int)q_BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
+ #define q_SSL_CTX_set_mode(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num((st))
++#else
++#define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num(GENERAL_NAME, (st))
++#endif
+ #define q_sk_GENERAL_NAME_value(st, i) q_SKM_sk_value(GENERAL_NAME, (st), (i))
+ 
+ void q_GENERAL_NAME_free(GENERAL_NAME *a);
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define q_sk_X509_num(st) q_SKM_sk_num((st))
++#else
++#define q_sk_X509_num(st) q_SKM_sk_num(X509, (st))
++#endif
+ #define q_sk_X509_value(st, i) q_SKM_sk_value(X509, (st), (i))
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define q_sk_SSL_CIPHER_num(st) q_SKM_sk_num((st))
++#else
++#define q_sk_SSL_CIPHER_num(st)   q_SKM_sk_num(SSL_CIPHER, (st))
++#endif
+ #define q_sk_SSL_CIPHER_value(st, i) q_SKM_sk_value(SSL_CIPHER, (st), (i))
+ #define q_SSL_CTX_add_extra_chain_cert(ctx,x509) \
+         q_SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
+@@ -645,7 +689,11 @@ int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, ASN1_GENERALIZEDTIME *n
+ int q_OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash,
+                         ASN1_INTEGER **pserial, OCSP_CERTID *cid);
+ 
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3050000fL
++#define q_OCSP_resp_get0_certs(bs) ((bs)->certs)
++#else
+ const STACK_OF(X509) *q_OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
++#endif
+ OCSP_CERTID *q_OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);
+ void q_OCSP_CERTID_free(OCSP_CERTID *cid);
+ int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
+@@ -664,8 +712,13 @@ int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
+ 
+ void *q_CRYPTO_malloc(size_t num, const char *file, int line);
+ #define q_OPENSSL_malloc(num) q_CRYPTO_malloc(num, "", 0)
++#ifndef LIBRESSL_VERSION_NUMBER
+ void q_CRYPTO_free(void *str, const char *file, int line);
+ # define q_OPENSSL_free(addr) q_CRYPTO_free(addr, "", 0)
++#else
++void q_CRYPTO_free(void *a);
++# define q_OPENSSL_free(addr) q_CRYPTO_free(addr)
++#endif
+ int q_CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len);
+ 
+ void q_SSL_set_info_callback(SSL *ssl, void (*cb) (const SSL *ssl, int type, int val));
+@@ -729,7 +782,11 @@ int q_EVP_PKEY_set1_DH(EVP_PKEY *a, DH *b);
+ 
+ int q_DH_bits(DH *dh);
+ int q_RSA_bits(RSA *a);
++#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x3050000fL)
++#define q_DSA_bits(dsa) q_BN_num_bits((dsa)->p)
++#else
+ int q_DSA_bits(DSA *a);
++#endif
+ 
+ int q_EVP_PKEY_assign(EVP_PKEY *a, int b, void *r);
+ int q_EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
+--- a/src/plugins/tls/openssl/qtls_openssl.cpp
++++ b/src/plugins/tls/openssl/qtls_openssl.cpp
+@@ -1438,13 +1438,13 @@ bool TlsCryptographOpenSSL::initSslContext()
+     else if (mode == QSslSocket::SslServerMode)
+         q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x10101006L
++#if OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
+     // Set the client callback for TLSv1.3 PSK
+     if (mode == QSslSocket::SslClientMode
+         && QSslSocket::sslLibraryBuildVersionNumber() >= 0x10101006L) {
+         q_SSL_set_psk_use_session_callback(ssl, &q_ssl_psk_use_session_callback);
+     }
+-#endif // openssl version >= 0x10101006L
++#endif // OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #endif // OPENSSL_NO_PSK
+ 
+--- a/src/plugins/tls/openssl/qx509_openssl.cpp
++++ b/src/plugins/tls/openssl/qx509_openssl.cpp
+@@ -64,7 +64,12 @@ QMultiMap<QByteArray, QString> mapFromX509Name(X509_NAME *name)
+         unsigned char *data = nullptr;
+         int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
+         info.insert(name, QString::fromUtf8((char*)data, size));
+-        q_CRYPTO_free(data, nullptr, 0);
++#if QT_CONFIG(opensslv11) && !defined(LIBRESSL_VERSION_NUMBER)
++         q_CRYPTO_free(data, nullptr, 0);
++#else
++         q_CRYPTO_free(data);
++#endif
++
+     }
+ 
+     return info;
+@@ -75,11 +80,27 @@ QDateTime dateTimeFromASN1(const ASN1_TIME *aTime)
+     QDateTime result;
+     tm lTime;
+ 
++#ifdef LIBRESSL_VERSION_NUMBER
++    const char *data;
++    size_t len;
++    int type;
++
++    data = (const char*)ASN1_STRING_get0_data((const ASN1_STRING *)aTime);
++    len = ASN1_STRING_length(aTime);
++    type = ASN1_STRING_type(aTime);
++
++    if (ASN1_time_parse(data, len, &lTime, type) == type) {
++        QDate resDate(lTime.tm_year + 1900, lTime.tm_mon + 1, lTime.tm_mday);
++        QTime resTime(lTime.tm_hour, lTime.tm_min, lTime.tm_sec);
++        result = QDateTime(resDate, resTime, Qt::UTC);
++    }
++#else
+     if (q_ASN1_TIME_to_tm(aTime, &lTime)) {
+         QDate resDate(lTime.tm_year + 1900, lTime.tm_mon + 1, lTime.tm_mday);
+         QTime resTime(lTime.tm_hour, lTime.tm_min, lTime.tm_sec);
+         result = QDateTime(resDate, resTime, QTimeZone::UTC);
+     }
++#endif
+ 
+     return result;
+ }
+@@ -190,7 +211,7 @@ QVariant x509UnknownExtensionToValue(X509_EXTENSION *ext)
+         QVariantList list;
+         bool isMap = false;
+ 
+-        for (int j = 0; j < q_SKM_sk_num(val); j++) {
++        for (int j = 0; j < q_SKM_sk_num(CONF_VALUE, val); j++) {
+             CONF_VALUE *nval = q_SKM_sk_value(CONF_VALUE, val, j);
+             if (nval->name && nval->value) {
+                 isMap = true;
+@@ -286,7 +307,7 @@ QVariant x509ExtensionToValue(X509_EXTENSION *ext)
+             if (!info)
+                 return {};
+             QVariantMap result;
+-            for (int i=0; i < q_SKM_sk_num(info); i++) {
++            for (int i=0; i < q_SKM_sk_num(ACCESS_DESCRIPTION, info); i++) {
+                 ACCESS_DESCRIPTION *ad = q_SKM_sk_value(ACCESS_DESCRIPTION, info, i);
+ 
+                 GENERAL_NAME *name = ad->location;

diff --git a/dev-qt/qtbase/qtbase-6.5.3.ebuild b/dev-qt/qtbase/qtbase-6.5.3-r1.ebuild
similarity index 97%
copy from dev-qt/qtbase/qtbase-6.5.3.ebuild
copy to dev-qt/qtbase/qtbase-6.5.3-r1.ebuild
index df8f999..cb379dc 100644
--- a/dev-qt/qtbase/qtbase-6.5.3.ebuild
+++ b/dev-qt/qtbase/qtbase-6.5.3-r1.ebuild
@@ -137,6 +137,8 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.5.3-xkbcommon160.patch
+	"${FILESDIR}"/${PN}-6.5.3-forkfd-childstack-size.patch
 )
 
 src_prepare() {
@@ -204,7 +206,8 @@ src_configure() {
 		-DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
 		-DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
 	) && use widgets && mycmakeargs+=(
-		$(qt_feature cups) # qtprintsupport is enabled w/ gui+widgets
+		# note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
+		$(qt_feature cups)
 		$(qt_feature gtk gtk3)
 	)
 
@@ -214,9 +217,7 @@ src_configure() {
 		$(qt_feature libproxy)
 		$(qt_feature sctp)
 		$(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
-
-		# Required for LibreSSL
-		-DQT_FEATURE_dtls=OFF
+		-DQT_FEATURE_dtls=OFF # Required for LibreSSL
 	)
 
 	use sql && mycmakeargs+=(

diff --git a/dev-qt/qtbase/qtbase-6.5.3.ebuild b/dev-qt/qtbase/qtbase-6.6.0-r1.ebuild
similarity index 96%
rename from dev-qt/qtbase/qtbase-6.5.3.ebuild
rename to dev-qt/qtbase/qtbase-6.6.0-r1.ebuild
index df8f999..bacb108 100644
--- a/dev-qt/qtbase/qtbase-6.5.3.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.0-r1.ebuild
@@ -133,10 +133,12 @@ PDEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-6.5.0-libressl.patch
+	"${FILESDIR}"/${PN}-6.6.0-libressl.patch
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.5.3-xkbcommon160.patch
+	"${FILESDIR}"/${PN}-6.5.3-forkfd-childstack-size.patch
 )
 
 src_prepare() {
@@ -204,7 +206,8 @@ src_configure() {
 		-DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
 		-DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
 	) && use widgets && mycmakeargs+=(
-		$(qt_feature cups) # qtprintsupport is enabled w/ gui+widgets
+		# note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
+		$(qt_feature cups)
 		$(qt_feature gtk gtk3)
 	)
 
@@ -214,14 +217,13 @@ src_configure() {
 		$(qt_feature libproxy)
 		$(qt_feature sctp)
 		$(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
-
-		# Required for LibreSSL
-		-DQT_FEATURE_dtls=OFF
+		-DQT_FEATURE_dtls=OFF # Required for LibreSSL
 	)
 
 	use sql && mycmakeargs+=(
 		-DQT_FEATURE_sql_db2=OFF # unpackaged
 		-DQT_FEATURE_sql_ibase=OFF # unpackaged
+		-DQT_FEATURE_sql_mimer=OFF # unpackaged
 		$(qt_feature mysql sql_mysql)
 		$(qt_feature oci8 sql_oci)
 		$(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client)
@@ -229,7 +231,6 @@ src_configure() {
 		$(qt_feature postgres sql_psql)
 		$(qt_feature sqlite sql_sqlite)
 		$(qt_feature sqlite system_sqlite)
-		-DQT_FEATURE_sql_tds=OFF # currently a no-op in CMakeLists.txt
 	)
 
 	if use amd64 || use x86; then
@@ -284,6 +285,8 @@ src_test() {
 		tst_qx11info
 		# fails with network sandbox
 		tst_qdnslookup
+		# fails with sandbox
+		tst_qsharedmemory
 		# typical to lack SCTP support on non-generic kernels
 		tst_qsctpsocket
 		# these can be flaky depending on the environment/toolchain


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-12-06  4:58 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2023-12-06  4:58 UTC (permalink / raw
  To: gentoo-commits

commit:     01b8d17052426cdf9c0bc440f94529d226419b8a
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Dec  6 04:45:01 2023 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Dec  6 04:45:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=01b8d170

dev-qt/qtbase: drop 6.5.2-r2

Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-qt/qtbase/Manifest                             |   1 -
 .../qtbase/files/qtbase-6.5.2-CVE-2023-38197.patch | 404 ---------------------
 dev-qt/qtbase/files/qtbase-6.5.2-tests-gcc13.patch |  25 --
 dev-qt/qtbase/qtbase-6.5.2-r2.ebuild               | 355 ------------------
 4 files changed, 785 deletions(-)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index dc81a32..71ca1f2 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1,4 +1,3 @@
-DIST qtbase-everywhere-src-6.5.2.tar.xz 48410716 BLAKE2B 578c69ede6f45a8b21cba0a24674d5d8801722503d13ab9578b06b2446ce15e6a84bcdbd0c5d2c9aa868ec70862f0845406c959ed79b695f82bb398ecf299c63 SHA512 8d97029aae5b73a3e03624c9a8495dbf2fe54a4f5e992071c06f3d93935e64c80f2121b33eeb60a92d96ceb288cb25d74906a5bf47b45bb018d859d4a2d13f20
 DIST qtbase-everywhere-src-6.5.3.tar.xz 47142456 BLAKE2B 5b4c774b7199563dc7f2aebf9b2b531d851ee49bc038212f4970eeb43a17c364710432708f82a518eee6692ab123d78b642c234d9548d5b553f689a43aa05ee6 SHA512 31c6c01d466f1e01f18d6dcee593360c08ee83ad0a6be495a8eba023faad628cf07ce7285426fabfd247db306319e9a64da329682c99a712a282e32f7493cdb9
 DIST qtbase-everywhere-src-6.6.0.tar.xz 48350308 BLAKE2B 719e265dfafb4fd95f972a317acb95e2d83f8d62175c28ab97837c635435bdcd79bdca113362dea2f04dab799d4749e23056ddb9583908ee20ab23cedeca19b7 SHA512 4e85acefeddc0a3cd6ba615b4768f435c4e237a605172153a1777a10285dab83d9cf220c18ce6d723d051b8b432f3e92be94925b54c2eb972c2c1d9ace849e17
 DIST qtbase-everywhere-src-6.6.1.tar.xz 48370760 BLAKE2B 2dd551d15eef30c7d9a5f4c406143d6f8908d7ebade9daf9fbd3d82a25765425956f2cb8689c50f87f6477de2150eee7b820ef25bb4355c51e7e7fad3ef73005 SHA512 93e77b9b077a3acd5607b643db282fdd7ed0bdfa07df74c3f0d2285afeb1672a6fa229a7e7a6c8a462701305fc22ffef20c212d906484e50fb5cdb706a7b72e1

diff --git a/dev-qt/qtbase/files/qtbase-6.5.2-CVE-2023-38197.patch b/dev-qt/qtbase/files/qtbase-6.5.2-CVE-2023-38197.patch
deleted file mode 100644
index 220e94d..0000000
--- a/dev-qt/qtbase/files/qtbase-6.5.2-CVE-2023-38197.patch
+++ /dev/null
@@ -1,404 +0,0 @@
-Upstream: https://codereview.qt-project.org/c/qt/qtbase/+/490550
-Upstream: https://lists.qt-project.org/pipermail/development/2023-July/044166.html
-
-From c216c3d9859a20b3aeec985512e89316423fc3a8 Mon Sep 17 00:00:00 2001
-From: Axel Spoerl <axel.spoerl@qt.io>
-Date: Fri, 30 Jun 2023 12:43:59 +0200
-Subject: [PATCH] QXmlStreamReader: Raise error on unexpected tokens
-
-QXmlStreamReader accepted multiple DOCTYPE elements, containing DTD
-fragments in the XML prolog, and in the XML body.
-Well-formed but invalid XML files - with multiple DTD fragments in
-prolog and body, combined with recursive entity expansions - have
-caused infinite loops in QXmlStreamReader.
-
-This patch implements a token check in QXmlStreamReader.
-A stream is allowed to start with an XML prolog. StartDocument
-and DOCTYPE elements are only allowed in this prolog, which
-may also contain ProcessingInstruction and Comment elements.
-As soon as anything else is seen, the prolog ends.
-After that, the prolog-specific elements are treated as unexpected.
-Furthermore, the prolog can contain at most one DOCTYPE element.
-
-Update the documentation to reflect the new behavior.
-Add an autotest that checks the new error cases are correctly detected,
-and no error is raised for legitimate input.
-
-The original OSS-Fuzz files (see bug reports) are not included in this
-patch for file size reasons. They have been tested manually. Each of
-them has more than one DOCTYPE element, causing infinite loops in
-recursive entity expansions. The newly implemented functionality
-detects those invalid DTD fragments. By raising an error, it aborts
-stream reading before an infinite loop occurs.
-
-Thanks to OSS-Fuzz for finding this.
-
-Fixes: QTBUG-92113
-Fixes: QTBUG-95188
-Change-Id: I0a082b9188b2eee50b396c4d5b1c9e1fd237bbdd
-Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-(cherry picked from commit c4301be7d5f94852e1b17f2c2989d5ca807855d4)
----
- src/corelib/serialization/qxmlstream.cpp           | 145 +++++++++++++++++++--
- src/corelib/serialization/qxmlstream_p.h           |  11 ++
- .../qxmlstream/tokenError/dtdInBody.xml            |  20 +++
- .../qxmlstream/tokenError/multipleDtd.xml          |  20 +++
- .../qxmlstream/tokenError/wellFormed.xml           |  15 +++
- .../serialization/qxmlstream/tst_qxmlstream.cpp    |  39 ++++++
- 6 files changed, 242 insertions(+), 8 deletions(-)
- create mode 100644 tests/auto/corelib/serialization/qxmlstream/tokenError/dtdInBody.xml
- create mode 100644 tests/auto/corelib/serialization/qxmlstream/tokenError/multipleDtd.xml
- create mode 100644 tests/auto/corelib/serialization/qxmlstream/tokenError/wellFormed.xml
-
-diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp
-index 6e34d4da6e5a..cf46d690f122 100644
---- a/src/corelib/serialization/qxmlstream.cpp
-+++ b/src/corelib/serialization/qxmlstream.cpp
-@@ -185,7 +185,7 @@ WRAP(indexOf, QLatin1StringView)
-     addData() or by waiting for it to arrive on the device().
- 
-     \value UnexpectedElementError The parser encountered an element
--    that was different to those it expected.
-+    or token that was different to those it expected.
- 
- */
- 
-@@ -322,13 +322,34 @@ QXmlStreamEntityResolver *QXmlStreamReader::entityResolver() const
- 
-   QXmlStreamReader is a well-formed XML 1.0 parser that does \e not
-   include external parsed entities. As long as no error occurs, the
--  application code can thus be assured that the data provided by the
--  stream reader satisfies the W3C's criteria for well-formed XML. For
--  example, you can be certain that all tags are indeed nested and
--  closed properly, that references to internal entities have been
--  replaced with the correct replacement text, and that attributes have
--  been normalized or added according to the internal subset of the
--  DTD.
-+  application code can thus be assured, that
-+  \list
-+  \li the data provided by the stream reader satisfies the W3C's
-+      criteria for well-formed XML,
-+  \li tokens are provided in a valid order.
-+  \endlist
-+
-+  Unless QXmlStreamReader raises an error, it guarantees the following:
-+  \list
-+  \li All tags are nested and closed properly.
-+  \li References to internal entities have been replaced with the
-+      correct replacement text.
-+  \li Attributes have been normalized or added according to the
-+      internal subset of the \l DTD.
-+  \li Tokens of type \l StartDocument happen before all others,
-+      aside from comments and processing instructions.
-+  \li At most one DOCTYPE element (a token of type \l DTD) is present.
-+  \li If present, the DOCTYPE appears before all other elements,
-+      aside from StartDocument, comments and processing instructions.
-+  \endlist
-+
-+  In particular, once any token of type \l StartElement, \l EndElement,
-+  \l Characters, \l EntityReference or \l EndDocument is seen, no
-+  tokens of type StartDocument or DTD will be seen. If one is present in
-+  the input stream, out of order, an error is raised.
-+
-+  \note The token types \l Comment and \l ProcessingInstruction may appear
-+  anywhere in the stream.
- 
-   If an error occurs while parsing, atEnd() and hasError() return
-   true, and error() returns the error that occurred. The functions
-@@ -659,6 +680,7 @@ QXmlStreamReader::TokenType QXmlStreamReader::readNext()
-         d->token = -1;
-         return readNext();
-     }
-+    d->checkToken();
-     return d->type;
- }
- 
-@@ -743,6 +765,11 @@ static constexpr auto QXmlStreamReader_tokenTypeString = qOffsetStringArray(
-     "ProcessingInstruction"
- );
- 
-+static constexpr auto QXmlStreamReader_XmlContextString = qOffsetStringArray(
-+    "Prolog",
-+    "Body"
-+);
-+
- /*!
-     \property  QXmlStreamReader::namespaceProcessing
-     \brief the namespace-processing flag of the stream reader.
-@@ -777,6 +804,15 @@ QString QXmlStreamReader::tokenString() const
-     return QLatin1StringView(QXmlStreamReader_tokenTypeString.at(d->type));
- }
- 
-+/*!
-+   \internal
-+   \return \param loc (Prolog/Body) as a string.
-+ */
-+static constexpr QLatin1StringView contextString(QXmlStreamReaderPrivate::XmlContext ctxt)
-+{
-+    return QLatin1StringView(QXmlStreamReader_XmlContextString.at(static_cast<int>(ctxt)));
-+}
-+
- #endif // QT_NO_XMLSTREAMREADER
- 
- QXmlStreamPrivateTagStack::QXmlStreamPrivateTagStack()
-@@ -864,6 +900,8 @@ void QXmlStreamReaderPrivate::init()
- 
-     type = QXmlStreamReader::NoToken;
-     error = QXmlStreamReader::NoError;
-+    currentContext = XmlContext::Prolog;
-+    foundDTD = false;
- }
- 
- /*
-@@ -3838,6 +3876,97 @@ void QXmlStreamWriter::writeCurrentToken(const QXmlStreamReader &reader)
-     }
- }
- 
-+static constexpr bool isTokenAllowedInContext(QXmlStreamReader::TokenType type,
-+                                               QXmlStreamReaderPrivate::XmlContext loc)
-+{
-+    switch (type) {
-+    case QXmlStreamReader::StartDocument:
-+    case QXmlStreamReader::DTD:
-+        return loc == QXmlStreamReaderPrivate::XmlContext::Prolog;
-+
-+    case QXmlStreamReader::StartElement:
-+    case QXmlStreamReader::EndElement:
-+    case QXmlStreamReader::Characters:
-+    case QXmlStreamReader::EntityReference:
-+    case QXmlStreamReader::EndDocument:
-+        return loc == QXmlStreamReaderPrivate::XmlContext::Body;
-+
-+    case QXmlStreamReader::Comment:
-+    case QXmlStreamReader::ProcessingInstruction:
-+        return true;
-+
-+    case QXmlStreamReader::NoToken:
-+    case QXmlStreamReader::Invalid:
-+        return false;
-+    }
-+
-+    // GCC 8.x does not treat __builtin_unreachable() as constexpr
-+#if !defined(Q_CC_GNU_ONLY) || (Q_CC_GNU >= 900)
-+    Q_UNREACHABLE_RETURN(false);
-+#else
-+    return false;
-+#endif
-+}
-+
-+/*!
-+   \internal
-+   \brief QXmlStreamReader::isValidToken
-+   \return \c true if \param type is a valid token type.
-+   \return \c false if \param type is an unexpected token,
-+   which indicates a non-well-formed or invalid XML stream.
-+ */
-+bool QXmlStreamReaderPrivate::isValidToken(QXmlStreamReader::TokenType type)
-+{
-+    // Don't change currentContext, if Invalid or NoToken occur in the prolog
-+    if (type == QXmlStreamReader::Invalid || type == QXmlStreamReader::NoToken)
-+        return false;
-+
-+    // If a token type gets rejected in the body, there is no recovery
-+    const bool result = isTokenAllowedInContext(type, currentContext);
-+    if (result || currentContext == XmlContext::Body)
-+        return result;
-+
-+    // First non-Prolog token observed => switch context to body and check again.
-+    currentContext = XmlContext::Body;
-+    return isTokenAllowedInContext(type, currentContext);
-+}
-+
-+/*!
-+   \internal
-+   Checks token type and raises an error, if it is invalid
-+   in the current context (prolog/body).
-+ */
-+void QXmlStreamReaderPrivate::checkToken()
-+{
-+    Q_Q(QXmlStreamReader);
-+
-+    // The token type must be consumed, to keep track if the body has been reached.
-+    const XmlContext context = currentContext;
-+    const bool ok = isValidToken(type);
-+
-+    // Do nothing if an error has been raised already (going along with an unexpected token)
-+    if (error != QXmlStreamReader::Error::NoError)
-+        return;
-+
-+    if (!ok) {
-+        raiseError(QXmlStreamReader::UnexpectedElementError,
-+                   QObject::tr("Unexpected token type %1 in %2.")
-+                   .arg(q->tokenString(), contextString(context)));
-+        return;
-+    }
-+
-+    if (type != QXmlStreamReader::DTD)
-+        return;
-+
-+    // Raise error on multiple DTD tokens
-+    if (foundDTD) {
-+        raiseError(QXmlStreamReader::UnexpectedElementError,
-+                   QObject::tr("Found second DTD token in %1.").arg(contextString(context)));
-+    } else {
-+        foundDTD = true;
-+    }
-+}
-+
- /*!
-  \fn bool QXmlStreamAttributes::hasAttribute(QAnyStringView qualifiedName) const
- 
-diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h
-index 070424a9f523..f09adaa37e66 100644
---- a/src/corelib/serialization/qxmlstream_p.h
-+++ b/src/corelib/serialization/qxmlstream_p.h
-@@ -297,6 +297,17 @@ public:
-     QStringDecoder decoder;
-     bool atEnd;
- 
-+    enum class XmlContext
-+    {
-+        Prolog,
-+        Body,
-+    };
-+
-+    XmlContext currentContext = XmlContext::Prolog;
-+    bool foundDTD = false;
-+    bool isValidToken(QXmlStreamReader::TokenType type);
-+    void checkToken();
-+
-     /*!
-       \sa setType()
-      */
-diff --git a/tests/auto/corelib/serialization/qxmlstream/tokenError/dtdInBody.xml b/tests/auto/corelib/serialization/qxmlstream/tokenError/dtdInBody.xml
-new file mode 100644
-index 000000000000..1c3ca4e2711f
---- /dev/null
-+++ b/tests/auto/corelib/serialization/qxmlstream/tokenError/dtdInBody.xml
-@@ -0,0 +1,20 @@
-+<!DOCTYPE TEST [
-+   <!ELEMENT TESTATTRIBUTE (CASE+)>
-+   <!ELEMENT CASE (CLASS, FUNCTION)>
-+   <!ELEMENT CLASS (#PCDATA)>
-+
-+   <!-- adding random ENTITY statement, as this is typical DTD content -->
-+   <!ENTITY unite "&#x222a;">
-+
-+   <!ATTLIST CASE CLASS CDATA #REQUIRED>
-+]>
-+<TEST>
-+  <CASE>
-+    <CLASS>tst_QXmlStream</CLASS>
-+  </CASE>
-+  <!-- invalid DTD in XML body follows -->
-+  <!DOCTYPE DTDTEST [
-+    <!ELEMENT RESULT (CASE+)>
-+    <!ATTLIST RESULT OUTPUT CDATA #REQUIRED>
-+  ]>
-+</TEST>
-diff --git a/tests/auto/corelib/serialization/qxmlstream/tokenError/multipleDtd.xml b/tests/auto/corelib/serialization/qxmlstream/tokenError/multipleDtd.xml
-new file mode 100644
-index 000000000000..cd398c0f9fde
---- /dev/null
-+++ b/tests/auto/corelib/serialization/qxmlstream/tokenError/multipleDtd.xml
-@@ -0,0 +1,20 @@
-+<!DOCTYPE TEST [
-+   <!ELEMENT TESTATTRIBUTE (CASE+)>
-+   <!ELEMENT CASE (CLASS, FUNCTION, DATASET, COMMENTS)>
-+   <!ELEMENT CLASS (#PCDATA)>
-+
-+   <!-- adding random ENTITY statements, as this is typical DTD content -->
-+   <!ENTITY iff "&hArr;">
-+
-+   <!ATTLIST CASE CLASS CDATA #REQUIRED>
-+]>
-+<!-- invalid second DTD follows -->
-+<!DOCTYPE SECOND [
-+   <!ELEMENT SECONDATTRIBUTE (#PCDATA)>
-+   <!ENTITY on "&#8728;">
-+]>
-+<TEST>
-+  <CASE>
-+    <CLASS>tst_QXmlStream</CLASS>
-+  </CASE>
-+</TEST>
-diff --git a/tests/auto/corelib/serialization/qxmlstream/tokenError/wellFormed.xml b/tests/auto/corelib/serialization/qxmlstream/tokenError/wellFormed.xml
-new file mode 100644
-index 000000000000..1b61a3f06225
---- /dev/null
-+++ b/tests/auto/corelib/serialization/qxmlstream/tokenError/wellFormed.xml
-@@ -0,0 +1,15 @@
-+<!DOCTYPE TEST [
-+   <!ELEMENT TESTATTRIBUTE (CASE+)>
-+   <!ELEMENT CASE (CLASS, FUNCTION, DATASET, COMMENTS)>
-+   <!ELEMENT CLASS (#PCDATA)>
-+
-+   <!-- adding random ENTITY statements, as this is typical DTD content -->
-+   <!ENTITY unite "&#x222a;">
-+
-+   <!ATTLIST CASE CLASS CDATA #REQUIRED>
-+]>
-+<TEST>
-+  <CASE>
-+    <CLASS>tst_QXmlStream</CLASS>
-+  </CASE>
-+</TEST>
-diff --git a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
-index 2a340e11bff5..30f54999e7c8 100644
---- a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
-+++ b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
-@@ -590,6 +590,9 @@ private slots:
- 
-     void entityExpansionLimit() const;
- 
-+    void tokenErrorHandling_data() const;
-+    void tokenErrorHandling() const;
-+
- private:
-     static QByteArray readFile(const QString &filename);
- 
-@@ -1855,5 +1858,41 @@ void tst_QXmlStream::test_fastScanName() const
-     QCOMPARE(reader.error(), errorType);
- }
- 
-+void tst_QXmlStream::tokenErrorHandling_data() const
-+{
-+    QTest::addColumn<QString>("fileName");
-+    QTest::addColumn<QXmlStreamReader::Error>("expectedError");
-+    QTest::addColumn<QString>("errorKeyWord");
-+
-+    constexpr auto invalid = QXmlStreamReader::Error::UnexpectedElementError;
-+    constexpr auto valid = QXmlStreamReader::Error::NoError;
-+    QTest::newRow("DtdInBody") << "dtdInBody.xml" << invalid << "DTD";
-+    QTest::newRow("multipleDTD") << "multipleDtd.xml" << invalid << "second DTD";
-+    QTest::newRow("wellFormed") << "wellFormed.xml" << valid << "";
-+}
-+
-+void tst_QXmlStream::tokenErrorHandling() const
-+{
-+    QFETCH(const QString, fileName);
-+    QFETCH(const QXmlStreamReader::Error, expectedError);
-+    QFETCH(const QString, errorKeyWord);
-+
-+    const QDir dir(QFINDTESTDATA("tokenError"));
-+    QFile file(dir.absoluteFilePath(fileName));
-+
-+    // Cross-compiling: File will be on host only
-+    if (!file.exists())
-+        QSKIP("Testfile not found.");
-+
-+    file.open(QIODevice::ReadOnly);
-+    QXmlStreamReader reader(&file);
-+    while (!reader.atEnd())
-+        reader.readNext();
-+
-+    QCOMPARE(reader.error(), expectedError);
-+    if (expectedError != QXmlStreamReader::Error::NoError)
-+        QVERIFY(reader.errorString().contains(errorKeyWord));
-+}
-+
- #include "tst_qxmlstream.moc"
- // vim: et:ts=4:sw=4:sts=4
--- 
-2.16.3
-

diff --git a/dev-qt/qtbase/files/qtbase-6.5.2-tests-gcc13.patch b/dev-qt/qtbase/files/qtbase-6.5.2-tests-gcc13.patch
deleted file mode 100644
index 431d89a..0000000
--- a/dev-qt/qtbase/files/qtbase-6.5.2-tests-gcc13.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-https://bugreports.qt.io/browse/QTBUG-114785
-https://code.qt.io/cgit/qt/qtbase.git/commit/?id=3e801b5477a7abfe4b87f20639e345bf3dc7eca8
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sat, 29 Apr 2023 13:01:56 +0200
-Subject: [PATCH] tinycbor: fix build with gcc-13
-
-Fixes: QTBUG-114785
-Pick-to: 6.6 6.5
-Change-Id: I4876ebd8890eee883a0d1a2bef8cb7aec4fd0f2f
-Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
---- a/src/3rdparty/tinycbor/tests/encoder/data.cpp
-+++ b/src/3rdparty/tinycbor/tests/encoder/data.cpp
-@@ -239,9 +239,9 @@
-     QTest::newRow("0.f16") << raw("\xf9\0\0") << QVariant::fromValue(qfloat16(0));
-     QTest::newRow("-1.f16") << raw("\xf9\xbc\0") << QVariant::fromValue(qfloat16(-1));
-     QTest::newRow("1.5f16") << raw("\xf9\x3e\0") << QVariant::fromValue(qfloat16(1.5));
--    QTest::newRow("nan_f16") << raw("\xf9\x7e\0") << QVariant::fromValue<qfloat16>(myNaNf());
--    QTest::newRow("-inf_f16") << raw("\xf9\xfc\0") << QVariant::fromValue<qfloat16>(myNInff());
--    QTest::newRow("+inf_f16") << raw("\xf9\x7c\0") << QVariant::fromValue<qfloat16>(myInff());
-+    QTest::newRow("nan_f16") << raw("\xf9\x7e\0") << QVariant::fromValue<qfloat16>(qfloat16(myNaNf()));
-+    QTest::newRow("-inf_f16") << raw("\xf9\xfc\0") << QVariant::fromValue<qfloat16>(qfloat16(myNInff()));
-+    QTest::newRow("+inf_f16") << raw("\xf9\x7c\0") << QVariant::fromValue<qfloat16>(qfloat16(myInff()));
- #endif
- 
-     QTest::newRow("0.f") << raw("\xfa\0\0\0\0") << QVariant::fromValue(0.f);

diff --git a/dev-qt/qtbase/qtbase-6.5.2-r2.ebuild b/dev-qt/qtbase/qtbase-6.5.2-r2.ebuild
deleted file mode 100644
index dd808c8..0000000
--- a/dev-qt/qtbase/qtbase-6.5.2-r2.ebuild
+++ /dev/null
@@ -1,355 +0,0 @@
-# Copyright 2021-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic qt6-build toolchain-funcs
-
-DESCRIPTION="Cross-platform application development framework"
-
-if [[ ${QT6_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 ~arm ~arm64 ~hppa ~loong ~x86"
-fi
-
-declare -A QT6_IUSE=(
-	[global]="+ssl +udev zstd"
-	[core]="icu"
-	[modules]="+concurrent +dbus +gui +network +sql +xml"
-
-	[gui]="
-		+X accessibility eglfs evdev gles2-only +libinput
-		opengl tslib vulkan +widgets
-	"
-	[network]="brotli gssapi libproxy sctp"
-	[sql]="mysql oci8 odbc postgres +sqlite"
-	[widgets]="cups gtk"
-
-	[optfeature]="nls wayland" #810802,864509
-)
-IUSE="${QT6_IUSE[*]}"
-REQUIRED_USE="
-	$(
-		printf '%s? ( gui ) ' ${QT6_IUSE[gui]//+/}
-		printf '%s? ( network ) ' ${QT6_IUSE[network]//+/}
-		printf '%s? ( sql ) ' ${QT6_IUSE[sql]//+/}
-		printf '%s? ( gui widgets ) ' ${QT6_IUSE[widgets]//+/}
-	)
-	accessibility? ( X dbus )
-	eglfs? ( opengl )
-	gles2-only? ( opengl )
-	gui? ( || ( X eglfs wayland ) )
-	libinput? ( udev )
-	sql? ( || ( ${QT6_IUSE[sql]//+/} ) )
-	test? ( icu sql? ( sqlite ) )
-"
-
-# groups:
-# - global (configure.cmake)
-# - qtcore (src/corelib/configure.cmake)
-# - qtgui (src/gui/configure.cmake)
-# - qtnetwork (src/network/configure.cmake)
-# - qtprintsupport (src/printsupport/configure.cmake) [gui+widgets]
-# - qtsql (src/plugins/sqldrivers/configure.cmake)
-RDEPEND="
-	sys-libs/zlib:=
-	ssl? ( dev-libs/openssl:= )
-	udev? ( virtual/libudev:= )
-	zstd? ( app-arch/zstd:= )
-
-	app-crypt/libb2
-	dev-libs/double-conversion:=
-	dev-libs/glib:2
-	dev-libs/libpcre2:=[pcre16,unicode(+)]
-	icu? ( dev-libs/icu:= )
-
-	dbus? ( sys-apps/dbus )
-	gui? (
-		media-libs/fontconfig
-		media-libs/freetype:2
-		media-libs/harfbuzz:=
-		media-libs/libjpeg-turbo:=
-		media-libs/libpng:=
-		x11-libs/libdrm
-		x11-libs/libxkbcommon[X?]
-		X? (
-			x11-libs/libICE
-			x11-libs/libSM
-			x11-libs/libX11
-			x11-libs/libxcb:=
-			x11-libs/xcb-util-cursor
-			x11-libs/xcb-util-image
-			x11-libs/xcb-util-keysyms
-			x11-libs/xcb-util-renderutil
-			x11-libs/xcb-util-wm
-		)
-		accessibility? ( app-accessibility/at-spi2-core:2 )
-		eglfs? ( media-libs/mesa[gbm(+)] )
-		evdev? ( sys-libs/mtdev )
-		libinput? ( dev-libs/libinput:= )
-		opengl? (
-			gles2-only? ( media-libs/libglvnd )
-			!gles2-only? ( media-libs/libglvnd[X?] )
-		)
-		tslib? ( x11-libs/tslib )
-		widgets? (
-			cups? ( net-print/cups )
-			gtk? (
-				x11-libs/gdk-pixbuf:2
-				x11-libs/gtk+:3
-				x11-libs/pango
-			)
-		)
-	)
-	network? (
-		brotli? ( app-arch/brotli:= )
-		gssapi? ( virtual/krb5 )
-		libproxy? ( net-libs/libproxy )
-	)
-	sql? (
-		mysql? ( dev-db/mysql-connector-c:= )
-		oci8? ( dev-db/oracle-instantclient:=[sdk] )
-		odbc? ( dev-db/unixODBC )
-		postgres? ( dev-db/postgresql:* )
-		sqlite? ( dev-db/sqlite:3 )
-	)
-"
-DEPEND="
-	${RDEPEND}
-	<x11-libs/libxkbcommon-1.6
-	X? ( x11-base/xorg-proto )
-	gui? (
-		vulkan? ( dev-util/vulkan-headers )
-	)
-	network? (
-		sctp? ( net-misc/lksctp-tools )
-	)
-	test? (
-		elibc_musl? ( sys-libs/timezone-data )
-	)
-"
-BDEPEND="zstd? ( app-arch/libarchive[zstd] )" #910392
-PDEPEND="
-	nls? ( ~dev-qt/qttranslations-${PV}:6 )
-	wayland? ( ~dev-qt/qtwayland-${PV}:6 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-6.5.0-libressl.patch
-	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
-	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
-	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
-	"${FILESDIR}"/${P}-CVE-2023-38197.patch
-	"${FILESDIR}"/${P}-tests-gcc13.patch
-)
-
-src_prepare() {
-	qt6-build_src_prepare
-
-	if use test; then
-		# test itself has -Werror=strict-aliasing issues, drop for simplicity
-		sed -e '/add_subdirectory(qsharedpointer)/d' \
-			-i tests/auto/corelib/tools/CMakeLists.txt || die
-	fi
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DBUILD_WITH_PCH=OFF
-
-		-DINSTALL_ARCHDATADIR="${QT6_ARCHDATADIR}"
-		-DINSTALL_BINDIR="${QT6_BINDIR}"
-		-DINSTALL_DATADIR="${QT6_DATADIR}"
-		-DINSTALL_DOCDIR="${QT6_DOCDIR}"
-		-DINSTALL_EXAMPLESDIR="${QT6_EXAMPLESDIR}"
-		-DINSTALL_INCLUDEDIR="${QT6_HEADERDIR}"
-		-DINSTALL_LIBDIR="${QT6_LIBDIR}"
-		-DINSTALL_LIBEXECDIR="${QT6_LIBEXECDIR}"
-		-DINSTALL_MKSPECSDIR="${QT6_MKSPECSDIR}"
-		-DINSTALL_PLUGINSDIR="${QT6_PLUGINDIR}"
-		-DINSTALL_QMLDIR="${QT6_QMLDIR}"
-		-DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
-		-DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
-
-		$(qt_feature ssl openssl)
-		$(qt_feature ssl openssl_linked)
-		$(qt_feature udev libudev)
-		$(qt_feature zstd)
-
-		# qtcore
-		$(qt_feature icu)
-
-		# tools
-		-DQT_FEATURE_androiddeployqt=OFF
-
-		# modules
-		$(qt_feature concurrent)
-		$(qt_feature dbus)
-		$(qt_feature gui)
-		$(qt_feature network)
-		$(qt_feature sql)
-		-DQT_FEATURE_testlib=ON # trivial and often needed to build revdeps
-		$(qt_feature xml)
-	)
-
-	use gui && mycmakeargs+=(
-		$(qt_feature X xcb)
-		$(qt_feature X system_xcb_xinput)
-		$(qt_feature X xkbcommon_x11)
-		$(cmake_use_find_package X X11) # needed for truly no automagic
-		$(qt_feature accessibility accessibility_atspi_bridge)
-		$(qt_feature eglfs)
-		$(qt_feature evdev)
-		$(qt_feature evdev mtdev)
-		$(qt_feature libinput)
-		$(qt_feature tslib)
-		$(qt_feature vulkan)
-		$(qt_feature widgets)
-		-DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
-		-DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
-	) && use widgets && mycmakeargs+=(
-		# note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
-		$(qt_feature cups)
-		$(qt_feature gtk gtk3)
-	)
-
-	use network && mycmakeargs+=(
-		$(qt_feature brotli)
-		$(qt_feature gssapi)
-		$(qt_feature libproxy)
-		$(qt_feature sctp)
-		$(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
-
-		# Required for LibreSSL
-		-DQT_FEATURE_dtls=OFF
-	)
-
-	use sql && mycmakeargs+=(
-		-DQT_FEATURE_sql_db2=OFF # unpackaged
-		-DQT_FEATURE_sql_ibase=OFF # unpackaged
-		$(qt_feature mysql sql_mysql)
-		$(qt_feature oci8 sql_oci)
-		$(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client)
-		$(qt_feature odbc sql_odbc)
-		$(qt_feature postgres sql_psql)
-		$(qt_feature sqlite sql_sqlite)
-		$(qt_feature sqlite system_sqlite)
-		-DQT_FEATURE_sql_tds=OFF # currently a no-op in CMakeLists.txt
-	)
-
-	if use amd64 || use x86; then
-		# see bug #913400 for explanations
-		local cpufeats=(
-			# list of checked cpu features in configure.cmake
-			avx avx2 avx512{bw,cd,dq,er,f,ifma,pf,vbmi,vbmi2,vl}
-			f16c rdrnd rdseed sse2 sse3 sse4_1 sse4_2 ssse3 vaes
-		)
-		# handle odd ones out not matching -m* and macros (keep same order)
-		local cpuflags=( "${cpufeats[@]}" aes sha )
-		local cpufeats+=( aesni shani )
-
-		local -a intrins
-		IFS=' ' read -ra intrins < <(
-			: "$(test-flags-CXX "${cpuflags[@]/#/-m}")"
-			$(tc-getCXX) -E -P ${_} ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 1
-				#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
-				#include <x86intrin.h>
-				#endif
-				$(printf '__%s__ ' "${cpuflags[@]^^}")
-			EOF
-			assert
-		)
-
-		# do nothing and leave to qtbase if no macros expanded (test failed?)
-		if [[ \ ${intrins[*]} == *\ [^_\ ]* ]]; then
-			local -i i
-			for ((i=0; i<${#cpufeats[@]}; i++)); do
-				[[ ${intrins[i]} == __* ]] &&
-					mycmakeargs+=( -DQT_FEATURE_${cpufeats[i]}=OFF )
-			done
-			mycmakeargs+=( -DTEST_x86intrin=ON )
-		fi
-	fi
-
-	qt6-build_src_configure
-}
-
-src_test() {
-	local -x TZ=UTC
-	local -x LC_TIME=C
-
-	local CMAKE_SKIP_TESTS=(
-		# broken with out-of-source + if qtbase is not already installed
-		tst_moc
-		tst_qmake
-		# needs x11/opengl, we *could* run these but tend to be flaky
-		# when opengl rendering is involved (even if software-only)
-		tst_qopengl{,config,widget,window}
-		tst_qgraphicsview
-		tst_qx11info
-		# fails with network sandbox
-		tst_qdnslookup
-		# typical to lack SCTP support on non-generic kernels
-		tst_qsctpsocket
-		# these can be flaky depending on the environment/toolchain
-		tst_qlogging # backtrace log test can easily vary
-		tst_q{,raw}font # affected by available fonts / settings (bug #914737)
-		tst_qstorageinfo # checks mounted filesystems
-		# flaky due to using different test framework and fails with USE=-gui
-		tst_selftests
-		# known failing when using clang+glibc+stdc++, needs looking into
-		tst_qthread
-		# partially failing on x86 chroots and seemingly(?) harmless (dev-qt
-		# revdeps tests pass), skip globally to avoid keywording flakiness
-		tst_json
-		tst_qcolorspace
-		tst_qdoublevalidator
-		tst_qglobal
-		tst_qglyphrun
-		tst_qvectornd
-		tst_rcc
-		# similarly, but on armv7 and potentially others (bug #914028)
-		tst_qlineedit
-		tst_qpainter
-		# likewise, known failing at least on BE arches (bug #914033,914371)
-		tst_qimagereader
-		tst_qimagewriter
-		tst_qpluginloader
-		# partially broken on llvm-musl, needs looking into but skip to have
-		# a baseline for regressions (rest of dev-qt still passes with musl)
-		$(usev elibc_musl '
-			tst_qfiledialog2
-			tst_qicoimageformat
-			tst_qimagereader
-			tst_qimage
-		')
-		# fails due to hppa's NaN handling, needs looking into (bug #914371)
-		$(usev hppa '
-			tst_qcborvalue
-			tst_qnumeric
-		')
-		# note: for linux, upstream only really runs+maintains tests for amd64
-		# https://doc.qt.io/qt-6/supported-platforms.html
-	)
-
-	qt6-build_src_test
-}
-
-src_install() {
-	qt6-build_src_install
-
-	if use test; then
-		local delete_bins=( # need a better way to handle this
-			clientserver copier crashingServer desktopsettingsaware_helper
-			echo fileWriterProcess modal_helper nospace 'one space'
-			paster qcommandlineparser_test_helper qfileopeneventexternal
-			socketprocess syslocaleapp tst_qhashseed_helper 'two space s'
-			write-read-write
-		)
-		local delete=( # sigh
-			"${D}${QT6_BINDIR}"/test*
-			"${delete_bins[@]/#/${D}${QT6_BINDIR}/}"
-		)
-		# using -f given not tracking which tests may be skipped or not
-		rm -rf -- "${delete[@]}" || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-01-09 15:48 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2024-01-09 15:48 UTC (permalink / raw
  To: gentoo-commits

commit:     5c6494f3f53aa0c495887368d84dc0e4d4e96553
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Jan  9 15:35:02 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Jan  9 15:35:02 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=5c6494f3

dev-qt/qtbase: add 6.6.1-r3, drop 6.6.1-r1

Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-qt/qtbase/Manifest                             |  1 +
 .../qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch | 55 ++++++++++++++++++++++
 ...base-6.6.1-r1.ebuild => qtbase-6.6.1-r3.ebuild} | 10 ++--
 3 files changed, 62 insertions(+), 4 deletions(-)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index 67b563a..fa00117 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1 +1,2 @@
+DIST qtbase-6.6.1-QTBUG-116905.patch.xz 7132 BLAKE2B 5ad6108f3d278c7014a124733a7e0151d79ab9b82256948c09f2d7d93494020131ec52bae0a0c9ae1959afe724bc033805b28f12676b018dce7d04668d8dec01 SHA512 61c13a96b19bd9c06056681101c2c9d301a5d014c4a155b82ba9b7bce2ba0e715041cd6c3e8e45c9ec3d52c3b77bcf3145fbbf502a72ffbaac02f4eb6b82c912
 DIST qtbase-everywhere-src-6.6.1.tar.xz 48370760 BLAKE2B 2dd551d15eef30c7d9a5f4c406143d6f8908d7ebade9daf9fbd3d82a25765425956f2cb8689c50f87f6477de2150eee7b820ef25bb4355c51e7e7fad3ef73005 SHA512 93e77b9b077a3acd5607b643db282fdd7ed0bdfa07df74c3f0d2285afeb1672a6fa229a7e7a6c8a462701305fc22ffef20c212d906484e50fb5cdb706a7b72e1

diff --git a/dev-qt/qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch b/dev-qt/qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch
new file mode 100644
index 0000000..8d2b0e7
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch
@@ -0,0 +1,55 @@
+Combination of the two patches [1][2] for CVE-2023-51714[3],
+fixed in upcoming qtbase-6.6.2.
+
+https://bugs.gentoo.org/921292
+
+[1] https://codereview.qt-project.org/c/qt/qtbase/+/525295
+[2] https://codereview.qt-project.org/c/qt/qtbase/+/525297
+[3] https://lists.qt-project.org/pipermail/announce/2024-January/000465.html
+
+From 13c16b756900fe524f6d9534e8a07aa003c05e0c Mon Sep 17 00:00:00 2001
+From: Marc Mutz <marc.mutz@qt.io>
+Date: Tue, 12 Dec 2023 20:51:56 +0100
+Subject: [PATCH] HPack: fix a Yoda Condition
+
+Putting the variable on the LHS of a relational operation makes the
+expression easier to read. In this case, we find that the whole
+expression is nonsensical as an overflow protection, because if
+name.size() + value.size() overflows, the result will exactly _not_
+be > max() - 32, because UB will have happened.
+
+To be fixed in a follow-up commit.
+
+As a drive-by, add parentheses around the RHS.
+
+From 811b9eef6d08d929af8708adbf2a5effb0eb62d7 Mon Sep 17 00:00:00 2001
+From: Marc Mutz <marc.mutz@qt.io>
+Date: Tue, 12 Dec 2023 22:08:07 +0100
+Subject: [PATCH] HPack: fix incorrect integer overflow check
+
+This code never worked:
+
+For the comparison with max() - 32 to trigger, on 32-bit platforms (or
+Qt 5) signed interger overflow would have had to happen in the
+addition of the two sizes. The compiler can therefore remove the
+overflow check as dead code.
+
+On Qt 6 and 64-bit platforms, the signed integer addition would be
+very unlikely to overflow, but the following truncation to uint32
+would yield the correct result only in a narrow 32-value window just
+below UINT_MAX, if even that.
+
+Fix by using the proper tool, qAddOverflow.
+--- a/src/network/access/http2/hpacktable.cpp
++++ b/src/network/access/http2/hpacktable.cpp
+@@ -27,6 +27,8 @@
+     // 32 octets of overhead."
+ 
+-    const unsigned sum = unsigned(name.size() + value.size());
+-    if (std::numeric_limits<unsigned>::max() - 32 < sum)
++    size_t sum;
++    if (qAddOverflow(size_t(name.size()), size_t(value.size()), &sum))
++        return HeaderSize();
++    if (sum > (std::numeric_limits<unsigned>::max() - 32))
+         return HeaderSize();
+     return HeaderSize(true, quint32(sum + 32));

diff --git a/dev-qt/qtbase/qtbase-6.6.1-r1.ebuild b/dev-qt/qtbase/qtbase-6.6.1-r3.ebuild
similarity index 97%
rename from dev-qt/qtbase/qtbase-6.6.1-r1.ebuild
rename to dev-qt/qtbase/qtbase-6.6.1-r3.ebuild
index ad1aebe..40bd9f1 100644
--- a/dev-qt/qtbase/qtbase-6.6.1-r1.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.1-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2023 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -6,6 +6,7 @@ EAPI=8
 inherit flag-o-matic qt6-build toolchain-funcs
 
 DESCRIPTION="Cross-platform application development framework"
+SRC_URI+=" https://dev.gentoo.org/~ionen/distfiles/${P}-QTBUG-116905.patch.xz"
 
 if [[ ${QT6_BUILD_TYPE} == release ]]; then
 	KEYWORDS="amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
@@ -138,6 +139,8 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
+	"${FILESDIR}"/${P}-CVE-2023-51714.patch
+	"${WORKDIR}"/${P}-QTBUG-116905.patch
 )
 
 src_prepare() {
@@ -248,9 +251,6 @@ src_configure() {
 		IFS=' ' read -ra intrins < <(
 			: "$(test-flags-CXX "${cpuflags[@]/#/-m}")"
 			$(tc-getCXX) -E -P ${_} ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 1
-				#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
-				#include <x86intrin.h>
-				#endif
 				$(printf '__%s__ ' "${cpuflags[@]^^}")
 			EOF
 			assert
@@ -291,6 +291,8 @@ src_test() {
 		tst_qsctpsocket
 		# randomly fails without -j1, and not worth it over this (bug #916181)
 		tst_qfiledialog{,2}
+		# may randomly hang+timeout, perhaps related to -j as well
+		tst_qtimer
 		# these can be flaky depending on the environment/toolchain
 		tst_qlogging # backtrace log test can easily vary
 		tst_q{,raw}font # affected by available fonts / settings (bug #914737)


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-02-25  2:42 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2024-02-25  2:42 UTC (permalink / raw
  To: gentoo-commits

commit:     90341c72fd720ad0630be46d4eccdfcb26bb9a35
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Feb 25 02:05:51 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Feb 25 02:06:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=90341c72

dev-qt/qtbase: drop 6.6.1-r4

Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-qt/qtbase/Manifest                             |   2 -
 .../qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch |  55 ----
 dev-qt/qtbase/qtbase-6.6.1-r4.ebuild               | 365 ---------------------
 3 files changed, 422 deletions(-)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index e7e1d83..f20b2d9 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1,3 +1 @@
-DIST qtbase-6.6.1-QTBUG-116905.patch.xz 7132 BLAKE2B 5ad6108f3d278c7014a124733a7e0151d79ab9b82256948c09f2d7d93494020131ec52bae0a0c9ae1959afe724bc033805b28f12676b018dce7d04668d8dec01 SHA512 61c13a96b19bd9c06056681101c2c9d301a5d014c4a155b82ba9b7bce2ba0e715041cd6c3e8e45c9ec3d52c3b77bcf3145fbbf502a72ffbaac02f4eb6b82c912
-DIST qtbase-everywhere-src-6.6.1.tar.xz 48370760 BLAKE2B 2dd551d15eef30c7d9a5f4c406143d6f8908d7ebade9daf9fbd3d82a25765425956f2cb8689c50f87f6477de2150eee7b820ef25bb4355c51e7e7fad3ef73005 SHA512 93e77b9b077a3acd5607b643db282fdd7ed0bdfa07df74c3f0d2285afeb1672a6fa229a7e7a6c8a462701305fc22ffef20c212d906484e50fb5cdb706a7b72e1
 DIST qtbase-everywhere-src-6.6.2.tar.xz 48689304 BLAKE2B e00f4ac7ede0694b7934612f7dc3acdd50139d385492034c3046625a973d8adbca059e9d4081e248502cab8c673806cdb6b8bc5cee6d9356bbb0a7845db528a2 SHA512 ea343bcf269779a4e078ed8baddfbe6c5ec4a34275c7d72b3f3928da60feece2ddc9ce4a380c6536a4e1654b483cee8918f8ad3038904725d2dd1c653ae83ece

diff --git a/dev-qt/qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch b/dev-qt/qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch
deleted file mode 100644
index 8d2b0e7..0000000
--- a/dev-qt/qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Combination of the two patches [1][2] for CVE-2023-51714[3],
-fixed in upcoming qtbase-6.6.2.
-
-https://bugs.gentoo.org/921292
-
-[1] https://codereview.qt-project.org/c/qt/qtbase/+/525295
-[2] https://codereview.qt-project.org/c/qt/qtbase/+/525297
-[3] https://lists.qt-project.org/pipermail/announce/2024-January/000465.html
-
-From 13c16b756900fe524f6d9534e8a07aa003c05e0c Mon Sep 17 00:00:00 2001
-From: Marc Mutz <marc.mutz@qt.io>
-Date: Tue, 12 Dec 2023 20:51:56 +0100
-Subject: [PATCH] HPack: fix a Yoda Condition
-
-Putting the variable on the LHS of a relational operation makes the
-expression easier to read. In this case, we find that the whole
-expression is nonsensical as an overflow protection, because if
-name.size() + value.size() overflows, the result will exactly _not_
-be > max() - 32, because UB will have happened.
-
-To be fixed in a follow-up commit.
-
-As a drive-by, add parentheses around the RHS.
-
-From 811b9eef6d08d929af8708adbf2a5effb0eb62d7 Mon Sep 17 00:00:00 2001
-From: Marc Mutz <marc.mutz@qt.io>
-Date: Tue, 12 Dec 2023 22:08:07 +0100
-Subject: [PATCH] HPack: fix incorrect integer overflow check
-
-This code never worked:
-
-For the comparison with max() - 32 to trigger, on 32-bit platforms (or
-Qt 5) signed interger overflow would have had to happen in the
-addition of the two sizes. The compiler can therefore remove the
-overflow check as dead code.
-
-On Qt 6 and 64-bit platforms, the signed integer addition would be
-very unlikely to overflow, but the following truncation to uint32
-would yield the correct result only in a narrow 32-value window just
-below UINT_MAX, if even that.
-
-Fix by using the proper tool, qAddOverflow.
---- a/src/network/access/http2/hpacktable.cpp
-+++ b/src/network/access/http2/hpacktable.cpp
-@@ -27,6 +27,8 @@
-     // 32 octets of overhead."
- 
--    const unsigned sum = unsigned(name.size() + value.size());
--    if (std::numeric_limits<unsigned>::max() - 32 < sum)
-+    size_t sum;
-+    if (qAddOverflow(size_t(name.size()), size_t(value.size()), &sum))
-+        return HeaderSize();
-+    if (sum > (std::numeric_limits<unsigned>::max() - 32))
-         return HeaderSize();
-     return HeaderSize(true, quint32(sum + 32));

diff --git a/dev-qt/qtbase/qtbase-6.6.1-r4.ebuild b/dev-qt/qtbase/qtbase-6.6.1-r4.ebuild
deleted file mode 100644
index 40bd9f1..0000000
--- a/dev-qt/qtbase/qtbase-6.6.1-r4.ebuild
+++ /dev/null
@@ -1,365 +0,0 @@
-# Copyright 2021-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic qt6-build toolchain-funcs
-
-DESCRIPTION="Cross-platform application development framework"
-SRC_URI+=" https://dev.gentoo.org/~ionen/distfiles/${P}-QTBUG-116905.patch.xz"
-
-if [[ ${QT6_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-declare -A QT6_IUSE=(
-	[global]="+ssl +udev zstd"
-	[core]="icu"
-	[modules]="+concurrent +dbus +gui +network +sql +xml"
-
-	[gui]="
-		+X accessibility eglfs evdev gles2-only +libinput
-		opengl tslib vulkan +widgets
-	"
-	[network]="brotli gssapi libproxy sctp"
-	[sql]="mysql oci8 odbc postgres +sqlite"
-	[widgets]="cups gtk"
-
-	[optfeature]="nls wayland" #810802,864509
-)
-IUSE="${QT6_IUSE[*]}"
-REQUIRED_USE="
-	$(
-		printf '%s? ( gui ) ' ${QT6_IUSE[gui]//+/}
-		printf '%s? ( network ) ' ${QT6_IUSE[network]//+/}
-		printf '%s? ( sql ) ' ${QT6_IUSE[sql]//+/}
-		printf '%s? ( gui widgets ) ' ${QT6_IUSE[widgets]//+/}
-	)
-	accessibility? ( dbus )
-	eglfs? ( opengl )
-	gles2-only? ( opengl )
-	gui? ( || ( X eglfs wayland ) )
-	libinput? ( udev )
-	sql? ( || ( ${QT6_IUSE[sql]//+/} ) )
-	test? ( icu sql? ( sqlite ) )
-"
-
-# groups:
-# - global (configure.cmake)
-# - qtcore (src/corelib/configure.cmake)
-# - qtgui (src/gui/configure.cmake)
-# - qtnetwork (src/network/configure.cmake)
-# - qtprintsupport (src/printsupport/configure.cmake) [gui+widgets]
-# - qtsql (src/plugins/sqldrivers/configure.cmake)
-RDEPEND="
-	sys-libs/zlib:=
-	ssl? ( dev-libs/openssl:= )
-	udev? ( virtual/libudev:= )
-	zstd? ( app-arch/zstd:= )
-
-	app-crypt/libb2
-	dev-libs/double-conversion:=
-	dev-libs/glib:2
-	dev-libs/libpcre2:=[pcre16,unicode(+)]
-	icu? ( dev-libs/icu:= )
-
-	dbus? ( sys-apps/dbus )
-	gui? (
-		media-libs/fontconfig
-		media-libs/freetype:2
-		media-libs/harfbuzz:=
-		media-libs/libjpeg-turbo:=
-		media-libs/libpng:=
-		x11-libs/libdrm
-		x11-libs/libxkbcommon[X?]
-		X? (
-			x11-libs/libICE
-			x11-libs/libSM
-			x11-libs/libX11
-			x11-libs/libxcb:=
-			x11-libs/xcb-util-cursor
-			x11-libs/xcb-util-image
-			x11-libs/xcb-util-keysyms
-			x11-libs/xcb-util-renderutil
-			x11-libs/xcb-util-wm
-		)
-		accessibility? ( app-accessibility/at-spi2-core:2 )
-		eglfs? ( media-libs/mesa[gbm(+)] )
-		evdev? ( sys-libs/mtdev )
-		libinput? ( dev-libs/libinput:= )
-		opengl? (
-			gles2-only? ( media-libs/libglvnd )
-			!gles2-only? ( media-libs/libglvnd[X?] )
-		)
-		tslib? ( x11-libs/tslib )
-		widgets? (
-			cups? ( net-print/cups )
-			gtk? (
-				x11-libs/gdk-pixbuf:2
-				x11-libs/gtk+:3
-				x11-libs/pango
-			)
-		)
-	)
-	network? (
-		brotli? ( app-arch/brotli:= )
-		gssapi? ( virtual/krb5 )
-		libproxy? ( net-libs/libproxy )
-	)
-	sql? (
-		mysql? ( dev-db/mysql-connector-c:= )
-		oci8? ( dev-db/oracle-instantclient:=[sdk] )
-		odbc? ( dev-db/unixODBC )
-		postgres? ( dev-db/postgresql:* )
-		sqlite? ( dev-db/sqlite:3 )
-	)
-"
-DEPEND="
-	${RDEPEND}
-	X? ( x11-base/xorg-proto )
-	gui? (
-		vulkan? ( dev-util/vulkan-headers )
-	)
-	network? (
-		sctp? ( net-misc/lksctp-tools )
-	)
-	test? (
-		elibc_musl? ( sys-libs/timezone-data )
-	)
-"
-BDEPEND="zstd? ( app-arch/libarchive[zstd] )" #910392
-PDEPEND="
-	nls? ( ~dev-qt/qttranslations-${PV}:6 )
-	wayland? ( ~dev-qt/qtwayland-${PV}:6 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-6.6.0-libressl.patch
-	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
-	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
-	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
-	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
-	"${FILESDIR}"/${P}-CVE-2023-51714.patch
-	"${WORKDIR}"/${P}-QTBUG-116905.patch
-)
-
-src_prepare() {
-	qt6-build_src_prepare
-
-	if use test; then
-		# test itself has -Werror=strict-aliasing issues, drop for simplicity
-		sed -e '/add_subdirectory(qsharedpointer)/d' \
-			-i tests/auto/corelib/tools/CMakeLists.txt || die
-	fi
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DBUILD_WITH_PCH=OFF
-
-		-DINSTALL_ARCHDATADIR="${QT6_ARCHDATADIR}"
-		-DINSTALL_BINDIR="${QT6_BINDIR}"
-		-DINSTALL_DATADIR="${QT6_DATADIR}"
-		-DINSTALL_DOCDIR="${QT6_DOCDIR}"
-		-DINSTALL_EXAMPLESDIR="${QT6_EXAMPLESDIR}"
-		-DINSTALL_INCLUDEDIR="${QT6_HEADERDIR}"
-		-DINSTALL_LIBDIR="${QT6_LIBDIR}"
-		-DINSTALL_LIBEXECDIR="${QT6_LIBEXECDIR}"
-		-DINSTALL_MKSPECSDIR="${QT6_MKSPECSDIR}"
-		-DINSTALL_PLUGINSDIR="${QT6_PLUGINDIR}"
-		-DINSTALL_QMLDIR="${QT6_QMLDIR}"
-		-DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
-		-DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
-
-		$(qt_feature ssl openssl)
-		$(qt_feature ssl openssl_linked)
-		$(qt_feature udev libudev)
-		$(qt_feature zstd)
-
-		# qtcore
-		$(qt_feature icu)
-
-		# tools
-		-DQT_FEATURE_androiddeployqt=OFF
-
-		# modules
-		$(qt_feature concurrent)
-		$(qt_feature dbus)
-		$(qt_feature gui)
-		$(qt_feature network)
-		$(qt_feature sql)
-		# trivial, and is often needed (sometimes even when not building tests)
-		-DQT_FEATURE_testlib=ON
-		$(qt_feature xml)
-	)
-
-	use gui && mycmakeargs+=(
-		$(qt_feature X xcb)
-		$(qt_feature X system_xcb_xinput)
-		$(qt_feature X xkbcommon_x11)
-		$(cmake_use_find_package X X11) # needed for truly no automagic
-		$(qt_feature accessibility accessibility_atspi_bridge)
-		$(qt_feature eglfs)
-		$(qt_feature evdev)
-		$(qt_feature evdev mtdev)
-		$(qt_feature libinput)
-		$(qt_feature tslib)
-		$(qt_feature vulkan)
-		$(qt_feature widgets)
-		-DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
-		-DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
-	) && use widgets && mycmakeargs+=(
-		# note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
-		$(qt_feature cups)
-		$(qt_feature gtk gtk3)
-	)
-
-	use network && mycmakeargs+=(
-		$(qt_feature brotli)
-		$(qt_feature gssapi)
-		$(qt_feature libproxy)
-		$(qt_feature sctp)
-		$(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
-		-DQT_FEATURE_dtls=OFF # Required for LibreSSL
-	)
-
-	use sql && mycmakeargs+=(
-		-DQT_FEATURE_sql_db2=OFF # unpackaged
-		-DQT_FEATURE_sql_ibase=OFF # unpackaged
-		-DQT_FEATURE_sql_mimer=OFF # unpackaged
-		$(qt_feature mysql sql_mysql)
-		$(qt_feature oci8 sql_oci)
-		$(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client)
-		$(qt_feature odbc sql_odbc)
-		$(qt_feature postgres sql_psql)
-		$(qt_feature sqlite sql_sqlite)
-		$(qt_feature sqlite system_sqlite)
-	)
-
-	if use amd64 || use x86; then
-		# see bug #913400 for explanations
-		local cpufeats=(
-			# list of checked cpu features in configure.cmake
-			avx avx2 avx512{bw,cd,dq,er,f,ifma,pf,vbmi,vbmi2,vl}
-			f16c rdrnd rdseed sse2 sse3 sse4_1 sse4_2 ssse3 vaes
-		)
-		# handle odd ones out not matching -m* and macros (keep same order)
-		local cpuflags=( "${cpufeats[@]}" aes sha )
-		local cpufeats+=( aesni shani )
-
-		local -a intrins
-		IFS=' ' read -ra intrins < <(
-			: "$(test-flags-CXX "${cpuflags[@]/#/-m}")"
-			$(tc-getCXX) -E -P ${_} ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 1
-				$(printf '__%s__ ' "${cpuflags[@]^^}")
-			EOF
-			assert
-		)
-
-		# do nothing and leave to qtbase if no macros expanded (test failed?)
-		if [[ \ ${intrins[*]} == *\ [^_\ ]* ]]; then
-			local -i i
-			for ((i=0; i<${#cpufeats[@]}; i++)); do
-				[[ ${intrins[i]} == __* ]] &&
-					mycmakeargs+=( -DQT_FEATURE_${cpufeats[i]}=OFF )
-			done
-			mycmakeargs+=( -DTEST_x86intrin=ON )
-		fi
-	fi
-
-	qt6-build_src_configure
-}
-
-src_test() {
-	local -x TZ=UTC
-	local -x LC_TIME=C
-
-	local CMAKE_SKIP_TESTS=(
-		# broken with out-of-source + if qtbase is not already installed
-		tst_moc
-		tst_qmake
-		# needs x11/opengl, we *could* run these but tend to be flaky
-		# when opengl rendering is involved (even if software-only)
-		tst_qopengl{,config,widget,window}
-		tst_qgraphicsview
-		tst_qx11info
-		# fails with network sandbox
-		tst_qdnslookup
-		# fails with sandbox
-		tst_qsharedmemory
-		# typical to lack SCTP support on non-generic kernels
-		tst_qsctpsocket
-		# randomly fails without -j1, and not worth it over this (bug #916181)
-		tst_qfiledialog{,2}
-		# may randomly hang+timeout, perhaps related to -j as well
-		tst_qtimer
-		# these can be flaky depending on the environment/toolchain
-		tst_qlogging # backtrace log test can easily vary
-		tst_q{,raw}font # affected by available fonts / settings (bug #914737)
-		tst_qprinter # checks system's printers (bug #916216)
-		tst_qstorageinfo # checks mounted filesystems
-		# flaky due to using different test framework and fails with USE=-gui
-		tst_selftests
-		# known failing when using clang+glibc+stdc++, needs looking into
-		tst_qthread
-		# partially failing on x86 chroots and seemingly(?) harmless (dev-qt
-		# revdeps tests pass), skip globally to avoid keywording flakiness
-		tst_json
-		tst_qcolorspace
-		tst_qdoublevalidator
-		tst_qglobal
-		tst_qglyphrun
-		tst_qvectornd
-		tst_rcc
-		# similarly, but on armv7 and potentially others (bug #914028)
-		tst_qlineedit
-		tst_qpainter
-		# likewise, known failing on BE arches (bug #914033,914371,918878)
-		tst_qimagereader
-		tst_qimagewriter
-		tst_qpluginloader
-		tst_quuid
-		# partially broken on llvm-musl, needs looking into but skip to have
-		# a baseline for regressions (rest of dev-qt still passes with musl)
-		$(usev elibc_musl '
-			tst_qicoimageformat
-			tst_qimagereader
-			tst_qimage
-		')
-		# fails due to hppa's NaN handling, needs looking into (bug #914371)
-		$(usev hppa '
-			tst_qcborvalue
-			tst_qnumeric
-		')
-		# bug #914033
-		$(usev sparc '
-			tst_qbuffer
-			tst_qprocess
-			tst_qtconcurrentiteratekernel
-		')
-		# note: for linux, upstream only really runs+maintains tests for amd64
-		# https://doc.qt.io/qt-6/supported-platforms.html
-	)
-
-	qt6-build_src_test
-}
-
-src_install() {
-	qt6-build_src_install
-
-	if use test; then
-		local delete_bins=( # need a better way to handle this
-			clientserver copier crashingServer desktopsettingsaware_helper
-			echo fileWriterProcess modal_helper nospace 'one space'
-			paster qcommandlineparser_test_helper qfileopeneventexternal
-			socketprocess syslocaleapp tst_qhashseed_helper 'two space s'
-			write-read-write
-		)
-		local delete=( # sigh
-			"${D}${QT6_BINDIR}"/test*
-			"${delete_bins[@]/#/${D}${QT6_BINDIR}/}"
-		)
-		# using -f given not tracking which tests may be skipped or not
-		rm -rf -- "${delete[@]}" || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-03-27 20:03 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2024-03-27 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     86c1b892ee9a1b255b08e9d7d5b84e4e91a68a09
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Mar 27 17:57:35 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Mar 27 17:57:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=86c1b892

dev-qt/qtbase: add 6.6.2-r1, 6.6.3, drop 6.6.2

Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-qt/qtbase/Manifest                                    |  1 +
 dev-qt/qtbase/files/qtbase-6.6.3-gcc14-avx512fp16.patch   | 15 +++++++++++++++
 .../{qtbase-6.6.2.ebuild => qtbase-6.6.2-r1.ebuild}       |  5 +++++
 .../qtbase/{qtbase-6.6.2.ebuild => qtbase-6.6.3.ebuild}   | 11 +++++++++--
 4 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index f20b2d9..4f9dfae 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1 +1,2 @@
 DIST qtbase-everywhere-src-6.6.2.tar.xz 48689304 BLAKE2B e00f4ac7ede0694b7934612f7dc3acdd50139d385492034c3046625a973d8adbca059e9d4081e248502cab8c673806cdb6b8bc5cee6d9356bbb0a7845db528a2 SHA512 ea343bcf269779a4e078ed8baddfbe6c5ec4a34275c7d72b3f3928da60feece2ddc9ce4a380c6536a4e1654b483cee8918f8ad3038904725d2dd1c653ae83ece
+DIST qtbase-everywhere-src-6.6.3.tar.xz 48784716 BLAKE2B f79e369c31968d026fb50dd64d53931ea28c25bd7eb442806760f733dbcacd868774d1c991d4da80c5eb40e24d75ffaba61b2cb9036fdc2d189f865b22143596 SHA512 cd96903a3947a1f5cf6a3ff21ab0b3209ed421d2a8c45acb34ae5aa7ad0501cb79e26cfa81bc02141d5731ebfa662442f37806e97994332077d963c9e70a5f54

diff --git a/dev-qt/qtbase/files/qtbase-6.6.3-gcc14-avx512fp16.patch b/dev-qt/qtbase/files/qtbase-6.6.3-gcc14-avx512fp16.patch
new file mode 100644
index 0000000..e7eb9dc
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.6.3-gcc14-avx512fp16.patch
@@ -0,0 +1,15 @@
+Simply disable the broken path rather than worry about it for now.
+
+Likely an easy fix but would rather this be handled upstream and
+reported by someone that is affected and can test.
+
+https://bugs.gentoo.org/926287
+--- a/src/gui/painting/qrgbafloat.h
++++ b/src/gui/painting/qrgbafloat.h
+@@ -20,5 +20,5 @@
+ public:
+     using Type = F;
+-#if defined(__AVX512FP16__) && QFLOAT16_IS_NATIVE
++#if 0
+     // AVX512FP16 has multiplication instructions
+     using FastType = F;

diff --git a/dev-qt/qtbase/qtbase-6.6.2.ebuild b/dev-qt/qtbase/qtbase-6.6.2-r1.ebuild
similarity index 98%
copy from dev-qt/qtbase/qtbase-6.6.2.ebuild
copy to dev-qt/qtbase/qtbase-6.6.2-r1.ebuild
index 6520749..420111b 100644
--- a/dev-qt/qtbase/qtbase-6.6.2.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.2-r1.ebuild
@@ -169,6 +169,7 @@ src_configure() {
 		-DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
 		-DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
 
+		-DQT_FEATURE_relocatable=OFF #927691
 		$(qt_feature ssl openssl)
 		$(qt_feature ssl openssl_linked)
 		$(qt_feature udev libudev)
@@ -276,6 +277,10 @@ src_test() {
 		# broken with out-of-source + if qtbase is not already installed
 		tst_moc
 		tst_qmake
+		# similarly broken when relocatable=OFF (bug #927691)
+		tst_qapplication
+		tst_qt_cmake_create
+		tst_uic
 		# needs x11/opengl, we *could* run these but tend to be flaky
 		# when opengl rendering is involved (even if software-only)
 		tst_qopengl{,config,widget,window}

diff --git a/dev-qt/qtbase/qtbase-6.6.2.ebuild b/dev-qt/qtbase/qtbase-6.6.3.ebuild
similarity index 96%
rename from dev-qt/qtbase/qtbase-6.6.2.ebuild
rename to dev-qt/qtbase/qtbase-6.6.3.ebuild
index 6520749..faebd94 100644
--- a/dev-qt/qtbase/qtbase-6.6.2.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.3.ebuild
@@ -8,7 +8,7 @@ inherit flag-o-matic qt6-build toolchain-funcs
 DESCRIPTION="Cross-platform application development framework"
 
 if [[ ${QT6_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 ~arm arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
 fi
 
 declare -A QT6_IUSE=(
@@ -138,7 +138,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
-	"${FILESDIR}"/${PN}-6.6.2-x32abi.patch
+	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
 )
 
 src_prepare() {
@@ -169,6 +169,9 @@ src_configure() {
 		-DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
 		-DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
 
+		-DQT_UNITY_BUILD=ON # ~30% faster build, affects other dev-qt/* too
+
+		-DQT_FEATURE_relocatable=OFF #927691
 		$(qt_feature ssl openssl)
 		$(qt_feature ssl openssl_linked)
 		$(qt_feature udev libudev)
@@ -276,6 +279,10 @@ src_test() {
 		# broken with out-of-source + if qtbase is not already installed
 		tst_moc
 		tst_qmake
+		# similarly broken when relocatable=OFF (bug #927691)
+		tst_qapplication
+		tst_qt_cmake_create
+		tst_uic
 		# needs x11/opengl, we *could* run these but tend to be flaky
 		# when opengl rendering is involved (even if software-only)
 		tst_qopengl{,config,widget,window}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-04-05 16:50 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2024-04-05 16:50 UTC (permalink / raw
  To: gentoo-commits

commit:     85847c4bc13681bc6822ede9aab31d63c38bc225
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Apr  5 16:48:25 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri Apr  5 16:48:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=85847c4b

dev-qt/qtbase: add 6.6.3-r1, 6.7.0-r1, drop 6.6.3, 6.7.0

Signed-off-by: orbea <orbea <AT> riseup.net>

 .../qtbase/files/qtbase-6.6.3-pkgconf-deps.patch   | 35 ++++++++++++++++++++++
 dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch | 29 ++++++++++++++++++
 ...{qtbase-6.6.3.ebuild => qtbase-6.6.3-r1.ebuild} |  1 +
 ...{qtbase-6.7.0.ebuild => qtbase-6.7.0-r1.ebuild} |  2 ++
 4 files changed, 67 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.6.3-pkgconf-deps.patch b/dev-qt/qtbase/files/qtbase-6.6.3-pkgconf-deps.patch
new file mode 100644
index 0000000..965dade
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.6.3-pkgconf-deps.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/928299
+https://bugreports.qt.io/browse/QTBUG-124135
+https://codereview.qt-project.org/c/qt/qtbase/+/553372
+From: Alexey Edelev <alexey.edelev@qt.io>
+Date: Fri, 05 Apr 2024 14:50:37 +0200
+Subject: [PATCH] Prefer the versioned targets over the namespaceless one when collecting deps
+
+Change the way we collect dependencies in __qt_internal_walk_libs.
+Prefer the versioned Qt targets over the namespaceless. This fixes the
+generating of the pkg-config configs.
+
+Pick-to: 6.5 6.6 6.7
+Task-number: QTBUG-124135
+Change-Id: I660376e122a99b5bc0874f2bc6ccd4d80c9ad453
+--- a/cmake/QtPublicWalkLibsHelpers.cmake
++++ b/cmake/QtPublicWalkLibsHelpers.cmake
+@@ -184,13 +184,13 @@
+             if(lib_target MATCHES "^::@")
+                 continue()
+             elseif(TARGET ${lib_target})
+-                if ("${lib_target}" MATCHES "^Qt::(.*)")
+-                    # If both, Qt::Foo and Foo targets exist, prefer the target name without
++                if(NOT "${lib_target}" MATCHES "^(Qt|${QT_CMAKE_EXPORT_NAMESPACE})::.+")
++                    # If both, Qt::Foo and Foo targets exist, prefer the target name with versioned
+                     # namespace. Which one is preferred doesn't really matter. This code exists to
+                     # avoid ending up with both, Qt::Foo and Foo in our dependencies.
+-                    set(namespaceless_lib_target "${CMAKE_MATCH_1}")
+-                    if(TARGET "${namespaceless_lib_target}")
+-                        set(lib_target ${namespaceless_lib_target})
++                    set(versioned_qt_target "${QT_CMAKE_EXPORT_NAMESPACE}::${lib_target}")
++                    if(TARGET "${versioned_qt_target}")
++                        set(lib_target ${versioned_qt_target})
+                     endif()
+                 endif()
+                 get_target_property(lib_target_type ${lib_target} TYPE)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch b/dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch
new file mode 100644
index 0000000..4c2a37c
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch
@@ -0,0 +1,29 @@
+https://bugreports.qt.io/browse/QTBUG-123937
+From 6810220218cbbf2854ecdedb291f7e4a84b31e54 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Wed, 3 Apr 2024 00:47:01 +0200
+Subject: [PATCH] Use ifdef instead of if for __cpp_lib_span
+
+Like the other times it's used in this file
+
+This is causing compilation errors in projects that use -Werror=undef
+
+Fixes: QTBUG-123937
+Change-Id: I0cdd2910755dc9079890011dd8dbc27a6e64793e
+Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
+(cherry picked from commit 699ddcb15b5e981d32ea65d1c1a12f8fa0b06e0d)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+--- a/src/corelib/tools/qspan.h
++++ b/src/corelib/tools/qspan.h
+@@ -297,7 +297,7 @@ public:
+         : QSpanBase(il.begin(), il.size())
+     {}
+ 
+-#if __cpp_lib_span
++#ifdef __cpp_lib_span
+     template <typename S, size_t N, if_qualification_conversion<S> = true>
+     Q_IMPLICIT constexpr QSpanBase(std::span<S, N> other) noexcept
+         : QSpanBase(other.data(), other.size())
+-- 
+2.44.0
+

diff --git a/dev-qt/qtbase/qtbase-6.6.3.ebuild b/dev-qt/qtbase/qtbase-6.6.3-r1.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.6.3.ebuild
rename to dev-qt/qtbase/qtbase-6.6.3-r1.ebuild
index 8b6f0aa..ffc9fda 100644
--- a/dev-qt/qtbase/qtbase-6.6.3.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.3-r1.ebuild
@@ -139,6 +139,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
+	"${FILESDIR}"/${PN}-6.6.3-pkgconf-deps.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.7.0.ebuild b/dev-qt/qtbase/qtbase-6.7.0-r1.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.7.0.ebuild
rename to dev-qt/qtbase/qtbase-6.7.0-r1.ebuild
index 9c6fc62..11d620d 100644
--- a/dev-qt/qtbase/qtbase-6.7.0.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.0-r1.ebuild
@@ -140,6 +140,8 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
+	"${FILESDIR}"/${PN}-6.6.3-pkgconf-deps.patch
+	"${FILESDIR}"/${PN}-6.7.0-qspan-ifdef.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-05-24 13:18 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2024-05-24 13:18 UTC (permalink / raw
  To: gentoo-commits

commit:     40aa0f1e1c06b18b127390630df15b141b65d98b
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri May 24 13:11:00 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri May 24 13:11:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=40aa0f1e

dev-qt/qtbase: add 6.7.1

Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-qt/qtbase/Manifest                             |   1 +
 .../files/qtbase-6.7.1-qeventlooplocker.patch      | 159 +++++++++
 dev-qt/qtbase/qtbase-6.7.1.ebuild                  | 383 +++++++++++++++++++++
 3 files changed, 543 insertions(+)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index 339951b..5852d21 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1 +1,2 @@
 DIST qtbase-everywhere-src-6.7.0.tar.xz 49314276 BLAKE2B f4ec35fd3c15d56a28e1608dec927eaf34d84c2250405d921adadc16d90ec148f4983024dcf9be1832de91381d18e33fd7578d60d8654469e23530a210618e11 SHA512 72896cc5a677361779f49d60dbdfc33a21d77bd479e0586b0beb03eee2016d613aee56e798143a489431a07a5e7a7db4c7c046105a11b63dd178768f3a7f195a
+DIST qtbase-everywhere-src-6.7.1.tar.xz 49324536 BLAKE2B 5e5a5801c29c1ac541812931cd56709a934a500ce4d5a38e7d3776620cb46db0d25408c22cbf33a7bcc657098c571e501fde14f523a77acba1827edd977d2bc5 SHA512 864bebfc3659907e52b8dc3f62a65d431573ef2bf406a9f71c688229083a2128c5474f75823275d11948be3d031de1d6427acf373f977df9ee9e73a27ef56efb

diff --git a/dev-qt/qtbase/files/qtbase-6.7.1-qeventlooplocker.patch b/dev-qt/qtbase/files/qtbase-6.7.1-qeventlooplocker.patch
new file mode 100644
index 0000000..ff2bf19
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.1-qeventlooplocker.patch
@@ -0,0 +1,159 @@
+https://bugs.kde.org/show_bug.cgi?id=484405
+https://bugreports.qt.io/browse/QTBUG-124386
+https://codereview.qt-project.org/c/qt/qtbase/+/556573
+https://github.com/qt/qtbase/commit/a8ef8ea55014546e0e835cd0eacf694919702a11
+From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= <tor.arne.vestbo@qt.io>
+Date: Wed, 24 Apr 2024 22:33:42 +0200
+Subject: [PATCH] Don't quit automatically via QEventLoopLocker if there are
+ open windows
+
+As part of df359bcb703db5a8adbf14e88ba4ae0d54f0cfcd the semantics and
+interaction between QEventLoopLocker and QGuiApplication was changed,
+based on the assumption that these two mechanisms were independent
+and should not affect each other.
+
+This had a surprising regression where the use of QEventLoopLocker in
+combination with the QCoreApplication::isQuitLockEnabled() automatic
+quit would end up quitting the app, even if it had open windows, for
+example when the last job of some internal job queue finished.
+
+It could be argued that if the app has open windows that should not
+be closed, they should ignore the Close event, and that an application
+with running QEventLoopLocker jobs should maintain an active window
+showing the progress of those jobs, but still, this is regression
+that we want to fix.
+
+We now bail out if !lastWindowClosed() in QGuiApplication's
+canQuitAutomatically, which is triggered from QEventLoopLocker's
+isQuitLockEnabled() behavior. And we do so regardless of whether
+quitOnLastWindowClosed is set or not, as the latter property
+determines the behavior when closing a window, not the behavior
+when a QEventLoopLocker goes out of scope.
+
+Similarly, we now block quitting of the application when triggered
+by quitOnLastWindowClosed() if a QEventLoop is active, regardless of
+the isQuitLockEnabled(), as the latter property is determining
+whether we should trigger a quit, not whether we should block them.
+
+[ChangeLog][Important behavior changes] Fixed a regression where
+the last QEventLoopLocker going out of scope would quit the app,
+even if there were open windows, if quitOnLastWindowClosed was
+false.
+
+[ChangeLog][Important behavior changes] Fixed a regression where
+closing the last window would quit the app, even if there were
+active QEventLoopLockers, if isQuitLockEnabled was false.
+--- a/src/corelib/kernel/qcoreapplication.cpp
++++ b/src/corelib/kernel/qcoreapplication.cpp
+@@ -1081,2 +1081,10 @@
+ 
++    When this property is \c true the release of the last remaining
++    QEventLoopLocker operating on the application will attempt to
++    quit the application.
++
++    Note that attempting a quit may not necessarily result in the
++    application quitting, for example if there still are open windows,
++    or the QEvent::Quit event is ignored.
++
+     The default is \c true.
+@@ -2083,3 +2091,9 @@
+ 
+-    if (quitLockEnabled && quitLockRef.loadRelaxed())
++    // The automatic quit functionality is triggered by
++    // both QEventLoopLocker and maybeLastWindowClosed.
++    // In either case, we don't want to quit if there
++    // are active QEventLoopLockers, even if quitLockEnabled
++    // is not enabled, as the property signals whether to
++    // trigger the automatic quit, not whether to block it.
++    if (quitLockRef.loadRelaxed())
+         return false;
+--- a/src/corelib/kernel/qeventloop.cpp
++++ b/src/corelib/kernel/qeventloop.cpp
+@@ -339,3 +339,7 @@
+ 
+-    The application will quit when there are no more QEventLoopLockers operating on it.
++    The application will attempt to quit when there are no more QEventLoopLockers
++    operating on it, as long as QCoreApplication::isQuitLockEnabled() is \c true.
++
++    Note that attempting a quit may not necessarily result in the application quitting,
++    if there for example are open windows, or the QEvent::Quit event is ignored.
+ 
+--- a/src/gui/kernel/qguiapplication.cpp
++++ b/src/gui/kernel/qguiapplication.cpp
+@@ -3677,5 +3677,9 @@
+ 
+-    If this property is \c true, the applications quits when the last visible
+-    \l{Primary and Secondary Windows}{primary window} (i.e. top level window
+-    with no transient parent) is closed.
++    If this property is \c true, the application will attempt to
++    quit when the last visible \l{Primary and Secondary Windows}{primary window}
++    (i.e. top level window with no transient parent) is closed.
++
++    Note that attempting a quit may not necessarily result in the
++    application quitting, for example if there still are active
++    QEventLoopLocker instances, or the QEvent::Quit event is ignored.
+ 
+@@ -3735,3 +3739,9 @@
+ {
+-    if (quitOnLastWindowClosed && !lastWindowClosed())
++    // The automatic quit functionality is triggered by
++    // both QEventLoopLocker and maybeLastWindowClosed.
++    // Although the former is a QCoreApplication feature
++    // we don't want to quit the application when there
++    // are open windows, regardless of whether the app
++    // also quits automatically on maybeLastWindowClosed.
++    if (!lastWindowClosed())
+         return false;
+--- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
++++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
+@@ -1010,4 +1010,4 @@
+     {
+-        // Disabling QEventLoopLocker support should not affect
+-        // quitting when last window is closed.
++        // Disabling QEventLoopLocker automatic quit should not affect
++        // quitting when last window is closed if there are no lockers.
+         app.setQuitLockEnabled(false);
+@@ -1025,4 +1025,36 @@
+     {
+-        // Disabling quitOnLastWindowClosed support should not affect
+-        // quitting when last QEventLoopLocker goes out of scope.
++        // Disabling QEventLoopLocker automatic quit should still block
++        // quitting when last window is closed if there is a locker alive.
++        app.setQuitLockEnabled(false);
++
++        QScopedPointer<QEventLoopLocker> locker(new QEventLoopLocker);
++
++        QuitSpy quitSpy;
++        QWindow window;
++        window.show();
++        QVERIFY(QTest::qWaitForWindowExposed(&window));
++        QTimer::singleShot(0, &window, &QWindow::close);
++        QTimer::singleShot(200, &app, []{ QCoreApplication::exit(0); });
++        app.exec();
++        QCOMPARE(quitSpy.quits, 0);
++    }
++
++    {
++        // Disabling quitOnLastWindowClosed automatic quit should not affect
++        // quitting when last QEventLoopLocker goes out of scope if
++        // there are no windows.
++        app.setQuitLockEnabled(true);
++        app.setQuitOnLastWindowClosed(false);
++
++        QuitSpy quitSpy;
++        QScopedPointer<QEventLoopLocker> locker(new QEventLoopLocker);
++        QTimer::singleShot(0, [&]{ locker.reset(nullptr); });
++        QTimer::singleShot(200, &app, []{ QCoreApplication::exit(0); });
++        app.exec();
++        QCOMPARE(quitSpy.quits, 1);
++    }
++
++    {
++        // Disabling quitOnLastWindowClosed automatic quit should still block
++        // quitting via QEventLoopLocker if there's a window alive.
+         app.setQuitLockEnabled(true);
+@@ -1038,3 +1070,3 @@
+         app.exec();
+-        QCOMPARE(quitSpy.quits, 1);
++        QCOMPARE(quitSpy.quits, 0);
+     }

diff --git a/dev-qt/qtbase/qtbase-6.7.1.ebuild b/dev-qt/qtbase/qtbase-6.7.1.ebuild
new file mode 100644
index 0000000..78d1164
--- /dev/null
+++ b/dev-qt/qtbase/qtbase-6.7.1.ebuild
@@ -0,0 +1,383 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic qt6-build toolchain-funcs
+
+DESCRIPTION="Cross-platform application development framework"
+
+if [[ ${QT6_BUILD_TYPE} == release ]]; then
+	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+declare -A QT6_IUSE=(
+	[global]="+ssl +udev zstd"
+	[core]="icu"
+	[modules]="+concurrent +dbus +gui +network +sql +xml"
+
+	[gui]="
+		+X accessibility eglfs evdev gles2-only +libinput
+		opengl renderdoc tslib vulkan wayland +widgets
+	"
+	[network]="brotli gssapi libproxy sctp"
+	[sql]="mysql oci8 odbc postgres +sqlite"
+	[widgets]="cups gtk"
+
+	[optfeature]="nls" #810802
+)
+IUSE="${QT6_IUSE[*]}"
+REQUIRED_USE="
+	$(
+		printf '%s? ( gui ) ' ${QT6_IUSE[gui]//+/}
+		printf '%s? ( network ) ' ${QT6_IUSE[network]//+/}
+		printf '%s? ( sql ) ' ${QT6_IUSE[sql]//+/}
+		printf '%s? ( gui widgets ) ' ${QT6_IUSE[widgets]//+/}
+	)
+	accessibility? ( dbus )
+	eglfs? ( opengl )
+	gles2-only? ( opengl )
+	gui? ( || ( X eglfs wayland ) )
+	libinput? ( udev )
+	sql? ( || ( ${QT6_IUSE[sql]//+/} ) )
+	test? ( icu sql? ( sqlite ) )
+"
+
+# groups:
+# - global (configure.cmake)
+# - qtcore (src/corelib/configure.cmake)
+# - qtgui (src/gui/configure.cmake)
+# - qtnetwork (src/network/configure.cmake)
+# - qtprintsupport (src/printsupport/configure.cmake) [gui+widgets]
+# - qtsql (src/plugins/sqldrivers/configure.cmake)
+# dlopen: renderdoc
+RDEPEND="
+	sys-libs/zlib:=
+	ssl? ( dev-libs/openssl:= )
+	udev? ( virtual/libudev:= )
+	zstd? ( app-arch/zstd:= )
+
+	app-crypt/libb2
+	dev-libs/double-conversion:=
+	dev-libs/glib:2
+	dev-libs/libpcre2:=[pcre16,unicode(+)]
+	icu? ( dev-libs/icu:= )
+
+	dbus? ( sys-apps/dbus )
+	gui? (
+		media-libs/fontconfig
+		media-libs/freetype:2
+		media-libs/harfbuzz:=
+		media-libs/libjpeg-turbo:=
+		media-libs/libpng:=
+		x11-libs/libdrm
+		x11-libs/libxkbcommon[X?]
+		X? (
+			x11-libs/libICE
+			x11-libs/libSM
+			x11-libs/libX11
+			x11-libs/libxcb:=
+			x11-libs/xcb-util-cursor
+			x11-libs/xcb-util-image
+			x11-libs/xcb-util-keysyms
+			x11-libs/xcb-util-renderutil
+			x11-libs/xcb-util-wm
+		)
+		accessibility? ( app-accessibility/at-spi2-core:2 )
+		eglfs? ( media-libs/mesa[gbm(+)] )
+		evdev? ( sys-libs/mtdev )
+		libinput? ( dev-libs/libinput:= )
+		opengl? (
+			gles2-only? ( media-libs/libglvnd )
+			!gles2-only? ( media-libs/libglvnd[X?] )
+		)
+		renderdoc? ( media-gfx/renderdoc )
+		tslib? ( x11-libs/tslib )
+		widgets? (
+			cups? ( net-print/cups )
+			gtk? (
+				x11-libs/gdk-pixbuf:2
+				x11-libs/gtk+:3
+				x11-libs/pango
+			)
+		)
+	)
+	network? (
+		brotli? ( app-arch/brotli:= )
+		gssapi? ( virtual/krb5 )
+		libproxy? ( net-libs/libproxy )
+	)
+	sql? (
+		mysql? ( dev-db/mysql-connector-c:= )
+		oci8? ( dev-db/oracle-instantclient:=[sdk] )
+		odbc? ( dev-db/unixODBC )
+		postgres? ( dev-db/postgresql:* )
+		sqlite? ( dev-db/sqlite:3 )
+	)
+"
+DEPEND="
+	${RDEPEND}
+	X? ( x11-base/xorg-proto )
+	gui? (
+		vulkan? ( dev-util/vulkan-headers )
+	)
+	network? (
+		sctp? ( net-misc/lksctp-tools )
+	)
+	test? (
+		elibc_musl? ( sys-libs/timezone-data )
+	)
+"
+BDEPEND="zstd? ( app-arch/libarchive[zstd] )" #910392
+PDEPEND="
+	nls? ( ~dev-qt/qttranslations-${PV}:6 )
+	wayland? ( ~dev-qt/qtwayland-${PV}:6 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.6.0-libressl.patch
+	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
+	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
+	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
+	"${FILESDIR}"/${PN}-6.6.3-pkgconf-deps.patch
+	"${FILESDIR}"/${PN}-6.7.1-qeventlooplocker.patch
+)
+
+src_prepare() {
+	qt6-build_src_prepare
+
+	if use test; then
+		# test itself has -Werror=strict-aliasing issues, drop for simplicity
+		sed -e '/add_subdirectory(qsharedpointer)/d' \
+			-i tests/auto/corelib/tools/CMakeLists.txt || die
+
+		# workaround for __extendhfxf2 being used for tst_qfloat16.cpp
+		# which is unavailable with compiler-rt (assume used if clang)
+		if tc-is-clang; then
+			sed -e '/add_subdirectory(qfloat16)/d' \
+				-i tests/auto/corelib/global/CMakeLists.txt || die
+		fi
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_WITH_PCH=OFF
+
+		-DINSTALL_ARCHDATADIR="${QT6_ARCHDATADIR}"
+		-DINSTALL_BINDIR="${QT6_BINDIR}"
+		-DINSTALL_DATADIR="${QT6_DATADIR}"
+		-DINSTALL_DOCDIR="${QT6_DOCDIR}"
+		-DINSTALL_EXAMPLESDIR="${QT6_EXAMPLESDIR}"
+		-DINSTALL_INCLUDEDIR="${QT6_HEADERDIR}"
+		-DINSTALL_LIBDIR="${QT6_LIBDIR}"
+		-DINSTALL_LIBEXECDIR="${QT6_LIBEXECDIR}"
+		-DINSTALL_MKSPECSDIR="${QT6_MKSPECSDIR}"
+		-DINSTALL_PLUGINSDIR="${QT6_PLUGINDIR}"
+		-DINSTALL_QMLDIR="${QT6_QMLDIR}"
+		-DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
+		-DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
+
+		-DQT_UNITY_BUILD=ON # ~30% faster build, affects other dev-qt/* too
+
+		-DQT_FEATURE_relocatable=OFF #927691
+		$(qt_feature ssl openssl)
+		$(qt_feature ssl openssl_linked)
+		$(qt_feature udev libudev)
+		$(qt_feature zstd)
+
+		# qtcore
+		$(qt_feature icu)
+
+		# tools
+		-DQT_FEATURE_androiddeployqt=OFF
+
+		# modules
+		$(qt_feature concurrent)
+		$(qt_feature dbus)
+		$(qt_feature gui)
+		$(qt_feature network)
+		$(qt_feature sql)
+		# trivial, and is often needed (sometimes even when not building tests)
+		-DQT_FEATURE_testlib=ON
+		$(qt_feature xml)
+	)
+
+	use gui && mycmakeargs+=(
+		$(qt_feature X xcb)
+		$(qt_feature X system_xcb_xinput)
+		$(qt_feature X xkbcommon_x11)
+		$(cmake_use_find_package X X11) # needed for truly no automagic
+		$(qt_feature accessibility accessibility_atspi_bridge)
+		$(qt_feature eglfs)
+		$(qt_feature evdev)
+		$(qt_feature evdev mtdev)
+		$(qt_feature libinput)
+		$(qt_feature renderdoc graphicsframecapture)
+		$(qt_feature tslib)
+		$(qt_feature vulkan)
+		$(qt_feature wayland)
+		$(qt_feature widgets)
+		-DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
+		-DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
+	) && use widgets && mycmakeargs+=(
+		# note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
+		$(qt_feature cups)
+		$(qt_feature gtk gtk3)
+	)
+
+	use network && mycmakeargs+=(
+		$(qt_feature brotli)
+		$(qt_feature gssapi)
+		$(qt_feature libproxy)
+		$(qt_feature sctp)
+		$(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
+		-DQT_FEATURE_dtls=OFF # Required for LibreSSL
+	)
+
+	use sql && mycmakeargs+=(
+		-DQT_FEATURE_sql_db2=OFF # unpackaged
+		-DQT_FEATURE_sql_ibase=OFF # unpackaged
+		-DQT_FEATURE_sql_mimer=OFF # unpackaged
+		$(qt_feature mysql sql_mysql)
+		$(qt_feature oci8 sql_oci)
+		$(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client)
+		$(qt_feature odbc sql_odbc)
+		$(qt_feature postgres sql_psql)
+		$(qt_feature sqlite sql_sqlite)
+		$(qt_feature sqlite system_sqlite)
+	)
+
+	if use amd64 || use x86; then
+		# see bug #913400 for explanations
+		local cpufeats=(
+			# list of checked cpu features in configure.cmake
+			avx avx2 avx512{bw,cd,dq,er,f,ifma,pf,vbmi,vbmi2,vl}
+			f16c rdrnd rdseed sse2 sse3 sse4_1 sse4_2 ssse3 vaes
+		)
+		# handle odd ones out not matching -m* and macros (keep same order)
+		local cpuflags=( "${cpufeats[@]}" aes sha )
+		local cpufeats+=( aesni shani )
+
+		local -a intrins
+		IFS=' ' read -ra intrins < <(
+			: "$(test-flags-CXX "${cpuflags[@]/#/-m}")"
+			$(tc-getCXX) -E -P ${_} ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 1
+				$(printf '__%s__ ' "${cpuflags[@]^^}")
+			EOF
+			assert
+		)
+
+		# do nothing and leave to qtbase if no macros expanded (test failed?)
+		if [[ \ ${intrins[*]} == *\ [^_\ ]* ]]; then
+			local -i i
+			for ((i=0; i<${#cpufeats[@]}; i++)); do
+				[[ ${intrins[i]} == __* ]] &&
+					mycmakeargs+=( -DQT_FEATURE_${cpufeats[i]}=OFF )
+			done
+			mycmakeargs+=( -DTEST_x86intrin=ON )
+		fi
+	fi
+
+	qt6-build_src_configure
+}
+
+src_test() {
+	local -x TZ=UTC
+	local -x LC_TIME=C
+
+	local CMAKE_SKIP_TESTS=(
+		# broken with out-of-source + if qtbase is not already installed
+		tst_moc
+		tst_qmake
+		# similarly broken when relocatable=OFF (bug #927691)
+		tst_qapplication
+		tst_qt_cmake_create
+		tst_uic
+		# needs x11/opengl, we *could* run these but tend to be flaky
+		# when opengl rendering is involved (even if software-only)
+		tst_qopengl{,config,widget,window}
+		tst_qgraphicsview
+		tst_qx11info
+		# fails with network sandbox
+		tst_qdnslookup
+		# fails with sandbox
+		tst_qsharedmemory
+		# typical to lack SCTP support on non-generic kernels
+		tst_qsctpsocket
+		# randomly fails without -j1, and not worth it over this (bug #916181)
+		tst_qfiledialog{,2}
+		# may randomly hang+timeout, perhaps related to -j as well
+		tst_qtimer
+		# these can be flaky depending on the environment/toolchain
+		tst_qlogging # backtrace log test can easily vary
+		tst_q{,raw}font # affected by available fonts / settings (bug #914737)
+		tst_qprinter # checks system's printers (bug #916216)
+		tst_qstorageinfo # checks mounted filesystems
+		# flaky due to using different test framework and fails with USE=-gui
+		tst_selftests
+		# known failing when using clang+glibc+stdc++, needs looking into
+		tst_qthread
+		# partially failing on x86 chroots and seemingly(?) harmless (dev-qt
+		# revdeps tests pass), skip globally to avoid keywording flakiness
+		tst_json
+		tst_qcolorspace
+		tst_qdoublevalidator
+		tst_qglobal
+		tst_qglyphrun
+		tst_qvectornd
+		tst_rcc
+		# similarly, but on armv7 and potentially others (bug #914028)
+		tst_qlineedit
+		tst_qpainter
+		# likewise, known failing on BE arches (bug #914033,914371,918878)
+		tst_qimagereader
+		tst_qimagewriter
+		tst_qpluginloader
+		tst_quuid # >=6.6.2 had related fixes, needs retesting
+		# partially broken on llvm-musl, needs looking into but skip to have
+		# a baseline for regressions (rest of dev-qt still passes with musl)
+		$(usev elibc_musl '
+			tst_qicoimageformat
+			tst_qimagereader
+			tst_qimage
+			tst_qprocess
+		')
+		# fails due to hppa's NaN handling, needs looking into (bug #914371)
+		$(usev hppa '
+			tst_qcborvalue
+			tst_qnumeric
+		')
+		# bug #914033
+		$(usev sparc '
+			tst_qbuffer
+			tst_qprocess
+			tst_qtconcurrentiteratekernel
+		')
+		# note: for linux, upstream only really runs+maintains tests for amd64
+		# https://doc.qt.io/qt-6/supported-platforms.html
+	)
+
+	qt6-build_src_test
+}
+
+src_install() {
+	qt6-build_src_install
+
+	if use test; then
+		local delete_bins=( # need a better way to handle this
+			clientserver copier crashingServer desktopsettingsaware_helper
+			echo fileWriterProcess modal_helper nospace 'one space'
+			paster qcommandlineparser_test_helper qfileopeneventexternal
+			socketprocess syslocaleapp tst_qhashseed_helper 'two space s'
+			write-read-write
+		)
+		local delete=( # sigh
+			"${D}${QT6_BINDIR}"/test*
+			"${delete_bins[@]/#/${D}${QT6_BINDIR}/}"
+		)
+		# using -f given not tracking which tests may be skipped or not
+		rm -rf -- "${delete[@]}" || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-08-13 16:16 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2024-08-13 16:16 UTC (permalink / raw
  To: gentoo-commits

commit:     4c836c037168c3ed1ba7696f69f4d1e90310b50c
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Aug 13 16:13:29 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Aug 13 16:13:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=4c836c03

dev-qt/qtbase: add 6.7.2-r2, drop 6.7.2-r1

Signed-off-by: orbea <orbea <AT> riseup.net>

 .../qtbase/files/qtbase-6.7.2-float16-sse2.patch   | 43 ++++++++++++++++++++++
 dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch   | 32 ++++++++++++++++
 ...base-6.7.2-r1.ebuild => qtbase-6.7.2-r2.ebuild} |  2 +
 3 files changed, 77 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch b/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch
new file mode 100644
index 0000000..a54c9da
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch
@@ -0,0 +1,43 @@
+Backport from 6.7.3 as it may cause major problems for x86 sse2-less
+systems using gcc14.
+
+https://github.com/qt/qtbase/commit/39fa7e7bef90be2940c5f736935f963e3969e0bd
+From: Dmitry Shachnev <mitya57@gmail.com>
+Date: Sat, 27 Jul 2024 23:03:07 +0300
+Subject: [PATCH] Use _Float16 only when SSE2 is enabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The GCC documentation [1] says: “On x86 targets with SSE2 enabled, GCC
+supports half-precision (16-bit) floating point via the _Float16 type”.
+
+On non-SSE2 x86 (such as Debian i386 baseline [2]), __FLT16_MAX__ is
+defined starting with GCC 14 [3], however any non-trivial use of the
+_Float16 type results in an error:
+
+error: operation not permitted on type ‘_Float16’ without option ‘-msse2’
+
+which makes some packages fail to build on i386 architecture [4].
+
+[1]: https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html
+[2]: https://wiki.debian.org/ArchitectureSpecificsMemo#i386-1
+[3]: https://gcc.gnu.org/g:9a19fa8b616f83474c35cc5b34a3865073ced829
+[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076986
+--- a/src/corelib/global/qtypes.h
++++ b/src/corelib/global/qtypes.h
+@@ -264,11 +264,10 @@
+ #  define QFLOAT16_IS_NATIVE        1
+ using NativeFloat16Type = decltype(__FLT16_MAX__);
+-#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__)
++#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__) && defined(__ARM_FP16_FORMAT_IEEE)
+ #  define QFLOAT16_IS_NATIVE        1
+-#  ifdef __ARM_FP16_FORMAT_IEEE
+ using NativeFloat16Type = __fp16;
+-#  else
++#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__) && defined(__SSE2__)
++#  define QFLOAT16_IS_NATIVE        1
+ using NativeFloat16Type = _Float16;
+-#  endif
+ #else
+ #  define QFLOAT16_IS_NATIVE        0

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch b/dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch
new file mode 100644
index 0000000..64cedb1
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch
@@ -0,0 +1,32 @@
+https://codereview.qt-project.org/c/qt/qtbase/+/582403
+From: Sam James <sam@gentoo.org>
+Date: Sat, 10 Aug 2024 16:43:05 +0100
+Subject: [PATCH] Fix ODR violation for IsFloatType_v
+
+With recent GCC 15 trunk, I started to see:
+```
+ld: .../kwalletentry.cc.o:(.rodata+0x0): multiple definition of `QtPrivate::IsFloatType_v<_Float16>';
+	src/runtime/kwalletd/backend/CMakeFiles/KF6WalletBackend.dir/cbc.cc.o:(.rodata+0x0): first defined here
+```
+
+The issue is that constexpr is only implicitly inline for functions or
+static data members [0], so the two constexpr IsFloatType_v definitions
+here cause an ODR violation.
+
+Explicitly mark them as inline constexpr.
+
+[0] http://eel.is/c++draft/dcl.constexpr#1.sentence-3
+--- a/src/corelib/global/qcomparehelpers.h
++++ b/src/corelib/global/qcomparehelpers.h
+@@ -348,9 +348,9 @@
+ 
+ template <typename T>
+-constexpr bool IsFloatType_v = std::is_floating_point_v<T>;
++inline constexpr bool IsFloatType_v = std::is_floating_point_v<T>;
+ 
+ #if QFLOAT16_IS_NATIVE
+ template <>
+-constexpr bool IsFloatType_v<QtPrivate::NativeFloat16Type> = true;
++inline constexpr bool IsFloatType_v<QtPrivate::NativeFloat16Type> = true;
+ #endif
+ 

diff --git a/dev-qt/qtbase/qtbase-6.7.2-r1.ebuild b/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.7.2-r1.ebuild
rename to dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
index 2fe9c04..35462e7 100644
--- a/dev-qt/qtbase/qtbase-6.7.2-r1.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
@@ -147,6 +147,8 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
 	"${FILESDIR}"/${PN}-6.7.2-CVE-2024-39936.patch
+	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
+	"${FILESDIR}"/${PN}-6.7.2-float16-sse2.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-08-24 15:09 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2024-08-24 15:09 UTC (permalink / raw
  To: gentoo-commits

commit:     825c1e834c5dd06b5d874d8451df4bd133b8f7e3
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sat Aug 24 15:03:14 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sat Aug 24 15:03:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=825c1e83

dev-qt/qtbase: add 6.7.2-r3, drop 6.7.2-r2

Signed-off-by: orbea <orbea <AT> riseup.net>

 .../files/qtbase-6.7.2-qwindowprivate-crash.patch  | 28 ++++++++++++++++++++++
 ...base-6.7.2-r2.ebuild => qtbase-6.7.2-r3.ebuild} |  1 +
 2 files changed, 29 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-qwindowprivate-crash.patch b/dev-qt/qtbase/files/qtbase-6.7.2-qwindowprivate-crash.patch
new file mode 100644
index 0000000..3533839
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-qwindowprivate-crash.patch
@@ -0,0 +1,28 @@
+https://bugs.kde.org/show_bug.cgi?id=490791
+https://codereview.qt-project.org/c/qt/qtbase/+/584636
+From: David Edmundson <davidedmundson@kde.org>
+Date: Wed, 31 Jul 2024 11:59:14 +0100
+Subject: [PATCH] QWidget: Store initialScreen as QPointer
+
+A Toplevel QWidget can hold a pointer to the screen where it will
+eventually show contents, before a QWidgetWindow is created which then
+takes precedence.
+
+The screen member of QWindows is always kept up-to-date when a screen is
+removed, but not the contents of a toplevel window. If a widget has
+setScreen called but is never shown, it has potentially dangling pointer
+which can cause issues in the future.
+
+Pick-to: 6.5
+Change-Id: Ia7c80549e8b3c90a75cdde745487e87ecddaca63
+Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
+(cherry picked from commit d67acf94afffde6a71498be6e30447f3acf7558e)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+(cherry picked from commit 6af4e5f604fff40cdb3be40099b8884362806ef4)
+--- a/src/widgets/kernel/qwidget_p.h
++++ b/src/widgets/kernel/qwidget_p.h
+@@ -110,3 +110,3 @@
+     Qt::WindowFlags savedFlags; // Save widget flags while showing fullscreen
+-    QScreen *initialScreen; // Screen when passing a QDesktop[Screen]Widget as parent.
++    QPointer<QScreen> initialScreen; // Screen when passing a QDesktop[Screen]Widget as parent.
+ 

diff --git a/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild b/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
rename to dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
index 35462e7..b2ca9bc 100644
--- a/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
@@ -149,6 +149,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.7.2-CVE-2024-39936.patch
 	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
 	"${FILESDIR}"/${PN}-6.7.2-float16-sse2.patch
+	"${FILESDIR}"/${PN}-6.7.2-qwindowprivate-crash.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-08-26 22:47 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2024-08-26 22:47 UTC (permalink / raw
  To: gentoo-commits

commit:     69a5a8dac26ab861c434f5610a869f17d0294bce
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Aug 26 18:43:16 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Mon Aug 26 18:43:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=69a5a8da

dev-qt/qtbase: add 6.7.2-r4, drop 6.7.2-r3

Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch      | 11 +++++++++++
 .../{qtbase-6.7.2-r3.ebuild => qtbase-6.7.2-r4.ebuild}       | 12 ++++++++++--
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch b/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
new file mode 100644
index 0000000..d010222
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
@@ -0,0 +1,11 @@
+diff '--color=auto' -ruN qtbase-everywhere-src-6.7.2/src/corelib/tools/qcontiguouscache.h my/src/corelib/tools/qcontiguouscache.h
+--- qtbase-everywhere-src-6.7.2/src/corelib/tools/qcontiguouscache.h	2024-05-07 01:06:44.000000000 +0200
++++ my/src/corelib/tools/qcontiguouscache.h	2024-08-25 18:20:13.958793266 +0200
+@@ -8,6 +8,7 @@
+ #include <QtCore/qassert.h>
+ #include <QtCore/qtclasshelpermacros.h>
+ #include <QtCore/qtcoreexports.h>
++#include <QtCore/qglobal.h>
+ #include <QtCore/qtypeinfo.h>
+ 
+ #include <climits>

diff --git a/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild b/dev-qt/qtbase/qtbase-6.7.2-r4.ebuild
similarity index 96%
rename from dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
rename to dev-qt/qtbase/qtbase-6.7.2-r4.ebuild
index b2ca9bc..568e068 100644
--- a/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.2-r4.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit qt6-build toolchain-funcs
+inherit flag-o-matic qt6-build toolchain-funcs
 
 DESCRIPTION="Cross-platform application development framework"
 
@@ -99,7 +99,7 @@ COMMON_DEPEND="
 			cups? ( net-print/cups )
 			gtk? (
 				x11-libs/gdk-pixbuf:2
-				x11-libs/gtk+:3
+				>=x11-libs/gtk+-3.24.41-r1:3[X?,wayland?]
 				x11-libs/pango
 			)
 		)
@@ -150,6 +150,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
 	"${FILESDIR}"/${PN}-6.7.2-float16-sse2.patch
 	"${FILESDIR}"/${PN}-6.7.2-qwindowprivate-crash.patch
+	"${FILESDIR}"/${PN}-6.7.2-qcontiguouscache.patch
 )
 
 src_prepare() {
@@ -170,6 +171,13 @@ src_prepare() {
 }
 
 src_configure() {
+	# The only component that uses gdk backends is the qgtk3 platformtheme plugin
+	if use gtk; then
+		# defang automagic dependencies
+		use wayland || append-cxxflags -DGENTOO_GTK_HIDE_WAYLAND
+		use X || append-cxxflags -DGENTOO_GTK_HIDE_X11
+	fi
+
 	local mycmakeargs=(
 		-DBUILD_WITH_PCH=OFF
 


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-09-25 23:52 orbea
  0 siblings, 0 replies; 14+ messages in thread
From: orbea @ 2024-09-25 23:52 UTC (permalink / raw
  To: gentoo-commits

commit:     a2fdcad4b4fc23f04d66584329d4cafdc04c9b30
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed Sep 25 22:41:58 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed Sep 25 22:41:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=a2fdcad4

dev-qt/qtbase: add 6.7.2-r5

Signed-off-by: orbea <orbea <AT> riseup.net>

 .../files/qtbase-6.7.2-haswell-no-rdrnd.patch      | 100 ++++++
 .../files/qtbase-6.7.2-qcontiguouscache.patch      |  13 +-
 .../files/qtbase-6.8.0-qcontiguouscache.patch      |  14 +
 dev-qt/qtbase/qtbase-6.7.2-r5.ebuild               | 371 +++++++++++++++++++++
 4 files changed, 490 insertions(+), 8 deletions(-)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-haswell-no-rdrnd.patch b/dev-qt/qtbase/files/qtbase-6.7.2-haswell-no-rdrnd.patch
new file mode 100644
index 0000000..0427315
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-haswell-no-rdrnd.patch
@@ -0,0 +1,100 @@
+https://bugreports.qt.io/browse/QTBUG-129193 
+https://forums.gentoo.org/viewtopic-t-1170690.html
+https://forums.gentoo.org/viewtopic-t-1169619.html
+https://codereview.qt-project.org/c/qt/qtbase/+/593073
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Mon, 23 Sep 2024 13:44:31 -0700
+Subject: [PATCH] qsimd_x86: disable the requirement that CPUs must have RNGs
+
+Intel CPUs have had this since 2013 (Ivy Bridge), but some older
+Bulldozer AMD CPUs appear to be missing it. This creates a mismatch
+between when the __haswell__ macro gets declared in qsimd_p.h and the
+runtime check using the CpuArchHaswell value. That in turn creates a
+condition where qInitDrawhelperFunctions() in qdrawhelper.cpp leaves the
+memfill pointers set to null.
+
+#elif defined(__SSE2__)
+#  ifndef __haswell__
+    qt_memfill32 = qt_memfill32_sse2;
+    qt_memfill64 = qt_memfill64_sse2;
+#  endif
+...
+#if defined(QT_COMPILER_SUPPORTS_AVX2)
+    if (qCpuHasFeature(ArchHaswell)) {
+        qt_memfill32 = qt_memfill32_avx2;
+        qt_memfill64 = qt_memfill64_avx2;
+
+It does this so the qt_memfillXX_sse2 functions don't have to be defined
+anywhere, so the QtGui build won't carry unnecessary dead code.
+
+This is old code (from Qt 4.x) and several improvements I've made for
+QtCore are not applied yet. My work for qSimdDispatcher[1] isn't
+complete: it might have avoided this problem here, but it would also
+have required major work for the draw helpers to work in the first
+place.
+
+[1] https://codereview.qt-project.org/c/qt/qtbase/+/537384
+
+Pick-to: 6.8 6.7 6.5 6.2
+Fixes: QTBUG-129193
+Change-Id: Ia427a9e502b0fb46b2bdfffda8e2131b7091c9e9
+Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
+--- a/src/corelib/global/qsimd_x86_p.h
++++ b/src/corelib/global/qsimd_x86_p.h
+@@ -85,16 +85,14 @@
+ #define cpu_snb                 (cpu_wsm \
+                                  | cpu_feature_avx)
+ #define cpu_ivb                 (cpu_snb \
+-                                 | cpu_feature_f16c \
+-                                 | cpu_feature_rdrnd)
++                                 | cpu_feature_f16c)
+ #define cpu_hsw                 (cpu_ivb \
+                                  | cpu_feature_avx2 \
+                                  | cpu_feature_fma \
+                                  | cpu_feature_bmi \
+                                  | cpu_feature_bmi2 \
+                                  | cpu_feature_movbe)
+-#define cpu_bdw                 (cpu_hsw \
+-                                 | cpu_feature_rdseed)
++#define cpu_bdw                 (cpu_hsw)
+ #define cpu_bdx                 (cpu_bdw)
+ #define cpu_skl                 (cpu_bdw)
+ #define cpu_skx                 (cpu_skl \
+@@ -237,9 +235,9 @@
+ #define QT_FUNCTION_TARGET_STRING_ARCH_NHM          QT_FUNCTION_TARGET_STRING_ARCH_CORE2 ",sse4.1,sse4.2,popcnt"
+ #define QT_FUNCTION_TARGET_STRING_ARCH_WSM          QT_FUNCTION_TARGET_STRING_ARCH_NHM
+ #define QT_FUNCTION_TARGET_STRING_ARCH_SNB          QT_FUNCTION_TARGET_STRING_ARCH_WSM ",avx"
+-#define QT_FUNCTION_TARGET_STRING_ARCH_IVB          QT_FUNCTION_TARGET_STRING_ARCH_SNB ",f16c,rdrnd,fsgsbase"
++#define QT_FUNCTION_TARGET_STRING_ARCH_IVB          QT_FUNCTION_TARGET_STRING_ARCH_SNB ",f16c,fsgsbase"
+ #define QT_FUNCTION_TARGET_STRING_ARCH_HSW          QT_FUNCTION_TARGET_STRING_ARCH_IVB ",avx2,fma,bmi,bmi2,lzcnt,movbe"
+-#define QT_FUNCTION_TARGET_STRING_ARCH_BDW          QT_FUNCTION_TARGET_STRING_ARCH_HSW ",adx,rdseed"
++#define QT_FUNCTION_TARGET_STRING_ARCH_BDW          QT_FUNCTION_TARGET_STRING_ARCH_HSW ",adx"
+ #define QT_FUNCTION_TARGET_STRING_ARCH_BDX          QT_FUNCTION_TARGET_STRING_ARCH_BDW
+ #define QT_FUNCTION_TARGET_STRING_ARCH_SKL          QT_FUNCTION_TARGET_STRING_ARCH_BDW ",xsavec,xsaves"
+ #define QT_FUNCTION_TARGET_STRING_ARCH_SKX          QT_FUNCTION_TARGET_STRING_ARCH_SKL ",avx512f,avx512dq,avx512cd,avx512bw,avx512vl"
+@@ -473,9 +471,9 @@
+     CpuArchNHM = cpu_nhm,
+     CpuArchWSM = cpu_wsm,
+     CpuArchSNB = cpu_snb,
+-    CpuArchIVB = cpu_ivb,
++    CpuArchIVB = cpu_ivb,                                    ///< rdrnd
+     CpuArchHSW = cpu_hsw,                                    ///< hle,rtm
+-    CpuArchBDW = cpu_bdw,
++    CpuArchBDW = cpu_bdw,                                    ///< rdseed
+     CpuArchBDX = cpu_bdx,
+     CpuArchSKL = cpu_skl,
+     CpuArchSKX = cpu_skx,                                    ///< clwb
+--- a/util/x86simdgen/3rdparty/simd-intel.conf
++++ b/util/x86simdgen/3rdparty/simd-intel.conf
+@@ -142,9 +142,9 @@
+ arch=NHM	Core2	sse4.1,sse4.2,popcnt
+ arch=WSM	NHM
+ arch=SNB	WSM	avx
+-arch=IVB	SNB	f16c,rdrnd,fsgsbase
++arch=IVB	SNB	f16c,fsgsbase		        # rdrnd
+ arch=HSW	IVB	avx2,fma,bmi,bmi2,lzcnt,movbe	# hle,rtm
+-arch=BDW	HSW	adx,rdseed
++arch=BDW	HSW	adx				# rdseed
+ arch=BDX	BDW
+ arch=SKL	BDW	xsavec,xsaves
+ arch=SKX	SKL	avx512f,avx512dq,avx512cd,avx512bw,avx512vl #clwb

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch b/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
index d010222..02219fe 100644
--- a/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
@@ -1,11 +1,8 @@
-diff '--color=auto' -ruN qtbase-everywhere-src-6.7.2/src/corelib/tools/qcontiguouscache.h my/src/corelib/tools/qcontiguouscache.h
---- qtbase-everywhere-src-6.7.2/src/corelib/tools/qcontiguouscache.h	2024-05-07 01:06:44.000000000 +0200
-+++ my/src/corelib/tools/qcontiguouscache.h	2024-08-25 18:20:13.958793266 +0200
-@@ -8,6 +8,7 @@
- #include <QtCore/qassert.h>
- #include <QtCore/qtclasshelpermacros.h>
+https://bugs.gentoo.org/938475
+Older version of https://codereview.qt-project.org/c/qt/qtbase/+/585668 for 6.7
+--- a/src/corelib/tools/qcontiguouscache.h
++++ b/src/corelib/tools/qcontiguouscache.h
+@@ -10,2 +10,3 @@
  #include <QtCore/qtcoreexports.h>
 +#include <QtCore/qglobal.h>
  #include <QtCore/qtypeinfo.h>
- 
- #include <climits>

diff --git a/dev-qt/qtbase/files/qtbase-6.8.0-qcontiguouscache.patch b/dev-qt/qtbase/files/qtbase-6.8.0-qcontiguouscache.patch
new file mode 100644
index 0000000..e5f14e0
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.8.0-qcontiguouscache.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/938475
+https://codereview.qt-project.org/c/qt/qtbase/+/585668
+From: Sam James <sam@gentoo.org>
+Date: Sun, 25 Aug 2024 17:34:22 +0100
+Subject: [PATCH] QContiguousCache: fix include for qMin
+
+Include `<QtCore/qminmax.h>` for `qMin`. This came up downstream
+in Gentoo at https://bugs.gentoo.org/938475.
+--- a/src/corelib/tools/qcontiguouscache.h
++++ b/src/corelib/tools/qcontiguouscache.h
+@@ -10,2 +10,3 @@
+ #include <QtCore/qtcoreexports.h>
++#include <QtCore/qminmax.h>
+ #include <QtCore/qttypetraits.h>

diff --git a/dev-qt/qtbase/qtbase-6.7.2-r5.ebuild b/dev-qt/qtbase/qtbase-6.7.2-r5.ebuild
new file mode 100644
index 0000000..6b43077
--- /dev/null
+++ b/dev-qt/qtbase/qtbase-6.7.2-r5.ebuild
@@ -0,0 +1,371 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic qt6-build toolchain-funcs
+
+DESCRIPTION="Cross-platform application development framework"
+
+if [[ ${QT6_BUILD_TYPE} == release ]]; then
+	KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~sparc x86"
+fi
+
+declare -A QT6_IUSE=(
+	[global]="+ssl +udev zstd"
+	[core]="icu journald syslog"
+	[modules]="+concurrent +dbus +gui +network +sql +xml"
+
+	[gui]="
+		+X accessibility eglfs evdev gles2-only +libinput
+		opengl renderdoc tslib vulkan wayland +widgets
+	"
+	[network]="brotli gssapi libproxy sctp"
+	[sql]="mysql oci8 odbc postgres +sqlite"
+	[widgets]="cups gtk"
+
+	[optfeature]="nls" #810802
+)
+IUSE="${QT6_IUSE[*]}"
+REQUIRED_USE="
+	?? ( journald syslog )
+	$(
+		printf '%s? ( gui ) ' ${QT6_IUSE[gui]//+/}
+		printf '%s? ( network ) ' ${QT6_IUSE[network]//+/}
+		printf '%s? ( sql ) ' ${QT6_IUSE[sql]//+/}
+		printf '%s? ( gui widgets ) ' ${QT6_IUSE[widgets]//+/}
+	)
+	accessibility? ( dbus )
+	eglfs? ( opengl )
+	gles2-only? ( opengl )
+	gui? ( || ( X eglfs wayland ) )
+	libinput? ( udev )
+	sql? ( || ( ${QT6_IUSE[sql]//+/} ) )
+	test? ( icu sql? ( sqlite ) )
+"
+
+# groups:
+# - global (configure.cmake)
+# - qtcore (src/corelib/configure.cmake)
+# - qtgui (src/gui/configure.cmake)
+# - qtnetwork (src/network/configure.cmake)
+# - qtprintsupport (src/printsupport/configure.cmake) [gui+widgets]
+# - qtsql (src/plugins/sqldrivers/configure.cmake)
+# nolink: renderdoc, systemd
+COMMON_DEPEND="
+	sys-libs/zlib:=
+	ssl? ( dev-libs/openssl:= )
+	udev? ( virtual/libudev:= )
+	zstd? ( app-arch/zstd:= )
+
+	app-crypt/libb2
+	dev-libs/double-conversion:=
+	dev-libs/glib:2
+	dev-libs/libpcre2:=[pcre16,unicode(+)]
+	icu? ( dev-libs/icu:= )
+	journald? ( sys-apps/systemd )
+
+	dbus? ( sys-apps/dbus )
+	gui? (
+		media-libs/fontconfig
+		media-libs/freetype:2
+		media-libs/harfbuzz:=
+		media-libs/libjpeg-turbo:=
+		media-libs/libpng:=
+		x11-libs/libdrm
+		x11-libs/libxkbcommon[X?]
+		X? (
+			x11-libs/libICE
+			x11-libs/libSM
+			x11-libs/libX11
+			x11-libs/libxcb:=
+			x11-libs/xcb-util-cursor
+			x11-libs/xcb-util-image
+			x11-libs/xcb-util-keysyms
+			x11-libs/xcb-util-renderutil
+			x11-libs/xcb-util-wm
+		)
+		accessibility? ( app-accessibility/at-spi2-core:2 )
+		eglfs? ( media-libs/mesa[gbm(+)] )
+		evdev? ( sys-libs/mtdev )
+		libinput? ( dev-libs/libinput:= )
+		opengl? (
+			gles2-only? ( media-libs/libglvnd )
+			!gles2-only? ( media-libs/libglvnd[X?] )
+		)
+		renderdoc? ( media-gfx/renderdoc )
+		tslib? ( x11-libs/tslib )
+		widgets? (
+			cups? ( net-print/cups )
+			gtk? (
+				x11-libs/gdk-pixbuf:2
+				>=x11-libs/gtk+-3.24.41-r1:3[X?,wayland?]
+				x11-libs/pango
+			)
+		)
+	)
+	network? (
+		brotli? ( app-arch/brotli:= )
+		gssapi? ( virtual/krb5 )
+		libproxy? ( net-libs/libproxy )
+	)
+	sql? (
+		mysql? ( dev-db/mysql-connector-c:= )
+		oci8? ( dev-db/oracle-instantclient:=[sdk] )
+		odbc? ( dev-db/unixODBC )
+		postgres? ( dev-db/postgresql:* )
+		sqlite? ( dev-db/sqlite:3 )
+	)
+"
+RDEPEND="
+	${COMMON_DEPEND}
+	syslog? ( virtual/logger )
+"
+DEPEND="
+	${COMMON_DEPEND}
+	X? ( x11-base/xorg-proto )
+	gui? (
+		vulkan? ( dev-util/vulkan-headers )
+	)
+	network? (
+		sctp? ( net-misc/lksctp-tools )
+	)
+	test? (
+		elibc_musl? ( sys-libs/timezone-data )
+	)
+"
+BDEPEND="zstd? ( app-arch/libarchive[zstd] )" #910392
+PDEPEND="
+	nls? ( ~dev-qt/qttranslations-${PV}:6 )
+	wayland? ( ~dev-qt/qtwayland-${PV}:6 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.6.0-libressl.patch
+	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
+	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
+	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
+	"${FILESDIR}"/${PN}-6.7.2-CVE-2024-39936.patch
+	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
+	"${FILESDIR}"/${PN}-6.7.2-float16-sse2.patch
+	"${FILESDIR}"/${PN}-6.7.2-qwindowprivate-crash.patch
+	"${FILESDIR}"/${PN}-6.7.2-qcontiguouscache.patch
+	"${FILESDIR}"/${PN}-6.7.2-haswell-no-rdrnd.patch
+)
+
+src_prepare() {
+	qt6-build_src_prepare
+
+	if use test; then
+		# test itself has -Werror=strict-aliasing issues, drop for simplicity
+		sed -e '/add_subdirectory(qsharedpointer)/d' \
+			-i tests/auto/corelib/tools/CMakeLists.txt || die
+
+		# workaround for __extendhfxf2 being used for tst_qfloat16.cpp
+		# which is unavailable with compiler-rt (assume used if clang)
+		if tc-is-clang; then
+			sed -e '/add_subdirectory(qfloat16)/d' \
+				-i tests/auto/corelib/global/CMakeLists.txt || die
+		fi
+	fi
+}
+
+src_configure() {
+	# The only component that uses gdk backends is the qgtk3 platformtheme plugin
+	if use gtk; then
+		# defang automagic dependencies
+		use wayland || append-cxxflags -DGENTOO_GTK_HIDE_WAYLAND
+		use X || append-cxxflags -DGENTOO_GTK_HIDE_X11
+	fi
+
+	local mycmakeargs=(
+		-DBUILD_WITH_PCH=OFF
+
+		-DINSTALL_ARCHDATADIR="${QT6_ARCHDATADIR}"
+		-DINSTALL_BINDIR="${QT6_BINDIR}"
+		-DINSTALL_DATADIR="${QT6_DATADIR}"
+		-DINSTALL_DOCDIR="${QT6_DOCDIR}"
+		-DINSTALL_EXAMPLESDIR="${QT6_EXAMPLESDIR}"
+		-DINSTALL_INCLUDEDIR="${QT6_HEADERDIR}"
+		-DINSTALL_LIBDIR="${QT6_LIBDIR}"
+		-DINSTALL_LIBEXECDIR="${QT6_LIBEXECDIR}"
+		-DINSTALL_MKSPECSDIR="${QT6_MKSPECSDIR}"
+		-DINSTALL_PLUGINSDIR="${QT6_PLUGINDIR}"
+		-DINSTALL_QMLDIR="${QT6_QMLDIR}"
+		-DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
+		-DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
+
+		-DQT_UNITY_BUILD=ON # ~30% faster build, affects other dev-qt/* too
+
+		-DQT_FEATURE_relocatable=OFF #927691
+		$(qt_feature ssl openssl)
+		$(qt_feature ssl openssl_linked)
+		$(qt_feature udev libudev)
+		$(qt_feature zstd)
+
+		# qtcore
+		$(qt_feature icu)
+		$(qt_feature journald)
+		$(qt_feature syslog)
+
+		# tools
+		-DQT_FEATURE_androiddeployqt=OFF
+
+		# modules
+		$(qt_feature concurrent)
+		$(qt_feature dbus)
+		$(qt_feature gui)
+		$(qt_feature network)
+		$(qt_feature sql)
+		# trivial, and is often needed (sometimes even when not building tests)
+		-DQT_FEATURE_testlib=ON
+		$(qt_feature xml)
+	)
+
+	use gui && mycmakeargs+=(
+		$(qt_feature X xcb)
+		$(qt_feature X system_xcb_xinput)
+		$(qt_feature X xkbcommon_x11)
+		$(cmake_use_find_package X X11) # needed for truly no automagic
+		$(qt_feature accessibility accessibility_atspi_bridge)
+		$(qt_feature eglfs)
+		$(qt_feature evdev)
+		$(qt_feature evdev mtdev)
+		$(qt_feature libinput)
+		$(qt_feature renderdoc graphicsframecapture)
+		$(qt_feature tslib)
+		$(qt_feature vulkan)
+		$(qt_feature wayland)
+		$(qt_feature widgets)
+		-DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
+		-DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
+	) && use widgets && mycmakeargs+=(
+		# note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
+		$(qt_feature cups)
+		$(qt_feature gtk gtk3)
+	)
+
+	use network && mycmakeargs+=(
+		$(qt_feature brotli)
+		$(qt_feature gssapi)
+		$(qt_feature libproxy)
+		$(qt_feature sctp)
+		$(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
+		-DQT_FEATURE_dtls=OFF # Required for LibreSSL
+	)
+
+	use sql && mycmakeargs+=(
+		-DQT_FEATURE_sql_db2=OFF # unpackaged
+		-DQT_FEATURE_sql_ibase=OFF # unpackaged
+		-DQT_FEATURE_sql_mimer=OFF # unpackaged
+		$(qt_feature mysql sql_mysql)
+		$(qt_feature oci8 sql_oci)
+		$(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client)
+		$(qt_feature odbc sql_odbc)
+		$(qt_feature postgres sql_psql)
+		$(qt_feature sqlite sql_sqlite)
+		$(qt_feature sqlite system_sqlite)
+	)
+
+	qt6-build_src_configure
+}
+
+src_test() {
+	local -x TZ=UTC
+	local -x LC_TIME=C
+
+	local CMAKE_SKIP_TESTS=(
+		# broken with out-of-source + if qtbase is not already installed
+		tst_moc
+		tst_qmake
+		# similarly broken when relocatable=OFF (bug #927691)
+		tst_qapplication
+		tst_qt_cmake_create
+		tst_uic
+		# needs x11/opengl, we *could* run these but tend to be flaky
+		# when opengl rendering is involved (even if software-only)
+		tst_qopengl{,config,widget,window}
+		tst_qgraphicsview
+		tst_qx11info
+		# fails with network sandbox
+		tst_qdnslookup
+		# fails with sandbox
+		tst_qsharedmemory
+		# typical to lack SCTP support on non-generic kernels
+		tst_qsctpsocket
+		# randomly fails without -j1, and not worth it over this (bug #916181)
+		tst_qfiledialog{,2}
+		# may randomly hang+timeout, perhaps related to -j as well
+		tst_qprocess #936484
+		tst_qtimer
+		# these can be flaky depending on the environment/toolchain
+		tst_qlogging # backtrace log test can easily vary
+		tst_q{,raw}font # affected by available fonts / settings (bug #914737)
+		tst_qprinter # checks system's printers (bug #916216)
+		tst_qhighdpi # may detect users' settings and fail (bug #935364)
+		tst_qstorageinfo # checks mounted filesystems
+		# flaky due to using different test framework and fails with USE=-gui
+		tst_selftests
+		# known failing when using clang+glibc+stdc++, needs looking into
+		tst_qthread
+		# partially failing on x86 chroots and seemingly(?) harmless (dev-qt
+		# revdeps tests pass), skip globally to avoid keywording flakiness
+		tst_json
+		tst_qcolorspace
+		tst_qdoublevalidator
+		tst_qglobal
+		tst_qglyphrun
+		tst_qvectornd
+		tst_rcc
+		# similarly, but on armv7 and potentially others (bug #914028)
+		tst_qlineedit
+		tst_qpainter
+		# likewise, known failing on BE arches (bug #914033,914371,918878)
+		tst_qimagereader
+		tst_qimagewriter
+		tst_qpluginloader
+		tst_quuid # >=6.6.2 had related fixes, needs retesting
+		# partially broken on llvm-musl, needs looking into but skip to have
+		# a baseline for regressions (rest of dev-qt still passes with musl)
+		$(usev elibc_musl '
+			tst_qicoimageformat
+			tst_qimagereader
+			tst_qimage
+		')
+		# fails due to hppa's NaN handling, needs looking into (bug #914371)
+		$(usev hppa '
+			tst_qcborvalue
+			tst_qnumeric
+		')
+		# bug #914033
+		$(usev sparc '
+			tst_qbuffer
+			tst_qtconcurrentiteratekernel
+		')
+		# note: for linux, upstream only really runs+maintains tests for amd64
+		# https://doc.qt.io/qt-6/supported-platforms.html
+	)
+
+	qt6-build_src_test
+}
+
+src_install() {
+	qt6-build_src_install
+
+	if use test; then
+		local delete_bins=( # need a better way to handle this
+			clientserver copier crashingServer desktopsettingsaware_helper
+			echo fileWriterProcess modal_helper nospace 'one space'
+			paster qcommandlineparser_test_helper qfileopeneventexternal
+			socketprocess syslocaleapp tst_qhashseed_helper 'two space s'
+			write-read-write
+		)
+		local delete=( # sigh
+			"${D}${QT6_BINDIR}"/test*
+			"${delete_bins[@]/#/${D}${QT6_BINDIR}/}"
+		)
+		# using -f given not tracking which tests may be skipped or not
+		rm -rf -- "${delete[@]}" || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-09-25 23:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-27 20:03 [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/ orbea
  -- strict thread matches above, loose matches on Subject: below --
2024-09-25 23:52 orbea
2024-08-26 22:47 orbea
2024-08-24 15:09 orbea
2024-08-13 16:16 orbea
2024-05-24 13:18 orbea
2024-04-05 16:50 orbea
2024-02-25  2:42 orbea
2024-01-09 15:48 orbea
2023-12-06  4:58 orbea
2023-10-22 16:54 orbea
2023-06-13  3:27 orbea
2023-06-08 18:29 orbea
2023-01-31 23:14 Quentin Retornaz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox