From 972502c01f31d63f4e238b38231c4dc964f3c762d6e8c839ece5506b0e6545d2 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Tue, 22 Aug 2017 21:15:34 +0000 Subject: [PATCH] Plasma 5.10.5 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kde-gtk-config5?expand=0&rev=131 --- 0001-Fix-look-up-of-gtk-preview-modules.patch | 135 ++++++++++++++++++ kde-gtk-config-5.10.4.tar.xz | 3 - kde-gtk-config-5.10.5.tar.xz | 3 + kde-gtk-config5.changes | 12 ++ kde-gtk-config5.spec | 5 +- 5 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 0001-Fix-look-up-of-gtk-preview-modules.patch delete mode 100644 kde-gtk-config-5.10.4.tar.xz create mode 100644 kde-gtk-config-5.10.5.tar.xz diff --git a/0001-Fix-look-up-of-gtk-preview-modules.patch b/0001-Fix-look-up-of-gtk-preview-modules.patch new file mode 100644 index 0000000..3e4ad0d --- /dev/null +++ b/0001-Fix-look-up-of-gtk-preview-modules.patch @@ -0,0 +1,135 @@ +From bf9c1c7ae6e7baf30e5cc794f5bd13b00ffbfe19 Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Wed, 9 Aug 2017 18:17:12 +0200 +Subject: [PATCH] Fix look-up of gtk preview modules + +BUG: 383198 +--- + CMakeLists.txt | 2 ++ + config.h.cmake | 1 + + gtk3proxies/CMakeLists.txt | 2 +- + gtkproxies/CMakeLists.txt | 2 +- + gtkproxies/preview.c | 2 +- + src/appearancegtk2.cpp | 3 ++- + src/gtkconfigkcmodule.cpp | 5 +++-- + tests/CMakeLists.txt | 1 + + 8 files changed, 12 insertions(+), 6 deletions(-) + create mode 100644 config.h.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 77f0d4d..5c17532 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,6 +24,8 @@ include(KDEInstallDirs) + include(KDECMakeSettings) + include(KDECompilerSettings NO_POLICY_SCOPE) + ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) ++ + # Set KI18n translation domain + add_definitions(-DTRANSLATION_DOMAIN=\"kde-gtk-config\") + +diff --git a/config.h.cmake b/config.h.cmake +new file mode 100644 +index 0000000..9f26104 +--- /dev/null ++++ b/config.h.cmake +@@ -0,0 +1 @@ ++#define CMAKE_INSTALL_FULL_LIBEXECDIR "@CMAKE_INSTALL_FULL_LIBEXECDIR@" +diff --git a/gtk3proxies/CMakeLists.txt b/gtk3proxies/CMakeLists.txt +index f22793a..04d9c7f 100644 +--- a/gtk3proxies/CMakeLists.txt ++++ b/gtk3proxies/CMakeLists.txt +@@ -9,6 +9,6 @@ add_executable(gtk3_preview preview3.c) + if(X11_FOUND) + target_include_directories(gtk3_preview PRIVATE ${X11_X11_INCLUDE_PATH}) + endif() +-target_compile_definitions(gtk3_preview PRIVATE "-DDATA_DIR=\"${DATA_INSTALL_DIR}/kcm-gtk-module/\"") ++target_compile_definitions(gtk3_preview PRIVATE "-DDATA_DIR=\"${KDE_INSTALL_FULL_DATADIR}/kcm-gtk-module/\"") + target_link_libraries(gtk3_preview ${GTK3_LIBRARY} ${GOBJECT2_LIBRARY} ${GLIB2_LIBRARY}) + install(TARGETS gtk3_preview RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}") +diff --git a/gtkproxies/CMakeLists.txt b/gtkproxies/CMakeLists.txt +index fe8e1a0..9a0f3bb 100644 +--- a/gtkproxies/CMakeLists.txt ++++ b/gtkproxies/CMakeLists.txt +@@ -8,7 +8,7 @@ install(TARGETS reload_gtk_apps RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}") + + + add_executable(gtk_preview preview.c) +-target_compile_definitions(gtk_preview PRIVATE "-DDATA_DIR=\"${DATA_INSTALL_DIR}/kcm-gtk-module/\"") ++target_compile_definitions(gtk_preview PRIVATE "-DDATA_DIR=\"${KDE_INSTALL_FULL_DATADIR}/kcm-gtk-module/\"") + target_link_libraries(gtk_preview ${GTK2_LIBRARIES} ${GTK2_GIOMM_LIBRARY}) + install(TARGETS gtk_preview RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}") + +diff --git a/gtkproxies/preview.c b/gtkproxies/preview.c +index 5b40a44..e37c1de 100644 +--- a/gtkproxies/preview.c ++++ b/gtkproxies/preview.c +@@ -86,7 +86,7 @@ int main(int argc, char **argv) + GtkBuilder *builder = gtk_builder_new(); + if( ! gtk_builder_add_from_file( builder, ui_file, &error ) ) { + g_warning( "%s", error->message ); +- g_free( error ); ++ g_object_unref( error ); + return 1; + } + +diff --git a/src/appearancegtk2.cpp b/src/appearancegtk2.cpp +index 791bb1f..44a2239 100644 +--- a/src/appearancegtk2.cpp ++++ b/src/appearancegtk2.cpp +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + bool AppearanceGTK2::loadSettings(const QString& path) + { +@@ -148,7 +149,7 @@ bool AppearanceGTK2::saveSettings(const QString& gtkrcFile) const + // qDebug() << "Symbolic link created for .gtkrc-2.0-kde4 :D"; + + if(gtkrcFile==defaultConfigFile()) +- QProcess::startDetached(QStandardPaths::findExecutable("reload_gtk_apps")); ++ QProcess::startDetached(QStandardPaths::findExecutable("reload_gtk_apps", {CMAKE_INSTALL_FULL_LIBEXECDIR})); + + return true; + } +diff --git a/src/gtkconfigkcmodule.cpp b/src/gtkconfigkcmodule.cpp +index bb2d994..76df4f2 100644 +--- a/src/gtkconfigkcmodule.cpp ++++ b/src/gtkconfigkcmodule.cpp +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include "ui_gui.h" + #include "abstractappearance.h" + #include "iconthemesmodel.h" +@@ -84,8 +85,8 @@ GTKConfigKCModule::GTKConfigKCModule(QWidget* parent, const QVariantList& args ) + ui->gtk2Preview->setIcon(previewIcon); + ui->gtk3Preview->setIcon(previewIcon); + +- QString gtk2Preview = QStandardPaths::findExecutable("gtk_preview"); +- QString gtk3Preview = QStandardPaths::findExecutable("gtk3_preview"); ++ QString gtk2Preview = QStandardPaths::findExecutable("gtk_preview", {CMAKE_INSTALL_FULL_LIBEXECDIR}); ++ QString gtk3Preview = QStandardPaths::findExecutable("gtk3_preview", {CMAKE_INSTALL_FULL_LIBEXECDIR}); + + m_p2 = new KProcess(this); + m_p2->setEnv("GTK2_RC_FILES", m_tempGtk2Preview, true); +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 997eb39..26c2048 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -3,6 +3,7 @@ macro(add_kgc_test name) + add_test(${name} ${name}) + ecm_mark_as_test(${name}) + target_link_libraries(${name} Qt5::Core Qt5::Gui Qt5::Test ) ++ target_include_directories(${name} PRIVATE ${CMAKE_BINARY_DIR}) + endmacro(add_kgc_test) + + add_kgc_test(fontstest ../src/fontshelpers.cpp) +-- +2.13.2 + diff --git a/kde-gtk-config-5.10.4.tar.xz b/kde-gtk-config-5.10.4.tar.xz deleted file mode 100644 index 8a4d63c..0000000 --- a/kde-gtk-config-5.10.4.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:32b126278fc89ec8f44126aa27569a02b0d913975b5b0d6021b126e1fa9eb364 -size 152280 diff --git a/kde-gtk-config-5.10.5.tar.xz b/kde-gtk-config-5.10.5.tar.xz new file mode 100644 index 0000000..134cbe1 --- /dev/null +++ b/kde-gtk-config-5.10.5.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5bedaa880d416a8ab259c59dc84b4086a1cb8582d95d8632d79c3e9a746b8a8 +size 152488 diff --git a/kde-gtk-config5.changes b/kde-gtk-config5.changes index 6dcfb66..224e4d6 100644 --- a/kde-gtk-config5.changes +++ b/kde-gtk-config5.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Aug 22 19:11:30 CEST 2017 - fabian@ritter-vogt.de + +- Update to 5.10.5 + * New bugfix release + * For more details please see: + * https://www.kde.org/announcements/plasma-5.10.5.php +- Changes since 5.10.4: + * None +- Add patch to fix preview options: + * 0001-Fix-look-up-of-gtk-preview-modules.patch + ------------------------------------------------------------------- Sun Aug 6 12:07:39 UTC 2017 - fabian@ritter-vogt.de diff --git a/kde-gtk-config5.spec b/kde-gtk-config5.spec index c6e8d5c..70e94a3 100644 --- a/kde-gtk-config5.spec +++ b/kde-gtk-config5.spec @@ -18,7 +18,7 @@ %bcond_without lang Name: kde-gtk-config5 -Version: 5.10.4 +Version: 5.10.5 Release: 0 Summary: KCM Module to Configure GTK2 and GTK3 Applications Appearance Under KDE License: LGPL-3.0+ and GPL-3.0+ @@ -28,6 +28,8 @@ Source1: kde_gtk_config.suse.sh Source2: gtkrc-2.0-kde4.template Source3: gtk3-settings.ini-kde4.template Source: http://download.kde.org/stable/plasma/%{version}/kde-gtk-config-%{version}.tar.xz +# PATCH-FIX-UPSTREAM +Patch1: 0001-Fix-look-up-of-gtk-preview-modules.patch BuildRequires: extra-cmake-modules >= 0.0.9 BuildRequires: kf5-filesystem BuildRequires: xz @@ -85,6 +87,7 @@ the GTK3 application style from within the GTK configuration KCM %prep %setup -q -n kde-gtk-config-%{version} +%patch1 -p1 %build %cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}