From 6ab112d4ace4d3e32c424fb5f37b91a39c37bc91 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Thu, 3 Feb 2022 10:38:21 +0000 Subject: x11-wm/kwinft: 5.24.0.b.0 Changes: https://gitlab.com/kwinft/kwinft/-/compare/kwinft@5.23.2...kwinft@5.24.0-beta.0 --- x11-wm/kwinft/Makefile | 18 +- x11-wm/kwinft/distinfo | 14 +- x11-wm/kwinft/files/patch-plasma-5.23 | 301 ++++++++++++++++++++++++++++++++++ x11-wm/kwinft/pkg-message | 4 - x11-wm/kwinft/pkg-plist | 49 +++++- 5 files changed, 358 insertions(+), 28 deletions(-) create mode 100644 x11-wm/kwinft/files/patch-plasma-5.23 (limited to 'x11-wm') diff --git a/x11-wm/kwinft/Makefile b/x11-wm/kwinft/Makefile index f69e232f1b3d..9183ac80eb6b 100644 --- a/x11-wm/kwinft/Makefile +++ b/x11-wm/kwinft/Makefile @@ -1,12 +1,11 @@ PORTNAME= kwinft DISTVERSIONPREFIX= ${PORTNAME}@ -DISTVERSION= 5.23.2 -PORTREVISION= 1 +DISTVERSION= 5.24.0-beta.0 CATEGORIES= x11-wm PATCH_SITES= ${GL_SITE}/${GL_ACCOUNT}/${GL_PROJECT}/-/commit/ -PATCHFILES+= 0499e4cd8162.patch:-p1 # https://gitlab.com/kwinft/kwinft/-/issues/209 -PATCHFILES+= e80b91d5bc45.patch:-p1 # https://gitlab.com/kwinft/kwinft/-/issues/210 +PATCHFILES+= 1c81c5f3ef9a.patch:-p1 # https://gitlab.com/kwinft/kwinft/-/merge_requests/163 +PATCHFILES+= a6d7bb9acfef.patch:-p1 # https://gitlab.com/kwinft/kwinft/-/merge_requests/164 MAINTAINER= jbeich@FreeBSD.org COMMENT= Wayland compositor and X11 window manager @@ -33,19 +32,20 @@ CONFLICTS_INSTALL= plasma5-kwin # bin/kwin_wayland USES= cmake:testing gl kde:5 pkgconfig python:run qt:5 shebangfix xorg USE_GITLAB= yes -USE_GL= egl gbm -USE_KDE= ecm_build activities auth completion config configwidgets \ - coreaddons crash decoration globalaccel i18n iconthemes \ +USE_GL= egl +USE_KDE= ecm_build auth completion config configwidgets \ + coreaddons crash dbusaddons decoration globalaccel i18n \ idletime kcmutils kdeclarative kio kscreenlocker newstuff \ notifications package plasma-framework service textwidgets \ widgetsaddons windowsystem xmlgui USE_LDCONFIG= yes USE_QT= qmake_build buildtools_build core dbus declarative gui \ multimedia_run quickcontrols2_run widgets x11extras -USE_XORG= x11 xcb xi +USE_XORG= pixman x11 xcb xi SHEBANG_FILES= kconf_update/*.py kconf_update/*.pl -GL_COMMIT= 611fe6a008c0fed3bff8004f56d240161190540b +GL_COMMIT= 9a706378af61d93fbacd0cd9dcd1b0be68bc6c70 PLIST_SUB= VERSION=${PORTVERSION} +PLIST_SUB= VERSION=5.23.90 # XXX beta override LDFLAGS+= -Wl,--as-needed # GL, ICE/SM/Xext, epoll-shim, glib, intl, Qt5*, KF5* OPTIONS_DEFINE= BREEZE DOCS QA11Y diff --git a/x11-wm/kwinft/distinfo b/x11-wm/kwinft/distinfo index 7a6c70a6c487..b8f02272597d 100644 --- a/x11-wm/kwinft/distinfo +++ b/x11-wm/kwinft/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1639391348 -SHA256 (kwinft-kwinft-611fe6a008c0fed3bff8004f56d240161190540b_GL0.tar.gz) = fa93c43f0242913633527b3a11b1210a3363d3a11d50889c62ccd07a198aa996 -SIZE (kwinft-kwinft-611fe6a008c0fed3bff8004f56d240161190540b_GL0.tar.gz) = 4815996 -SHA256 (0499e4cd8162.patch) = 04914da119da76f3df03b074052cf676f3a5eeccae78e7c5535fb763aca1e927 -SIZE (0499e4cd8162.patch) = 869 -SHA256 (e80b91d5bc45.patch) = e9896145de5e7f3c4f51d1707442d5afbcf87757e5f6978b3c0084ecf608fb09 -SIZE (e80b91d5bc45.patch) = 827 +TIMESTAMP = 1643884701 +SHA256 (kwinft-kwinft-9a706378af61d93fbacd0cd9dcd1b0be68bc6c70_GL0.tar.gz) = fdf8b84c78f76c8791aee54d7f41f4c0628c849eb1aa312cd052817337ecbff1 +SIZE (kwinft-kwinft-9a706378af61d93fbacd0cd9dcd1b0be68bc6c70_GL0.tar.gz) = 4939124 +SHA256 (1c81c5f3ef9a.patch) = 34f01f456b0c7b8bf5d85629141995e18220a0439feec3fb324d2d47af7f3348 +SIZE (1c81c5f3ef9a.patch) = 1079 +SHA256 (a6d7bb9acfef.patch) = edfd447f8fd4827145bd1a2fa852c29bb01112f20bc208ce0997ce7b4de9b8db +SIZE (a6d7bb9acfef.patch) = 5098 diff --git a/x11-wm/kwinft/files/patch-plasma-5.23 b/x11-wm/kwinft/files/patch-plasma-5.23 new file mode 100644 index 000000000000..ab82453a9d36 --- /dev/null +++ b/x11-wm/kwinft/files/patch-plasma-5.23 @@ -0,0 +1,301 @@ +Revert until x11-wm/plasma5-kdecoration is updated to 5.24 +https://gitlab.com/kwinft/kwinft/-/commit/0368384f4942 +https://gitlab.com/kwinft/kwinft/-/commit/2d9277aa47f7 +https://gitlab.com/kwinft/kwinft/-/commit/67fd993c8ba6 + +CMake Error at CMakeLists.txt:115 (find_package): + Could not find a configuration file for package "KDecoration2" that is + compatible with requested version "5.23.90". + + The following configuration files were considered but not accepted: + + /usr/local/lib/cmake/KDecoration2/KDecoration2Config.cmake, version: 5.23.5 + +--- CMakeLists.txt.orig 2022-02-03 10:38:21 UTC ++++ CMakeLists.txt +@@ -112,7 +112,7 @@ set_package_properties(KF5Kirigami2 PROPERTIES + TYPE RUNTIME + ) + +-find_package(KDecoration2 ${PROJECT_VERSION} CONFIG REQUIRED) ++find_package(KDecoration2 5.18.0 CONFIG REQUIRED) + + find_package(KScreenLocker CONFIG REQUIRED) + set_package_properties(KScreenLocker PROPERTIES +--- kcmkwin/kwindecoration/decorationmodel.cpp.orig 2022-02-03 10:38:21 UTC ++++ kcmkwin/kwindecoration/decorationmodel.cpp +@@ -19,10 +19,10 @@ + */ + #include "decorationmodel.h" + // KDecoration2 +-#include + #include +-#include ++#include + // KDE ++#include + #include + #include + // Qt +@@ -55,18 +55,18 @@ QVariant DecorationsModel::data(const QModelIndex &ind + if (!index.isValid() || index.column() != 0 || index.row() < 0 || index.row() >= int(m_plugins.size())) { + return QVariant(); + } +- const KDecoration2::DecorationThemeMetaData &d = m_plugins.at(index.row()); ++ const Data &d = m_plugins.at(index.row()); + switch (role) { + case Qt::DisplayRole: +- return d.visibleName(); ++ return d.visibleName; + case PluginNameRole: +- return d.pluginId(); ++ return d.pluginName; + case ThemeNameRole: +- return d.themeName(); ++ return d.themeName; + case ConfigurationRole: +- return d.hasConfiguration(); ++ return d.configuration; + case RecommendedBorderSizeRole: +- return Utils::borderSizeToString(d.borderSize()); ++ return Utils::borderSizeToString(d.recommendedBorderSize); + } + return QVariant(); + } +@@ -132,13 +132,17 @@ void DecorationsModel::init() + { + beginResetModel(); + m_plugins.clear(); +- const auto plugins = KPluginMetaData::findPlugins(s_pluginName); ++ const auto plugins = KPluginLoader::findPlugins(s_pluginName); + for (const auto &info : plugins) { +- QScopedPointer themeFinder( +- KPluginFactory::instantiatePlugin(info).plugin); +- KDecoration2::DecorationThemeMetaData data; +- const auto decoSettingsMap = info.rawData().value("org.kde.kdecoration2").toObject().toVariantMap(); +- if (themeFinder) { ++ KPluginLoader loader(info.fileName()); ++ KPluginFactory *factory = loader.factory(); ++ if (!factory) { ++ continue; ++ } ++ auto metadata = loader.metaData().value(QStringLiteral("MetaData")).toObject().value(s_pluginName); ++ Data data; ++ if (!metadata.isUndefined()) { ++ const auto decoSettingsMap = metadata.toObject().toVariantMap(); + const QString &kns = findKNewStuff(decoSettingsMap); + if (!kns.isEmpty() && !m_knsProviders.contains(kns)) { + m_knsProviders.append(kns); +@@ -149,20 +153,35 @@ void DecorationsModel::init() + // We cannot list the themes + continue; + } +- const auto themesList = themeFinder->themes(); +- for (const KDecoration2::DecorationThemeMetaData &data : themesList) { +- m_plugins.emplace_back(data); ++ QScopedPointer themeFinder(factory->create(keyword)); ++ if (themeFinder.isNull()) { ++ continue; + } ++ QVariant themes = themeFinder->property("themes"); ++ if (!themes.isValid()) { ++ continue; ++ } ++ const auto themesMap = themes.toMap(); ++ for (auto it = themesMap.begin(); it != themesMap.end(); ++it) { ++ Data d; ++ d.pluginName = info.pluginId(); ++ d.themeName = it.value().toString(); ++ d.visibleName = it.key(); ++ QMetaObject::invokeMethod(themeFinder.data(), "hasConfiguration", ++ Q_RETURN_ARG(bool, d.configuration), ++ Q_ARG(QString, d.themeName)); ++ m_plugins.emplace_back(std::move(d)); ++ } + + // it's a theme engine, we don't want to show this entry + continue; + } ++ data.configuration = isConfigureable(decoSettingsMap); ++ data.recommendedBorderSize = recommendedBorderSize(decoSettingsMap); + } +- data.setHasConfiguration(isConfigureable(decoSettingsMap)); +- data.setBorderSize(recommendedBorderSize(decoSettingsMap)); +- data.setVisibleName(info.name().isEmpty() ? info.pluginId() : info.name()); +- data.setPluginId(info.pluginId()); +- data.setThemeName(data.visibleName()); ++ data.pluginName = info.pluginId(); ++ data.visibleName = info.name().isEmpty() ? info.pluginId() : info.name(); ++ data.themeName = data.visibleName; + + m_plugins.emplace_back(std::move(data)); + } +@@ -171,9 +190,11 @@ void DecorationsModel::init() + + QModelIndex DecorationsModel::findDecoration(const QString &pluginName, const QString &themeName) const + { +- auto it = std::find_if(m_plugins.cbegin(), m_plugins.cend(), [pluginName, themeName](const KDecoration2::DecorationThemeMetaData &d) { +- return d.pluginId() == pluginName && d.themeName() == themeName; +- }); ++ auto it = std::find_if(m_plugins.cbegin(), m_plugins.cend(), ++ [pluginName, themeName](const Data &d) { ++ return d.pluginName == pluginName && d.themeName == themeName; ++ } ++ ); + if (it == m_plugins.cend()) { + return QModelIndex(); + } +--- kcmkwin/kwindecoration/decorationmodel.h.orig 2022-02-03 10:38:21 UTC ++++ kcmkwin/kwindecoration/decorationmodel.h +@@ -22,7 +22,6 @@ + + #include "utils.h" + +-#include + #include + + namespace KDecoration2 +@@ -60,7 +59,14 @@ public Q_SLOTS: + void init(); + + private: +- std::vector m_plugins; ++ struct Data { ++ QString pluginName; ++ QString themeName; ++ QString visibleName; ++ bool configuration = false; ++ KDecoration2::BorderSize recommendedBorderSize = KDecoration2::BorderSize::Normal; ++ }; ++ std::vector m_plugins; + QStringList m_knsProviders; + }; + +--- plugins/kdecorations/aurorae/src/aurorae.cpp.orig 2022-02-03 10:38:21 UTC ++++ plugins/kdecorations/aurorae/src/aurorae.cpp +@@ -60,11 +60,10 @@ along with this program. If not, see (); +- registerPlugin(); +- registerPlugin(); ++ registerPlugin(QStringLiteral("themes")); ++ registerPlugin(QStringLiteral("kcmodule")); + ) + +- + namespace Aurorae + { + +@@ -610,33 +609,28 @@ KDecoration2::DecoratedClient *Decoration::clientPoint + return client().data(); + } + +-ThemeProvider::ThemeProvider(QObject *parent, const KPluginMetaData &data, const QVariantList &args) +- : KDecoration2::DecorationThemeProvider(parent, data, args) +- , m_data(data) ++ThemeFinder::ThemeFinder(QObject *parent, const QVariantList &args) ++ : QObject(parent) + { ++ Q_UNUSED(args) + init(); + } + +-void ThemeProvider::init() ++void ThemeFinder::init() + { + findAllQmlThemes(); + findAllSvgThemes(); + } + +-void ThemeProvider::findAllQmlThemes() ++void ThemeFinder::findAllQmlThemes() + { + const auto offers = KPackage::PackageLoader::self()->findPackages(QStringLiteral("KWin/Decoration"), s_qmlPackageFolder); + for (const auto &offer : offers) { +- KDecoration2::DecorationThemeMetaData data; +- data.setPluginId(m_data.pluginId()); +- data.setThemeName(offer.pluginId()); +- data.setVisibleName(offer.name()); +- data.setHasConfiguration(hasConfiguration(offer.pluginId())); +- m_themes.append(data); ++ m_themes.insert(offer.name(), offer.pluginId()); + } + } + +-void ThemeProvider::findAllSvgThemes() ++void ThemeFinder::findAllSvgThemes() + { + QStringList themes; + const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("aurorae/themes/"), QStandardPaths::LocateDirectory); +@@ -664,19 +658,14 @@ void ThemeProvider::findAllSvgThemes() + name = packageName; + } + +- KDecoration2::DecorationThemeMetaData data; +- data.setPluginId(m_data.pluginId()); +- data.setThemeName(QLatin1String("__aurorae__svg__") + packageName); +- data.setVisibleName(name); +- data.setHasConfiguration(hasConfiguration(data.themeName())); +- m_themes.append(data); ++ m_themes.insert(name, QString(QLatin1String("__aurorae__svg__") + packageName)); + } + } + + static const QString s_configUiPath = QStringLiteral("kwin/decorations/%1/contents/ui/config.ui"); + static const QString s_configXmlPath = QStringLiteral("kwin/decorations/%1/contents/config/main.xml"); + +-bool ThemeProvider::hasConfiguration(const QString &theme) ++bool ThemeFinder::hasConfiguration(const QString &theme) const + { + if (theme.startsWith(QLatin1String("__aurorae__svg__"))) { + return true; +--- plugins/kdecorations/aurorae/src/aurorae.h.orig 2022-02-03 10:38:21 UTC ++++ plugins/kdecorations/aurorae/src/aurorae.h +@@ -18,12 +18,10 @@ along with this program. If not, see + #include +-#include +-#include + #include + #include ++#include + + class QQmlComponent; + class QQmlContext; +@@ -91,24 +89,25 @@ Q_SIGNALS: (private) + QElapsedTimer m_doubleClickTimer; + }; + +-class ThemeProvider : public KDecoration2::DecorationThemeProvider ++class ThemeFinder : public QObject + { + Q_OBJECT ++ Q_PROPERTY(QVariantMap themes READ themes) + public: +- explicit ThemeProvider(QObject *parent, const KPluginMetaData &data, const QVariantList &args); ++ explicit ThemeFinder(QObject *parent = nullptr, const QVariantList &args = QVariantList()); + +- QList themes() const override +- { ++ QVariantMap themes() const { + return m_themes; + } + ++public Q_SLOTS: ++ bool hasConfiguration(const QString &theme) const; ++ + private: + void init(); + void findAllQmlThemes(); + void findAllSvgThemes(); +- bool hasConfiguration(const QString &theme); +- QList m_themes; +- const KPluginMetaData m_data; ++ QVariantMap m_themes; + }; + + class ConfigurationModule : public KCModule diff --git a/x11-wm/kwinft/pkg-message b/x11-wm/kwinft/pkg-message index 392fed0f34f3..68e3a0e9b0dd 100644 --- a/x11-wm/kwinft/pkg-message +++ b/x11-wm/kwinft/pkg-message @@ -1,10 +1,6 @@ [ { type: install message: <