From 01b11f409d95d0db9dd1ec58c953983e34914ca24e3d61647bff19c550205d4a Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Mon, 2 Aug 2021 13:50:22 +0000 Subject: [PATCH] Accepting request 909757 from home:Vogtinator:plasma5.22 - Add patch to drop gtk-2.0 dependency and adjust BuildRequires: * 0001-Drop-unused-dependency-on-gtk-2.0.patch - Add patch to fix setting the default GTK theme on first login: * 0001-Make-sure-to-actually-commit-GSettings-changes.patch OBS-URL: https://build.opensuse.org/request/show/909757 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kde-gtk-config5?expand=0&rev=297 --- 0001-Drop-unused-dependency-on-gtk-2.0.patch | 25 +++++++++++++ ...to-actually-commit-GSettings-changes.patch | 35 +++++++++++++++++++ kde-gtk-config5.changes | 8 +++++ kde-gtk-config5.spec | 8 +++-- 4 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 0001-Drop-unused-dependency-on-gtk-2.0.patch create mode 100644 0001-Make-sure-to-actually-commit-GSettings-changes.patch diff --git a/0001-Drop-unused-dependency-on-gtk-2.0.patch b/0001-Drop-unused-dependency-on-gtk-2.0.patch new file mode 100644 index 0000000..18b76ab --- /dev/null +++ b/0001-Drop-unused-dependency-on-gtk-2.0.patch @@ -0,0 +1,25 @@ +From 090cfb2db4bc9c032cd7a7c12cf2a317c248e3c6 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Mon, 2 Aug 2021 13:52:38 +0200 +Subject: [PATCH] Drop unused dependency on gtk+-2.0 + +FWICT it's not actually used anywhere. +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 45d02ef..f102642 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,7 +20,6 @@ find_package(Sass REQUIRED) + find_package(XSettingsd) + + pkg_check_modules(GTK+3 REQUIRED IMPORTED_TARGET gtk+-3.0) +-pkg_check_modules(GTK+2 REQUIRED IMPORTED_TARGET gtk+-2.0) + pkg_check_modules(GLib2 REQUIRED IMPORTED_TARGET glib-2.0) + pkg_check_modules(GObject REQUIRED IMPORTED_TARGET gobject-2.0) + pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) +-- +2.32.0 + diff --git a/0001-Make-sure-to-actually-commit-GSettings-changes.patch b/0001-Make-sure-to-actually-commit-GSettings-changes.patch new file mode 100644 index 0000000..f33157f --- /dev/null +++ b/0001-Make-sure-to-actually-commit-GSettings-changes.patch @@ -0,0 +1,35 @@ +From da887d179bff6597355b0214c4e6c56f327b6ce3 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Mon, 2 Aug 2021 13:47:36 +0200 +Subject: [PATCH] Make sure to actually commit GSettings changes + +g_settings_set_* is async, so make sure the change is actually performed before +returning and eventually exiting. This mostly affected the gtk_theme update +binary, because that isn't long running unlike the kded module. +--- + kded/configeditor.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/kded/configeditor.cpp b/kded/configeditor.cpp +index a51f48b..587ff7c 100644 +--- a/kded/configeditor.cpp ++++ b/kded/configeditor.cpp +@@ -38,12 +38,15 @@ void ConfigEditor::setGtkConfigValueGSettings(const QString ¶mName, const QV + } else if (paramValue.type() == QVariant::Type::Bool) { + g_settings_set_boolean(gsettings, paramName.toUtf8().constData(), paramValue.toBool()); + } ++ ++ g_settings_sync(); + } + + void ConfigEditor::setGtkConfigValueGSettingsAsEnum(const QString ¶mName, int paramValue, const QString &category) + { + g_autoptr(GSettings) gsettings = g_settings_new(category.toUtf8().constData()); + g_settings_set_enum(gsettings, paramName.toUtf8().constData(), paramValue); ++ g_settings_sync(); + } + + void ConfigEditor::setGtkConfigValueSettingsIni(const QString &versionString, const QString ¶mName, const QVariant ¶mValue) +-- +2.32.0 + diff --git a/kde-gtk-config5.changes b/kde-gtk-config5.changes index e888b22..5d2c983 100644 --- a/kde-gtk-config5.changes +++ b/kde-gtk-config5.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Aug 2 11:58:51 UTC 2021 - Fabian Vogt + +- Add patch to drop gtk-2.0 dependency and adjust BuildRequires: + * 0001-Drop-unused-dependency-on-gtk-2.0.patch +- Add patch to fix setting the default GTK theme on first login: + * 0001-Make-sure-to-actually-commit-GSettings-changes.patch + ------------------------------------------------------------------- Tue Jul 27 12:34:50 UTC 2021 - Fabian Vogt diff --git a/kde-gtk-config5.spec b/kde-gtk-config5.spec index 212393e..91daf0c 100644 --- a/kde-gtk-config5.spec +++ b/kde-gtk-config5.spec @@ -29,6 +29,9 @@ Source: https://download.kde.org/stable/plasma/%{version}/kde-gtk-config Source1: https://download.kde.org/stable/plasma/%{version}/kde-gtk-config-%{version}.tar.xz.sig Source2: plasma.keyring %endif +# PATCH-FIX-UPSTREAM +Patch1: 0001-Make-sure-to-actually-commit-GSettings-changes.patch +Patch2: 0001-Drop-unused-dependency-on-gtk-2.0.patch BuildRequires: extra-cmake-modules >= 0.0.9 BuildRequires: gsettings-desktop-schemas BuildRequires: kf5-filesystem @@ -42,8 +45,9 @@ BuildRequires: cmake(KF5DBusAddons) BuildRequires: cmake(KF5GuiAddons) BuildRequires: cmake(KF5IconThemes) BuildRequires: cmake(Qt5Svg) -BuildRequires: pkgconfig(giomm-2.4) -BuildRequires: pkgconfig(gtk+-2.0) +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(x11) # Needed for syncing GTK+ settings