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

EAPI=4

inherit eutils cmake-utils

DESCRIPTION="A fast and usable calculator for power users"
HOMEPAGE="https://code.google.com/p/speedcrunch/"
SRC_URI="https://speedcrunch.googlecode.com/files/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
IUSE="doc"

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

LANGS="ca cs de en es es_AR eu fi fr he id it nb nl no pl
	pt pt_BR ro ru sv tr zh_CN"
for lang in ${LANGS}; do
	IUSE="${IUSE} linguas_${lang}"
done

S="${WORKDIR}/${P}/src"

src_prepare( ) {
	epatch "${FILESDIR}"/${P}-iconname.patch
	# regenerate translations
	lrelease speedcrunch.pro || die
	local lang
	for lang in ${LANGS}; do
		if ! use linguas_${lang}; then
			sed -i -e "s:i18n/${lang}\.qm::" Translations.cmake || die
			sed -i -e "s:books/${lang}::" CMakeLists.txt || die
		fi
	done
}

src_install() {
	cmake-utils_src_install
	cd ..
	dodoc ChangeLog ChangeLog.floatnum HACKING.txt LISEZMOI README TRANSLATORS
	use doc && dodoc doc/*.pdf
}