aboutsummaryrefslogtreecommitdiff
blob: 5429531acb41b398eb4f8f6ccf7dbc5c50d4d63f (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

inherit multilib

DESCRIPTION="Linear and non-linear least squares fitting"
HOMEPAGE="http://cpmcnet.columbia.edu/dept/gsas/biochem/labs/palmer/software/curvefit.html"
SRC_URI="http://cpmcnet.columbia.edu/dept/gsas/biochem/labs/palmer/software/curvefit.linux.tar.gz"

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

RDEPEND="
	sci-libs/blas-reference
	sys-devel/gcc:4.1"
DEPEND="dev-util/patchelf"

S="${WORKDIR}"/linux

QA_PREBUILT="opt/bin/.*"

src_install() {
	local _exe
	sed \
		-e 's: xmgr : xmgrace :g' \
		-e "s: /bin/ls:${EPREFIX}/bin/ls:g" \
		-i batch_curve curveplot || die

	exeinto /opt/bin
	if use x86; then
		_exe=./linux_32/curvefit
	elif use amd64; then
		_exe=./linux_64/curvefit
	fi

	patchelf --set-rpath "${EPREFIX}/opt/${PN}:${EPREFIX}/usr/$(get_libdir)/gcc/x86_64-pc-linux-gnu/4.1.2/" ${_exe}

	doexe batch_curve curveplot ${_exe}

	dosym ../../usr/$(get_libdir)/libblas.so /opt/${PN}/libblas.so.3

	dodoc Versions
	dohtml curvefit_manual.html

	if use examples; then
		insinto /usr/share/${PN}/examples/
		doins sample*
	fi
}