From fad7a15bd6d0e1f779a978f6b16e82aaf5b0afc5 Mon Sep 17 00:00:00 2001 From: gulle Date: Thu, 20 Jul 2017 17:18:41 +0300 Subject: [PATCH] kate --- .../kate/files/kate-17.04.0-allow-root.patch | 28 +++++++++++++++++++ .../files/kwrite-17.04.0-allow-root.patch | 27 ++++++++++++++++++ desktop/kde/applications/kate/pspec.xml | 13 ++++++++- 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 desktop/kde/applications/kate/files/kate-17.04.0-allow-root.patch create mode 100644 desktop/kde/applications/kate/files/kwrite-17.04.0-allow-root.patch diff --git a/desktop/kde/applications/kate/files/kate-17.04.0-allow-root.patch b/desktop/kde/applications/kate/files/kate-17.04.0-allow-root.patch new file mode 100644 index 0000000000..55bf29f38a --- /dev/null +++ b/desktop/kde/applications/kate/files/kate-17.04.0-allow-root.patch @@ -0,0 +1,28 @@ + +--- a/kate/main.cpp ++++ b/kate/main.cpp +@@ -51,24 +51,9 @@ + #include "qtsingleapplication/qtsingleapplication.h" + #endif + +-#ifndef Q_OS_WIN +-#include +-#endif +-#include +- + + int main(int argc, char **argv) + { +-#ifndef Q_OS_WIN +- /** +- * Check whether we are running as root +- **/ +- if (getuid() == 0) { +- std::cout << "Executing Kate as root is not possible. To edit files as root use:" << std::endl; +- std::cout << "SUDO_EDITOR=kate sudoedit " << std::endl; +- return 0; +- } +-#endif + /** + * init resources from our static lib + */ diff --git a/desktop/kde/applications/kate/files/kwrite-17.04.0-allow-root.patch b/desktop/kde/applications/kate/files/kwrite-17.04.0-allow-root.patch new file mode 100644 index 0000000000..09f9e1df80 --- /dev/null +++ b/desktop/kde/applications/kate/files/kwrite-17.04.0-allow-root.patch @@ -0,0 +1,27 @@ + +--- a/kwrite/main.cpp ++++ b/kwrite/main.cpp +@@ -42,23 +42,8 @@ + + #include "../urlinfo.h" + +-#ifndef Q_OS_WIN +-#include +-#endif +-#include +- + extern "C" Q_DECL_EXPORT int main(int argc, char **argv) + { +-#ifndef Q_OS_WIN +- /** +- * Check whether we are running as root +- **/ +- if (getuid() == 0) { +- std::cout << "Executing KWrite as root is not possible. To edit files as root use:" << std::endl; +- std::cout << "SUDO_EDITOR=kwrite sudoedit " << std::endl; +- return 0; +- } +-#endif + /** + * Create application first + * Enforce application name even if the executable is renamed diff --git a/desktop/kde/applications/kate/pspec.xml b/desktop/kde/applications/kate/pspec.xml index 1bea4ff651..262cfca429 100644 --- a/desktop/kde/applications/kate/pspec.xml +++ b/desktop/kde/applications/kate/pspec.xml @@ -12,7 +12,7 @@ app:gui Advanced Text Editor Plasma library and runtime components based upon KF5 and Qt5 - mirrors://kde/stable/applications/17.04.2/src/kate-17.04.2.tar.xz + https://codeload.github.com/KDE/kate/tar.gz/v17.04.3 qt5-base-devel plasma-framework-devel @@ -33,6 +33,10 @@ extra-cmake-modules kded-devel + + kate-17.04.0-allow-root.patch + kwrite-17.04.0-allow-root.patch + @@ -81,6 +85,13 @@ + + 2017-07-17 + 17.04.3 + Version bump + Ali Algul + aligulle3801@gmail.com + 2017-06-29 17.04.2