Accepting request 518259 from KDE:Frameworks5
Plasma 5.10.5 (forwarded request 518189 from Vogtinator) OBS-URL: https://build.opensuse.org/request/show/518259 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kde-gtk-config5?expand=0&rev=44
This commit is contained in:
135
0001-Fix-look-up-of-gtk-preview-modules.patch
Normal file
135
0001-Fix-look-up-of-gtk-preview-modules.patch
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
From bf9c1c7ae6e7baf30e5cc794f5bd13b00ffbfe19 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Aleix Pol <aleixpol@kde.org>
|
||||||
|
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 <QDebug>
|
||||||
|
#include <QProcess>
|
||||||
|
#include <QStandardPaths>
|
||||||
|
+#include <config.h>
|
||||||
|
|
||||||
|
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 <QMenu>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QDir>
|
||||||
|
+#include <config.h>
|
||||||
|
#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
|
||||||
|
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:32b126278fc89ec8f44126aa27569a02b0d913975b5b0d6021b126e1fa9eb364
|
|
||||||
size 152280
|
|
3
kde-gtk-config-5.10.5.tar.xz
Normal file
3
kde-gtk-config-5.10.5.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a5bedaa880d416a8ab259c59dc84b4086a1cb8582d95d8632d79c3e9a746b8a8
|
||||||
|
size 152488
|
@@ -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
|
Sun Aug 6 12:07:39 UTC 2017 - fabian@ritter-vogt.de
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
%bcond_without lang
|
%bcond_without lang
|
||||||
Name: kde-gtk-config5
|
Name: kde-gtk-config5
|
||||||
Version: 5.10.4
|
Version: 5.10.5
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: KCM Module to Configure GTK2 and GTK3 Applications Appearance Under KDE
|
Summary: KCM Module to Configure GTK2 and GTK3 Applications Appearance Under KDE
|
||||||
License: LGPL-3.0+ and GPL-3.0+
|
License: LGPL-3.0+ and GPL-3.0+
|
||||||
@@ -28,6 +28,8 @@ Source1: kde_gtk_config.suse.sh
|
|||||||
Source2: gtkrc-2.0-kde4.template
|
Source2: gtkrc-2.0-kde4.template
|
||||||
Source3: gtk3-settings.ini-kde4.template
|
Source3: gtk3-settings.ini-kde4.template
|
||||||
Source: http://download.kde.org/stable/plasma/%{version}/kde-gtk-config-%{version}.tar.xz
|
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: extra-cmake-modules >= 0.0.9
|
||||||
BuildRequires: kf5-filesystem
|
BuildRequires: kf5-filesystem
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
@@ -85,6 +87,7 @@ the GTK3 application style from within the GTK configuration KCM
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n kde-gtk-config-%{version}
|
%setup -q -n kde-gtk-config-%{version}
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}
|
%cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}
|
||||||
|
Reference in New Issue
Block a user