blob: 3ed94ae9724c1a81fb06f90ee89c423469b383ca (
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
76
77
78
|
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-visualization/zhu3d/zhu3d-4.2.6.ebuild,v 1.1 2013/06/14 20:52:35 bicatali Exp $
EAPI=5
LANGS="cs de es fr zh"
inherit eutils qt4-r2
DESCRIPTION="Interactive 3D mathematical function viewer"
HOMEPAGE="http://sourceforge.net/projects/zhu3d"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE=""
DEPEND="
virtual/glu
virtual/opengl
dev-qt/qtcore:4
dev-qt/qtgui:4
dev-qt/qtopengl:4"
RDEPEND="${DEPEND}"
PATCHES=( "${FILESDIR}"/${PN}-4.2.4-gold.patch )
src_prepare() {
qt4-r2_src_prepare
local datadir=/usr/share/${PN}
sed \
-e "s:^SYSDIR=:SYSDIR=${datadir}/system:" \
-e "s:^TEXDIR=:TEXDIR=${datadir}/textures:" \
-e "s:^WORKDIR=:WORKDIR=${datadir}/work:" \
-e "s:^DOCDIR=:DOCDIR=/usr/share/doc/${PF}/html:" \
-i ${PN}.pri || die "sed zhu3d.pri failed"
sed \
-e "/# Optimisation/,/# Include/d" \
-i zhu3d.pro || die "optimisation sed failed"
}
src_install() {
# not working: emake install INSTALL_ROOT="${D}" || die
dobin zhu3d
dodoc {readme,src/changelog}.txt
dohtml doc/*.png doc/${PN}_en.html
local lang
for lang in ${LANGS} ; do
if use linguas_${lang} ; then
insinto /usr/share/${PN}/system/languages
doins system/languages/${PN}_${lang}.qm
if [ -e doc/${PN}_${lang}.html ] ; then
dohtml doc/${PN}_${lang}.html
fi
fi
done
insinto /usr/share/${PN}
doins -r work/textures
insinto /usr/share/${PN}/work
doins -r work/*.zhu work/slideshow
insinto /usr/share/${PN}/system
doins -r system/*.zhu system/icons
doicon system/icons/${PN}.png
make_desktop_entry ${PN} "Zhu3D Function Viewer" \
${PN} "Education;Science;Math;Qt"
}
|