commit:     0281ba71b34942191930a86d3fb2faad8b91686d
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 24 17:06:58 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Feb 24 18:01:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0281ba71

kde-misc/latte-dock: Fix first-run experience

See also: https://bugs.kde.org/show_bug.cgi?id=404762

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../latte-dock-0.8.6-create-dir-if-missing.patch   | 34 ++++++++++++++
 kde-misc/latte-dock/latte-dock-0.8.6-r1.ebuild     | 53 ++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git 
a/kde-misc/latte-dock/files/latte-dock-0.8.6-create-dir-if-missing.patch 
b/kde-misc/latte-dock/files/latte-dock-0.8.6-create-dir-if-missing.patch
new file mode 100644
index 00000000000..97cc7c1d76d
--- /dev/null
+++ b/kde-misc/latte-dock/files/latte-dock-0.8.6-create-dir-if-missing.patch
@@ -0,0 +1,34 @@
+From 7283e2698d1fcd9aba2e4e1de1b24ed13425e2f5 Mon Sep 17 00:00:00 2001
+From: Michail Vourlakos <mvourla...@gmail.com>
+Date: Sun, 24 Feb 2019 13:10:04 +0200
+Subject: create latte dir if missing when loading presets
+
+--this is critical because it does not open Latte at
+first run. The fix is just to make sure that "latte"
+directory will be created in case there isnt already
+
+BUG: 404762
+---
+ app/layoutmanager.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/app/layoutmanager.cpp b/app/layoutmanager.cpp
+index 73cb740..97abed1 100644
+--- a/app/layoutmanager.cpp
++++ b/app/layoutmanager.cpp
+@@ -1075,6 +1075,12 @@ void LayoutManager::importPresets(bool includeDefault)
+ 
+ void LayoutManager::importPreset(int presetNo, bool newInstanceIfPresent)
+ {
++    QDir configDir(QDir::homePath() + "/.config");
++
++    if (!QDir(configDir.absolutePath() + "/latte").exists()) {
++        configDir.mkdir("latte");
++    }
++
+     QByteArray presetNameOrig = QString("preset" + 
QString::number(presetNo)).toUtf8();
+     QString presetPath = m_corona->kPackage().filePath(presetNameOrig);
+     QString presetName = Layout::layoutName(presetPath);
+-- 
+cgit v1.1
+

diff --git a/kde-misc/latte-dock/latte-dock-0.8.6-r1.ebuild 
b/kde-misc/latte-dock/latte-dock-0.8.6-r1.ebuild
new file mode 100644
index 00000000000..332a87ea14f
--- /dev/null
+++ b/kde-misc/latte-dock/latte-dock-0.8.6-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit kde5
+
+if [[ ${KDE_BUILD_TYPE} = release ]]; then
+       SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz"
+       KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Elegant dock, based on KDE Frameworks"
+HOMEPAGE="https://store.kde.org/p/1169519/
+       https://github.com/psifidotos/Latte-Dock";
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE=""
+
+DEPEND="
+       $(add_frameworks_dep kactivities)
+       $(add_frameworks_dep karchive)
+       $(add_frameworks_dep kconfig)
+       $(add_frameworks_dep kcoreaddons)
+       $(add_frameworks_dep kcrash)
+       $(add_frameworks_dep kdbusaddons)
+       $(add_frameworks_dep kdeclarative)
+       $(add_frameworks_dep kglobalaccel)
+       $(add_frameworks_dep ki18n)
+       $(add_frameworks_dep kiconthemes)
+       $(add_frameworks_dep knewstuff)
+       $(add_frameworks_dep knotifications)
+       $(add_frameworks_dep kpackage)
+       $(add_frameworks_dep kwayland)
+       $(add_frameworks_dep kwindowsystem)
+       $(add_frameworks_dep kxmlgui)
+       $(add_frameworks_dep plasma X)
+       $(add_qt_dep qtdbus)
+       $(add_qt_dep qtdeclarative)
+       $(add_qt_dep qtgraphicaleffects)
+       $(add_qt_dep qtgui 'xcb')
+       $(add_qt_dep qtwidgets)
+       $(add_qt_dep qtx11extras)
+       x11-libs/libSM
+       x11-libs/libX11
+       x11-libs/libxcb
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( CHANGELOG.md README.md )
+
+PATCHES=( "${FILESDIR}/${P}-create-dir-if-missing.patch" )

Reply via email to