summaryrefslogtreecommitdiff
blob: d1943a94621bd3a97aa6c795fa42d46ecdcfa065 (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
PLOCALES="cs_CZ de_DE el es fr hr_HR ia it ja pt_BR ru sv zh_CN zh_TW"
inherit desktop git-r3 plocale qmake-utils

DESCRIPTION="View Your Mind, a mindmap tool"
HOMEPAGE="https://www.insilmaril.de/vym/"
EGIT_REPO_URI="https://git.code.sf.net/p/vym/code"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="dbus"

RDEPEND="
	dev-qt/qtcore:5
	dev-qt/qtgui:5
	dev-qt/qtnetwork:5
	dev-qt/qtprintsupport:5
	dev-qt/qtsvg:5
	dev-qt/qtxml:5
	dbus? ( dev-qt/qtdbus:5 )
"
DEPEND="
	${RDEPEND}
"
BDEPEND="
	dev-qt/qtcore:5
	dev-qt/linguist-tools:5
"
DOCS=( README.md )

src_prepare() {
	default

	if has es ${LINGUAS-es} ; then
		DOCS+=( doc/vym_es.pdf )
	fi
	if has fr ${LINGUAS-fr} ; then
		DOCS+=( doc/vym_fr.pdf )
	fi

	remove_locale() {
		sed -i \
			-e "/TRANSLATIONS += lang\/vym.${1}.ts/d" \
			vym.pro || die
	}

	gunzip doc/vym.1.gz || die

	#remove dead en translation
	rm lang/vym.en.ts || die
	remove_locale en

	plocale_find_changes lang ${PN}. .ts
	plocale_for_each_disabled_locale remove_locale

	"$(qt5_get_bindir)"/lrelease vym.pro || die
}

src_configure() {
	eqmake5 vym.pro \
		PREFIX="${EPREFIX}"/usr \
		DATADIR="${EPREFIX}"/usr/share \
		$(usex dbus "" NO_DBUS=1 )
}

src_install() {
	emake INSTALL_ROOT="${D}" install

	einstalldocs

	doman doc/vym.1

	make_desktop_entry vym vym /usr/share/vym/icons/vym.png Education
}