summaryrefslogtreecommitdiff
path: root/mail-client/astroid/astroid-9999.ebuild
blob: ba7e4c768e213ade13ef6691a4c747efaf7e9711 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit cmake git-r3 optfeature virtualx

DESCRIPTION="lightweight graphical threads-with-tags style email client for notmuch"
HOMEPAGE="https://github.com/astroidmail/astroid"
EGIT_REPO_URI="https://github.com/astroidmail/astroid.git"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS=""
IUSE="+doc embedded-editor plugins profile terminal test"

RDEPEND="
	plugins? (
		dev-libs/gobject-introspection
		>=dev-libs/libpeas-1.0.0
		|| (
			dev-libs/gmime:3.0[vala]
			dev-libs/gmime:2.6[vala]
		)
	)
	terminal? (
		x11-libs/vte:2.91
	)
	|| (
		>=dev-libs/gmime-3.0.3:3.0
		>=dev-libs/gmime-2.6.21:2.6
	)
	dev-cpp/glibmm:2
	>=dev-cpp/gtkmm-3.10:3.0
	dev-libs/boost[nls]
	dev-libs/libsass
	>=dev-libs/protobuf-3.6.0:=[protobuf]
	|| (
		>=net-libs/webkit-gtk-2.22.0:4.1=
		>=net-libs/webkit-gtk-2.22.0:4=
	)
	net-mail/notmuch
"
DEPEND="${RDEPEND}
	doc? (
		|| (
			app-text/scdoc
			app-text/ronn-ng
		)
	)
	test? (
		${VIRTUALX_DEPEND}
		app-crypt/gnupg
		app-text/cmark
	)
	virtual/pkgconfig
"

src_prepare() {
	if ! use test; then
		sed -i -e '/enable_testing/d;/add_subdirectory.*tests.*/d' CMakeLists.txt
		rm -rf tests
	fi

	if use terminal; then
		sed -i -e '/pkg_check_modules.*VTE2/s/VTE2/VTE2 REQUIRED/' CMakeLists.txt
	fi

	cmake_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DDISABLE_DOCS=$(usex doc OFF ON)
		-DDISABLE_EMBEDDED_EDITOR=$(usex embedded-editor OFF ON)
		-DDISABLE_TERMINAL=$(usex terminal OFF ON)
		-DDISABLE_PLUGINS=$(usex plugins OFF ON)
		-DENABLE_PROFILING=$(usex profile ON OFF)
	)

	cmake_src_configure
}

src_test() {
	virtx cmake_src_test
}

pkg_postinst() {
	optfeature "GnuPG" app-crypt/gnupg
	optfeature "Markdown" app-text/cmark
}