# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Virtual for a freedesktop.org Secret Service API provider"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"

IUSE="kde"

RDEPEND="|| (
	gnome-base/gnome-keyring
	app-admin/keepassxc
	>=kde-frameworks/kwallet-5.97
)"
# TODO: add the KDE provider here once ready, there are still problems as of August 2023 though
# (see https://bugs.kde.org/show_bug.cgi?id=458085)

pkg_postinst() {
	if use kde; then
		ewarn "KDE users (kwallet) should use the following workaround:"
		ewarn "https://invent.kde.org/frameworks/kwallet/-/merge_requests/11#note_614022"
		ewarn "or apply the following patch"
		ewarn "https://invent.kde.org/frameworks/kwallet/-/merge_requests/67"
	fi
}
