--- /dev/null
+From 7283e2698d1fcd9aba2e4e1de1b24ed13425e2f5 Mon Sep 17 00:00:00 2001
+From: Michail Vourlakos <mvourlakos@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
+
--- /dev/null
+# 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" )