summaryrefslogtreecommitdiff
blob: 6aa784d8d123dde2317eb037bfe20ed61a39d499 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/kde-misc/filelight/filelight-1.0-r1.ebuild,v 1.1 2008/06/29 16:05:23 carlo Exp $

ARTS_REQUIRED="never"

inherit kde

P_I18N="${P}-i18n-20070422"

DESCRIPTION="Filelight creates an interactive map of concentric, segmented rings that help visualise disk usage."
HOMEPAGE="http://www.methylblue.com/filelight/"
SRC_URI="http://www.methylblue.com/filelight/packages/${P}.tar.bz2
		http://www.methylblue.com/filelight/packages/${P_I18N}.tar.bz2"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
IUSE=""

DEPEND="!kde-misc/filelight-i18n"
RDEPEND="x11-apps/xdpyinfo"

need-kde 3.5

LANGS="az bg br ca cs cy da de el en_GB es et fr ga gl is it ja ka lt nb nl pl pt pt_BR ro ru rw sr sr@Latn sv ta tr uk"
LANGS_DOC="da es et it pt ru sv"

for lang in ${LANGS}; do
	IUSE="${IUSE} linguas_${lang}"
done

PATCHES=( "${FILESDIR}/filelight-1.0-desktop-entry-fix.diff" )

src_unpack() {
	kde_src_unpack
	rm "${S}"/configure "${WORKDIR}/${P_I18N}"/configure

	local sanitised_linguas=$(printf "${LINGUAS}" | tr '[[:space:]]' '\n' | sort | uniq)

	local MAKE_PO=$(printf "${sanitised_linguas} ${LANGS}" |  tr '[[:space:]]' '\n' | sort | uniq -d | tr '\n' ' ')
	einfo "Installing translations for: ${MAKE_PO}"
	sed -i -e "s:^SUBDIRS =.*:SUBDIRS = . ${MAKE_PO}:" "${WORKDIR}/${P_I18N}/po/Makefile.am" || die "sed for locale failed"

	local MAKE_DOC=$(echo "${sanitised_linguas} ${LANGS_DOC}" |  tr '[[:space:]]' '\n' | sort | uniq -d | tr '\n' ' ')
	sed -i -e "s:^SUBDIRS =.*:SUBDIRS = filelight ${MAKE_DOC}:" "${WORKDIR}/${P_I18N}/doc/Makefile.am" || die "sed for locale (docs) failed"
}

src_compile() {
	kde_src_compile
	KDE_S="${WORKDIR}/${P_I18N}"
	kde_src_compile
}

src_install() {
	kde_src_install
	KDE_S=""
	kde_src_install
}