summaryrefslogtreecommitdiff
blob: a424245d30bdbc01c61c54e3afed49e4bbb0567b (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="tk"

inherit python-single-r1

DESCRIPTION="Decomposition-based analysis of NMR projections"
HOMEPAGE="http://www.lundberg.gu.se/nmr/software.php?program=PRODECOMP"
SRC_URI="mirror://gentoo/${P}.tar.bz2"

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

RDEPEND="sci-libs/scipy[${PYTHON_USEDEP}]"
DEPEND=""

S="${WORKDIR}"/NMRProjAnalys

src_install() {
	python_export
	if use examples; then
		insinto /usr/share/${PN}
		doins -r ExampleData Results
	fi

	dodoc ProjTools/Manual.pdf
	rm -rf ProjTools/Manual.pdf ProdecompOutput || die

	python_moduleinto ${PN}
	python_domodule ProjTools/.
	python_optimize

	cat >> "${T}"/${PN} <<- EOF
	#!/bin/bash
	${PYTHON} -O $(python_get_sitedir)/${PN}/ProjAnalys.py \$@
	EOF
	dobin "${T}"/${PN}

	dosym ../../../../share/doc/${PF}/Manual.pdf "${PYTHON_SITEDIR##${EPREFIX}}"/${PN}/Manual.pdf
}