aboutsummaryrefslogtreecommitdiff
blob: c30d3e338b7b972642d29eea67e6f3e183ec117f (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

inherit cmake-utils git-2

DESCRIPTION="A fast and usable calculator for power users"
HOMEPAGE="http://speedcrunch.org/"
EGIT_REPO_URI="git://gitorious.org/${PN}/mainline"

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

LANGS="ar_JO ca_ES cs_CZ de_DE en_US es_ES eu_ES fi_FI fr_FR he_IL id_ID it_IT
	nb_NO nl_NL pl_PL pt_PT ro_RO ru_RU sv_SE tr_TR zh_CN"
LANGSLONG="en_GB es_AR pt_BR"

for X in ${LANGS}; do
	IUSE="${IUSE} linguas_${X%_*}"
done
for X in ${LANGSLONG}; do
	IUSE="${IUSE} linguas_${X}"
done

DEPEND="dev-qt/qtgui:4"
RDEPEND="${DEPEND}"

src_prepare() {
	for X in ${LANGS}; do
		use linguas_${X%_*} && lrelease "src/locale/${X}.ts"
	done
	for X in ${LANGSLONG}; do
		use linguas_${X} && lrelease "src/locale/${X}.ts"
	done

	S="${S}/src"
}

src_install() {
	cmake-utils_src_install

	# prevent install of empty dir
	rmdir "${D}/usr/share/${PN}/locale" 2>/dev/null

	cd ..
	dodoc ChangeLog HACKING README
	if use doc; then
		insinto /usr/share/doc/${PF}
		doins doc/*.pdf
	fi
}