summaryrefslogtreecommitdiff
blob: bb79a48df6b948bf2f0189350b06741cbeac377a (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
79
80
81
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-visualization/scidavis/scidavis-0.2.3.ebuild,v 1.7 2010/10/10 17:27:25 jlec Exp $

EAPI=2
inherit eutils qt4 fdo-mime

DESCRIPTION="Scientific Data Analysis and Visualization"
HOMEPAGE="http://scidavis.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"

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

LANGS="de es fr ja ru sv"
for l in ${LANGS}; do
	IUSE="${IUSE} linguas_${l}"
done

CDEPEND="sys-libs/zlib
	>=x11-libs/qwt-5.1[svg]
	>=x11-libs/qwtplot3d-0.2.7
	|| ( >=x11-libs/qt-assistant-4.7.0:4[compat] <x11-libs/qt-assistant-4.7.0:4 )
	x11-libs/qt-qt3support:4
	>=dev-cpp/muParser-1.30
	>=sci-libs/gsl-1.8"
# remove because unsupported for now
#	sci-libs/liborigin:2"

DEPEND="${CDEPEND}
	dev-util/pkgconfig
	>=dev-python/sip-4.7"

RDEPEND="${CDEPEND}
	>=dev-python/PyQt4-4.4[X]
	dev-python/pygsl
	sci-libs/scipy"

src_prepare() {
	epatch "${FILESDIR}"/${P}-profile.patch
	epatch "${FILESDIR}"/${P}-sip49.patch
	sed -i -e '/lgsl/d' fitPlugins/*/*.pro || die "sed gsl link failed"
	sed -i \
		-e "s:doc/${PN}:doc/${PF}:g" \
		${PN}/${PN}.pro || die "sed doc dir failed"
	# the libsuff thingy does not work
	sed -i \
		-e "s|/usr/lib\$\${libsuff}|/usr/$(get_libdir)|g" \
		-i fit*/*/*.pro || die "sed plugins failed"

	sed -i \
		-e '/^include( python.pri )$/d' \
		${PN}/${PN}.pro || die "sed python failed"
}

src_configure() {
	eqmake4
}

src_install() {
	emake INSTALL_ROOT="${D}" install || die 'emake install failed'
	dodoc README CHANGES
	doicon scidavis/icons/hicolor-48/scidavis.png
	cd ${PN}/translations
	insinto /usr/share/${PN}/translations
	for l in ${LANGS}; do
		if use linguas_${l}; then
			doins ${PN}_${l}.qm
		fi
	done
}

pkg_postinst() {
	fdo-mime_desktop_database_update
}

pkg_postrm() {
	fdo-mime_desktop_database_update
}