summaryrefslogtreecommitdiff
blob: d19739f4a34f1c05a3925cf49efa23b84a2452b0 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/monkeystudio/monkeystudio-1.9.0.2.ebuild,v 1.1 2012/07/03 17:20:33 kensington Exp $

EAPI=4
LANGS="be es fr ru"

inherit qt4-r2

MY_P="mks_${PV}-src"

DESCRIPTION="A cross platform Qt 4 IDE"
HOMEPAGE="http://www.monkeystudio.org"
SRC_URI="http://${PN}.googlecode.com/files/${MY_P}.tar.gz"

KEYWORDS="~amd64 ~x86"
LICENSE="GPL-2 LGPL-3"
SLOT="0"
IUSE="doc plugins"

RDEPEND="plugins? ( >=x11-libs/qt-webkit-4.7.0:4 )
	>=x11-libs/qt-assistant-4.7.0:4
	>=x11-libs/qt-core-4.7.0:4
	>=x11-libs/qt-gui-4.7.0:4
	>=x11-libs/qt-sql-4.7.0:4
	x11-libs/qscintilla"
DEPEND="${RDEPEND}
	doc? ( >=app-doc/doxygen-1.5.8 )"

DOCS="ChangeLog readme.txt"

S=${WORKDIR}/${MY_P}

src_prepare() {
	# avoid installing every translation
	sed -e "s:datas/\*:datas/apis datas/scripts datas/templates:" \
		-i installs.pri || die "sed installs.pri failed"

	rm -r qscintilla/QScintilla-gpl-snapshot \
		|| die "failed removing bundled qscintilla"

	qt4-r2_src_prepare
}

src_configure() {
	eqmake4 build.pro prefix=/usr system_qscintilla=1

	if use plugins ; then
		eqmake4 plugins/plugins.pro
	fi
}

src_install() {
	qt4-r2_src_install

	if use plugins ; then
		insinto /usr/lib64/monkeystudio
		doins -r bin/plugins/*
	fi

	insinto /usr/share/${PN}/translations
	local lang
	for lang in ${LANGS} ; do
		if use linguas_${lang} ; then
			doins datas/translations/monkeystudio_${lang}.qm
		fi
	done

	fperms 755 /usr/bin/${PN}

	if use doc ; then
		doxygen || die "doxygen failed"
		dohtml -r doc/html/*
	fi
}