public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kde-gtk-config/files/, kde-plasma/kde-gtk-config/
@ 2016-09-13  2:27 Jason Donenfeld
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Donenfeld @ 2016-09-13  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     c8423c30d5f08634ff99db038127f9f8735225ad
Author:     Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 13 02:26:45 2016 +0000
Commit:     Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org>
CommitDate: Tue Sep 13 02:27:03 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8423c30

kde-plasma/kde-gtk-config: ensure we use gentoo cursor paths by importing upstream patch

Package-Manager: portage-2.3.0

 ...fig-5.7.4-look-for-cursors-in-right-place.patch | 152 +++++++++++++++++++++
 ...5.7.4.ebuild => kde-gtk-config-5.7.4-r1.ebuild} |   2 +-
 2 files changed, 153 insertions(+), 1 deletion(-)

diff --git a/kde-plasma/kde-gtk-config/files/kde-gtk-config-5.7.4-look-for-cursors-in-right-place.patch b/kde-plasma/kde-gtk-config/files/kde-gtk-config-5.7.4-look-for-cursors-in-right-place.patch
new file mode 100644
index 00000000..d44ad28
--- /dev/null
+++ b/kde-plasma/kde-gtk-config/files/kde-gtk-config-5.7.4-look-for-cursors-in-right-place.patch
@@ -0,0 +1,152 @@
+From 43323a188f17822cc7b26055b70e1e79cd50fc23 Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Tue, 13 Sep 2016 04:13:47 +0200
+Subject: [PATCH] cursor model: look for cursors in correct place
+
+plasma-desktop's cursor theme kcm does the right thing, by consulting
+the libXcursor library for the right search paths. Unfortunately, the
+kcm here does a pretty butchered job of it. So, we copy, more or less,
+the same algorithm used by plasma-desktop. Now there's parity in cursor
+selection.
+---
+ CMakeLists.txt            |  2 +-
+ src/cursorthemesmodel.cpp | 47 ++++++++++++++++++++++++++++++++++++++++-------
+ src/cursorthemesmodel.h   |  3 +--
+ src/gtkconfigkcmodule.cpp |  2 +-
+ 4 files changed, 43 insertions(+), 11 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 07d313c..ee2eed9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -54,7 +54,7 @@ ki18n_wrap_ui(kcm_SRCS
+ )
+ add_library(kcm_kdegtkconfig MODULE ${kcm_SRCS})
+ target_compile_definitions(kcm_kdegtkconfig PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}")
+-target_link_libraries(kcm_kdegtkconfig KF5::I18n KF5::KIOWidgets KF5::NewStuff KF5::Archive KF5::NewStuff KF5::ConfigWidgets KF5::IconThemes)
++target_link_libraries(kcm_kdegtkconfig ${X11_Xcursor_LIB} KF5::I18n KF5::KIOWidgets KF5::NewStuff KF5::Archive KF5::NewStuff KF5::ConfigWidgets KF5::IconThemes)
+ 
+ kcoreaddons_desktop_to_json(kcm_kdegtkconfig kde-gtk-config.desktop)
+ 
+diff --git a/src/cursorthemesmodel.cpp b/src/cursorthemesmodel.cpp
+index 5238714..2955bd9 100644
+--- a/src/cursorthemesmodel.cpp
++++ b/src/cursorthemesmodel.cpp
+@@ -27,9 +27,17 @@
+ #include <KIconTheme>
+ #include <QStandardPaths>
+ 
+-CursorThemesModel::CursorThemesModel(bool onlyHome, QObject* parent)
++#include <X11/Xlib.h>
++#include <X11/Xcursor/Xcursor.h>
++
++// Check for older version
++#if !defined(XCURSOR_LIB_MAJOR) && defined(XCURSOR_MAJOR)
++#  define XCURSOR_LIB_MAJOR XCURSOR_MAJOR
++#  define XCURSOR_LIB_MINOR XCURSOR_MINOR
++#endif
++
++CursorThemesModel::CursorThemesModel(QObject* parent)
+     : IconThemesModel(parent)
+-    , m_onlyHome(onlyHome)
+ {
+     reload();
+ }
+@@ -37,13 +45,38 @@ CursorThemesModel::CursorThemesModel(bool onlyHome, QObject* parent)
+ QList<QDir> CursorThemesModel::installedThemesPaths()
+ {
+     QList<QDir> availableIcons;
++    QStringList dirs;
++
++#if XCURSOR_LIB_MAJOR == 1 && XCURSOR_LIB_MINOR < 1
++    // These are the default paths Xcursor will scan for cursor themes
++    QString path("~/.icons:/usr/share/icons:/usr/share/pixmaps:/usr/X11R6/lib/X11/icons");
++
++    // If XCURSOR_PATH is set, use that instead of the default path
++    char *xcursorPath = std::getenv("XCURSOR_PATH");
++    if (xcursorPath)
++        path = xcursorPath;
++#else
++    // Get the search path from Xcursor
++    QString path = XcursorLibraryPath();
++#endif
+ 
+-    QSet<QString> dirs;
+-    dirs += QDir::home().filePath(".icons");
+-    if(!m_onlyHome) {
+-        dirs += QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "icons", QStandardPaths::LocateDirectory).toSet();
++    // Separate the paths
++    dirs = path.split(':', QString::SkipEmptyParts);
++
++    // Remove duplicates
++    QMutableStringListIterator i(dirs);
++    while (i.hasNext())
++    {
++        const QString path = i.next();
++        QMutableStringListIterator j(i);
++        while (j.hasNext())
++            if (j.next() == path)
++                j.remove();
+     }
+-    
++
++    // Expand all occurrences of ~/ to the home dir
++    dirs.replaceInStrings(QRegExp(QStringLiteral("^~\\/")), QDir::home().path() + '/');
++ 
+     foreach(const QString& dir, dirs) {
+         QDir userIconsDir(dir);
+         QDirIterator it(userIconsDir.path(), QDir::NoDotAndDotDot|QDir::AllDirs|QDir::NoSymLinks);
+diff --git a/src/cursorthemesmodel.h b/src/cursorthemesmodel.h
+index 7658bd5..4acfa4b 100644
+--- a/src/cursorthemesmodel.h
++++ b/src/cursorthemesmodel.h
+@@ -29,14 +29,13 @@ class QDir;
+ class CursorThemesModel : public IconThemesModel
+ {
+     public:
+-        explicit CursorThemesModel(bool onlyHome=false, QObject* parent = 0);
++        explicit CursorThemesModel(QObject* parent = 0);
+ 
+         void reload();
+         
+     private:
+         static void fillItem(const QDir& dir, QStandardItem* item);
+         QList<QDir> installedThemesPaths();
+-        bool m_onlyHome;
+ };
+ 
+ #endif // CURSORTHEMESMODEL_H
+diff --git a/src/gtkconfigkcmodule.cpp b/src/gtkconfigkcmodule.cpp
+index 7afe698..d36c6a3 100644
+--- a/src/gtkconfigkcmodule.cpp
++++ b/src/gtkconfigkcmodule.cpp
+@@ -71,7 +71,7 @@ GTKConfigKCModule::GTKConfigKCModule(QWidget* parent, const QVariantList& args )
+     setButtons(KCModule::Default | KCModule::Apply);
+     ui->setupUi(this);
+     appareance = new AppearenceGTK;
+-    m_cursorsModel = new CursorThemesModel(false, this);
++    m_cursorsModel = new CursorThemesModel(this);
+     ui->cb_cursor->setModel(m_cursorsModel);
+     m_iconsModel = new IconThemesModel(false, this);
+     ui->cb_icon->setModel(m_iconsModel);
+-- 
+2.10.0
+
+commit ab7c3c13721466cdf0236732bdb9f4a1f50db89c
+Author: Jason A. Donenfeld <Jason@zx2c4.com>
+Date:   Tue Sep 13 04:23:46 2016 +0200
+
+    cmake: find x11 libs
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ee2eed9..14ce086 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,6 +7,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_P
+ 
+ find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Widgets Test)
+ find_package(KF5 REQUIRED COMPONENTS I18n KIO ConfigWidgets NewStuff Archive KCMUtils IconThemes)
++find_package(X11)
+ 
+ include_directories(
+     ${CMAKE_SOURCE_DIR} 

diff --git a/kde-plasma/kde-gtk-config/kde-gtk-config-5.7.4.ebuild b/kde-plasma/kde-gtk-config/kde-gtk-config-5.7.4-r1.ebuild
similarity index 91%
rename from kde-plasma/kde-gtk-config/kde-gtk-config-5.7.4.ebuild
rename to kde-plasma/kde-gtk-config/kde-gtk-config-5.7.4-r1.ebuild
index 412ffd5..ad7ea62 100644
--- a/kde-plasma/kde-gtk-config/kde-gtk-config-5.7.4.ebuild
+++ b/kde-plasma/kde-gtk-config/kde-gtk-config-5.7.4-r1.ebuild
@@ -36,7 +36,7 @@ RDEPEND="${DEPEND}
 	!kde-misc/kde-gtk-config
 "
 
-PATCHES=( "${FILESDIR}/${PN}-5.4.2-gtk3-optional.patch" )
+PATCHES=( "${FILESDIR}/${PN}-5.4.2-gtk3-optional.patch" "${FILESDIR}/${P}-look-for-cursors-in-right-place.patch" )
 
 src_configure() {
 	local mycmakeargs=(


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kde-gtk-config/files/, kde-plasma/kde-gtk-config/
@ 2021-02-12 20:55 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2021-02-12 20:55 UTC (permalink / raw
  To: gentoo-commits

commit:     117c55dda3e55d36d869c69f9abb4290b7368500
Author:     Michal Privoznik <mprivozn <AT> redhat <DOT> com>
AuthorDate: Thu Feb 11 16:29:19 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Feb 12 20:55:39 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=117c55dd

kde-plasma/kde-gtk-config: Don't print debug message

I've noticed that whenever a GTK application is started the
stdout is polluted with the following message:

WINDOW DECORATIONS RELOADED

After some research I came across KDE bug:

  https://bugs.kde.org/show_bug.cgi?id=431365

which says the message is a debug message and could be dropped.
In the upstream repository, the following commit was merged which
does exactly that:

https://invent.kde.org/plasma/kde-gtk-config/-/commit/62e272df848d6848482ceb534d14bf36c9fde241.patch

Backport the commit until the version of kde-gtk-config is
bumped.

Closes: https://bugs.gentoo.org/770097
Signed-off-by: Michal Privoznik <mprivozn <AT> redhat.com>
Closes: https://github.com/gentoo/gentoo/pull/19415
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...config-5.20.5-window-decorations-reloaded.patch | 24 +++++++++
 .../kde-gtk-config/kde-gtk-config-5.20.5-r1.ebuild | 59 ++++++++++++++++++++++
 2 files changed, 83 insertions(+)

diff --git a/kde-plasma/kde-gtk-config/files/kde-gtk-config-5.20.5-window-decorations-reloaded.patch b/kde-plasma/kde-gtk-config/files/kde-gtk-config-5.20.5-window-decorations-reloaded.patch
new file mode 100644
index 00000000000..9b790a03dd1
--- /dev/null
+++ b/kde-plasma/kde-gtk-config/files/kde-gtk-config-5.20.5-window-decorations-reloaded.patch
@@ -0,0 +1,24 @@
+From 62e272df848d6848482ceb534d14bf36c9fde241 Mon Sep 17 00:00:00 2001
+From: Weng Xuetian <wengxt@gmail.com>
+Date: Sat, 9 Jan 2021 19:07:24 -0800
+Subject: [PATCH] Remove debug message to avoid polute to stdout.
+
+This would break application like zenity which output to stdout.
+---
+ window-decorations-reload-module/reloader.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/window-decorations-reload-module/reloader.c b/window-decorations-reload-module/reloader.c
+index 9e367dc..606bb1f 100644
+--- a/window-decorations-reload-module/reloader.c
++++ b/window-decorations-reload-module/reloader.c
+@@ -55,7 +55,6 @@ void manage_css_provider(GFileMonitor *monitor, GFile *file, GFile *other_file,
+ 
+ void reload_css_provider()
+ {
+-    printf("WINDOW DECORATIONS RELOADED\n");
+     if (css_provider != NULL) {
+         remove_css_provider();
+     }
+-- 
+GitLab

diff --git a/kde-plasma/kde-gtk-config/kde-gtk-config-5.20.5-r1.ebuild b/kde-plasma/kde-gtk-config/kde-gtk-config-5.20.5-r1.ebuild
new file mode 100644
index 00000000000..10b6fa2e627
--- /dev/null
+++ b/kde-plasma/kde-gtk-config/kde-gtk-config-5.20.5-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+KFMIN=5.74.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.1
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="GTK2 and GTK3 configurator for KDE Plasma"
+HOMEPAGE="https://invent.kde.org/plasma/kde-gtk-config"
+
+LICENSE="GPL-3"
+SLOT="5"
+KEYWORDS="amd64 ~arm arm64 ~ppc64 x86"
+IUSE=""
+
+BDEPEND="
+	dev-lang/sassc
+"
+DEPEND="
+	dev-cpp/glibmm:2
+	dev-libs/glib:2
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtsvg-${QTMIN}:5
+	gnome-base/gsettings-desktop-schemas
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=kde-frameworks/kconfigwidgets-${KFMIN}:5
+	>=kde-frameworks/kcoreaddons-${KFMIN}:5
+	>=kde-frameworks/kdbusaddons-${KFMIN}:5
+	>=kde-frameworks/kguiaddons-${KFMIN}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	x11-libs/gtk+:2
+	x11-libs/gtk+:3
+"
+RDEPEND="${DEPEND}
+	>=kde-plasma/kde-cli-tools-${PVCUT}:5
+	x11-misc/xsettingsd
+"
+
+PATCHES=( "${FILESDIR}/${PN}-5.20.5-window-decorations-reloaded.patch" )
+
+src_configure() {
+	local mycmakeargs=(
+		-DDATA_INSTALL_DIR="${EPREFIX}/usr/share"
+	)
+
+	ecm_src_configure
+}
+
+pkg_postinst() {
+	ecm_pkg_postinst
+	elog "If you notice missing icons in your GTK applications, you may have to install"
+	elog "the corresponding themes for GTK. A good guess would be x11-themes/oxygen-gtk"
+	elog "for example."
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-12 20:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13  2:27 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kde-gtk-config/files/, kde-plasma/kde-gtk-config/ Jason Donenfeld
  -- strict thread matches above, loose matches on Subject: below --
2021-02-12 20:55 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox