summaryrefslogtreecommitdiff
blob: 8ab633f80be2e974dfd705334ca7370df283677d (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-visualization/zhu3d/zhu3d-4.2.2.ebuild,v 1.1 2009/06/22 08:06:04 bicatali Exp $

EAPI=2

inherit eutils qt4

DESCRIPTION="Interactive 3D mathematical function viewer"
HOMEPAGE="http://sourceforge.net/projects/zhu3d"
LICENSE="GPL-2"
SRC_URI="mirror://sourceforge/${PN}/${P}.zip"

IUSE=""

KEYWORDS="~amd64 ~x86"
SLOT="0"

RDEPEND="|| ( ( x11-libs/qt-gui:4 x11-libs/qt-opengl:4 )
		x11-libs/qt:4[opengl] )
	virtual/glu"
DEPEND="${RDEPEND}
	app-arch/unzip"

src_prepare() {
	local datadir=/usr/share/${PN}
	sed -i \
		-e "s:^SYSDIR=:SYSDIR=${datadir}/system:" \
		-e "s:^TEXDIR=:TEXDIR=${datadir}/textures:" \
		-e "s:^WORKDIR=:WORKDIR=${datadir}/work:" \
		-e "s:^DOCDIR=:WORKDIR=/usr/share/doc/${PF}/html:" \
		${PN}.pri || die "sed zhu3d.pri failed"
	sed -i -e '/QMAKE_C/d' ${PN}.pro || die "sed zhu3d.pro for flags failed"
}

src_configure() {
	eqmake4
}

src_install() {
	# not working: emake install INSTALL_ROOT="${D}" || die
	dobin zhu3d || die

	dodoc {readme,src/changelog}.txt || die
	dohtml doc/* || die

	insinto /usr/share/${PN}
	rm -f system/languages/*.ts
	doins -r work system || die

	doicon system/icons/${PN}.png || die
	make_desktop_entry ${PN} "Zhu3D Function Viewer" ${PN} "Education;Science;Math;Qt"
}