summaryrefslogtreecommitdiff
path: root/dev-libs/qtkeychain/qtkeychain-0.17.0.ebuild
blob: e2116c57dd71bf2f3d99d0a6b0ad5bda0c74d0c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake qt-utils

DESCRIPTION="Qt API for storing passwords securely"
HOMEPAGE="https://github.com/frankosterfeld/qtkeychain"

if [[ ${PV} != *9999* ]]; then
	SRC_URI="https://github.com/frankosterfeld/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv x86"
else
	inherit git-r3
	EGIT_REPO_URI="https://github.com/frankosterfeld/${PN}.git"
fi

LICENSE="BSD-2"
SLOT="0/1"
IUSE="keyring test"

# tests require DBus
RESTRICT="test !test? ( test )"

RDEPEND="
	dev-qt/qtbase:6[dbus]
	keyring? (
		app-crypt/libsecret
		dev-libs/glib:2
	)
"
DEPEND="${RDEPEND}"
BDEPEND="dev-qt/qttools:6[linguist]"

DOCS=( ChangeLog ReadMe.md )

src_configure() {
	local mycmakeargs=(
		-DECM_MKSPECS_INSTALL_DIR="${EPREFIX}"$(qt_get_mkspecsdir 6)
		-DBUILD_QTQUICK_DEMO=OFF
		-DBUILD_TEST_APPLICATION=OFF
		-DBUILD_TRANSLATIONS=ON
		-DLIBSECRET_SUPPORT=$(usex keyring)
		-DBUILD_TESTING=$(usex test)
	)

	cmake_src_configure
}