commit: 1896fac74ffa1cdb67fd9c9d3d85a618096c5d40 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Wed Jan 22 19:10:47 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Wed Jan 22 19:15:35 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1896fac7
net-news/rssguard: Fix build failure with dev-qt/qtbase[-wayland] Closes: https://bugs.gentoo.org/948473 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> .../files/rssguard-4.8.1-qt-feature-checks.patch | 70 ++++++++++++++++++++++ net-news/rssguard/rssguard-4.8.1.ebuild | 5 ++ 2 files changed, 75 insertions(+) diff --git a/net-news/rssguard/files/rssguard-4.8.1-qt-feature-checks.patch b/net-news/rssguard/files/rssguard-4.8.1-qt-feature-checks.patch new file mode 100644 index 000000000000..f48e7bb1c420 --- /dev/null +++ b/net-news/rssguard/files/rssguard-4.8.1-qt-feature-checks.patch @@ -0,0 +1,70 @@ +From 017ce7168f31a9dcd156fea9abd4cb5f16a47773 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgo...@gentoo.org> +Date: Wed, 22 Jan 2025 20:02:45 +0100 +Subject: [PATCH] fix qt6 feature checks in libmpv +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fix Qt6 feature checks to ensure the `QT_CONFIG` macro rather than +incorrectly checking for the definitions. `QT_FEATURE_*` are always +defined, and they take values 1 or -1 to indicate whether the feature +is present or not. The `QT_CONFIG` macro wraps checking for that, see: +https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qtconfigmacros.h?id=f9163ae7a8167daded0798654d99a2e3a5aaa2b5#n60 + +This fixes build failure when qtbase is built without Wayland support: + +``` +/tmp/portage/net-news/rssguard-4.8.1/work/rssguard-4.8.1/src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.cpp: In member function ‘v +irtual void LibMpvWidget::initializeGL()’: +/tmp/portage/net-news/rssguard-4.8.1/work/rssguard-4.8.1/src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.cpp:123:60: error: ‘QWayla +ndApplication’ is not a member of ‘QNativeInterface’; did you mean ‘QX11Application’? + 123 | display.data = qApp->nativeInterface<QNativeInterface::QWaylandApplication>()->display(); + | ^~~~~~~~~~~~~~~~~~~ + | QX11Application +/tmp/portage/net-news/rssguard-4.8.1/work/rssguard-4.8.1/src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.cpp:123:80: error: no matc +hing function for call to ‘Application::nativeInterface<<expression error> >()’ + 123 | display.data = qApp->nativeInterface<QNativeInterface::QWaylandApplication>()->display(); +In file included from /usr/include/qt6/QtCore/qcoreapplication.h:17, + from /usr/include/qt6/QtCore/QCoreApplication:1, + from /tmp/portage/net-news/rssguard-4.8.1/work/rssguard-4.8.1/src/librssguard/miscellaneous/iofactory.h:8, + from /tmp/portage/net-news/rssguard-4.8.1/work/rssguard-4.8.1/src/librssguard/miscellaneous/application.h:11, + from /tmp/portage/net-news/rssguard-4.8.1/work/rssguard-4.8.1/src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.cpp: +5: +/usr/include/qt6/QtWidgets/qapplication.h:125:5: note: candidate: ‘template<class NativeInterface, class TypeInfo, class BaseType, typename std::enable_if<TypeInfo::isCompatibleWith<QApplication>, bool>::type <anonymous> > NativeInterface* QApplication::nativeInterface() const’ + 125 | QT_DECLARE_NATIVE_INTERFACE_ACCESSOR(QApplication) + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/include/qt6/QtWidgets/qapplication.h:125:5: note: template argument deduction/substitution failed: +/tmp/portage/net-news/rssguard-4.8.1/work/rssguard-4.8.1/src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.cpp:123:80: error: templat +e argument 1 is invalid +``` + +Originally reported in https://bugs.gentoo.org/948473. +--- + src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.cpp b/src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.cpp +index b5f6174..2e0bc29 100644 +--- a/src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.cpp ++++ b/src/librssguard/gui/mediaplayer/libmpv/libmpvwidget.cpp +@@ -110,14 +110,14 @@ void LibMpvWidget::initializeGL() { + mpv_render_param display{MPV_RENDER_PARAM_INVALID, nullptr}; + + #if QT_VERSION_MAJOR == 6 && defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_ANDROID) +-#if defined(QT_FEATURE_xcb) ++#if QT_CONFIG(xcb) + if (QGuiApplication::platformName() == QStringLiteral("xcb")) { + display.type = MPV_RENDER_PARAM_X11_DISPLAY; + display.data = qApp->nativeInterface<QNativeInterface::QX11Application>()->display(); + } + #endif + +-#if defined(QT_FEATURE_wayland) ++#if QT_CONFIG(wayland) + if (qApp->isWayland()) { + display.type = MPV_RENDER_PARAM_WL_DISPLAY; + display.data = qApp->nativeInterface<QNativeInterface::QWaylandApplication>()->display(); +-- +2.48.1 + diff --git a/net-news/rssguard/rssguard-4.8.1.ebuild b/net-news/rssguard/rssguard-4.8.1.ebuild index c75b112dc995..e060200734a6 100644 --- a/net-news/rssguard/rssguard-4.8.1.ebuild +++ b/net-news/rssguard/rssguard-4.8.1.ebuild @@ -43,6 +43,11 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( + # https://github.com/martinrotter/rssguard/pull/1612 + "${FILESDIR}/${P}-qt-feature-checks.patch" +) + src_configure() { local mycmakeargs=( -DBUILD_WITH_QT6=ON