diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2023-12-12 16:57:45 -0500 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2023-12-12 21:52:40 -0500 |
commit | db7dd9f234f68a89e1b9da5e973d2e038b1c5131 (patch) | |
tree | d6d0eef000a9663ed383f2badd3ed643cdb174d6 /dev-python/PyQt6 | |
parent | app-text/pandoc-bin: bump to 3.1.10 (diff) | |
download | gentoo-db7dd9f234f68a89e1b9da5e973d2e038b1c5131.tar.gz gentoo-db7dd9f234f68a89e1b9da5e973d2e038b1c5131.tar.bz2 gentoo-db7dd9f234f68a89e1b9da5e973d2e038b1c5131.zip |
dev-python/PyQt6: fix build with upcoming qtbase-6.7.0
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-python/PyQt6')
-rw-r--r-- | dev-python/PyQt6/PyQt6-6.6.1.ebuild | 4 | ||||
-rw-r--r-- | dev-python/PyQt6/files/PyQt6-6.6.1-qt670.patch | 77 |
2 files changed, 81 insertions, 0 deletions
diff --git a/dev-python/PyQt6/PyQt6-6.6.1.ebuild b/dev-python/PyQt6/PyQt6-6.6.1.ebuild index 4dee14aeda33..b5abeb38b190 100644 --- a/dev-python/PyQt6/PyQt6-6.6.1.ebuild +++ b/dev-python/PyQt6/PyQt6-6.6.1.ebuild @@ -84,6 +84,10 @@ BDEPEND=" dbus? ( virtual/pkgconfig ) " +PATCHES=( + "${FILESDIR}"/${PN}-6.6.1-qt670.patch +) + src_prepare() { default diff --git a/dev-python/PyQt6/files/PyQt6-6.6.1-qt670.patch b/dev-python/PyQt6/files/PyQt6-6.6.1-qt670.patch new file mode 100644 index 000000000000..64c4aa303836 --- /dev/null +++ b/dev-python/PyQt6/files/PyQt6-6.6.1-qt670.patch @@ -0,0 +1,77 @@ +Early workarounds to fix build with upcoming Qt6.7.0 not to have +to wait for the matching PyQt6-6.7.0. Not fully correct fixes, +but should be better than failing. May need revision given 6.7 +apis are not finalized as of the writing of this. + +Caused by the following commits: +https://github.com/qt/qtbase/commit/fd48ce0b73c (qdatastream+pyqtpyboject) +> qsizetype is ssize_t and ends up more correct (e.g. for Py_ssize_t) +https://github.com/qt/qtbase/commit/7a3fed3f209 (qtimezone) +> removed, can just drop these if 6.7 and ignore the replacement +https://github.com/qt/qtbase/commit/19bc5de296a (qfont) +https://github.com/qt/qtbase/commit/bde443801fe (qfont) +> these tag features are new'ish (and changing) and only available if +> >=6.6 as-is, let's just drop them if 6.7 as no revdeps should need yet +--- a/qpy/QtCore/qpycore_pyqtpyobject.cpp ++++ b/qpy/QtCore/qpycore_pyqtpyobject.cpp +@@ -173,9 +173,13 @@ + { + char *ser; ++#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) ++ qsizetype len; ++#else + uint len; ++#endif + + in.readBytes(ser, len); + +- if (len) ++ if (len > 0) + { + static PyObject *loads = 0; +--- a/sip/QtCore/QtCoremod.sip ++++ b/sip/QtCore/QtCoremod.sip +@@ -23,5 +23,5 @@ + %Module(name=PyQt6.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt6, keyword_arguments="Optional", use_limited_api=True, py_ssize_t_clean=True) + +-%Timeline {Qt_6_0_0 Qt_6_1_0 Qt_6_2_0 Qt_6_3_0 Qt_6_4_0 Qt_6_5_0 Qt_6_6_0} ++%Timeline {Qt_6_0_0 Qt_6_1_0 Qt_6_2_0 Qt_6_3_0 Qt_6_4_0 Qt_6_5_0 Qt_6_6_0 Qt_6_7_0} + + %Platforms {Android iOS Linux macOS WebAssembly Windows} +--- a/sip/QtCore/qdatastream.sip ++++ b/sip/QtCore/qdatastream.sip +@@ -123,5 +123,9 @@ + %MethodCode + char *s; ++#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) ++ qsizetype l; ++#else + uint l; ++#endif + + Py_BEGIN_ALLOW_THREADS +--- a/sip/QtCore/qtimezone.sip ++++ b/sip/QtCore/qtimezone.sip +@@ -72,6 +72,8 @@ + ~QTimeZone(); + void swap(QTimeZone &other /Constrained/); ++%If (- Qt_6_7_0) + bool operator==(const QTimeZone &other) const; + bool operator!=(const QTimeZone &other) const; ++%End + bool isValid() const; + QByteArray id() const; +--- a/sip/QtGui/qfont.sip ++++ b/sip/QtGui/qfont.sip +@@ -209,4 +209,5 @@ + QStringList families() const; + void setFamilies(const QStringList &); ++%If (- Qt_6_7_0) + %If (Qt_6_6_0 -) + void setFeature(quint32 tag, quint32 value); +@@ -239,4 +240,5 @@ + static quint32 stringToTag(const char *tagString /Encoding="None"/); + %End ++%End + }; + |