69a10050827849598355f00feb4809cf3ef61bd2
[gentoo.git] / app-admin / keepassxc / keepassxc-2.3.3.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit cmake-utils gnome2-utils xdg-utils
7
8 DESCRIPTION="KeePassXC - KeePass Cross-platform Community Edition"
9 HOMEPAGE="https://keepassxc.org"
10
11 if [[ "${PV}" != 9999 ]] ; then
12         #SRC_URI="https://github.com/keepassxreboot/keepassxc/archive/${PV}.tar.gz -> ${P}.tar.gz"
13         SRC_URI="https://github.com/keepassxreboot/keepassxc/releases/download/${PV}/${P}-src.tar.xz"
14         KEYWORDS="~amd64 ~x86"
15 else
16         inherit git-r3
17         EGIT_REPO_URI="https://github.com/keepassxreboot/${PN}"
18 fi
19
20 LICENSE="LGPL-2.1 GPL-2 GPL-3"
21 SLOT="0"
22 IUSE="autotype browser debug network test yubikey"
23
24 RDEPEND="
25         app-crypt/argon2:=
26         dev-libs/libgcrypt:=
27         dev-qt/qtcore:5
28         dev-qt/qtdbus:5
29         dev-qt/qtgui:5
30         dev-qt/qtnetwork:5
31         dev-qt/qtwidgets:5
32         sys-libs/zlib
33         autotype? (
34                 dev-qt/qtx11extras:5
35                 x11-libs/libX11
36                 x11-libs/libXi
37                 x11-libs/libXtst
38         )
39         browser? ( >=dev-libs/libsodium-1.0.12 )
40         yubikey? ( sys-auth/ykpers )
41 "
42
43 DEPEND="
44         ${RDEPEND}
45         dev-qt/linguist-tools:5
46         dev-qt/qttest:5
47         dev-qt/qtconcurrent:5
48 "
49
50 src_prepare() {
51          use test || \
52                 sed -e "/^find_package(Qt5Test/d" -i CMakeLists.txt || die
53
54          cmake-utils_src_prepare
55 }
56
57 src_configure() {
58         local mycmakeargs=(
59                 -DWITH_GUI_TESTS=OFF
60                 -DWITH_TESTS="$(usex test)"
61                 -DWITH_XC_AUTOTYPE="$(usex autotype)"
62                 -DWITH_XC_BROWSER="$(usex browser)"
63                 -DWITH_XC_HTTP=OFF
64                 -DWITH_XC_NETWORKING="$(usex network)"
65                 -DWITH_XC_SSHAGENT=ON
66                 -DWITH_XC_YUBIKEY="$(usex yubikey)"
67         )
68         cmake-utils_src_configure
69 }
70
71 pkg_postinst() {
72         gnome2_icon_cache_update
73         xdg_desktop_database_update
74         xdg_mimeinfo_database_update
75 }
76
77 pkg_postrm() {
78         gnome2_icon_cache_update
79         xdg_desktop_database_update
80         xdg_mimeinfo_database_update
81 }